StoreProductDiscount constructor

const StoreProductDiscount(
  1. @JsonKey(name: 'identifier') String identifier,
  2. @JsonKey(name: 'price') double price,
  3. @JsonKey(name: 'priceString') String priceString,
  4. @JsonKey(name: 'cycles') int cycles,
  5. @JsonKey(name: 'period') String period,
  6. @JsonKey(name: 'periodUnit') String periodUnit,
  7. @JsonKey(name: 'periodNumberOfUnits') int periodNumberOfUnits,
)

Implementation

const factory StoreProductDiscount(
  /// Identifier of the discount.
  @JsonKey(name: 'identifier') String identifier,

  /// Identifier of the discount.
  @JsonKey(name: 'price') double price,

  /// Formatted price, including its currency sign, such as €3.99.
  @JsonKey(name: 'priceString') String priceString,

  /// Number of subscription billing periods for which the user will be given the discount, such as 3.
  @JsonKey(name: 'cycles') int cycles,

  /// Billing period of the discount, specified in ISO 8601 format.
  @JsonKey(name: 'period') String period,

  /// Unit for the billing period of the discount, can be DAY, WEEK, MONTH or YEAR.
  @JsonKey(name: 'periodUnit') String periodUnit,

  /// Number of units for the billing period of the discount.
  @JsonKey(name: 'periodNumberOfUnits') int periodNumberOfUnits,
) = _StoreProductDiscount;