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
I get the basic idea of using this package, but it would be great if there is a detailed documentation of this package as there are so many scopes and using each of them is very different. I Explored the calcinai/xero-php and Xero api explorer but understanding of CREATE scope is much complicated than that of GET scope.
I am trying to convert the idea given on calcinai/xero-php 's README page:
Suppose I have multiple LineItems that I wanted to add in a single invoice. I know the values required to set a LineItem is { "Description": "Acme Tires", "Quantity": 2, "UnitAmount": 20, "AccountCode": "200", "TaxType": "NONE", "LineAmount": 40 } but there is no proper documentation to show how to set these values and there is no example exists.
Can you please at least help me in creating an invoice and save it in xero crm?
The text was updated successfully, but these errors were encountered:
You should post that question in the calcinai/xero-php Issues section.
This package just allows you to use the calcinai package in an eloquent like syntax.
The above code you posted showx exactly how to create an invoice, and to add multiple line items, just do ->addLineItem for however many lines you need to add.
If you open the Invoice class in the calcinai package you will see all the properties and methods that can be used.
@seanmccabe
Ok. I have added addLineItem many times instead of passing this as a single array, but now when I am trying to fetch the contact from xero I am getting an unexpected error. You have implemented the calcinai/xero-php in your package you must know why this issue is persisting. Please help me resolve this error.
This is my code: $contact = $this->xero->load(Contact::class)->where('ContactID', $xero_auth->contact_id)->first();
I have also tried: $contact = $this->xero->contacts()->where('ContactID', $xero_auth->contact_id)->first();
This is the error.
XeroPHP\Remote\Exception\ForbiddenException: You are not permitted to access this resource in /var/www/html/project_dev/vendor/calcinai/xero-php/src/XeroPHP/Remote/Response.php:127
Stack trace:
#0 /var/www/html/project_dev/vendor/calcinai/xero-php/src/XeroPHP/Remote/Request.php(119): XeroPHP\Remote\Response->parse()
#1 /var/www/html/project_dev/vendor/calcinai/xero-php/src/XeroPHP/Remote/Query.php(330): XeroPHP\Remote\Request->send()
#2 /var/www/html/project_dev/vendor/calcinai/xero-php/src/XeroPHP/Remote/Query.php(347): XeroPHP\Remote\Query->execute()
#3 /var/www/html/project_dev/app/Service/XeroApiService.php(144): XeroPHP\Remote\Query->first()
I get the basic idea of using this package, but it would be great if there is a detailed documentation of this package as there are so many scopes and using each of them is very different. I Explored the calcinai/xero-php and Xero api explorer but understanding of CREATE scope is much complicated than that of GET scope.
I am trying to convert the idea given on calcinai/xero-php 's README page:
Suppose I have multiple LineItems that I wanted to add in a single invoice. I know the values required to set a LineItem is
{ "Description": "Acme Tires", "Quantity": 2, "UnitAmount": 20, "AccountCode": "200", "TaxType": "NONE", "LineAmount": 40 }
but there is no proper documentation to show how to set these values and there is no example exists.Can you please at least help me in creating an invoice and save it in xero crm?
The text was updated successfully, but these errors were encountered: