InPlayerVoucher

public struct InPlayerVoucher : Codable

Voucher model

  • id

    Brand id

    Declaration

    Swift

    public let id: Int?
  • Voucher name

    Declaration

    Swift

    public let name: String?
  • Discount amount in percentage [1..100]

    Declaration

    Swift

    public let discount: Int?
  • Discount amount in percentage on rebill [1..100]

    Declaration

    Swift

    public let rebillDiscount: Int?
  • Voucher is valid from this date forward

    Declaration

    Swift

    public let startDate: Double?
  • Voucher validation ends on this date

    Declaration

    Swift

    public let endDate: Double?
  • Code provided by the merchant instead of generating it automatically

    Declaration

    Swift

    public let code: String?
  • Limit the number of times for voucher usage

    Declaration

    Swift

    public let usageLimit: Int?
  • Number of times voucher was used

    Declaration

    Swift

    public let usageCounter: Int?
  • Enum: once repeating forever. In case this voucher is used for a subscription, you can use a discount period for the recurrent payments

    Declaration

    Swift

    public let discountPeriod: String?
  • In case the discountPeriod is repeating this field is required, for number of months to repeat the discount

    Declaration

    Swift

    public let discountDuration: Int?
  • Decoder method

    Declaration

    Swift

    public init(from decoder: Decoder) throws
  • Encoder method

    Declaration

    Swift

    public func encode(to encoder: Encoder) throws