public class ApplePromotionalOffer
- Object
- ApplePromotionalOffer
ImplementsPromotionalOffer
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.
Constructors
public ApplePromotionalOffer() |
Methods
public String getOfferIdentifier() | A string used to uniquely identify a discount offer for a product. |
public void setOfferIdentifier(String offerIdentifier) | A string used to uniquely identify a discount offer for a product. |
public String getKeyIdentifier() | A string that identifies the key used to generate the signature. |
public void setKeyIdentifier(String keyIdentifier) | A string that identifies the key used to generate the signature. |
public String getNonce() | A universally unique ID (UUID) value that you define. |
public void setNonce(String nonce) | A universally unique ID (UUID) value that you define. |
public String getSignature() | A string representing the properties of a specific promotional offer, cryptographically signed. |
public void setSignature(String signature) | A string representing the properties of a specific promotional offer, cryptographically signed. |
public long getTimestamp() | The date and time of the signature’s creation in milliseconds, formatted in Unix epoch time. |
public void setTimestamp(long timestamp) | The date and time of the signature’s creation in milliseconds, formatted in Unix epoch time. |
Inherited methods
Constructor details
ApplePromotionalOffer
public ApplePromotionalOffer()Method details
getOfferIdentifier
public String getOfferIdentifier()A string used to uniquely identify a discount offer for a product.
See Apple docs.
Returns
setOfferIdentifier
public void setOfferIdentifier(String offerIdentifier)Parameters
offerIdentifierStringThe offer identifier.
See Apple docs.
getKeyIdentifier
public String getKeyIdentifier()A string that identifies the key used to generate the signature.
See Apple’s docs.
Returns
setKeyIdentifier
public void setKeyIdentifier(String keyIdentifier)Parameters
keyIdentifierStringThe key identifier.
See Apple’s docs.
getNonce
public String getNonce()A universally unique ID (UUID) value that you define. (As a string).
See Apple’s docs.
Returns
setNonce
public void setNonce(String nonce)A universally unique ID (UUID) value that you define. (As a string).
See Apple’s docs.
Parameters
nonceString- The nonce
getSignature
public String getSignature()A string representing the properties of a specific promotional offer, cryptographically signed.
See Apple’s docs
Returns
setSignature
public void setSignature(String signature)A string representing the properties of a specific promotional offer, cryptographically signed.
See Apple’s docs
Parameters
signatureString- The signature.
getTimestamp
public long getTimestamp()Returns
setTimestamp
public void setTimestamp(long timestamp)Parameters
timestamplong- The timestamp.