IncentiveRule

public struct IncentiveRule : Codable, Sendable

Card incentive model.

  • A unique id that identifies this rule.

    Declaration

    Swift

    public let ruleUuid: String
  • Product id of the rule.

    Declaration

    Swift

    public let externalId: String
  • Type of incentive.

    Declaration

    Swift

    public let incentiveTypeString: String?
  • Type of incentive. Check incentiveTypeString if nil.

    Declaration

    Swift

    public var incentiveType: IncentiveType? { get }
  • Type of incentive.

    Declaration

    Swift

    public let transactionTypeString: String
  • Type of incentive. Check transactionTypeString if nil.

    Declaration

    Swift

    public var transactionType: TransactionType? { get }
  • A description of the incentive rule.

    Declaration

    Swift

    public let incentiveDescription: String
  • To which entities this rule apply.

    Declaration

    Swift

    public let scopeString: String
  • To which entities this rule apply. Check scopeString if nil.

    Declaration

    Swift

    public var scope: IncentiveScope? { get }
  • Use this incentive value type if you want a percentage to be applied on the total amount of the transaction.

    Declaration

    Swift

    public let value: ServiceFeeValue
  • Merchants to which the incentive rule apply.

    Declaration

    Swift

    public let merchants: Merchants?
  • Rules to expire the rule.

    Declaration

    Swift

    public let expirationRules: IncentiveExpirationRules?
  • A unique id that identifies this rule.

    Declaration

    Swift

    public let createdAt: String
  • A unique id that identifies this rule.

    Declaration

    Swift

    public let updatedAt: String
  • Auxiliary constructor

    Declaration

    Swift

    public init(
        ruleUuid: String,
        externalId: String,
        incentiveType: IncentiveType,
        transactionType: TransactionType,
        incentiveDescription: String,
        scope: IncentiveScope,
        value: ServiceFeeValue,
        createAt: String,
        updatedAt: String,
        merchants: Merchants? = nil,
        expirationRules: IncentiveExpirationRules? = nil)

    Parameters

    ruleUuid

    A unique id that identifies this rule.

    externalId

    Product id of the rule.

    incentiveType

    Type of incentive.

    transactionType

    Type of incentive.

    incentiveDescription

    A description of the incentive rule.

    scope

    To which entities this rule apply.

    value

    Use this incentive value type if you want a percentage to be applied on the total amount of the transaction.

    merchants

    Merchants to which the incentive rule apply.

    expirationRules

    Rules to expire the rule.

    createdAt

    The date the rule was created in the system.

    updatedAt

    The date the rule was last updated in the system.