FTLCampaignView
Immutable representation of a FTLoyalty Campaign
Contents
id
name
campaignDescription
campaignType
creationStamp
currency
rewardRatio
glyph
balance
balanceDouble
cumulative
cumulativeDouble
description
firstTransaction
lastTransaction
lastTransactionPoints
lastTransactionPointsDouble
lastRedemption
lastRedemptionPoints
lastRedemptionPointsDouble
transactions
promotionViews
rewardViews
final public class FTLCampaignView : ModelComforming
id
public let id : String
Campaign identifier
name
public let name : String
Campaign name
campaignDescription
public let campaignDescription : String
Campaign description
campaignType
public let campaignType : FTLCampaignType
Campaign type (points, card, etc)
creationStamp
public var creationStamp : String
Creation stamp (date string)
currency
public var currency : String
Current symbol
rewardRatio
public var rewardRatio : Double
Reward multiplier
glyph
public var glyph : String?
Currency symbol
balance
public var balance : String
Campaign balance as string
balanceDouble
public var balanceDouble : Double
Double value of campaign balance
cumulative
public var cumulative : String
Cumulative value of the balances in the campaign
cumulativeDouble
public var cumulativeDouble : Double
Double value of the balances in the campaign
description
public var description : String
Extended Reward Description
firstTransaction
public var firstTransaction : String
First transaction recorded in the campaign for the containing customer
lastTransaction
public var lastTransaction : String
Last transaction recorded in the campaign for the containing customer
lastTransactionPoints
public var lastTransactionPoints : String
Points of the last transaction executed in the campaign for the containing customer, as a String
lastTransactionPointsDouble
public var lastTransactionPointsDouble : Double
Points of the last transaction executed in the campaign for the containing customer, as a Double
lastRedemption
public var lastRedemption : String
Date of the lastRedemption executed in the campaign for the containing customer, as a String
lastRedemptionPoints
public var lastRedemptionPoints: String
String value of the last redeemed points
lastRedemptionPointsDouble
public var lastRedemptionPointsDouble : Double
Double value of the last redeemed points
transactions
public var transactions = [FTLTransactionView]()
Transactions executed in the campaign
promotionViews
public var promotionViews : [FTLPromotionView]
promotions available in the campaign
rewardViews
public var rewardViews : [FTLRewardView]
Rewards available for the campaign
FTLCustomer
Entity representing a FTLoyalty end user Customer.
Contents
id
customerUsername
cardNumber
name
lastname
email
description
campaignSet
campaignViews
public class FTLCustomer : ModelComforming
id
public var id : String
Unique customer identifier within FTPay
customerUsername
public var customerUsername : String
Customer crendetial used for login (alphanumeric username, email, phone, etc)
cardNumber
public var cardNumber : String
Customer card number, used for promotions & rewards
name
public var name : String
Customer’s first name
lastname
public var lastname : String
Customer’s last name
email
public var email : String
Customer email
description
public var description: String
Custom Customer description (human readable)
campaignSet
public var campaignSet : Set<FTLCampaignView>
Campaigns set the customer is a part of (read-only)
campaignViews
public var campaignViews : [FTLCampaignView]
Campaigns array the customer is part of (read-only)
FTLPromotionView
Entity representing a Loyalty Campaign Promotion
Contents
campaignId
id
customIdentifier
promotionDescription
operand
startDateString
endDateString
value
startDate
endDate
valueDouble
description
final public class FTLPromotionView : ModelComforming
campaignId
public var campaignId : String
Identifier of the campaign the promotion corresponds to
id
public let id : String
Unique promotion Identifier
customIdentifier
public let customIdentifier : String
Custom promotion Identifier
- TODO: Request more information
promotionDescription
public let promotionDescription : String
promotion description as created on the FTPay portal
operand
public let operand : String
String representing whether the promotion, adds, substract or multiplies a campaign balance
startDateString
public let startDateString : String
Start date of the promotion, as a String
endDateString
public let endDateString : String
End date of the promotion, as a String
value
public let value : String
Value of the promotion, as a String
startDate
public var startDate : Date?
Start date of the promotion, as a Date
- Remark: Will return a date from Distant past if dateString is unparsable as a Date (01-01,0001)
endDate
public var endDate : Date?
End date of the promotion, as a Date
- Remark: Will return a date from Distant past if dateString is unparsable as a Date (01-01,0001)
valueDouble
public var valueDouble : Double
Value of the promotion, as a double
description
public var description: String
Extended human-readable description
FTLRewardView
Entity representing a Loyalty Campaign Reward
Contents
id
level
levelDouble
rewardDescription
rewardId
description
public final class FTLRewardView : ModelComforming
id
public let id : String
Rewards Unique Identifier
level
public let level : String
- Todo: REQUEST INFORMATION
levelDouble
public var levelDouble : Double
- Todo: REQUEST INFORMATION
rewardDescription
public let rewardDescription: String
Reward description as set on FTPay portal
rewardId
public let rewardId : String?
Identifier String used for third party integration
description
public var description: String
Extended human-readable description
FTLTransactionView
Entity representing a transaction executed against a Loyalty Campaign
Contents
redeemed
id
amount
serviceProduct
campaignIdentifier
originalAmount
authorization
real
dateString
date
amountDouble
originalAmountDouble
description
final public class FTLTransactionView : ModelComforming
redeemed
public let redeemed : Bool
Whether the trascantion was executed
- TODO: REQUEST FURTHER INFO
id
public let id : String
Unique transaction identifier
amount
public let amount : String
The amount of the transaction, as a String
serviceProduct
public let serviceProduct : String
The service or product the transaction corresponds to
campaignIdentifier
public let campaignIdentifier : String
Identifier of the campaign the transaction was executed against
originalAmount
public let originalAmount : String
- TODO: REQUEST FURTHER INFO
authorization
public let authorization : String
- TODO: REQUEST FURTHER INFO
real
public let real : Bool
Whether the charge is a real or simulated one
- TODO: REQUEST FURTHER INFO
dateString
public let dateString : String
Date the transaction was recorded, as a String
date
public var date : Date
Date the transaction was recorded, as a Date
- Remark: Will return a date from Distant past if dateString is unparsable as a Date (01-01,0001)
amountDouble
public var amountDouble : Double
Amount of the transaction, as a Double
originalAmountDouble
public var originalAmountDouble : Double
- TODO: REQUEST FURTHER INFO
description
public var description: String
Extended human-readable description
FTLCampaignBonus
Object used to grant customer points for a given campaign at registration time
Contents
points
campaignId
authorization
init(campaignId:points:authorization:)
public struct FTLCampaignBonus
points
public let points : Int
Points to grant to given campaign
campaignId
public let campaignId : String
Campaign id to grant points to at registration
authorization
public let authorization : String
Authorization string
init(campaignId:points:authorization:)
public init(campaignId : String, points : Int, authorization : String)