You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The lineitems field DiscountAmount should be returned in any response that also returns DiscountRate as they both apply equally to a lineitem.
Current Behavior
When a call is made to a single invoice the lineitem fields DiscountRate and DiscountAmount are both returned in the lineitems object HOWEVER if a call is made that retrieves a summary then only the DiscountRate is returned.
I have verified this behaviour using the following:
Returns DiscountRate but NOT DiscountAmount on lineitems:
Using PHP SDK call to $result = $apiInstance->getInvoices($xeroTenantId,null,null,null,"{$invoice_guid1},{$invoice_guid2}",null);
Using Xero API Explorer using the GetInvoices with comma seperated query IDs
Using Xero API Explorer using the GetInvoices with page query
Returns both DiscountRate and DiscountAmount:
Using Xero API Explorer using the GetInvoice with one invoice GUID specified
Returns empty lineitems field:
Using Xero API Explorer using the GetInvoice with createByMyApp set to 1
Expected Behavior
The API should return lineitems with DiscountRate and DiscountAmount as documented for a call that returns multiple invoices if the lineitems field is populated
OR the API documentation needs to be updated with a specific breakdown of what lineitem fields are returned in a summarised response ... which would be all fields EXCEPT validationerrors and DiscountAmount which seems a bit strange why only those two would not be returned.
The text was updated successfully, but these errors were encountered:
The lineitems field DiscountAmount should be returned in any response that also returns DiscountRate as they both apply equally to a lineitem.
Current Behavior
When a call is made to a single invoice the lineitem fields DiscountRate and DiscountAmount are both returned in the lineitems object HOWEVER if a call is made that retrieves a summary then only the DiscountRate is returned.
The API documentation states (see https://developer.xero.com/documentation/api/accounting/invoices#get-invoices) that when multiple invoices are returned then either no lineitems are returned OR a summary is returned depending on the invoice query.
I have verified this behaviour using the following:
$result = $apiInstance->getInvoices($xeroTenantId,null,null,null,"{$invoice_guid1},{$invoice_guid2}",null);
Expected Behavior
The API should return lineitems with DiscountRate and DiscountAmount as documented for a call that returns multiple invoices if the lineitems field is populated
OR the API documentation needs to be updated with a specific breakdown of what lineitem fields are returned in a summarised response ... which would be all fields EXCEPT validationerrors and DiscountAmount which seems a bit strange why only those two would not be returned.
The text was updated successfully, but these errors were encountered: