Skip to content

Releases: XeroAPI/xero-ruby

2.6.1

27 Jan 15:48
be42b63
Compare
Choose a tag to compare

2.6.1

  • patch to fix #to_hash to maintain PascalCase transformation for XeroAPI and adds #attributes to return snake_case 🐍

2.6.0

Description

January work session to address recent community reported issues

Release Notes

  • Date Parsing via UTC rolling over to next day
  • Date Parsing payroll api utc string (not normal MS utc format )
  • connections/disconnections base url fix
  • state URL param
  • TrackingCategory fix - wrong API was deserializing wrong model (not a fix but closed issue w/ this PR)

Fixes:

Types of Changes

  • Bug fix
  • New feature
  • Breaking change

2.6.0

20 Jan 22:54
Compare
Choose a tag to compare

Description

January work session to address recent community reported issues

Release Notes

  • Date Parsing via UTC rolling over to next day
  • Date Parsing payroll api utc string (not normal MS utc format )
  • connections/disconnections base url fix
  • state URL param
  • TrackingCategory fix - wrong API was deserializing wrong model (not a fix but closed issue w/ this PR)

Fixes:

Types of Changes

  • Bug fix
  • New feature
  • Breaking change

2.5.1.

21 Dec 23:03
e1ff61c
Compare
Choose a tag to compare

Fixes for the following:

  • Adds optional state param to the identity flow & readme example
  • Actually Fixes #94 (cc @gravitystorm)
  • Ensures we only include proper files in the build, not docs, etc..
  • closed #79
  • closed #93
  • closed #99

Refactored these api_client.rb methods to use the proper error handling and existing call_api logic where they could (return_error(response) unless response.success?)

Adds new model

  • require 'xero-ruby/models/accounting/address_for_organisation'

Built from OAS 2.8.0

https://github.com/XeroAPI/Xero-OpenAPI

2.5.0

19 Dec 00:46
f3f2b0c
Compare
Choose a tag to compare

Fixes for the following:

closed #94
closed #79
closed #93
closed #99

Refactored these api_client.rb methods to use the proper error handling and existing call_api logic where they could (return_error(response) unless response.success?)

Adds new model

  • require 'xero-ruby/models/accounting/address_for_organisation'

Built from OAS 2.8.0

https://github.com/XeroAPI/Xero-OpenAPI

2.4.1

05 Dec 00:09
a63a902
Compare
Choose a tag to compare

2.4.1

Accounting API

new POST /Setup route
Associated models for the /Setup route code
fix batch payment reference length

Project API

Add charge type

NZ PAYROLL API

In TaxSettings changed periodunits from int to decimal
Move CalendarType into a separate component for reuse by PayRun and PayRunCalendar
Add TwiceMonthly value to CalendarType enum

Files API

Serialize back created/updated UTC (currently as string, until we can fix the spec at source to work across languages)

2.3.1

06 Nov 17:25
623a188
Compare
Choose a tag to compare

.1 patch - removed unnecessary files from the actual gem publish #89 #90 for massive reduction in gem size.

Thank you @c0va23 & @m1neral 👏


This Release adds all the remaining API sets that the XeroAPI can interact with for the Xero product suite.

Documentation updated.

2.3.0

03 Nov 20:25
a35eeb8
Compare
Choose a tag to compare

This Release adds all the remaining API sets that the XeroAPI can interact with for the Xero product suite.

Documentation updated.

2.2.4

29 Sep 22:15
16ee559
Compare
Choose a tag to compare
  • Fix tracking category option length going from 50 -> 100

Fixes #80

Build from OAS:

XeroAPI/Xero-OpenAPI#290

2.2.3

28 Sep 22:08
Compare
Choose a tag to compare

Regenerated with recent OAS to fix things like quote number method

fixes #76 - adds two currencies and renames _TRY to TRY (Turkish Lira)

graceful handling of date parsing in case anyone overrides it in their rails config it won't break the date parsing / deserialization

Time.at(seconds_since_epoch).strftime('%Y-%m-%dT%l:%M:%S%z')

adds repeating_invoice_id

2.2.2

23 Sep 23:23
Compare
Choose a tag to compare

Supports edge cases and core operations in the where filter object.

First laid out in issue #73 - here is exhaustive list of a lot of the options you can now properly use in where

Main convention is that for a filter with an operator, pass that in as an array

where: {
  field: ['operator', 'query']
}

Querying & Filtering

Examples for the opts (options) parameters most endpoints support. This is an area of focus and improvement. If you have a complex filering/sorting/where usage that is not supported please open an issue.

# Invoices
 opts = {
  page: 1,
  where: {
    type: ['=', XeroRuby::Accounting::Invoice::ACCREC],
    fully_paid_on_date: (DateTime.now - 6.month)..DateTime.now,
    amount_due: ['>=', 0],
    reference: ['=', "Website Design"],
    invoice_number: ['=', "INV-0001"],
    contact_id: ['=', 'contact-uuid-xxxx-xxx-xxxxxxx'],
    contact_number: ['=', "the-contact-number"],
    # date: (DateTime.now - 2.year)..DateTime.now
    # ▲ you can pass a range ▼ or a date & operator
    date: ['>=', DateTime.now - 2.year],
    status: ['=', XeroRuby::Accounting::Invoice::PAID]
  }
}
xero_client.accounting_api.get_invoices(tenant_id, opts).invoices

# Contacts 
opts = {
  if_modified_since: (DateTime.now - 1.weeks).to_s,
  # ▼ ordering by strings needs PascalCase convention
  order: 'UpdatedDateUtc DESC',
  where: {
    is_customer: ['==', true],
    is_supplier: ['==', true]
  }
}
xero_client.accounting_api.get_contacts(tenant_id, opts).contacts

# Bank Transactions
opts = {
  if_modified_since: (DateTime.now - 1.year).to_s,
  where: { type: ['==', XeroRuby::Accounting::BankTransaction::SPEND] },
  order: 'UpdatedDateUtc DESC',
  page: 2,
  unitdp: 4 # (Unit Decimal Places)
}
xero_client.accounting_api.get_bank_transactions(tenant_id, opts).bank_transactions

# Bank Transfers
opts = {
  if_modified_since: (DateTime.now - 1.month).to_s,
  where: {
    amount: [">=" , 999.99]
  },
  order: 'Amount ASC'
}
xero_client.accounting_api.get_bank_transfers(tenant_id, opts).bank_transfers