Skip to content

TrackingCategory option failing to create  #290

@oldusername91

Description

@oldusername91

SDK you're using

  • Version 2.14.1

Describe the bug
TrackingCategory option failing to create correctly.

Using PUT TrackingCategories results in a 200 response while ommitting TrackingOptionID attribute.

Querying the TrackingCategory after the above 200 response reveals no new options were created.


To Reproduce

I am using the following method to create a new option for my tracking category:

  1. AccountingAip::createTrackingOptions()

Expected behavior
I expect a 200 response when calling PUT TrackingCategories which includes the created option and its TrackingOptionID attribute.


PUT Request

^ GuzzleHttp\Psr7\Request^ {#7699
  -method: "PUT"
  -requestTarget: null
  -uri: GuzzleHttp\Psr7\Uri^ {#7770
    -scheme: "https"
    -userInfo: ""
    -host: "api.xero.com"
    -port: null
    -path: "/api.xro/2.0/TrackingCategories/<my tracking category guid>/Options"
    -query: ""
    -fragment: ""
  }
  -headers: array:6 [
    "Host" => array:1 [
      0 => "api.xero.com"
    ]
    "User-Agent" => array:1 [
      0 => "[xero-php-oauth2 (2.14.1)]"
    ]
    "xero-tenant-id" => array:1 [
      0 => "<my tenant>"
    ]
    "Accept" => array:1 [
      0 => "application/json"
    ]
    "Content-Type" => array:1 [
      0 => "application/json"
    ]
    "Authorization" => array:1 [
      0 => "<My auth details>"
    ]
  ]
  -headerNames: array:6 [
    "user-agent" => "User-Agent"
    "xero-tenant-id" => "xero-tenant-id"
    "accept" => "Accept"
    "content-type" => "Content-Type"
    "authorization" => "Authorization"
    "host" => "Host"
  ]
  -protocol: "1.1"
  -body:   "{"Name":"1015766"}"
}

XERO Response

  "Id": "132d0f7e-9df6-465f-8371-88d3a112783e",\r\n
  "Status": "OK",\r\n
  "ProviderName": "<my provider>",\r\n
  "DateTimeUTC": "\/Date(1656627563006)\/",\r\n
  "Options": [\r\n
    {\r\n
      "Name": "1015766",\r\n
      "Status": "ACTIVE",\r\n
      "HasValidationErrors": false,\r\n
      "IsDeleted": false,\r\n
      "IsArchived": false,\r\n
      "IsActive": true,\r\n
      "ValidationErrors": []\r\n
    }\r\n
  ]\r\n
}

The tracking category I am attempting to create a new option in already has ~8000 options.
The docs mention a limit of 100, however this is not correct as I've had no troubles until now creating new options beyond 100.

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