| @@ 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 |
|
| @@ 877-895 (lines=19) @@ | ||
| 874 | return $mapping; |
|
| 875 | } |
|
| 876 | ||
| 877 | private function getOrderMetadata() |
|
| 878 | { |
|
| 879 | $orderMetadata = new ClassMetadata( |
|
| 880 | 'orders', |
|
| 881 | 'Mapado\RestClientSdk\Tests\Model\JsonLd\Order', |
|
| 882 | '' |
|
| 883 | ); |
|
| 884 | ||
| 885 | $orderMetadata->setAttributeList([ |
|
| 886 | new Attribute('@id', 'id', 'string', true), |
|
| 887 | new Attribute('customerPaidAmount', 'customerPaidAmount', 'int'), |
|
| 888 | new Attribute('status'), |
|
| 889 | ]); |
|
| 890 | ||
| 891 | $orderMetadata->setRelationList([ |
|
| 892 | ]); |
|
| 893 | ||
| 894 | return $orderMetadata; |
|
| 895 | } |
|
| 896 | ||
| 897 | private function getCartMetadata() |
|
| 898 | { |
|
| @@ 922-941 (lines=20) @@ | ||
| 919 | return $cartMetadata; |
|
| 920 | } |
|
| 921 | ||
| 922 | private function getCartItemMetadata() |
|
| 923 | { |
|
| 924 | $cartItemMetadata = new ClassMetadata( |
|
| 925 | 'cart_items', |
|
| 926 | 'Mapado\RestClientSdk\Tests\Model\JsonLd\CartItem', |
|
| 927 | '' |
|
| 928 | ); |
|
| 929 | ||
| 930 | $cartItemMetadata->setAttributeList([ |
|
| 931 | new Attribute('@id', 'id', 'string', true), |
|
| 932 | new Attribute('amount'), |
|
| 933 | new Attribute('cartItemDetailList'), |
|
| 934 | ]); |
|
| 935 | ||
| 936 | $cartItemMetadata->setRelationList([ |
|
| 937 | new Relation('cartItemDetailList', Relation::ONE_TO_MANY, 'Mapado\RestClientSdk\Tests\Model\JsonLd\CartItemDetail'), |
|
| 938 | ]); |
|
| 939 | ||
| 940 | return $cartItemMetadata; |
|
| 941 | } |
|
| 942 | ||
| 943 | private function getCartItemDetailMetadata() |
|
| 944 | { |
|