AMAECommerceProduct class
This class contains product information.
Instance methods
Initializes the instance of the |
|
-initWithSKU:name:categoryComponents:payload:actualPrice:originalPrice:promoCodes: |
Initializes the instance of the |
Properties
Item number. Allowed size: Up to 100 characters. |
||
Name of the product. Allowed size: Up to 1000 characters. |
||
The path to the product by category. |
||
Method descriptions
-initWithSKU:
- (instancetype)initWithSKU:(NSString *)sku
Initializes the instance of the AMAECommerceProduct
class with the specified item number.
Parameters:
|
Item number. Allowed size: Up to 100 characters. |
Returns:
The AMAECommerceProduct
class instance.
‑initWithSKU:name:categoryComponents:payload:actualPrice:originalPrice:promoCodes:
- (instancetype)initWithSKU:(NSString *)sku
name:(nullable NSString *)name
categoryComponents:(nullable NSArray<NSString *> *)categoryComponents
payload:(nullable NSDictionary<NSString *, NSString *> *)payload
actualPrice:(nullable AMAECommercePrice *)actualPrice
originalPrice:(nullable AMAECommercePrice *)originalPrice
promoCodes:(nullable NSArray<NSString *> *)promoCodes;
Initializes the instance of the AMAECommerceProduct
class with all parameters.
Parameters:
|
Item number. Allowed size: Up to 100 characters. |
|
|
Name of the product. Allowed size: Up to 1000 characters. |
|
|
The path to the product by category. Acceptable sizes:
|
|
Returns:
The AMAECommerceProduct
class instance.
Property descriptions
sku
(nonatomic, copy, readonly) NSString *sku
Item number. Allowed size: Up to 100 characters.
name
(nonatomic, copy, readonly, nullable) NSString *name
Name of the product. Allowed size: Up to 1000 characters.
categoryComponents
(nonatomic, copy, readonly, nullable) NSArray<NSString *> *categoryComponents
The path to the product by category. Acceptable sizes:
- Up to 10 elements.
- The size of a single element is up to 100 characters.
payload
(nonatomic, copy, readonly, nullable) NSDictionary<NSString *, NSString *> *payload
Additional information about the product. Acceptable sizes:
- The total
payload
size: Up to 20 KB. - The
key
size: Up to 100 characters. - The
value
size: Up to 1000 characters.
actualPrice
(nonatomic, strong, readonly, nullable) AMAECommercePrice *actualPrice
The actual product price, which is the price after applying all discounts and promo codes.
originalPrice
(nonatomic, strong, readonly, nullable) AMAECommercePrice *originalPrice
The initial product price.
promoCodes
(nonatomic, copy, readonly, nullable) NSArray<NSString *> *promoCodes
A list of promo codes that are applied to the product. Acceptable sizes:
- Up to 20 elements.
- The promo code length is up to 100 characters.