| @@ 710-728 (lines=19) @@ | ||
| 707 | /** |
|
| 708 | * @param string $idKey |
|
| 709 | */ |
|
| 710 | private function getCartItemDetailMetadata($idKey) |
|
| 711 | { |
|
| 712 | $cartItemDetailMetadata = new ClassMetadata( |
|
| 713 | 'cart_item_details', |
|
| 714 | 'Mapado\RestClientSdk\Tests\Model\JsonLd\CartItemDetail', |
|
| 715 | '' |
|
| 716 | ); |
|
| 717 | ||
| 718 | $cartItemDetailMetadata->setRelationList([ |
|
| 719 | new Relation('cartItem', Relation::MANY_TO_ONE, 'Mapado\RestClientSdk\Tests\Model\JsonLd\CartItem'), |
|
| 720 | ]); |
|
| 721 | $cartItemDetailMetadata->setAttributeList([ |
|
| 722 | new Attribute($idKey, 'id', 'string', true), |
|
| 723 | new Attribute('name'), |
|
| 724 | new Attribute('cartItem'), |
|
| 725 | ]); |
|
| 726 | ||
| 727 | return $cartItemDetailMetadata; |
|
| 728 | } |
|
| 729 | ||
| 730 | /** |
|
| 731 | * @param string $idKey |
|
| @@ 835-853 (lines=19) @@ | ||
| 832 | return $mapping; |
|
| 833 | } |
|
| 834 | ||
| 835 | private function getOrderMetadata() |
|
| 836 | { |
|
| 837 | $orderMetadata = new ClassMetadata( |
|
| 838 | 'orders', |
|
| 839 | 'Mapado\RestClientSdk\Tests\Model\JsonLd\Order', |
|
| 840 | '' |
|
| 841 | ); |
|
| 842 | ||
| 843 | $orderMetadata->setAttributeList([ |
|
| 844 | new Attribute('@id', 'id', 'string', true), |
|
| 845 | new Attribute('customerPaidAmount', 'customerPaidAmount', 'int'), |
|
| 846 | new Attribute('status'), |
|
| 847 | ]); |
|
| 848 | ||
| 849 | $orderMetadata->setRelationList([ |
|
| 850 | ]); |
|
| 851 | ||
| 852 | return $orderMetadata; |
|
| 853 | } |
|
| 854 | ||
| 855 | private function getCartMetadata() |
|
| 856 | { |
|
| @@ 880-899 (lines=20) @@ | ||
| 877 | return $cartMetadata; |
|
| 878 | } |
|
| 879 | ||
| 880 | private function getCartItemMetadata() |
|
| 881 | { |
|
| 882 | $cartItemMetadata = new ClassMetadata( |
|
| 883 | 'cart_items', |
|
| 884 | 'Mapado\RestClientSdk\Tests\Model\JsonLd\CartItem', |
|
| 885 | '' |
|
| 886 | ); |
|
| 887 | ||
| 888 | $cartItemMetadata->setAttributeList([ |
|
| 889 | new Attribute('@id', 'id', 'string', true), |
|
| 890 | new Attribute('amount'), |
|
| 891 | new Attribute('cartItemDetailList'), |
|
| 892 | ]); |
|
| 893 | ||
| 894 | $cartItemMetadata->setRelationList([ |
|
| 895 | new Relation('cartItemDetailList', Relation::ONE_TO_MANY, 'Mapado\RestClientSdk\Tests\Model\JsonLd\CartItemDetail'), |
|
| 896 | ]); |
|
| 897 | ||
| 898 | return $cartItemMetadata; |
|
| 899 | } |
|
| 900 | ||
| 901 | private function getCartItemDetailMetadata() |
|
| 902 | { |
|