ApplePayCartSummaryItem.recurring constructor

  1. @JsonSerializable(explicitToJson: true)
  2. @FreezedUnionValue('Recurring')
const ApplePayCartSummaryItem.recurring({
  1. required String label,
  2. required String amount,
  3. required ApplePayIntervalUnit intervalUnit,
  4. required int intervalCount,
  5. int? startDate,
  6. int? number,
})

Use this type for payments that occur more than once, such as a subscription. Only available on iOS 15 and up, otherwise falls back to ImmediateCartSummaryItem

Implementation

@JsonSerializable(explicitToJson: true)
@FreezedUnionValue('Recurring')

///  Use this type for payments that occur more than once, such as a subscription. Only available on iOS 15 and up, otherwise falls back to ImmediateCartSummaryItem
const factory ApplePayCartSummaryItem.recurring({
  /// Short localized description of the item.
  required String label,

  /// The monetary amount.
  required String amount,

  /// The amount of time – in calendar units such as day, month, or year – that represents a fraction of the total payment interval. For example, if you set the intervalUnit to 'month' and intervalCount to 3, then the payment interval is three months.
  required ApplePayIntervalUnit intervalUnit,

  /// The number of interval units that make up the total payment interval. For example, if you set the intervalUnit to 'month' and intervalCount to 3, then the payment interval is three months.
  required int intervalCount,

  /// The unix timestamp of the start date. Measured in seconds.
  int? startDate,
  ////The unix timestamp of the end date. Measured in seconds. */
  int? number,
}) = RecurringCartSummaryItem;