commercetools-jvm-sdk icon indicating copy to clipboard operation
commercetools-jvm-sdk copied to clipboard

Make prices and assets Identifiable<T>

Open andrii-kovalenko-ct opened this issue 7 years ago • 1 comments

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.

andrii-kovalenko-ct avatar Feb 19 '18 15:02 andrii-kovalenko-ct

We really like this idea and will take a look at it. Let's see how we can proceed with it 😉

katmatt avatar Mar 05 '18 14:03 katmatt