PromotionalOffer constructor

const PromotionalOffer(
  1. @JsonKey(name: 'identifier') String identifier,
  2. @JsonKey(name: 'keyIdentifier') String keyIdentifier,
  3. @JsonKey(name: 'nonce') String nonce,
  4. @JsonKey(name: 'signature') String signature,
  5. @JsonKey(name: 'timestamp') int timestamp,
)

Implementation

const factory PromotionalOffer(
  /// Identifier agreed upon with the App Store for a discount of your choosing.
  @JsonKey(name: 'identifier') String identifier,

  /// The identifier of the public/private key pair agreed upon with the
  /// App Store when the keys were generated.
  @JsonKey(name: 'keyIdentifier') String keyIdentifier,

  /// One-time use random entropy-adding value for security.
  @JsonKey(name: 'nonce') String nonce,

  /// The cryptographic signature generated by your private key.
  @JsonKey(name: 'signature') String signature,

  /// Timestamp of when the signature is created.
  @JsonKey(name: 'timestamp') int timestamp,
) = _PromotionalOffer;