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
incentiveTypeStringifnil.Declaration
Swift
public var incentiveType: IncentiveType? { get } -
Type of incentive.
Declaration
Swift
public let transactionTypeString: String -
Type of incentive. Check
transactionTypeStringifnil.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
scopeStringifnil.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 -
init(ruleUuid:externalId: incentiveType: transactionType: incentiveDescription: scope: value: createAt: updatedAt: merchants: expirationRules: ) 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
ruleUuidA unique id that identifies this rule.
externalIdProduct id of the rule.
incentiveTypeType of incentive.
transactionTypeType of incentive.
incentiveDescriptionA description of the incentive rule.
scopeTo which entities this rule apply.
valueUse this incentive value type if you want a percentage to be applied on the total amount of the transaction.
merchantsMerchants to which the incentive rule apply.
expirationRulesRules to expire the rule.
createdAtThe date the rule was created in the system.
updatedAtThe date the rule was last updated in the system.
View on GitHub