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. @Deprecated('Use periodUnit property of type PeriodUnit instead.') @JsonKey(name: 'periodUnit') String introPricePeriodUnit,
  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,

  /// String representation of unit for the billing period of the introductory
  /// price, can be DAY, WEEK, MONTH or YEAR.
  @Deprecated('Use periodUnit property of type PeriodUnit instead.')
  @JsonKey(name: 'periodUnit')
      String introPricePeriodUnit,

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