| @@ 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 |
|
| @@ 931-949 (lines=19) @@ | ||
| 928 | return $mapping; |
|
| 929 | } |
|
| 930 | ||
| 931 | private function getOrderMetadata() |
|
| 932 | { |
|
| 933 | $orderMetadata = new ClassMetadata( |
|
| 934 | 'orders', |
|
| 935 | 'Mapado\RestClientSdk\Tests\Model\JsonLd\Order', |
|
| 936 | '' |
|
| 937 | ); |
|
| 938 | ||
| 939 | $orderMetadata->setAttributeList([ |
|
| 940 | new Attribute('@id', 'id', 'string', true), |
|
| 941 | new Attribute('customerPaidAmount', 'customerPaidAmount', 'int'), |
|
| 942 | new Attribute('status'), |
|
| 943 | ]); |
|
| 944 | ||
| 945 | $orderMetadata->setRelationList([ |
|
| 946 | ]); |
|
| 947 | ||
| 948 | return $orderMetadata; |
|
| 949 | } |
|
| 950 | ||
| 951 | private function getCartMetadata() |
|
| 952 | { |
|
| @@ 976-995 (lines=20) @@ | ||
| 973 | return $cartMetadata; |
|
| 974 | } |
|
| 975 | ||
| 976 | private function getCartItemMetadata() |
|
| 977 | { |
|
| 978 | $cartItemMetadata = new ClassMetadata( |
|
| 979 | 'cart_items', |
|
| 980 | 'Mapado\RestClientSdk\Tests\Model\JsonLd\CartItem', |
|
| 981 | '' |
|
| 982 | ); |
|
| 983 | ||
| 984 | $cartItemMetadata->setAttributeList([ |
|
| 985 | new Attribute('@id', 'id', 'string', true), |
|
| 986 | new Attribute('amount'), |
|
| 987 | new Attribute('cartItemDetailList'), |
|
| 988 | ]); |
|
| 989 | ||
| 990 | $cartItemMetadata->setRelationList([ |
|
| 991 | new Relation('cartItemDetailList', Relation::ONE_TO_MANY, 'Mapado\RestClientSdk\Tests\Model\JsonLd\CartItemDetail'), |
|
| 992 | ]); |
|
| 993 | ||
| 994 | return $cartItemMetadata; |
|
| 995 | } |
|
| 996 | ||
| 997 | private function getCartItemDetailMetadata() |
|
| 998 | { |
|