I didn't say there is a consistency problem, I quoted FTA.
My suggestion actually has nothing to do with the price of the object, it only has to do with the server state of the object (product) and whether or not that state was updated (price, quantity available, etc...), which is what the article was worrying about (the lost update problem).
i.e. if the underlying objects in a transaction changed between the time a client retrieved information about the object and the time where a user was interested in creating an order with the object, in a way which might invalidate the transaction, I'm highlighting a potential solution to notifying the client.
What if the order includes something that the manager
threw in for free to sweeten the deal? The price of
that product on that order is zero, but the product's
list price at any given point in time was not zero.
Well, in that case, I hope there is a system the "manager" can create a discount object to and attach it to the order.
PUT /orders/12345?discount=FREE_IPAD_YO
PUT /orders/12345;discounts [{"discount_id":"FREE_IPAD_YO"}]
whatever flavor you want, etc...
Note: I don't work in the ecommerce domain, but I do develop systems which are often transactional in nature.
My suggestion actually has nothing to do with the price of the object, it only has to do with the server state of the object (product) and whether or not that state was updated (price, quantity available, etc...), which is what the article was worrying about (the lost update problem).
i.e. if the underlying objects in a transaction changed between the time a client retrieved information about the object and the time where a user was interested in creating an order with the object, in a way which might invalidate the transaction, I'm highlighting a potential solution to notifying the client.
Well, in that case, I hope there is a system the "manager" can create a discount object to and attach it to the order. Note: I don't work in the ecommerce domain, but I do develop systems which are often transactional in nature.