Skip to content

Invalid organisation type #387

@Bahramn

Description

@Bahramn

SDK you're using (please complete the following information):

  • Version [2.23.0]

Describe the bug
In the API explorer, I found that the Class attribute value has been changed to COMPREHENSIVE, which is not on the list of valid classes.
https://api-explorer.xero.com/accounting/organisation/getorganisations

It's causing the bellow issue:

{main} {"exception":"[object] (InvalidArgumentException(code: 0): Invalid value for 'class', must be one of 'DEMO', 'TRIAL', 'STARTER', 'STANDARD', 'PREMIUM', 'PREMIUM_20', 'PREMIUM_50', 'PREMIUM_100', 'LEDGER', 'GST_CASHBOOK', 'NON_GST_CASHBOOK', 'ULTIMATE', 'LITE' at /vendor/xeroapi/xero-php-oauth2/lib/Models/Accounting/Organisation.php:1508)
[stacktrace]
#0 /vendor/xeroapi/xero-php-oauth2/lib/AccountingObjectSerializer.php(358): XeroAPI\\XeroPHP\\Models\\Accounting\\Organisation->setClass()
#1 /vendor/xeroapi/xero-php-oauth2/lib/AccountingObjectSerializer.php(277): XeroAPI\\XeroPHP\\AccountingObjectSerializer::deserialize()
#2 /vendor/xeroapi/xero-php-oauth2/lib/AccountingObjectSerializer.php(358): XeroAPI\\XeroPHP\\AccountingObjectSerializer::deserialize()
#3 /vendor/xeroapi/xero-php-oauth2/lib/Api/AccountingApi.php(37712): XeroAPI\\XeroPHP\\AccountingObjectSerializer::deserialize()
#4 /vendor/xeroapi/xero-php-oauth2/lib/Api/AccountingApi.php(37664): XeroAPI\\XeroPHP\\Api\\AccountingApi->getOrganisationsWithHttpInfo()
#5 /app/Console/Commands/XeroRefreshTokenCommand.php(56): XeroAPI\\XeroPHP\\Api\\AccountingApi->getOrganisations()
#6 /vendor/illuminate/container/BoundMethod.php(36): App\\Console\\Commands\\XeroRefreshTokenCommand->handle()

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions