XeroAPI / xero-php-oauth2

Xero PHP SDK for oAuth 2 generated from Xero API OpenAPI Spec 3.0
MIT License
93 stars 66 forks source link

There is an issue with the length valiation of this field #174

Closed micmek closed 4 years ago

micmek commented 4 years ago

I am calling the getContacts() function but the contacts returned from Xero have BatchPayments field as a related field to the contact.

These BatchPayment relationships have the following fields "BankAccountNumber", "BankAccountName", "Details", "Code", "Reference".

The "Details" field has more that 18 characters in it and so it throws an exception when it tries to populate the object.

invalid length for $details when calling BatchPaymentDetails., must be smaller than or equal to 18.

This comes from the file below: https://github.com/XeroAPI/xero-php-oauth2/blob/03a311e50078cc9e48575e769a0108ecc99815b7/lib/Models/Accounting/BatchPaymentDetails.php#L317

Can this please be looked into as my application is now broken because I can't get the getContacts method to work

SidneyAllen commented 4 years ago

We've addressed this in our OpenAPI spec and should be fixed in our next release of xero-php-oauth2 https://github.com/XeroAPI/Xero-OpenAPI/releases/tag/2.3.5

micmek commented 4 years ago

Thanks @SidneyAllen Do you know when this will be fixed? in the xero-php-oauth2 library?

SidneyAllen commented 4 years ago

@micmek fixed in version 2.1.5

https://github.com/XeroAPI/xero-php-oauth2/releases/tag/2.1.5