I am trying create an invoice using Xero accounting software\'s API (php). I can create an invoice and add the products without any issues if I use the below code (excerpt):