commercetools-jvm-sdk
commercetools-jvm-sdk copied to clipboard
Make prices and assets Identifiable<T>
Since Product Price and Asset have unique id
field it has sense to make them identifiable (inherit from Identifiable<T>
interface.
Should not be a difficult change.
This could be useful in some generic cases where entity id
should be processed (for example, logged).
For example, in this PR of sync library when we extended CustomField builders to support Prices and Assets we had to re-factor our generic util method to accept resourceIdGetter
, because Prices and Assets don't have common interface with Products/Inventories/Categories even though we need only and access to getId()
method to log a message in case of error.
We really like this idea and will take a look at it. Let's see how we can proceed with it 😉