sdk-java
sdk-java copied to clipboard
Inconsistent types for fields shared between subscription and transaction
We are looking to add a phone number to our requests to create subscriptions and transactions. I noticed an odd discrepancy between how phone numbers are stored on TransactionRequestType and ARBSubscriptionType.
TransactionRequestType supports phoneNumber on it's billTo field of type CustomerAddressType.
However,
ARBSubscriptionType does not use that same type for it's billTo field. It instead uses NameAndAddressType which does not support a phoneNumber field. It does have a customer field of CustomerType which supports a phoneNumber.
But,
TransactionRequestType's customer field uses CustomerDataType which inexplicably does not have a phoneNumber field.
This is somewhat confusing and inconsistent. I'm not sure if this is by design or something was typed incorrectly.
Since CustomerAddressType extends the NameAndAddressType I would propose changing the ARBSubscriptionType billTo field to CustomerAddressType
or change the customer field on TransactionRequestType from CustomerDataType to CustomerType since the latter supports all of the formers fields as well as adding two new ones.
Appreciate your time.
Thanks.