Skip to content

2.0.3

Compare
Choose a tag to compare
@SerKnight SerKnight released this 06 Aug 04:33
· 378 commits to master since this release

Ruby 2.0.3 release

generated from Xero-OpenAPI version: 2.2.11

BREAKING changes include:

  • All monetary fields are now typed as BigDecimal across all api sets - examples in readme

changes include:

SDK does still supports existing functionality of passing camelCase, PascalCase, or some combination.

But now all params can now be snake cased before sent to any SDK method:

invoices = { invoices: [{ type: XeroRuby::Accounting::Invoice::ACCREC, contact: { contact_id: contacts[0].contact_id }, line_items: [{ description: "Acme Tires", quantity: 2.0, unit_amount: BigDecimal("20.99"), account_code: "600", tax_type: XeroRuby::Accounting::TaxType::NONE }], date: "2019-03-11", due_date: "2018-12-10", reference: "Website Design", status: XeroRuby::Accounting::Invoice::DRAFT }]}

bug fixes / improvements

invoice = xero_client.accounting_api.get_invoices(current_user.active_tenant_id).invoices.first
file_name = "an-invoice-filename.png"
opts = {
  include_online: true # Boolean | Allows an attachment to be seen by the end customer within their online invoice
}
file = File.read(Rails.root.join('app/assets/images/xero-api.png'))
attachment = xero_client.accounting_api.create_invoice_attachment_by_file_name(current_user.active_tenant_id, invoice.invoice_id, file_name, file, opts)

Readme & related sample app updates

  • updates readme with PUT/POST examples
  • updates to readme showing how to download a file as PDF
  • Related updates to the companion sample app showing more comprehensive xero-ruby SDK usage