| 1 | <?php |
||
| 17 | class Child implements \JsonSerializable |
||
| 18 | { |
||
| 19 | private const PRICE = 'price'; |
||
| 20 | |||
| 21 | private const NAME = 'name'; |
||
| 22 | |||
| 23 | private const SKU = 'sku'; |
||
| 24 | |||
| 25 | private const CUSTOM_ATTRIBUTES = 'custom_attributes'; |
||
| 26 | |||
| 27 | // TODO FIELDS INSIDE CHILD IN DEMO APP ONLY below, IN DOCS '$price' is not whole Price class |
||
| 28 | // + categoryIds[] + options[] + product_options[] -custom_attributes[] |
||
| 29 | |||
| 30 | // private const DEMO_APP = [ |
||
| 31 | // Details::IMAGE, Details::THUMBNAIL, Details::COLOR, Details::SMALL_IMAGE, Details::TAX_CLASS_ID, |
||
| 32 | // Details::HAS_OPTIONS, Details::URL_KEY, Details::SIZE, Details::NAME, Details::STATUS, |
||
| 33 | // ]; |
||
| 34 | |||
| 35 | /** @var Price */ |
||
| 36 | private $price; |
||
| 37 | |||
| 38 | /** @var string */ |
||
| 39 | private $name; |
||
| 40 | |||
| 41 | /** @var string */ |
||
| 42 | private $sku; |
||
| 43 | |||
| 44 | /** @var array */ |
||
| 45 | private $customAttributes; |
||
| 46 | |||
| 47 | public function __construct( |
||
| 58 | |||
| 59 | public function jsonSerialize(): array |
||
| 70 | } |
||
| 71 |