IntroductoryPrice constructor

const IntroductoryPrice(
  1. @JsonKey(name: 'price') double price,
  2. @JsonKey(name: 'priceString') String priceString,
  3. @JsonKey(name: 'period') String period,
  4. @JsonKey(name: 'cycles') int cycles,
  5. @JsonKey(name: 'periodUnit', unknownEnumValue: PeriodUnit.unknown) PeriodUnit periodUnit,
  6. @JsonKey(name: 'periodNumberOfUnits') int periodNumberOfUnits,
)

Implementation

const factory IntroductoryPrice(
  /// Introductory price of a subscription in the local currency.
  @JsonKey(name: 'price') double price,

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

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

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

  /// Unit for the billing period of the introductory price, can be DAY, WEEK,
  /// MONTH or YEAR.
  @JsonKey(name: 'periodUnit', unknownEnumValue: PeriodUnit.unknown)
      PeriodUnit periodUnit,

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