Releases: XeroAPI/xero-ruby
2.0.1
Ruby 2.0.0 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:
- re-serialization of params during PUT's and POST's to the XeroAPI to PascalCase from Ruby's preferred snake_case 🐍 related code
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
- fixing all file download routes based on @wojw5's suggestion in #32
- Download as PDF (#43) also fixed by (https://github.com/XeroAPI/xero-ruby/pull/54/files#diff-c1ed4f733dbf7dd2d5bbba26b23819e5R379)
- Duplicate Constants removed for account.rb & organisation.rb reported in #50
- Upload attachments examples added to readme and sample app
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
1.2.0
- Rspec suite fixed (1227 examples, 0 failures) at PR
- documentation corrected to be ruby specific by adding 2 flags to openapi-spec https://github.com/XeroAPI/Xero-OpenAPI/pull/233/files
- added the Projects API https://developer.xero.com/documentation/projects/overview-projects
- Adds enums in the model
- raises Faraday dependency to
'faraday', '~> 1.0.1', '>= 1.0.1'
1.1.0
Release notes:
This version was generate from Release 2.1.3 · XeroAPI/Xero-OpenAPI · GitHub
Added summarizeErrors
to the createPayments
method
Added method getPrepaymentAsPdf
Changed JournalNumber
from type string to number
Adds statusAttributeString
to Payment
Adds assetTypeId
to Payment
Adds 2 TaxRates to enum
Adds 4 TaxTypes to enum
1.0
xero-ruby SDK version 1.0 generated against OpenAPI Spec version 2.1.0
IMPORTANT: this major versioning and has breaking changes.
There is now a namespace of Accounting & Asset Models, docs, and specs:
Assets API set now supported, others coming soon: https://developer.xero.com/documentation/
Readme Updated with accurate usage:
creds = {
client_id: ENV['CLIENT_ID'],
client_secret: ENV['CLIENT_SECRET'],
redirect_uri: ENV['REDIRECT_URI'],
scopes: ENV['SCOPES']
}
xero_client = XeroRuby::ApiClient.new(credentials: creds)
xero_client.refresh_token_set(user.token_set)
org = xero_client.accounting_api.get_organisation('your-tenant-id').organisation
assets = xero_client.asset_api.get_assets('your-tenant-id').items
0.4.0
Xero Ruby version 0.4.0 generated against OpenAPI Spec version 2.0.9
- Added full OAuth2.0 authorization and token_set callback flow.
- added documentation on using SDK without full client init (passing of access token only)
- Added Faraday http client support (migrated away from Typheous)
- generated via openapi-generator vsn. 4.3.0
- released companion sample app showcasing all new features (https://github.com/XeroAPI/xero-ruby-oauth2-app)
- added token convenience methods (callback, refresh, connections, disconnect)
0.2.4
Xero Ruby version 0.2.4 generated against OpenAPI Spec version 2.0.7
has_attachments is now readonly for following models:
- account.rb
- receipt.rb
- repeating_invoice.rb
- invoice.rb
- manual_journal.rb
- overpayment.rb
- preparyment.rb
- purchase_orders.rb
- bank_transaction.rb
- bank_transfer.rb
- contact.rb
- credit_note.rb
credit_note.rb
- added support for status_attriute_string parameter/option
quote.rb
- updated_date_utc is now a String and readonly
OpenAPI document version update from 2.0.6 to 2.0.7 across all files
SDK version updated to 0.2.4 (patch)
0.2.3
Xero Ruby version 0.2.3 generated against OpenAPI Spec version 2.0.6
accounting_api.rb
- Fixed issue with payment_delete method - Delete payment operation requires a payload when performing a POST. The payment_delete object (of type PaymentDelete, has a single property "status" with a default value of "DELETED". Simply create a new instance of payment_delete and pass it as an arg to the payment_delete method. (added payment_delete.rb)
- Added get_quote_as_pdf
- Removed update_employee method - updateEmployee singular not supported by API
currency_code.rb
- Adding ZWK and "" empty strings to currencyCode ENUM list
invoice.rb
- Add missing ENUM "ARPREPAYMENT" for Invoice Type
AccountingApi.md
Updated documentation for AccountingApi
PaymentDelete.md
Added new documentaion for PaymentDelete
RSpec Tests update (Not used)
payment_delete_spec.rb
OpenAPI document version update from 2.0.4 to 2.0.6 across all files
SDK version updated to 0.2.3 (patch)
0.2.2
0.2.1
Version 0.2.1 release based on Xero OpenAPI Spec version 2.0.3
Accounting_api.rb:
- Fixed typo across all methods
PurchaseOrder:
- Added get_purchase_order_by_number
Quotes (attachments):
- Added create_quote_attachment_by_file_name
- Added update_quote_attachment_by_file_name
- Added create_quote_attachment_by_file_name
- Added get_quote_attachment_by_file_name
- Added get_quote_attachments
- Added get_quote_attachment_by_id
AppliedAmount property added to the following models:
- CreditNote
- Prepayment
- Overpayment
Response:
- Added x-isEmpty to 204 responses
SDK version updated from 0.2.0 to 0.2.1
OpenAPI document version update from 2.0.1 to 2.0.3 across all files
Auto-generated document updates
0.2.0
version 0.2.0 release based on Xero OpenAPI Spec version 2.0.1
OpenAPI Generator Version updated from v4.0.0 to v4.2.0
Header Parameter for all API calls changed from "Xero-Tenant-Id" to "xero-tenant-id".
Removed all #bulk methods, corresponding create methods have been adjusted e.g. create_employees
Added support for unitdp parameter
Added support for summarize_errors parameter for a few methods
Removed following methods:
- create_credit_note
- create_employee
- create_invoice_attachment_by_file_name
- create_invoice_attachment_by_file_name_with_http_info
- create_item_with_http_info
- create_item
- create_linked_transactions
- create_linked_transactions_with_http_info
- create_manual_journal_with_http_info
- create_overpayment_allocations
- create_tax_rate
- create_tax_rate_with_http_info
Corrected query parameters for Bank Summary report
content_type parameter removed from following methods:
- get_credit_note_as_pdf
- get_credit_note_as_pdf_with_http_info
- get_invoice_as_pdf
- get_invoice_as_pdf_with_http_info
Added methods:
- get_quote
- get_quote_history
- get_quote_history_with_http_info
- get_quotes
- update_or_create_credit_notes
- update_or_create_credit_notes_with_http_info
- update_or_create_employees
- update_or_create_employees_with_http_info
- update_or_create_invoices
- update_or_create_invoices_with_http_info
- update_or_create_items
- update_or_create_items_with_http_info
- update_or_create_manual_journals
- update_or_create_manual_journals_with_http_info
- update_or_create_purchase_orders
- update_or_create_purchase_orders_with_http_info
- update_or_create_quotes
- update_or_create_quotes_with_http_info
- update_purchase_order
- update_quote
- update_receipt