Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Credit notes line item array always null #27

Open
upultfs opened this issue May 17, 2022 · 0 comments
Open

Credit notes line item array always null #27

upultfs opened this issue May 17, 2022 · 0 comments

Comments

@upultfs
Copy link

upultfs commented May 17, 2022

Hi There,

I try to get Credit notes data using this package but expect line items all other data can receive. could you pls tell me where I'm wrong? i have attached below the Request and Response data .thanks.

Request

$if_modified_since = $_GET["credit_notes_date"];
$statuses = 'Status=="PAID"';
$page = 1;
$apiResponse2 = $apiInstance->getCreditNotes($xeroTenantId,$if_modified_since,$statuses,$page);
var_dump($apiResponse2->getCreditNotes());

Response

/var/www/xerotfsapi/authorizedResource.php:307:
array (size=1)
0 =>
object(XeroAPI\XeroPHP\Models\Accounting\CreditNote)[22]
protected 'container' =>
array (size=30)
'type' => string 'ACCRECCREDIT' (length=12)
'contact' =>
object(XeroAPI\XeroPHP\Models\Accounting\Contact)[32]
...
'date' => string '/Date(1650585600000+0000)/' (length=26)
'due_date' => null
'status' => string 'PAID' (length=4)
'line_amount_types' => string 'Exclusive' (length=9)
'line_items' =>
array (size=0)
...
'sub_total' => float 2697.54
'total_tax' => float 404.63
'total' => float 3102.17
'cis_deduction' => null
'cis_rate' => null
'updated_date_utc' => string '/Date(1652822145173+0000)/' (length=26)
'currency_code' => string 'NZD' (length=3)
'fully_paid_on_date' => string '/Date(1650585600000+0000)/' (length=26)
'credit_note_id' => string 'baaa9b47-7a3f-4646-a7f0-91d54f84c2f1' (length=36)
'credit_note_number' => string 'CN-0007' (length=7)
'reference' => string '87675' (length=5)
'sent_to_contact' => null
'currency_rate' => float 1
'remaining_credit' => float 0
'allocations' =>
array (size=1)
...
'applied_amount' => null
'payments' =>
array (size=0)
...
'branding_theme_id' => string 'f8974d1a-6eb8-49d7-973e-f54a30f93bdc' (length=36)
'status_attribute_string' => null
'has_attachments' => boolean false
'has_errors' => boolean false
'validation_errors' => null
'warnings' => null

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant