Skip to content

Incorrect documentation - if_modified_since, where, order #303

@swombat

Description

@swombat

API docs say:

xero_client.set_token_set(user.token_set)

xero_tenant_id = 'YOUR_XERO_TENANT_ID'
if_modified_since = "2020-02-06T12:17:43.202-08:00"
where = 'Status==#{XeroRuby::Accounting::Account::ACTIVE}'
order = 'Name ASC'

begin
  response = xero_client.accounting_api.get_accounts(xero_tenant_id, if_modified_since, where, order)
  return response
rescue XeroRuby::ApiError => e
  puts "Exception when calling get_accounts: #{e}"
end

But here is my code:

@api_client.accounting_api.get_accounts(@api_client.last_connection["id"], if_modified_since, where, order)

And the result:

app/apis/xero_api.rb:60:in `get_accounts': wrong number of arguments (given 4, expected 1..2) (ArgumentError)

So it seems the docs are incorrect at least here, probably in other places too. Do the docs need to be re-generated after an OpenAPI update?

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