appstoreserverlibrary.promotional_offer module¶
- class appstoreserverlibrary.promotional_offer.PromotionalOfferSignatureCreator(signing_key: bytes, key_id: str, bundle_id: str)[source]¶
Bases:
object
- create_signature(product_identifier: str, subscription_offer_id: str, application_username: str, nonce: UUID, timestamp: int)[source]¶
Return the Base64 encoded signature
- Parameters:
product_identifier – The subscription product identifier
subscription_offer_id – The subscription discount identifier
application_username – An optional string value that you define; may be an empty string
nonce – A one-time UUID value that your server generates. Generate a new nonce for every signature.
timestamp – A timestamp your server generates in UNIX time format, in milliseconds. The timestamp keeps the offer active for 24 hours.
- Returns:
The Base64 encoded signature