MPTransactionAttributes Class Reference
Inherits from | NSObject |
---|---|
Conforms to | NSCopying NSSecureCoding |
Declared in | MPTransactionAttributes.h |
Overview
This class represents the atributes of a commerce event transaction. It is used in conjunction with MPCommerceEvent to represent a commerce event transaction.
Usage:
Swift
let transactionAttributes = MPTransactionAttributes()
transactionAttributes.transactionId = "abc987"
transactionAttributes.revenue = 31.41
transactionAttributes.tax = 2.51
transactionAttributes.affiliation = "Awesome Company, Inc."
Objective-C
MPTransactionAttributes *transactionAttributes = [[MPTransactionAttributes alloc] init];
transactionAttributes.transactionId = @"abc987";
transactionAttributes.revenue = @31.41;
transactionAttributes.tax = @2.51;
transactionAttributes.affiliation = @"Awesome Company, Inc.";
affiliation
A string describing the affiliation.
@property (nonatomic, strong, nullable) NSString *affiliation
Discussion
A string describing the affiliation.
Declared In
MPTransactionAttributes.h
couponCode
The coupon code string.
@property (nonatomic, strong, nullable) NSString *couponCode
Discussion
The coupon code string.
Declared In
MPTransactionAttributes.h
shipping
The shipping amount of the commerce event transaction.
@property (nonatomic, strong, nullable) NSNumber *shipping
Discussion
The shipping amount of the commerce event transaction.
Declared In
MPTransactionAttributes.h
tax
The tax amount of the commerce event transaction.
@property (nonatomic, strong, nullable) NSNumber *tax
Discussion
The tax amount of the commerce event transaction.
Declared In
MPTransactionAttributes.h
revenue
The revenue amount of the commerce event transaction. It usually is the sum(products x quantities) + tax + shipping. However it may contain other values not listed in the formula, it will vary per company.
@property (nonatomic, strong, nullable) NSNumber *revenue
Discussion
The revenue amount of the commerce event transaction. It usually is the sum(products x quantities) + tax + shipping. However it may contain other values not listed in the formula, it will vary per company.
Declared In
MPTransactionAttributes.h
transactionId
The unique identifier for the commerce event transaction.
@property (nonatomic, strong, nullable) NSString *transactionId
Discussion
The unique identifier for the commerce event transaction.
Declared In
MPTransactionAttributes.h