@@ 711-729 (lines=19) @@ | ||
708 | /** |
|
709 | * @param string $idKey |
|
710 | */ |
|
711 | private function getCartItemDetailMetadata($idKey) |
|
712 | { |
|
713 | $cartItemDetailMetadata = new ClassMetadata( |
|
714 | 'cart_item_details', |
|
715 | 'Mapado\RestClientSdk\Tests\Model\JsonLd\CartItemDetail', |
|
716 | '' |
|
717 | ); |
|
718 | ||
719 | $cartItemDetailMetadata->setRelationList([ |
|
720 | new Relation('cartItem', Relation::MANY_TO_ONE, 'Mapado\RestClientSdk\Tests\Model\JsonLd\CartItem'), |
|
721 | ]); |
|
722 | $cartItemDetailMetadata->setAttributeList([ |
|
723 | new Attribute($idKey, 'id', 'string', true), |
|
724 | new Attribute('name'), |
|
725 | new Attribute('cartItem'), |
|
726 | ]); |
|
727 | ||
728 | return $cartItemDetailMetadata; |
|
729 | } |
|
730 | ||
731 | /** |
|
732 | * @param string $idKey |
@@ 501-520 (lines=20) @@ | ||
498 | return $cartMetadata; |
|
499 | } |
|
500 | ||
501 | private function getCartItemMetadata() |
|
502 | { |
|
503 | $cartItemMetadata = new ClassMetadata( |
|
504 | 'cart_items', |
|
505 | 'Mapado\RestClientSdk\Tests\Model\JsonLd\CartItem', |
|
506 | '' |
|
507 | ); |
|
508 | ||
509 | $cartItemMetadata->setAttributeList([ |
|
510 | new Attribute('@id', 'id', 'string', true), |
|
511 | new Attribute('amount'), |
|
512 | new Attribute('cart_item_details', 'cartItemDetailList'), |
|
513 | ]); |
|
514 | ||
515 | $cartItemMetadata->setRelationList([ |
|
516 | new Relation('cartItemDetailList', Relation::ONE_TO_MANY, 'Mapado\RestClientSdk\Tests\Model\JsonLd\CartItemDetail'), |
|
517 | ]); |
|
518 | ||
519 | return $cartItemMetadata; |
|
520 | } |
|
521 | ||
522 | private function getCartItemDetailMetadata() |
|
523 | { |