MerchantProduct
@interface MerchantProduct : NSObject
MerchantProduct
represents a product inside a Merchant
.
Eg. Xbox 3 month membership gift card.
-
A unique code associated with each
MerchantProduct
.Declaration
Objective-C
@property (readonly, strong, nonatomic) NSString *_Nonnull code;
Swift
var code: String { get }
-
The cost of the product.
Declaration
Objective-C
@property (readonly, nonatomic) double price;
Swift
var price: Double { get }
-
The name of the product.
Declaration
Objective-C
@property (readonly, strong, nonatomic, nullable) NSString *name;
Swift
var name: String? { get }
-
A fee associated with the product.
Declaration
Objective-C
@property (readonly, nonatomic) double fee;
Swift
var fee: Double { get }
-
Default initializer for a
MerchantProduct
from a dictionary.Declaration
Objective-C
+ (nonnull MerchantProduct *)productWithDictionary: (nonnull NSDictionary *)dictionary;
Swift
/*not inherited*/ init(dictionary: [AnyHashable : Any])
Parameters
dictionary
- dictionary form of a
MerchantProduct
.Return Value
Instance of
MerchantProduct
. -
Converts a
MerchantProduct
to an NSDictionary that can be used for caching or sending to the server.Declaration
Objective-C
- (nonnull NSDictionary *)dictionaryRepresentation;
Swift
func dictionaryRepresentation() -> [AnyHashable : Any]
Return Value
dictionary - Dictionary form of a
MerchantProduct
.