commercetools / commercetools-sdk-java-v2

The e-commerce SDK from commercetools for Java.
https://commercetools.github.io/commercetools-sdk-java-v2/javadoc/index.html
Apache License 2.0
34 stars 15 forks source link

It's confusing to set different types for the index and indices on CustomerDraft. defaultBillingAddress, defaultShippingAddress #231

Closed ahmetoz closed 2 years ago

ahmetoz commented 2 years ago

Is there any specific reason on here ? It's confusing to set Long and Integer for the same thing.

https://github.com/commercetools/commercetools-sdk-java-v2/blob/f3dda18fa7a418e4da919075409782732d659611/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/customer/CustomerDraftImpl.java#L205-L219

Also the builder seems a bit weird, such as:

.defaultBillingAddress(0L)
.billingAddresses(asList(0, 1))
jenschude commented 2 years ago

Nice finding!

There is some inconsistency in the API spec, we will fix this and use int as most likely no one ever will have more than 2 billion addresses. Btw the builder also allows billingAddresses(0, 1)

jenschude commented 2 years ago

Fixed with 7.4.0

Thanks for the report.