-
Notifications
You must be signed in to change notification settings - Fork 152
Conversation
The sort was already merged. This PR will integrate it as well. can you rebase your branch to the latest master version? Then please take a look on the changeset that the SORT on search is out. Thanks |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please rebase your PR to the current master to avoid collision with the already merged search sorting.
@Exeu done, somehow messed up in a squashing nightmare :) sorry for that - now should be clean again |
$subTotal2 = $domDoc->documentElement->getElementsByTagName('Amount')->item(0)->nodeValue; | ||
$size = $domDoc->documentElement->getElementsByTagName('CartItem')->length; | ||
|
||
$cartAdd = new CartAdd(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about passing $cartId
and $hmac
in the constructor as both are mandatory?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would be a BC Break at least for all existing Cart Operations. Would prefer to avoid this and put it on the list for version 2.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Another approach to maintain BC could be a named constructor like CartAdd::withCartIdAndHmac($cartId, $hmac)
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 for @Exeu - right now this is a plain simple wrapper for the API Operations I guess?
Ideally speaking, IMHO CartCreate Operation (c/w)ould return a instance of a CartModel holding parsed Cart(Response) attributes like HMAC, CartID etc. (or add complex ResponseTransformer?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The operation itself cannot return any response. It just returns parameters needed for a request that another component can build any request with it.
So the only thing you can do is to add a responsetransformer. But i think this beyond the topic here :) @daFish had a valid point. But i will create a task for it for the next version since i don't want to start with named constructors right now or factories for something which is anyway mandatory in those operations (my bad to put it optional in the class design).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Exeu so any idea if you wanna still merge it or not? :)
Implementation of CartModify according to http://docs.aws.amazon.com/AWSECommerceService/latest/DG/CartModify.html