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