YMMECommerceProduct class
This class contains product information.
Instance methods
init(sku:) | Initializes the instance of the |
init(sku:name:categoryComponents:payload:actualPrice:originalPrice:promoCodes:) | Initializes the instance of the |
init(sku:) | Initializes the instance of the |
init(sku: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
init(sku:)
init(sku: String)
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.
init(sku:name:categoryComponents:payload:actualPrice:originalPrice:promoCodes:)
init(sku: String, name: String?, categoryComponents: [String]?, payload: [String, String]?, actualPrice: YMMECommercePrice?, originalPrice: YMMECommercePrice?, promoCodes: [String]?)
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
var sku: String { get }
Item number. Allowed size: Up to 100 characters.
name
var name: String? { get }
Name of the product. Allowed size: Up to 1000 characters.
categoryComponents
var categoryComponents: [String]? { get }
- Up to 10 elements.
- The size of a single element is up to 100 characters.
payload
var payload: [String : String]? { get }
- The total
payload
size: Up to 20 KB. - The
key
size: Up to 100 characters. - The
value
size: Up to 1000 characters.
actualPrice
var actualPrice: YMMECommercePrice? { get }
The actual product price, which is the price after applying all discounts and promo codes.
originalPrice
var originalPrice: YMMECommercePrice? { get }
The initial product price.
promoCodes
var promoCodes: [String]? { get }
- Up to 20 elements.
- The promo code length is up to 100 characters.