Class ApplePromotionalOffer
- All Implemented Interfaces:
PromotionalOffer
Encapsulates a promotional offer for use with in-app-purchase in Apple's App store. This mirrors the information required to construct a SKPaymentDiscount object.
See Apple's documentation for implementing promotional offers.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionA string that identifies the key used to generate the signature.getNonce()A universally unique ID (UUID) value that you define.A string used to uniquely identify a discount offer for a product.A string representing the properties of a specific promotional offer, cryptographically signed.longThe date and time of the signature's creation in milliseconds, formatted in Unix epoch time.voidsetKeyIdentifier(String keyIdentifier) A string that identifies the key used to generate the signature.voidA universally unique ID (UUID) value that you define.voidsetOfferIdentifier(String offerIdentifier) A string used to uniquely identify a discount offer for a product.voidsetSignature(String signature) A string representing the properties of a specific promotional offer, cryptographically signed.voidsetTimestamp(long timestamp) The date and time of the signature's creation in milliseconds, formatted in Unix epoch time.
-
Constructor Details
-
ApplePromotionalOffer
public ApplePromotionalOffer()
-
-
Method Details
-
getOfferIdentifier
A string used to uniquely identify a discount offer for a product.
See Apple docs.
Returns
The offer identifier.
-
setOfferIdentifier
A string used to uniquely identify a discount offer for a product.
Parameters
offerIdentifier: @param offerIdentifier The offer identifier.
See Apple docs.
-
getKeyIdentifier
A string that identifies the key used to generate the signature.
See Apple's docs.
Returns
The key identifier.
-
setKeyIdentifier
A string that identifies the key used to generate the signature.
Parameters
keyIdentifier: @param keyIdentifier The key identifier.
See Apple's docs.
-
getNonce
A universally unique ID (UUID) value that you define. (As a string).
See Apple's docs.
Returns
The nonce
-
setNonce
A universally unique ID (UUID) value that you define. (As a string).
See Apple's docs.
Parameters
nonce: The nonce
-
getSignature
A string representing the properties of a specific promotional offer, cryptographically signed.
See Apple's docs
Returns
The signature.
-
setSignature
A string representing the properties of a specific promotional offer, cryptographically signed.
See Apple's docs
Parameters
signature: The signature.
-
getTimestamp
public long getTimestamp()The date and time of the signature's creation in milliseconds, formatted in Unix epoch time.
Returns
The timestamp
-
setTimestamp
public void setTimestamp(long timestamp) The date and time of the signature's creation in milliseconds, formatted in Unix epoch time.
Parameters
timestamp: The timestamp.
-