diff --git a/.gitignore b/.gitignore index fb7a88e1..3b92fe76 100644 --- a/.gitignore +++ b/.gitignore @@ -49,3 +49,4 @@ build-iPhoneSimulator/ # unless supporting rvm < 1.11.0 or doing something fancy, ignore this: .rvmrc .DS_Store +build_notes.md diff --git a/README.md b/README.md index 7e73f279..554986e8 100644 --- a/README.md +++ b/README.md @@ -119,24 +119,64 @@ token_set = xero_client.token_set ``` ## API Usage +> Comprehensive xero-ruby API usage is showcased here: https://github.com/XeroAPI/xero-ruby-oauth2-app + +Here is the basic workflow of using SDK once you have a valid `access_token` (and `token_set`) stored on an instance of the `xero_client` + ```ruby require 'xero-ruby' # reference `Authorization & Callback` to first store a valid token_set on the `xero_client` xero_client.refresh_token_set(user.token_set) - # Accounting API set (https://github.com/XeroAPI/xero-ruby/blob/master/accounting/lib/xero-ruby/api/accounting_api.rb) + # Using the Accounting API set (https://github.com/XeroAPI/xero-ruby/blob/master/accounting/lib/xero-ruby/api/accounting_api.rb) + + # Examples invoices = xero_client.accounting_api.get_invoices(user.active_tenant_id).invoices accounts = xero_client.accounting_api.get_accounts(user.active_tenant_id).accounts contacts = xero_client.accounting_api.get_contacts(user.active_tenant_id).contacts - # Asset API set (https://github.com/XeroAPI/xero-ruby/blob/master/accounting/lib/xero-ruby/api/asset_api.rb) + contacts = xero_client.accounting_api.get_contacts(current_user.active_tenant_id).contacts + invoices = { invoices: [{ type: XeroRuby::Accounting::Invoice::ACCREC, contact: { contact_id: contacts[0].contact_id }, line_items: [{ description: "Acme Tires", quantity: BigDecimal("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 }]} + invoice = xero_client.accounting_api.create_invoices(current_user.active_tenant_id, invoices).invoices.first + + # all money and fields requiring advanced precision utilize BigDecimal + puts invoice.unit_amount + => 0.2099e2 + + puts invoice.unit_amount.class + => BigDecimal + + puts invoice.unit_amount.to_s("F") + => "20.99" + + # or if using Rails https://api.rubyonrails.org/classes/ActionView/Helpers/NumberHelper.html#method-i-number_to_currency + number_to_currency(invoice.unit_amount, :unit => "$") + + # creating an object History record + payment = xero_client.accounting_api.get_payments(current_user.active_tenant_id).payments.first + history_records = { history_records:[ { details: "This payment now has some History #{rand(10000)}" } ]} + payment_history = xero_client.accounting_api.create_payment_history(user.active_tenant_id, payment.payment_id, history_records) + + # creating an object Attachment record + account = xero_client.accounting_api.get_accounts(current_user.active_tenant_id).accounts.first + file_name = "an-account-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_account_attachment_by_file_name(current_user.active_tenant_id, @account.account_id, file_name, file, opts) + + # Using the Asset API set (https://github.com/XeroAPI/xero-ruby/blob/master/accounting/lib/xero-ruby/api/asset_api.rb) asset = { "assetName": "AssetName: #{rand(10000)}", "assetNumber": "Asset: #{rand(10000)}", "assetStatus": "DRAFT" } asset = xero_client.asset_api.create_asset(current_user.active_tenant_id, asset) + + # Using the Project API set (https://github.com/XeroAPI/xero-ruby/blob/master/docs/projects/ProjectApi.md) + projects = xero_client.project_api.get_projects(current_user.active_tenant_id).items ``` If you have use cases outside of these examples or this readmy, please let us know! diff --git a/docs/accounting/AccountingApi.md b/docs/accounting/AccountingApi.md index 2551c1c2..79cf4eab 100644 --- a/docs/accounting/AccountingApi.md +++ b/docs/accounting/AccountingApi.md @@ -6,7 +6,7 @@ Method | HTTP request | Description ------------- | ------------- | ------------- [**create_account**](AccountingApi.md#create_account) | **PUT** /Accounts | Allows you to create a new chart of accounts [**create_account_attachment_by_file_name**](AccountingApi.md#create_account_attachment_by_file_name) | **PUT** /Accounts/{AccountID}/Attachments/{FileName} | Allows you to create Attachment on Account -[**create_bank_transaction_attachment_by_file_name**](AccountingApi.md#create_bank_transaction_attachment_by_file_name) | **PUT** /BankTransactions/{BankTransactionID}/Attachments/{FileName} | Allows you to createa an Attachment on BankTransaction by Filename +[**create_bank_transaction_attachment_by_file_name**](AccountingApi.md#create_bank_transaction_attachment_by_file_name) | **PUT** /BankTransactions/{BankTransactionID}/Attachments/{FileName} | Allows you to create an Attachment on BankTransaction by Filename [**create_bank_transaction_history_record**](AccountingApi.md#create_bank_transaction_history_record) | **PUT** /BankTransactions/{BankTransactionID}/History | Allows you to create history record for a bank transactions [**create_bank_transactions**](AccountingApi.md#create_bank_transactions) | **PUT** /BankTransactions | Allows you to create one or more spend or receive money transaction [**create_bank_transfer**](AccountingApi.md#create_bank_transfer) | **PUT** /BankTransfers | Allows you to create a bank transfers @@ -186,7 +186,7 @@ Method | HTTP request | Description [**get_users**](AccountingApi.md#get_users) | **GET** /Users | Allows you to retrieve users [**update_account**](AccountingApi.md#update_account) | **POST** /Accounts/{AccountID} | Allows you to update a chart of accounts [**update_account_attachment_by_file_name**](AccountingApi.md#update_account_attachment_by_file_name) | **POST** /Accounts/{AccountID}/Attachments/{FileName} | Allows you to update Attachment on Account by Filename -[**update_bank_transaction**](AccountingApi.md#update_bank_transaction) | **POST** /BankTransactions/{BankTransactionID} | +[**update_bank_transaction**](AccountingApi.md#update_bank_transaction) | **POST** /BankTransactions/{BankTransactionID} | Allows you to update a single spend or receive money transaction [**update_bank_transaction_attachment_by_file_name**](AccountingApi.md#update_bank_transaction_attachment_by_file_name) | **POST** /BankTransactions/{BankTransactionID}/Attachments/{FileName} | Allows you to update an Attachment on BankTransaction by Filename [**update_bank_transfer_attachment_by_file_name**](AccountingApi.md#update_bank_transfer_attachment_by_file_name) | **POST** /BankTransfers/{BankTransferID}/Attachments/{FileName} | [**update_contact**](AccountingApi.md#update_contact) | **POST** /Contacts/{ContactID} | @@ -360,7 +360,7 @@ Name | Type | Description | Notes > Attachments create_bank_transaction_attachment_by_file_name(xero_tenant_id, bank_transaction_id, file_name, body) -Allows you to createa an Attachment on BankTransaction by Filename +Allows you to create an Attachment on BankTransaction by Filename ### Example @@ -394,7 +394,7 @@ bank_transaction_id = '00000000-0000-0000-000-000000000000' # String | Xero gene file_name = 'xero-dev.jpg' # String | The name of the file being attached body = 'body_example' # String | Byte array of file in body of request begin - #Allows you to createa an Attachment on BankTransaction by Filename + #Allows you to create an Attachment on BankTransaction by Filename result = api_instance.create_bank_transaction_attachment_by_file_name(xero_tenant_id, bank_transaction_id, file_name, body) p result rescue XeroRuby::Accounting::ApiError => e @@ -1132,7 +1132,7 @@ api_instance = xero_client.accounting_api api_instance = xero_client.asset_api # :projects_api api_instance = xero_client.projects_api -contacts = { contacts: [{ contactID: "a3675fc4-f8dd-4f03-ba5b-f1870566bcd7" }, { contactID: "4e1753b9-018a-4775-b6aa-1bc7871cfee3" }]} +contacts = { contacts: [{ contact_id: "a3675fc4-f8dd-4f03-ba5b-f1870566bcd7" }, { contact_id: "4e1753b9-018a-4775-b6aa-1bc7871cfee3" }]} begin #Allows you to add Contacts to a Contact Group @@ -1305,7 +1305,7 @@ Name | Type | Description | Notes ## create_credit_note_allocation -> Allocations create_credit_note_allocation(xero_tenant_id, credit_note_id, allocations) +> Allocations create_credit_note_allocation(xero_tenant_id, credit_note_id, allocations, opts) Allows you to create Allocation on CreditNote @@ -1336,9 +1336,13 @@ api_instance = xero_client.asset_api api_instance = xero_client.projects_api allocations = { allocations: [{ amount: 1.0, date: "2019-03-05", invoice: { invoice_id: "c45720a1-ade3-4a38-a064-d15489be6841", line_items: [], type: XeroRuby::Accounting::Invoice::ACCPAY, contact: {} }}]} +opts = { + summarize_errors: false # Boolean | If false return 200 OK and mix of successfully created obejcts and any with validation errors +} + begin #Allows you to create Allocation on CreditNote - result = api_instance.create_credit_note_allocation(xero_tenant_id, credit_note_id, allocations) + result = api_instance.create_credit_note_allocation(xero_tenant_id, credit_note_id, allocations, opts) p result rescue XeroRuby::Accounting::ApiError => e puts "Exception when calling AccountingApi->create_credit_note_allocation: #{e}" @@ -1353,6 +1357,7 @@ Name | Type | Description | Notes **xero_tenant_id** | **String**| Xero identifier for Tenant | **credit_note_id** | [**String**](.md)| Unique identifier for a Credit Note | **allocations** | [**Allocations**](Allocations.md)| Allocations with array of Allocation object in body of request. | + **summarize_errors** | **Boolean**| If false return 200 OK and mix of successfully created obejcts and any with validation errors | [optional] [default to false] ### Return type @@ -12874,9 +12879,9 @@ Name | Type | Description | Notes ## update_bank_transaction -> BankTransactions update_bank_transaction(xero_tenant_id, bank_transactions) - +> BankTransactions update_bank_transaction(xero_tenant_id, bank_transaction_id, bank_transactions, opts) +Allows you to update a single spend or receive money transaction ### Example @@ -12903,10 +12908,15 @@ api_instance = xero_client.accounting_api api_instance = xero_client.asset_api # :projects_api api_instance = xero_client.projects_api -{ bank_transactions: [{ type: XeroRuby::Accounting::BankTransaction::SPEND, date: "2019-02-25", reference: "You just updated", status: XeroRuby::Accounting::BankTransaction::AUTHORISED, bank_transaction_id: "00000000-0000-0000-000-000000000000", line_items: [], contact: {}, bank_account: { account_id: "00000000-0000-0000-000-000000000000" }}]} summary: Allows you to update a single spend or receive money transaction parameters: - required: true in: path name: BankTransactionID description: Xero generated unique identifier for a bank transaction example: "00000000-0000-0000-000-000000000000" schema: type: string format: uuid - $ref: +{ bank_transactions: [{ type: XeroRuby::Accounting::BankTransaction::SPEND, date: "2019-02-25", reference: "You just updated", status: XeroRuby::Accounting::BankTransaction::AUTHORISED, bank_transaction_id: "00000000-0000-0000-000-000000000000", line_items: [], contact: {}, bank_account: { account_id: "00000000-0000-0000-000-000000000000" }}]} + +opts = { + unitdp: 4 # Integer | e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts +} begin - result = api_instance.update_bank_transaction(xero_tenant_id, bank_transactions) + #Allows you to update a single spend or receive money transaction + result = api_instance.update_bank_transaction(xero_tenant_id, bank_transaction_id, bank_transactions, opts) p result rescue XeroRuby::Accounting::ApiError => e puts "Exception when calling AccountingApi->update_bank_transaction: #{e}" @@ -12919,7 +12929,9 @@ end Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **xero_tenant_id** | **String**| Xero identifier for Tenant | + **bank_transaction_id** | [**String**](.md)| Xero generated unique identifier for a bank transaction | **bank_transactions** | [**BankTransactions**](BankTransactions.md)| | + **unitdp** | **Integer**| e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts | [optional] ### Return type diff --git a/docs/accounting/ManualJournalLine.md b/docs/accounting/ManualJournalLine.md index 5cd35619..6e514b47 100644 --- a/docs/accounting/ManualJournalLine.md +++ b/docs/accounting/ManualJournalLine.md @@ -6,6 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **line_amount** | **Float** | total for line. Debits are positive, credits are negative value | [optional] **account_code** | **String** | See Accounts | [optional] +**account_id** | **String** | See Accounts | [optional] **description** | **String** | Description for journal line | [optional] **tax_type** | **String** | The tax type from TaxRates | [optional] **tracking** | [**Array<TrackingCategory>**](TrackingCategory.md) | Optional Tracking Category – see Tracking. Any JournalLine can have a maximum of 2 <TrackingCategory> elements. | [optional] @@ -19,6 +20,7 @@ require 'XeroRuby::Accounting' instance = XeroRuby::Accounting::ManualJournalLine.new(line_amount: -2569.0, account_code: 720, + account_id: null, description: Coded incorrectly Office Equipment should be Computer Equipment, tax_type: null, tracking: null, diff --git a/docs/accounting/Organisation.md b/docs/accounting/Organisation.md index 921d3ef4..3f4a504a 100644 --- a/docs/accounting/Organisation.md +++ b/docs/accounting/Organisation.md @@ -28,7 +28,7 @@ Name | Type | Description | Notes **end_of_year_lock_date** | **Date** | Shown if set. See lock dates | [optional] **created_date_utc** | **DateTime** | Timestamp when the organisation was created in Xero | [optional] **timezone** | [**TimeZone**](TimeZone.md) | | [optional] -**organisation_entity_type** | **String** | Organisation Type | [optional] +**organisation_entity_type** | **String** | Organisation Entity Type | [optional] **short_code** | **String** | A unique identifier for the organisation. Potential uses. | [optional] **_class** | **String** | Organisation Classes describe which plan the Xero organisation is on (e.g. DEMO, TRIAL, PREMIUM) | [optional] **edition** | **String** | BUSINESS or PARTNER. Partner edition organisations are sold exclusively through accounting partners and have restricted functionality (e.g. no access to invoicing) | [optional] diff --git a/docs/accounting/Report.md b/docs/accounting/Report.md index dcb380a3..8111554d 100644 --- a/docs/accounting/Report.md +++ b/docs/accounting/Report.md @@ -10,7 +10,7 @@ Name | Type | Description | Notes **report_title** | **String** | See Prepayment Types | [optional] **report_date** | **String** | Date of report | [optional] **updated_date_utc** | **DateTime** | Updated Date | [optional] -**contacts** | [**Array<TenNinteyNineContact>**](TenNinteyNineContact.md) | | [optional] +**contacts** | [**Array<TenNinetyNineContact>**](TenNinetyNineContact.md) | | [optional] ## Code Sample diff --git a/docs/accounting/TenNinteyNineContact.md b/docs/accounting/TenNinetyNineContact.md similarity index 95% rename from docs/accounting/TenNinteyNineContact.md rename to docs/accounting/TenNinetyNineContact.md index abe0b22a..db9ba587 100644 --- a/docs/accounting/TenNinteyNineContact.md +++ b/docs/accounting/TenNinetyNineContact.md @@ -1,4 +1,4 @@ -# XeroRuby::Accounting::TenNinteyNineContact +# XeroRuby::Accounting::TenNinetyNineContact ## Properties @@ -32,7 +32,7 @@ Name | Type | Description | Notes ```ruby require 'XeroRuby::Accounting' -instance = XeroRuby::Accounting::TenNinteyNineContact.new(box1: null, +instance = XeroRuby::Accounting::TenNinetyNineContact.new(box1: null, box2: null, box3: null, box4: null, diff --git a/lib/xero-ruby.rb b/lib/xero-ruby.rb index 63ae7004..4ccd3a2a 100644 --- a/lib/xero-ruby.rb +++ b/lib/xero-ruby.rb @@ -3,7 +3,7 @@ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) -The version of the OpenAPI document: 2.2.2 +The version of the OpenAPI document: 2.2.11 Contact: api@xero.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 4.3.1 @@ -152,7 +152,7 @@ require 'xero-ruby/models/accounting/tax_rate' require 'xero-ruby/models/accounting/tax_rates' require 'xero-ruby/models/accounting/tax_type' -require 'xero-ruby/models/accounting/ten_nintey_nine_contact' +require 'xero-ruby/models/accounting/ten_ninety_nine_contact' require 'xero-ruby/models/accounting/time_zone' require 'xero-ruby/models/accounting/tracking_categories' require 'xero-ruby/models/accounting/tracking_category' diff --git a/lib/xero-ruby/api/accounting_api.rb b/lib/xero-ruby/api/accounting_api.rb index 87fb0345..da8c061f 100644 --- a/lib/xero-ruby/api/accounting_api.rb +++ b/lib/xero-ruby/api/accounting_api.rb @@ -3,7 +3,7 @@ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) -The version of the OpenAPI document: 2.2.2 +The version of the OpenAPI document: 2.2.11 Contact: api@xero.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 4.3.1 @@ -169,7 +169,7 @@ def create_account_attachment_by_file_name_with_http_info(xero_tenant_id, accoun return data, status_code, headers end - # Allows you to createa an Attachment on BankTransaction by Filename + # Allows you to create an Attachment on BankTransaction by Filename # @param xero_tenant_id [String] Xero identifier for Tenant # @param bank_transaction_id [String] Xero generated unique identifier for a bank transaction # @param file_name [String] The name of the file being attached @@ -181,7 +181,7 @@ def create_bank_transaction_attachment_by_file_name(xero_tenant_id, bank_transac data end - # Allows you to createa an Attachment on BankTransaction by Filename + # Allows you to create an Attachment on BankTransaction by Filename # @param xero_tenant_id [String] Xero identifier for Tenant # @param bank_transaction_id [String] Xero generated unique identifier for a bank transaction # @param file_name [String] The name of the file being attached @@ -1218,6 +1218,7 @@ def create_contacts_with_http_info(xero_tenant_id, contacts, opts = {}) # @param credit_note_id [String] Unique identifier for a Credit Note # @param allocations [Allocations] Allocations with array of Allocation object in body of request. # @param [Hash] opts the optional parameters + # @option opts [Boolean] :summarize_errors If false return 200 OK and mix of successfully created obejcts and any with validation errors (default to false) # @return [Allocations] def create_credit_note_allocation(xero_tenant_id, credit_note_id, allocations, opts = {}) data, _status_code, _headers = create_credit_note_allocation_with_http_info(xero_tenant_id, credit_note_id, allocations, opts) @@ -1229,6 +1230,7 @@ def create_credit_note_allocation(xero_tenant_id, credit_note_id, allocations, o # @param credit_note_id [String] Unique identifier for a Credit Note # @param allocations [Allocations] Allocations with array of Allocation object in body of request. # @param [Hash] opts the optional parameters + # @option opts [Boolean] :summarize_errors If false return 200 OK and mix of successfully created obejcts and any with validation errors # @return [Array<(Allocations, Integer, Hash)>] Allocations data, response status code and response headers def create_credit_note_allocation_with_http_info(xero_tenant_id, credit_note_id, allocations, opts = {}) if @api_client.config.debugging @@ -1251,6 +1253,7 @@ def create_credit_note_allocation_with_http_info(xero_tenant_id, credit_note_id, # query parameters query_params = opts[:query_params] || {} + query_params[:'summarizeErrors'] = opts[:'summarize_errors'] if !opts[:'summarize_errors'].nil? # header parameters header_params = opts[:header_params] || {} @@ -13149,20 +13152,26 @@ def update_account_attachment_by_file_name_with_http_info(xero_tenant_id, accoun return data, status_code, headers end + # Allows you to update a single spend or receive money transaction # @param xero_tenant_id [String] Xero identifier for Tenant + # @param bank_transaction_id [String] Xero generated unique identifier for a bank transaction # @param bank_transactions [BankTransactions] # @param [Hash] opts the optional parameters + # @option opts [Integer] :unitdp e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts # @return [BankTransactions] - def update_bank_transaction(xero_tenant_id, bank_transactions, opts = {}) - data, _status_code, _headers = update_bank_transaction_with_http_info(xero_tenant_id, bank_transactions, opts) + def update_bank_transaction(xero_tenant_id, bank_transaction_id, bank_transactions, opts = {}) + data, _status_code, _headers = update_bank_transaction_with_http_info(xero_tenant_id, bank_transaction_id, bank_transactions, opts) data end + # Allows you to update a single spend or receive money transaction # @param xero_tenant_id [String] Xero identifier for Tenant + # @param bank_transaction_id [String] Xero generated unique identifier for a bank transaction # @param bank_transactions [BankTransactions] # @param [Hash] opts the optional parameters + # @option opts [Integer] :unitdp e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts # @return [Array<(BankTransactions, Integer, Hash)>] BankTransactions data, response status code and response headers - def update_bank_transaction_with_http_info(xero_tenant_id, bank_transactions, opts = {}) + def update_bank_transaction_with_http_info(xero_tenant_id, bank_transaction_id, bank_transactions, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.update_bank_transaction ...' end @@ -13170,15 +13179,20 @@ def update_bank_transaction_with_http_info(xero_tenant_id, bank_transactions, op if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.update_bank_transaction" end + # verify the required parameter 'bank_transaction_id' is set + if @api_client.config.client_side_validation && bank_transaction_id.nil? + fail ArgumentError, "Missing the required parameter 'bank_transaction_id' when calling AccountingApi.update_bank_transaction" + end # verify the required parameter 'bank_transactions' is set if @api_client.config.client_side_validation && bank_transactions.nil? fail ArgumentError, "Missing the required parameter 'bank_transactions' when calling AccountingApi.update_bank_transaction" end # resource path - local_var_path = '/BankTransactions/{BankTransactionID}' + local_var_path = '/BankTransactions/{BankTransactionID}'.sub('{' + 'BankTransactionID' + '}', bank_transaction_id.to_s) # query parameters query_params = opts[:query_params] || {} + query_params[:'unitdp'] = opts[:'unitdp'] if !opts[:'unitdp'].nil? # header parameters header_params = opts[:header_params] || {} diff --git a/lib/xero-ruby/api/asset_api.rb b/lib/xero-ruby/api/asset_api.rb index a5b13a61..4b7bb11c 100644 --- a/lib/xero-ruby/api/asset_api.rb +++ b/lib/xero-ruby/api/asset_api.rb @@ -3,7 +3,7 @@ #This is the Xero Assets API -The version of the OpenAPI document: 2.2.6 +The version of the OpenAPI document: 2.2.11 Contact: api@xero.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 4.3.1 diff --git a/lib/xero-ruby/api/project_api.rb b/lib/xero-ruby/api/project_api.rb index d76c0ed5..bd13d101 100644 --- a/lib/xero-ruby/api/project_api.rb +++ b/lib/xero-ruby/api/project_api.rb @@ -3,7 +3,7 @@ #This is the Xero Projects API -The version of the OpenAPI document: 2.2.6 +The version of the OpenAPI document: 2.2.11 Contact: api@xero.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 4.3.1 diff --git a/lib/xero-ruby/api_client.rb b/lib/xero-ruby/api_client.rb index 1dffa2ad..e35a5d83 100644 --- a/lib/xero-ruby/api_client.rb +++ b/lib/xero-ruby/api_client.rb @@ -3,7 +3,7 @@ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) -The version of the OpenAPI document: 2.2.2 +The version of the OpenAPI document: 2.2.11 Contact: api@xero.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 4.3.1 @@ -176,6 +176,7 @@ def call_api(http_method, path, opts = {}) end if opts[:return_type] + prepare_file(response) if opts[:return_type] == 'File' data = deserialize(response, opts[:return_type]) else data = nil @@ -222,7 +223,6 @@ def build_request(http_method, path, request, opts = {}) request.body = req_body request.url url request.params = query_params - download_file(request) if opts[:return_type] == 'File' request end @@ -376,33 +376,24 @@ def api_set_prefix(return_type) # process can use. # # @see Configuration#temp_folder_path - def download_file(request) - tempfile = nil - encoding = nil - request.on_headers do |response| - content_disposition = response.headers['Content-Disposition'] - if content_disposition && content_disposition =~ /filename=/i - filename = content_disposition[/filename=['"]?([^'"\s]+)['"]?/, 1] - prefix = sanitize_filename(filename) - else - prefix = 'download-' - end - prefix = prefix + '-' unless prefix.end_with?('-') - encoding = response.body.encoding - tempfile = Tempfile.open(prefix, @config.temp_folder_path, encoding: encoding) - @tempfile = tempfile - end - request.on_body do |chunk| - chunk.force_encoding(encoding) - tempfile.write(chunk) - end - request.on_complete do |response| - tempfile.close if tempfile - @config.logger.info "Temp file written to #{tempfile.path}, please copy the file to a proper folder "\ - "with e.g. `FileUtils.cp(tempfile.path, '/new/file/path')` otherwise the temp file "\ - "will be deleted automatically with GC. It's also recommended to delete the temp file "\ - "explicitly with `tempfile.delete`" + def prepare_file(response) + content_disposition = response.headers['Content-Disposition'] + if content_disposition && content_disposition =~ /filename=/i + filename = content_disposition[/filename=['"]?([^'"\s]+)['"]?/, 1] + prefix = sanitize_filename(filename) + else + prefix = 'download-' end + prefix = prefix + '-' unless prefix.end_with?('-') + encoding = response.body.encoding + tempfile = Tempfile.open(prefix, @config.temp_folder_path, encoding: encoding) + @tempfile = tempfile + tempfile.write(response.body) + tempfile.close if tempfile + @config.logger.info "Temp file written to #{tempfile.path}, please copy the file to a proper folder "\ + "with e.g. `FileUtils.cp(tempfile.path, '/new/file/path')` otherwise the temp file "\ + "will be deleted automatically with GC. It's also recommended to delete the temp file "\ + "explicitly with `tempfile.delete`" end # Sanitize filename by removing path. @@ -485,11 +476,55 @@ def object_to_http_body(model) # @return [String] JSON string representation of the object def object_to_hash(obj) if obj.respond_to?(:to_hash) - obj.to_hash + to_camel_keys(obj).to_hash + else + to_camel_keys(obj) + end + end + + # START - Re-serializes snake_cased params to PascalCase required by XeroAPI + def to_camel_keys(value = self) + case value + when Array + value.map { |v| to_camel_keys(v) } + when Hash + Hash[value.map { |k, v| [camelize_key(k), to_camel_keys(v)] }] + else + value + end + end + + def camelize_key(key, first_upper = true) + if key.is_a? Symbol + camelize(key.to_s, first_upper).to_sym + elsif key.is_a? String + camelize(key, first_upper) + else + key # Awrence can't camelize anything except strings and symbols + end + end + + def camelize(snake_word, first_upper = true) + if first_upper + str = snake_word.to_s + str = gsubbed(str, /(?:^|_)([^_\s]+)/) + str = gsubbed(str, %r{/([^/]*)}, "::") + str else - obj + parts = snake_word.split("_", 2) + parts[0] << camelize(parts[1]) if parts.size > 1 + parts[0] || "" + end + end + + def gsubbed(str, pattern, extra = "") + key_map_scronyms = { "id" => "ID" } + str = str.gsub(pattern) do + extra + (key_map_scronyms[Regexp.last_match(1)] || Regexp.last_match(1).capitalize) end + str end + # END - Re-serializes snake_cased params to PascalCase required by XeroAPI # Build parameter value according to the given collection format. # @param [String] collection_format one of :csv, :ssv, :tsv, :pipes and :multi @@ -504,7 +539,7 @@ def build_collection_param(param, collection_format) when :pipes param.join('|') when :multi - # return the array directly as typhoeus will handle it as expected + # return the array directly as http client will handle it as expected param else fail "unknown collection format: #{collection_format.inspect}" diff --git a/lib/xero-ruby/api_error.rb b/lib/xero-ruby/api_error.rb index fe6065f6..27dfec27 100644 --- a/lib/xero-ruby/api_error.rb +++ b/lib/xero-ruby/api_error.rb @@ -3,7 +3,7 @@ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) -The version of the OpenAPI document: 2.2.2 +The version of the OpenAPI document: 2.2.11 Contact: api@xero.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 4.3.1 diff --git a/lib/xero-ruby/configuration.rb b/lib/xero-ruby/configuration.rb index 4776841d..63c59c1a 100644 --- a/lib/xero-ruby/configuration.rb +++ b/lib/xero-ruby/configuration.rb @@ -3,7 +3,7 @@ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) -The version of the OpenAPI document: 2.2.2 +The version of the OpenAPI document: 2.2.11 Contact: api@xero.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 4.3.1 @@ -124,9 +124,6 @@ class Configuration # Set this to customize parameters encoding of array parameter with multi collectionFormat. # Default to nil. - # - # @see The params_encoding option of Ethon. Related source code: - # https://github.com/typhoeus/ethon/blob/master/lib/ethon/easy/queryable.rb#L96 attr_accessor :params_encoding attr_accessor :inject_format diff --git a/lib/xero-ruby/models/accounting/account.rb b/lib/xero-ruby/models/accounting/account.rb index 5cf6b997..4e41e069 100644 --- a/lib/xero-ruby/models/accounting/account.rb +++ b/lib/xero-ruby/models/accounting/account.rb @@ -3,7 +3,7 @@ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) -The version of the OpenAPI document: 2.2.2 +The version of the OpenAPI document: 2.2.11 Contact: api@xero.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 4.3.1 @@ -14,6 +14,8 @@ require 'date' module XeroRuby::Accounting + require 'bigdecimal' + class Account # Customer defined alpha numeric account code e.g 200 or SALES (max length = 10) attr_accessor :code @@ -89,7 +91,8 @@ class Account CISLABOURINCOME = "CISLABOURINCOME".freeze CISLIABILITY = "CISLIABILITY".freeze CISMATERIALS = "CISMATERIALS".freeze - EMPTY = "".freeze + # duplicate definitions generated: https://github.com/XeroAPI/xero-ruby/issues/53#issuecomment-668893305 + # EMPTY = "".freeze # Shown if set attr_accessor :reporting_code @@ -456,6 +459,8 @@ def _deserialize(type, value) value.to_i when :Float value.to_f + when :BigDecimal + BigDecimal(value.to_s) when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true diff --git a/lib/xero-ruby/models/accounting/account_type.rb b/lib/xero-ruby/models/accounting/account_type.rb index 60406e95..148125c9 100644 --- a/lib/xero-ruby/models/accounting/account_type.rb +++ b/lib/xero-ruby/models/accounting/account_type.rb @@ -3,7 +3,7 @@ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) -The version of the OpenAPI document: 2.2.2 +The version of the OpenAPI document: 2.2.11 Contact: api@xero.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 4.3.1 diff --git a/lib/xero-ruby/models/accounting/accounts.rb b/lib/xero-ruby/models/accounting/accounts.rb index 5cbb0178..e582b9f7 100644 --- a/lib/xero-ruby/models/accounting/accounts.rb +++ b/lib/xero-ruby/models/accounting/accounts.rb @@ -3,7 +3,7 @@ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) -The version of the OpenAPI document: 2.2.2 +The version of the OpenAPI document: 2.2.11 Contact: api@xero.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 4.3.1 @@ -14,6 +14,8 @@ require 'date' module XeroRuby::Accounting + require 'bigdecimal' + class Accounts attr_accessor :accounts @@ -130,6 +132,8 @@ def _deserialize(type, value) value.to_i when :Float value.to_f + when :BigDecimal + BigDecimal(value.to_s) when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true diff --git a/lib/xero-ruby/models/accounting/accounts_payable.rb b/lib/xero-ruby/models/accounting/accounts_payable.rb index ed7e50fe..4805d354 100644 --- a/lib/xero-ruby/models/accounting/accounts_payable.rb +++ b/lib/xero-ruby/models/accounting/accounts_payable.rb @@ -3,7 +3,7 @@ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) -The version of the OpenAPI document: 2.2.2 +The version of the OpenAPI document: 2.2.11 Contact: api@xero.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 4.3.1 @@ -14,6 +14,8 @@ require 'date' module XeroRuby::Accounting + require 'bigdecimal' + class AccountsPayable attr_accessor :outstanding @@ -32,8 +34,8 @@ def self.attribute_map # Attribute type mapping. def self.openapi_types { - :'outstanding' => :'Float', - :'overdue' => :'Float' + :'outstanding' => :'BigDecimal', + :'overdue' => :'BigDecimal' } end @@ -138,6 +140,8 @@ def _deserialize(type, value) value.to_i when :Float value.to_f + when :BigDecimal + BigDecimal(value.to_s) when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true diff --git a/lib/xero-ruby/models/accounting/accounts_receivable.rb b/lib/xero-ruby/models/accounting/accounts_receivable.rb index 38154450..cb3be86a 100644 --- a/lib/xero-ruby/models/accounting/accounts_receivable.rb +++ b/lib/xero-ruby/models/accounting/accounts_receivable.rb @@ -3,7 +3,7 @@ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) -The version of the OpenAPI document: 2.2.2 +The version of the OpenAPI document: 2.2.11 Contact: api@xero.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 4.3.1 @@ -14,6 +14,8 @@ require 'date' module XeroRuby::Accounting + require 'bigdecimal' + class AccountsReceivable attr_accessor :outstanding @@ -32,8 +34,8 @@ def self.attribute_map # Attribute type mapping. def self.openapi_types { - :'outstanding' => :'Float', - :'overdue' => :'Float' + :'outstanding' => :'BigDecimal', + :'overdue' => :'BigDecimal' } end @@ -138,6 +140,8 @@ def _deserialize(type, value) value.to_i when :Float value.to_f + when :BigDecimal + BigDecimal(value.to_s) when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true diff --git a/lib/xero-ruby/models/accounting/address.rb b/lib/xero-ruby/models/accounting/address.rb index 454909cf..7574df22 100644 --- a/lib/xero-ruby/models/accounting/address.rb +++ b/lib/xero-ruby/models/accounting/address.rb @@ -3,7 +3,7 @@ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) -The version of the OpenAPI document: 2.2.2 +The version of the OpenAPI document: 2.2.11 Contact: api@xero.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 4.3.1 @@ -14,6 +14,8 @@ require 'date' module XeroRuby::Accounting + require 'bigdecimal' + class Address # define the type of address attr_accessor :address_type @@ -390,6 +392,8 @@ def _deserialize(type, value) value.to_i when :Float value.to_f + when :BigDecimal + BigDecimal(value.to_s) when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true diff --git a/lib/xero-ruby/models/accounting/allocation.rb b/lib/xero-ruby/models/accounting/allocation.rb index 15f0e267..71e45487 100644 --- a/lib/xero-ruby/models/accounting/allocation.rb +++ b/lib/xero-ruby/models/accounting/allocation.rb @@ -3,7 +3,7 @@ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) -The version of the OpenAPI document: 2.2.2 +The version of the OpenAPI document: 2.2.11 Contact: api@xero.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 4.3.1 @@ -14,6 +14,8 @@ require 'date' module XeroRuby::Accounting + require 'bigdecimal' + class Allocation attr_accessor :invoice @@ -60,7 +62,7 @@ def self.openapi_types :'overpayment' => :'Overpayment', :'prepayment' => :'Prepayment', :'credit_note' => :'CreditNote', - :'amount' => :'Float', + :'amount' => :'BigDecimal', :'date' => :'Date', :'status_attribute_string' => :'String', :'validation_errors' => :'Array' @@ -215,6 +217,8 @@ def _deserialize(type, value) value.to_i when :Float value.to_f + when :BigDecimal + BigDecimal(value.to_s) when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true diff --git a/lib/xero-ruby/models/accounting/allocations.rb b/lib/xero-ruby/models/accounting/allocations.rb index 5577a115..8879f1ba 100644 --- a/lib/xero-ruby/models/accounting/allocations.rb +++ b/lib/xero-ruby/models/accounting/allocations.rb @@ -3,7 +3,7 @@ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) -The version of the OpenAPI document: 2.2.2 +The version of the OpenAPI document: 2.2.11 Contact: api@xero.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 4.3.1 @@ -14,6 +14,8 @@ require 'date' module XeroRuby::Accounting + require 'bigdecimal' + class Allocations attr_accessor :allocations @@ -130,6 +132,8 @@ def _deserialize(type, value) value.to_i when :Float value.to_f + when :BigDecimal + BigDecimal(value.to_s) when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true diff --git a/lib/xero-ruby/models/accounting/attachment.rb b/lib/xero-ruby/models/accounting/attachment.rb index 0b93cc91..b18bb623 100644 --- a/lib/xero-ruby/models/accounting/attachment.rb +++ b/lib/xero-ruby/models/accounting/attachment.rb @@ -3,7 +3,7 @@ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) -The version of the OpenAPI document: 2.2.2 +The version of the OpenAPI document: 2.2.11 Contact: api@xero.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 4.3.1 @@ -14,6 +14,8 @@ require 'date' module XeroRuby::Accounting + require 'bigdecimal' + class Attachment # Unique ID for the file attr_accessor :attachment_id @@ -178,6 +180,8 @@ def _deserialize(type, value) value.to_i when :Float value.to_f + when :BigDecimal + BigDecimal(value.to_s) when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true diff --git a/lib/xero-ruby/models/accounting/attachments.rb b/lib/xero-ruby/models/accounting/attachments.rb index 32cd006d..4dcc8b08 100644 --- a/lib/xero-ruby/models/accounting/attachments.rb +++ b/lib/xero-ruby/models/accounting/attachments.rb @@ -3,7 +3,7 @@ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) -The version of the OpenAPI document: 2.2.2 +The version of the OpenAPI document: 2.2.11 Contact: api@xero.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 4.3.1 @@ -14,6 +14,8 @@ require 'date' module XeroRuby::Accounting + require 'bigdecimal' + class Attachments attr_accessor :attachments @@ -130,6 +132,8 @@ def _deserialize(type, value) value.to_i when :Float value.to_f + when :BigDecimal + BigDecimal(value.to_s) when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true diff --git a/lib/xero-ruby/models/accounting/balances.rb b/lib/xero-ruby/models/accounting/balances.rb index d47c8fbc..a654bd19 100644 --- a/lib/xero-ruby/models/accounting/balances.rb +++ b/lib/xero-ruby/models/accounting/balances.rb @@ -3,7 +3,7 @@ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) -The version of the OpenAPI document: 2.2.2 +The version of the OpenAPI document: 2.2.11 Contact: api@xero.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 4.3.1 @@ -15,6 +15,8 @@ module XeroRuby::Accounting # The raw AccountsReceivable(sales invoices) and AccountsPayable(bills) outstanding and overdue amounts, not converted to base currency (read only) + require 'bigdecimal' + class Balances attr_accessor :accounts_receivable @@ -139,6 +141,8 @@ def _deserialize(type, value) value.to_i when :Float value.to_f + when :BigDecimal + BigDecimal(value.to_s) when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true diff --git a/lib/xero-ruby/models/accounting/bank_transaction.rb b/lib/xero-ruby/models/accounting/bank_transaction.rb index 1de4b956..54db53d3 100644 --- a/lib/xero-ruby/models/accounting/bank_transaction.rb +++ b/lib/xero-ruby/models/accounting/bank_transaction.rb @@ -3,7 +3,7 @@ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) -The version of the OpenAPI document: 2.2.2 +The version of the OpenAPI document: 2.2.11 Contact: api@xero.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 4.3.1 @@ -14,6 +14,8 @@ require 'date' module XeroRuby::Accounting + require 'bigdecimal' + class BankTransaction # See Bank Transaction Types attr_accessor :type @@ -153,13 +155,13 @@ def self.openapi_types :'date' => :'Date', :'reference' => :'String', :'currency_code' => :'CurrencyCode', - :'currency_rate' => :'Float', + :'currency_rate' => :'BigDecimal', :'url' => :'String', :'status' => :'String', :'line_amount_types' => :'LineAmountTypes', - :'sub_total' => :'Float', - :'total_tax' => :'Float', - :'total' => :'Float', + :'sub_total' => :'BigDecimal', + :'total_tax' => :'BigDecimal', + :'total' => :'BigDecimal', :'bank_transaction_id' => :'String', :'prepayment_id' => :'String', :'overpayment_id' => :'String', @@ -421,6 +423,8 @@ def _deserialize(type, value) value.to_i when :Float value.to_f + when :BigDecimal + BigDecimal(value.to_s) when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true diff --git a/lib/xero-ruby/models/accounting/bank_transactions.rb b/lib/xero-ruby/models/accounting/bank_transactions.rb index 41c83a5b..a21df5c7 100644 --- a/lib/xero-ruby/models/accounting/bank_transactions.rb +++ b/lib/xero-ruby/models/accounting/bank_transactions.rb @@ -3,7 +3,7 @@ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) -The version of the OpenAPI document: 2.2.2 +The version of the OpenAPI document: 2.2.11 Contact: api@xero.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 4.3.1 @@ -14,6 +14,8 @@ require 'date' module XeroRuby::Accounting + require 'bigdecimal' + class BankTransactions attr_accessor :bank_transactions @@ -130,6 +132,8 @@ def _deserialize(type, value) value.to_i when :Float value.to_f + when :BigDecimal + BigDecimal(value.to_s) when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true diff --git a/lib/xero-ruby/models/accounting/bank_transfer.rb b/lib/xero-ruby/models/accounting/bank_transfer.rb index 1f083f0c..4fa2eedb 100644 --- a/lib/xero-ruby/models/accounting/bank_transfer.rb +++ b/lib/xero-ruby/models/accounting/bank_transfer.rb @@ -3,7 +3,7 @@ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) -The version of the OpenAPI document: 2.2.2 +The version of the OpenAPI document: 2.2.11 Contact: api@xero.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 4.3.1 @@ -14,6 +14,8 @@ require 'date' module XeroRuby::Accounting + require 'bigdecimal' + class BankTransfer attr_accessor :from_bank_account @@ -70,10 +72,10 @@ def self.openapi_types { :'from_bank_account' => :'Account', :'to_bank_account' => :'Account', - :'amount' => :'Float', + :'amount' => :'BigDecimal', :'date' => :'Date', :'bank_transfer_id' => :'String', - :'currency_rate' => :'Float', + :'currency_rate' => :'BigDecimal', :'from_bank_transaction_id' => :'String', :'to_bank_transaction_id' => :'String', :'has_attachments' => :'Boolean', @@ -247,6 +249,8 @@ def _deserialize(type, value) value.to_i when :Float value.to_f + when :BigDecimal + BigDecimal(value.to_s) when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true diff --git a/lib/xero-ruby/models/accounting/bank_transfers.rb b/lib/xero-ruby/models/accounting/bank_transfers.rb index 05359282..782c42a4 100644 --- a/lib/xero-ruby/models/accounting/bank_transfers.rb +++ b/lib/xero-ruby/models/accounting/bank_transfers.rb @@ -3,7 +3,7 @@ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) -The version of the OpenAPI document: 2.2.2 +The version of the OpenAPI document: 2.2.11 Contact: api@xero.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 4.3.1 @@ -14,6 +14,8 @@ require 'date' module XeroRuby::Accounting + require 'bigdecimal' + class BankTransfers attr_accessor :bank_transfers @@ -130,6 +132,8 @@ def _deserialize(type, value) value.to_i when :Float value.to_f + when :BigDecimal + BigDecimal(value.to_s) when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true diff --git a/lib/xero-ruby/models/accounting/batch_payment.rb b/lib/xero-ruby/models/accounting/batch_payment.rb index 0bf6d124..08916444 100644 --- a/lib/xero-ruby/models/accounting/batch_payment.rb +++ b/lib/xero-ruby/models/accounting/batch_payment.rb @@ -3,7 +3,7 @@ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) -The version of the OpenAPI document: 2.2.2 +The version of the OpenAPI document: 2.2.11 Contact: api@xero.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 4.3.1 @@ -14,6 +14,8 @@ require 'date' module XeroRuby::Accounting + require 'bigdecimal' + class BatchPayment attr_accessor :account @@ -123,7 +125,7 @@ def self.openapi_types :'batch_payment_id' => :'String', :'date_string' => :'String', :'date' => :'Date', - :'amount' => :'Float', + :'amount' => :'BigDecimal', :'payments' => :'Array', :'type' => :'String', :'status' => :'String', @@ -405,6 +407,8 @@ def _deserialize(type, value) value.to_i when :Float value.to_f + when :BigDecimal + BigDecimal(value.to_s) when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true diff --git a/lib/xero-ruby/models/accounting/batch_payment_details.rb b/lib/xero-ruby/models/accounting/batch_payment_details.rb index 0339dfac..8cc0103f 100644 --- a/lib/xero-ruby/models/accounting/batch_payment_details.rb +++ b/lib/xero-ruby/models/accounting/batch_payment_details.rb @@ -3,7 +3,7 @@ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) -The version of the OpenAPI document: 2.2.2 +The version of the OpenAPI document: 2.2.11 Contact: api@xero.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 4.3.1 @@ -15,6 +15,8 @@ module XeroRuby::Accounting # Bank details for use on a batch payment stored with each contact + require 'bigdecimal' + class BatchPaymentDetails # Bank account number for use with Batch Payments attr_accessor :bank_account_number @@ -214,6 +216,8 @@ def _deserialize(type, value) value.to_i when :Float value.to_f + when :BigDecimal + BigDecimal(value.to_s) when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true diff --git a/lib/xero-ruby/models/accounting/batch_payments.rb b/lib/xero-ruby/models/accounting/batch_payments.rb index 610d83b6..4b5a0cc1 100644 --- a/lib/xero-ruby/models/accounting/batch_payments.rb +++ b/lib/xero-ruby/models/accounting/batch_payments.rb @@ -3,7 +3,7 @@ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) -The version of the OpenAPI document: 2.2.2 +The version of the OpenAPI document: 2.2.11 Contact: api@xero.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 4.3.1 @@ -14,6 +14,8 @@ require 'date' module XeroRuby::Accounting + require 'bigdecimal' + class BatchPayments attr_accessor :batch_payments @@ -130,6 +132,8 @@ def _deserialize(type, value) value.to_i when :Float value.to_f + when :BigDecimal + BigDecimal(value.to_s) when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true diff --git a/lib/xero-ruby/models/accounting/bill.rb b/lib/xero-ruby/models/accounting/bill.rb index bdc8c5bd..db342bb7 100644 --- a/lib/xero-ruby/models/accounting/bill.rb +++ b/lib/xero-ruby/models/accounting/bill.rb @@ -3,7 +3,7 @@ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) -The version of the OpenAPI document: 2.2.2 +The version of the OpenAPI document: 2.2.11 Contact: api@xero.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 4.3.1 @@ -14,6 +14,8 @@ require 'date' module XeroRuby::Accounting + require 'bigdecimal' + class Bill # Day of Month (0-31) attr_accessor :day @@ -138,6 +140,8 @@ def _deserialize(type, value) value.to_i when :Float value.to_f + when :BigDecimal + BigDecimal(value.to_s) when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true diff --git a/lib/xero-ruby/models/accounting/branding_theme.rb b/lib/xero-ruby/models/accounting/branding_theme.rb index 4ebea1a2..1ec05611 100644 --- a/lib/xero-ruby/models/accounting/branding_theme.rb +++ b/lib/xero-ruby/models/accounting/branding_theme.rb @@ -3,7 +3,7 @@ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) -The version of the OpenAPI document: 2.2.2 +The version of the OpenAPI document: 2.2.11 Contact: api@xero.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 4.3.1 @@ -14,6 +14,8 @@ require 'date' module XeroRuby::Accounting + require 'bigdecimal' + class BrandingTheme # Xero identifier attr_accessor :branding_theme_id @@ -213,6 +215,8 @@ def _deserialize(type, value) value.to_i when :Float value.to_f + when :BigDecimal + BigDecimal(value.to_s) when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true diff --git a/lib/xero-ruby/models/accounting/branding_themes.rb b/lib/xero-ruby/models/accounting/branding_themes.rb index 8467a498..f4b31c04 100644 --- a/lib/xero-ruby/models/accounting/branding_themes.rb +++ b/lib/xero-ruby/models/accounting/branding_themes.rb @@ -3,7 +3,7 @@ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) -The version of the OpenAPI document: 2.2.2 +The version of the OpenAPI document: 2.2.11 Contact: api@xero.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 4.3.1 @@ -14,6 +14,8 @@ require 'date' module XeroRuby::Accounting + require 'bigdecimal' + class BrandingThemes attr_accessor :branding_themes @@ -130,6 +132,8 @@ def _deserialize(type, value) value.to_i when :Float value.to_f + when :BigDecimal + BigDecimal(value.to_s) when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true diff --git a/lib/xero-ruby/models/accounting/cis_org_setting.rb b/lib/xero-ruby/models/accounting/cis_org_setting.rb index f25e15c9..9ae9207f 100644 --- a/lib/xero-ruby/models/accounting/cis_org_setting.rb +++ b/lib/xero-ruby/models/accounting/cis_org_setting.rb @@ -3,7 +3,7 @@ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) -The version of the OpenAPI document: 2.2.2 +The version of the OpenAPI document: 2.2.11 Contact: api@xero.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 4.3.1 @@ -14,6 +14,8 @@ require 'date' module XeroRuby::Accounting + require 'bigdecimal' + class CISOrgSetting # true or false - Boolean that describes if the organisation is a CIS Contractor attr_accessor :cis_contractor_enabled @@ -148,6 +150,8 @@ def _deserialize(type, value) value.to_i when :Float value.to_f + when :BigDecimal + BigDecimal(value.to_s) when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true diff --git a/lib/xero-ruby/models/accounting/cis_setting.rb b/lib/xero-ruby/models/accounting/cis_setting.rb index 82ec3de5..7f28291c 100644 --- a/lib/xero-ruby/models/accounting/cis_setting.rb +++ b/lib/xero-ruby/models/accounting/cis_setting.rb @@ -3,7 +3,7 @@ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) -The version of the OpenAPI document: 2.2.2 +The version of the OpenAPI document: 2.2.11 Contact: api@xero.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 4.3.1 @@ -14,6 +14,8 @@ require 'date' module XeroRuby::Accounting + require 'bigdecimal' + class CISSetting # Boolean that describes if the contact is a CIS Subcontractor attr_accessor :cis_enabled @@ -138,6 +140,8 @@ def _deserialize(type, value) value.to_i when :Float value.to_f + when :BigDecimal + BigDecimal(value.to_s) when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true diff --git a/lib/xero-ruby/models/accounting/cis_settings.rb b/lib/xero-ruby/models/accounting/cis_settings.rb index 3e72a953..3924e13d 100644 --- a/lib/xero-ruby/models/accounting/cis_settings.rb +++ b/lib/xero-ruby/models/accounting/cis_settings.rb @@ -3,7 +3,7 @@ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) -The version of the OpenAPI document: 2.2.2 +The version of the OpenAPI document: 2.2.11 Contact: api@xero.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 4.3.1 @@ -14,6 +14,8 @@ require 'date' module XeroRuby::Accounting + require 'bigdecimal' + class CISSettings attr_accessor :cis_settings @@ -130,6 +132,8 @@ def _deserialize(type, value) value.to_i when :Float value.to_f + when :BigDecimal + BigDecimal(value.to_s) when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true diff --git a/lib/xero-ruby/models/accounting/contact.rb b/lib/xero-ruby/models/accounting/contact.rb index 2e45ad88..3ba429bd 100644 --- a/lib/xero-ruby/models/accounting/contact.rb +++ b/lib/xero-ruby/models/accounting/contact.rb @@ -3,7 +3,7 @@ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) -The version of the OpenAPI document: 2.2.2 +The version of the OpenAPI document: 2.2.11 Contact: api@xero.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 4.3.1 @@ -14,6 +14,8 @@ require 'date' module XeroRuby::Accounting + require 'bigdecimal' + class Contact # Xero identifier attr_accessor :contact_id @@ -237,7 +239,7 @@ def self.openapi_types :'website' => :'String', :'branding_theme' => :'BrandingTheme', :'batch_payments' => :'BatchPaymentDetails', - :'discount' => :'Float', + :'discount' => :'BigDecimal', :'balances' => :'Balances', :'attachments' => :'Array', :'has_attachments' => :'Boolean', @@ -670,6 +672,8 @@ def _deserialize(type, value) value.to_i when :Float value.to_f + when :BigDecimal + BigDecimal(value.to_s) when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true diff --git a/lib/xero-ruby/models/accounting/contact_group.rb b/lib/xero-ruby/models/accounting/contact_group.rb index 8aa789f8..335e9019 100644 --- a/lib/xero-ruby/models/accounting/contact_group.rb +++ b/lib/xero-ruby/models/accounting/contact_group.rb @@ -3,7 +3,7 @@ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) -The version of the OpenAPI document: 2.2.2 +The version of the OpenAPI document: 2.2.11 Contact: api@xero.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 4.3.1 @@ -14,6 +14,8 @@ require 'date' module XeroRuby::Accounting + require 'bigdecimal' + class ContactGroup # The Name of the contact group. Required when creating a new contact group attr_accessor :name @@ -196,6 +198,8 @@ def _deserialize(type, value) value.to_i when :Float value.to_f + when :BigDecimal + BigDecimal(value.to_s) when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true diff --git a/lib/xero-ruby/models/accounting/contact_groups.rb b/lib/xero-ruby/models/accounting/contact_groups.rb index dbec474c..46d6318a 100644 --- a/lib/xero-ruby/models/accounting/contact_groups.rb +++ b/lib/xero-ruby/models/accounting/contact_groups.rb @@ -3,7 +3,7 @@ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) -The version of the OpenAPI document: 2.2.2 +The version of the OpenAPI document: 2.2.11 Contact: api@xero.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 4.3.1 @@ -14,6 +14,8 @@ require 'date' module XeroRuby::Accounting + require 'bigdecimal' + class ContactGroups attr_accessor :contact_groups @@ -130,6 +132,8 @@ def _deserialize(type, value) value.to_i when :Float value.to_f + when :BigDecimal + BigDecimal(value.to_s) when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true diff --git a/lib/xero-ruby/models/accounting/contact_person.rb b/lib/xero-ruby/models/accounting/contact_person.rb index 5e45588f..2aeac6c8 100644 --- a/lib/xero-ruby/models/accounting/contact_person.rb +++ b/lib/xero-ruby/models/accounting/contact_person.rb @@ -3,7 +3,7 @@ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) -The version of the OpenAPI document: 2.2.2 +The version of the OpenAPI document: 2.2.11 Contact: api@xero.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 4.3.1 @@ -14,6 +14,8 @@ require 'date' module XeroRuby::Accounting + require 'bigdecimal' + class ContactPerson # First name of person attr_accessor :first_name @@ -158,6 +160,8 @@ def _deserialize(type, value) value.to_i when :Float value.to_f + when :BigDecimal + BigDecimal(value.to_s) when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true diff --git a/lib/xero-ruby/models/accounting/contacts.rb b/lib/xero-ruby/models/accounting/contacts.rb index a2d1cf9f..fe205ba2 100644 --- a/lib/xero-ruby/models/accounting/contacts.rb +++ b/lib/xero-ruby/models/accounting/contacts.rb @@ -3,7 +3,7 @@ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) -The version of the OpenAPI document: 2.2.2 +The version of the OpenAPI document: 2.2.11 Contact: api@xero.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 4.3.1 @@ -14,6 +14,8 @@ require 'date' module XeroRuby::Accounting + require 'bigdecimal' + class Contacts attr_accessor :contacts @@ -130,6 +132,8 @@ def _deserialize(type, value) value.to_i when :Float value.to_f + when :BigDecimal + BigDecimal(value.to_s) when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true diff --git a/lib/xero-ruby/models/accounting/country_code.rb b/lib/xero-ruby/models/accounting/country_code.rb index 4a6f5c1d..3bd0df79 100644 --- a/lib/xero-ruby/models/accounting/country_code.rb +++ b/lib/xero-ruby/models/accounting/country_code.rb @@ -3,7 +3,7 @@ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) -The version of the OpenAPI document: 2.2.2 +The version of the OpenAPI document: 2.2.11 Contact: api@xero.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 4.3.1 diff --git a/lib/xero-ruby/models/accounting/credit_note.rb b/lib/xero-ruby/models/accounting/credit_note.rb index 29c095e5..47f3c21d 100644 --- a/lib/xero-ruby/models/accounting/credit_note.rb +++ b/lib/xero-ruby/models/accounting/credit_note.rb @@ -3,7 +3,7 @@ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) -The version of the OpenAPI document: 2.2.2 +The version of the OpenAPI document: 2.2.11 Contact: api@xero.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 4.3.1 @@ -14,6 +14,8 @@ require 'date' module XeroRuby::Accounting + require 'bigdecimal' + class CreditNote # See Credit Note Types attr_accessor :type @@ -164,9 +166,9 @@ def self.openapi_types :'status' => :'String', :'line_amount_types' => :'LineAmountTypes', :'line_items' => :'Array', - :'sub_total' => :'Float', - :'total_tax' => :'Float', - :'total' => :'Float', + :'sub_total' => :'BigDecimal', + :'total_tax' => :'BigDecimal', + :'total' => :'BigDecimal', :'updated_date_utc' => :'DateTime', :'currency_code' => :'CurrencyCode', :'fully_paid_on_date' => :'Date', @@ -174,8 +176,8 @@ def self.openapi_types :'credit_note_number' => :'String', :'reference' => :'String', :'sent_to_contact' => :'Boolean', - :'currency_rate' => :'Float', - :'remaining_credit' => :'Float', + :'currency_rate' => :'BigDecimal', + :'remaining_credit' => :'BigDecimal', :'allocations' => :'Array', :'applied_amount' => :'Float', :'payments' => :'Array', @@ -444,6 +446,8 @@ def _deserialize(type, value) value.to_i when :Float value.to_f + when :BigDecimal + BigDecimal(value.to_s) when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true diff --git a/lib/xero-ruby/models/accounting/credit_notes.rb b/lib/xero-ruby/models/accounting/credit_notes.rb index d008b453..7de14ac5 100644 --- a/lib/xero-ruby/models/accounting/credit_notes.rb +++ b/lib/xero-ruby/models/accounting/credit_notes.rb @@ -3,7 +3,7 @@ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) -The version of the OpenAPI document: 2.2.2 +The version of the OpenAPI document: 2.2.11 Contact: api@xero.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 4.3.1 @@ -14,6 +14,8 @@ require 'date' module XeroRuby::Accounting + require 'bigdecimal' + class CreditNotes attr_accessor :credit_notes @@ -130,6 +132,8 @@ def _deserialize(type, value) value.to_i when :Float value.to_f + when :BigDecimal + BigDecimal(value.to_s) when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true diff --git a/lib/xero-ruby/models/accounting/currencies.rb b/lib/xero-ruby/models/accounting/currencies.rb index 462dc561..f5b40a82 100644 --- a/lib/xero-ruby/models/accounting/currencies.rb +++ b/lib/xero-ruby/models/accounting/currencies.rb @@ -3,7 +3,7 @@ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) -The version of the OpenAPI document: 2.2.2 +The version of the OpenAPI document: 2.2.11 Contact: api@xero.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 4.3.1 @@ -14,6 +14,8 @@ require 'date' module XeroRuby::Accounting + require 'bigdecimal' + class Currencies attr_accessor :currencies @@ -130,6 +132,8 @@ def _deserialize(type, value) value.to_i when :Float value.to_f + when :BigDecimal + BigDecimal(value.to_s) when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true diff --git a/lib/xero-ruby/models/accounting/currency.rb b/lib/xero-ruby/models/accounting/currency.rb index 78c527b0..db3d9004 100644 --- a/lib/xero-ruby/models/accounting/currency.rb +++ b/lib/xero-ruby/models/accounting/currency.rb @@ -3,7 +3,7 @@ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) -The version of the OpenAPI document: 2.2.2 +The version of the OpenAPI document: 2.2.11 Contact: api@xero.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 4.3.1 @@ -14,6 +14,8 @@ require 'date' module XeroRuby::Accounting + require 'bigdecimal' + class Currency attr_accessor :code @@ -138,6 +140,8 @@ def _deserialize(type, value) value.to_i when :Float value.to_f + when :BigDecimal + BigDecimal(value.to_s) when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true diff --git a/lib/xero-ruby/models/accounting/currency_code.rb b/lib/xero-ruby/models/accounting/currency_code.rb index c4cdc829..254e947c 100644 --- a/lib/xero-ruby/models/accounting/currency_code.rb +++ b/lib/xero-ruby/models/accounting/currency_code.rb @@ -3,7 +3,7 @@ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) -The version of the OpenAPI document: 2.2.2 +The version of the OpenAPI document: 2.2.11 Contact: api@xero.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 4.3.1 diff --git a/lib/xero-ruby/models/accounting/element.rb b/lib/xero-ruby/models/accounting/element.rb index 2a02acd2..81ed07a6 100644 --- a/lib/xero-ruby/models/accounting/element.rb +++ b/lib/xero-ruby/models/accounting/element.rb @@ -3,7 +3,7 @@ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) -The version of the OpenAPI document: 2.2.2 +The version of the OpenAPI document: 2.2.11 Contact: api@xero.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 4.3.1 @@ -14,6 +14,8 @@ require 'date' module XeroRuby::Accounting + require 'bigdecimal' + class Element # Array of Validation Error message attr_accessor :validation_errors @@ -200,6 +202,8 @@ def _deserialize(type, value) value.to_i when :Float value.to_f + when :BigDecimal + BigDecimal(value.to_s) when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true diff --git a/lib/xero-ruby/models/accounting/employee.rb b/lib/xero-ruby/models/accounting/employee.rb index 6b2cb8dc..26acd1d5 100644 --- a/lib/xero-ruby/models/accounting/employee.rb +++ b/lib/xero-ruby/models/accounting/employee.rb @@ -3,7 +3,7 @@ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) -The version of the OpenAPI document: 2.2.2 +The version of the OpenAPI document: 2.2.11 Contact: api@xero.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 4.3.1 @@ -14,6 +14,8 @@ require 'date' module XeroRuby::Accounting + require 'bigdecimal' + class Employee # The Xero identifier for an employee e.g. 297c2dc5-cc47-4afd-8ec8-74990b8761e9 attr_accessor :employee_id @@ -267,6 +269,8 @@ def _deserialize(type, value) value.to_i when :Float value.to_f + when :BigDecimal + BigDecimal(value.to_s) when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true diff --git a/lib/xero-ruby/models/accounting/employees.rb b/lib/xero-ruby/models/accounting/employees.rb index 06b470c3..bc5b6dda 100644 --- a/lib/xero-ruby/models/accounting/employees.rb +++ b/lib/xero-ruby/models/accounting/employees.rb @@ -3,7 +3,7 @@ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) -The version of the OpenAPI document: 2.2.2 +The version of the OpenAPI document: 2.2.11 Contact: api@xero.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 4.3.1 @@ -14,6 +14,8 @@ require 'date' module XeroRuby::Accounting + require 'bigdecimal' + class Employees attr_accessor :employees @@ -130,6 +132,8 @@ def _deserialize(type, value) value.to_i when :Float value.to_f + when :BigDecimal + BigDecimal(value.to_s) when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true diff --git a/lib/xero-ruby/models/accounting/error.rb b/lib/xero-ruby/models/accounting/error.rb index 525eab2c..72373142 100644 --- a/lib/xero-ruby/models/accounting/error.rb +++ b/lib/xero-ruby/models/accounting/error.rb @@ -3,7 +3,7 @@ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) -The version of the OpenAPI document: 2.2.2 +The version of the OpenAPI document: 2.2.11 Contact: api@xero.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 4.3.1 @@ -14,6 +14,8 @@ require 'date' module XeroRuby::Accounting + require 'bigdecimal' + class Error # Exception number attr_accessor :error_number @@ -160,6 +162,8 @@ def _deserialize(type, value) value.to_i when :Float value.to_f + when :BigDecimal + BigDecimal(value.to_s) when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true diff --git a/lib/xero-ruby/models/accounting/expense_claim.rb b/lib/xero-ruby/models/accounting/expense_claim.rb index 5a7eaa4d..3712bf5d 100644 --- a/lib/xero-ruby/models/accounting/expense_claim.rb +++ b/lib/xero-ruby/models/accounting/expense_claim.rb @@ -3,7 +3,7 @@ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) -The version of the OpenAPI document: 2.2.2 +The version of the OpenAPI document: 2.2.11 Contact: api@xero.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 4.3.1 @@ -14,6 +14,8 @@ require 'date' module XeroRuby::Accounting + require 'bigdecimal' + class ExpenseClaim # Xero generated unique identifier for an expense claim attr_accessor :expense_claim_id @@ -105,9 +107,9 @@ def self.openapi_types :'user' => :'User', :'receipts' => :'Array', :'updated_date_utc' => :'DateTime', - :'total' => :'Float', - :'amount_due' => :'Float', - :'amount_paid' => :'Float', + :'total' => :'BigDecimal', + :'amount_due' => :'BigDecimal', + :'amount_paid' => :'BigDecimal', :'payment_due_date' => :'Date', :'reporting_date' => :'Date', :'receipt_id' => :'String' @@ -281,6 +283,8 @@ def _deserialize(type, value) value.to_i when :Float value.to_f + when :BigDecimal + BigDecimal(value.to_s) when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true diff --git a/lib/xero-ruby/models/accounting/expense_claims.rb b/lib/xero-ruby/models/accounting/expense_claims.rb index 89264df7..b63e1c8c 100644 --- a/lib/xero-ruby/models/accounting/expense_claims.rb +++ b/lib/xero-ruby/models/accounting/expense_claims.rb @@ -3,7 +3,7 @@ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) -The version of the OpenAPI document: 2.2.2 +The version of the OpenAPI document: 2.2.11 Contact: api@xero.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 4.3.1 @@ -14,6 +14,8 @@ require 'date' module XeroRuby::Accounting + require 'bigdecimal' + class ExpenseClaims attr_accessor :expense_claims @@ -130,6 +132,8 @@ def _deserialize(type, value) value.to_i when :Float value.to_f + when :BigDecimal + BigDecimal(value.to_s) when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true diff --git a/lib/xero-ruby/models/accounting/external_link.rb b/lib/xero-ruby/models/accounting/external_link.rb index 857ed74a..4656c9f6 100644 --- a/lib/xero-ruby/models/accounting/external_link.rb +++ b/lib/xero-ruby/models/accounting/external_link.rb @@ -3,7 +3,7 @@ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) -The version of the OpenAPI document: 2.2.2 +The version of the OpenAPI document: 2.2.11 Contact: api@xero.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 4.3.1 @@ -14,6 +14,8 @@ require 'date' module XeroRuby::Accounting + require 'bigdecimal' + class ExternalLink # See External link types attr_accessor :link_type @@ -187,6 +189,8 @@ def _deserialize(type, value) value.to_i when :Float value.to_f + when :BigDecimal + BigDecimal(value.to_s) when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true diff --git a/lib/xero-ruby/models/accounting/history_record.rb b/lib/xero-ruby/models/accounting/history_record.rb index 4f915231..a6b96602 100644 --- a/lib/xero-ruby/models/accounting/history_record.rb +++ b/lib/xero-ruby/models/accounting/history_record.rb @@ -3,7 +3,7 @@ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) -The version of the OpenAPI document: 2.2.2 +The version of the OpenAPI document: 2.2.11 Contact: api@xero.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 4.3.1 @@ -14,6 +14,8 @@ require 'date' module XeroRuby::Accounting + require 'bigdecimal' + class HistoryRecord # details attr_accessor :details @@ -158,6 +160,8 @@ def _deserialize(type, value) value.to_i when :Float value.to_f + when :BigDecimal + BigDecimal(value.to_s) when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true diff --git a/lib/xero-ruby/models/accounting/history_records.rb b/lib/xero-ruby/models/accounting/history_records.rb index 35cd55d5..a533ee75 100644 --- a/lib/xero-ruby/models/accounting/history_records.rb +++ b/lib/xero-ruby/models/accounting/history_records.rb @@ -3,7 +3,7 @@ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) -The version of the OpenAPI document: 2.2.2 +The version of the OpenAPI document: 2.2.11 Contact: api@xero.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 4.3.1 @@ -14,6 +14,8 @@ require 'date' module XeroRuby::Accounting + require 'bigdecimal' + class HistoryRecords attr_accessor :history_records @@ -130,6 +132,8 @@ def _deserialize(type, value) value.to_i when :Float value.to_f + when :BigDecimal + BigDecimal(value.to_s) when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true diff --git a/lib/xero-ruby/models/accounting/invoice.rb b/lib/xero-ruby/models/accounting/invoice.rb index 41df5871..2d0736d6 100644 --- a/lib/xero-ruby/models/accounting/invoice.rb +++ b/lib/xero-ruby/models/accounting/invoice.rb @@ -3,7 +3,7 @@ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) -The version of the OpenAPI document: 2.2.2 +The version of the OpenAPI document: 2.2.11 Contact: api@xero.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 4.3.1 @@ -14,6 +14,8 @@ require 'date' module XeroRuby::Accounting + require 'bigdecimal' + class Invoice # See Invoice Types attr_accessor :type @@ -223,26 +225,26 @@ def self.openapi_types :'branding_theme_id' => :'String', :'url' => :'String', :'currency_code' => :'CurrencyCode', - :'currency_rate' => :'Float', + :'currency_rate' => :'BigDecimal', :'status' => :'String', :'sent_to_contact' => :'Boolean', :'expected_payment_date' => :'Date', :'planned_payment_date' => :'Date', - :'cis_deduction' => :'Float', - :'sub_total' => :'Float', - :'total_tax' => :'Float', - :'total' => :'Float', - :'total_discount' => :'Float', + :'cis_deduction' => :'BigDecimal', + :'sub_total' => :'BigDecimal', + :'total_tax' => :'BigDecimal', + :'total' => :'BigDecimal', + :'total_discount' => :'BigDecimal', :'invoice_id' => :'String', :'has_attachments' => :'Boolean', :'is_discounted' => :'Boolean', :'payments' => :'Array', :'prepayments' => :'Array', :'overpayments' => :'Array', - :'amount_due' => :'Float', - :'amount_paid' => :'Float', + :'amount_due' => :'BigDecimal', + :'amount_paid' => :'BigDecimal', :'fully_paid_on_date' => :'Date', - :'amount_credited' => :'Float', + :'amount_credited' => :'BigDecimal', :'updated_date_utc' => :'DateTime', :'credit_notes' => :'Array', :'attachments' => :'Array', @@ -608,6 +610,8 @@ def _deserialize(type, value) value.to_i when :Float value.to_f + when :BigDecimal + BigDecimal(value.to_s) when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true diff --git a/lib/xero-ruby/models/accounting/invoice_reminder.rb b/lib/xero-ruby/models/accounting/invoice_reminder.rb index 2711881a..b940cd32 100644 --- a/lib/xero-ruby/models/accounting/invoice_reminder.rb +++ b/lib/xero-ruby/models/accounting/invoice_reminder.rb @@ -3,7 +3,7 @@ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) -The version of the OpenAPI document: 2.2.2 +The version of the OpenAPI document: 2.2.11 Contact: api@xero.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 4.3.1 @@ -14,6 +14,8 @@ require 'date' module XeroRuby::Accounting + require 'bigdecimal' + class InvoiceReminder # setting for on or off attr_accessor :enabled @@ -128,6 +130,8 @@ def _deserialize(type, value) value.to_i when :Float value.to_f + when :BigDecimal + BigDecimal(value.to_s) when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true diff --git a/lib/xero-ruby/models/accounting/invoice_reminders.rb b/lib/xero-ruby/models/accounting/invoice_reminders.rb index f1a0bd3c..04f6cb88 100644 --- a/lib/xero-ruby/models/accounting/invoice_reminders.rb +++ b/lib/xero-ruby/models/accounting/invoice_reminders.rb @@ -3,7 +3,7 @@ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) -The version of the OpenAPI document: 2.2.2 +The version of the OpenAPI document: 2.2.11 Contact: api@xero.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 4.3.1 @@ -14,6 +14,8 @@ require 'date' module XeroRuby::Accounting + require 'bigdecimal' + class InvoiceReminders attr_accessor :invoice_reminders @@ -130,6 +132,8 @@ def _deserialize(type, value) value.to_i when :Float value.to_f + when :BigDecimal + BigDecimal(value.to_s) when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true diff --git a/lib/xero-ruby/models/accounting/invoices.rb b/lib/xero-ruby/models/accounting/invoices.rb index 84c567f9..5eb7171e 100644 --- a/lib/xero-ruby/models/accounting/invoices.rb +++ b/lib/xero-ruby/models/accounting/invoices.rb @@ -3,7 +3,7 @@ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) -The version of the OpenAPI document: 2.2.2 +The version of the OpenAPI document: 2.2.11 Contact: api@xero.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 4.3.1 @@ -14,6 +14,8 @@ require 'date' module XeroRuby::Accounting + require 'bigdecimal' + class Invoices attr_accessor :invoices @@ -130,6 +132,8 @@ def _deserialize(type, value) value.to_i when :Float value.to_f + when :BigDecimal + BigDecimal(value.to_s) when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true diff --git a/lib/xero-ruby/models/accounting/item.rb b/lib/xero-ruby/models/accounting/item.rb index 910daa57..2c47e618 100644 --- a/lib/xero-ruby/models/accounting/item.rb +++ b/lib/xero-ruby/models/accounting/item.rb @@ -3,7 +3,7 @@ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) -The version of the OpenAPI document: 2.2.2 +The version of the OpenAPI document: 2.2.11 Contact: api@xero.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 4.3.1 @@ -14,6 +14,8 @@ require 'date' module XeroRuby::Accounting + require 'bigdecimal' + class Item # User defined item code (max length = 30) attr_accessor :code @@ -98,8 +100,8 @@ def self.openapi_types :'purchase_details' => :'Purchase', :'sales_details' => :'Purchase', :'is_tracked_as_inventory' => :'Boolean', - :'total_cost_pool' => :'Float', - :'quantity_on_hand' => :'Float', + :'total_cost_pool' => :'BigDecimal', + :'quantity_on_hand' => :'BigDecimal', :'updated_date_utc' => :'DateTime', :'item_id' => :'String', :'status_attribute_string' => :'String', @@ -349,6 +351,8 @@ def _deserialize(type, value) value.to_i when :Float value.to_f + when :BigDecimal + BigDecimal(value.to_s) when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true diff --git a/lib/xero-ruby/models/accounting/items.rb b/lib/xero-ruby/models/accounting/items.rb index 44dfc8e8..468c8c2b 100644 --- a/lib/xero-ruby/models/accounting/items.rb +++ b/lib/xero-ruby/models/accounting/items.rb @@ -3,7 +3,7 @@ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) -The version of the OpenAPI document: 2.2.2 +The version of the OpenAPI document: 2.2.11 Contact: api@xero.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 4.3.1 @@ -14,6 +14,8 @@ require 'date' module XeroRuby::Accounting + require 'bigdecimal' + class Items attr_accessor :items @@ -130,6 +132,8 @@ def _deserialize(type, value) value.to_i when :Float value.to_f + when :BigDecimal + BigDecimal(value.to_s) when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true diff --git a/lib/xero-ruby/models/accounting/journal.rb b/lib/xero-ruby/models/accounting/journal.rb index 3a5f334a..112579b2 100644 --- a/lib/xero-ruby/models/accounting/journal.rb +++ b/lib/xero-ruby/models/accounting/journal.rb @@ -3,7 +3,7 @@ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) -The version of the OpenAPI document: 2.2.2 +The version of the OpenAPI document: 2.2.11 Contact: api@xero.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 4.3.1 @@ -14,6 +14,8 @@ require 'date' module XeroRuby::Accounting + require 'bigdecimal' + class Journal # Xero identifier attr_accessor :journal_id @@ -259,6 +261,8 @@ def _deserialize(type, value) value.to_i when :Float value.to_f + when :BigDecimal + BigDecimal(value.to_s) when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true diff --git a/lib/xero-ruby/models/accounting/journal_line.rb b/lib/xero-ruby/models/accounting/journal_line.rb index 32c0de82..5151d88d 100644 --- a/lib/xero-ruby/models/accounting/journal_line.rb +++ b/lib/xero-ruby/models/accounting/journal_line.rb @@ -3,7 +3,7 @@ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) -The version of the OpenAPI document: 2.2.2 +The version of the OpenAPI document: 2.2.11 Contact: api@xero.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 4.3.1 @@ -14,6 +14,8 @@ require 'date' module XeroRuby::Accounting + require 'bigdecimal' + class JournalLine # Xero identifier for Journal attr_accessor :journal_line_id @@ -78,9 +80,9 @@ def self.openapi_types :'account_type' => :'AccountType', :'account_name' => :'String', :'description' => :'String', - :'net_amount' => :'Float', - :'gross_amount' => :'Float', - :'tax_amount' => :'Float', + :'net_amount' => :'BigDecimal', + :'gross_amount' => :'BigDecimal', + :'tax_amount' => :'BigDecimal', :'tax_type' => :'String', :'tax_name' => :'String', :'tracking_categories' => :'Array' @@ -240,6 +242,8 @@ def _deserialize(type, value) value.to_i when :Float value.to_f + when :BigDecimal + BigDecimal(value.to_s) when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true diff --git a/lib/xero-ruby/models/accounting/journals.rb b/lib/xero-ruby/models/accounting/journals.rb index ff7dbd5c..297dea52 100644 --- a/lib/xero-ruby/models/accounting/journals.rb +++ b/lib/xero-ruby/models/accounting/journals.rb @@ -3,7 +3,7 @@ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) -The version of the OpenAPI document: 2.2.2 +The version of the OpenAPI document: 2.2.11 Contact: api@xero.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 4.3.1 @@ -14,6 +14,8 @@ require 'date' module XeroRuby::Accounting + require 'bigdecimal' + class Journals attr_accessor :journals @@ -130,6 +132,8 @@ def _deserialize(type, value) value.to_i when :Float value.to_f + when :BigDecimal + BigDecimal(value.to_s) when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true diff --git a/lib/xero-ruby/models/accounting/line_amount_types.rb b/lib/xero-ruby/models/accounting/line_amount_types.rb index 84264448..784b1b2f 100644 --- a/lib/xero-ruby/models/accounting/line_amount_types.rb +++ b/lib/xero-ruby/models/accounting/line_amount_types.rb @@ -3,7 +3,7 @@ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) -The version of the OpenAPI document: 2.2.2 +The version of the OpenAPI document: 2.2.11 Contact: api@xero.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 4.3.1 diff --git a/lib/xero-ruby/models/accounting/line_item.rb b/lib/xero-ruby/models/accounting/line_item.rb index 94061c16..c22f4232 100644 --- a/lib/xero-ruby/models/accounting/line_item.rb +++ b/lib/xero-ruby/models/accounting/line_item.rb @@ -3,7 +3,7 @@ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) -The version of the OpenAPI document: 2.2.2 +The version of the OpenAPI document: 2.2.11 Contact: api@xero.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 4.3.1 @@ -14,6 +14,8 @@ require 'date' module XeroRuby::Accounting + require 'bigdecimal' + class LineItem # LineItem unique ID attr_accessor :line_item_id @@ -78,16 +80,16 @@ def self.openapi_types { :'line_item_id' => :'String', :'description' => :'String', - :'quantity' => :'Float', - :'unit_amount' => :'Float', + :'quantity' => :'BigDecimal', + :'unit_amount' => :'BigDecimal', :'item_code' => :'String', :'account_code' => :'String', :'tax_type' => :'String', - :'tax_amount' => :'Float', - :'line_amount' => :'Float', + :'tax_amount' => :'BigDecimal', + :'line_amount' => :'BigDecimal', :'tracking' => :'Array', - :'discount_rate' => :'Float', - :'discount_amount' => :'Float', + :'discount_rate' => :'BigDecimal', + :'discount_amount' => :'BigDecimal', :'repeating_invoice_id' => :'String' } end @@ -250,6 +252,8 @@ def _deserialize(type, value) value.to_i when :Float value.to_f + when :BigDecimal + BigDecimal(value.to_s) when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true diff --git a/lib/xero-ruby/models/accounting/line_item_tracking.rb b/lib/xero-ruby/models/accounting/line_item_tracking.rb index f00a77f9..e8052e6e 100644 --- a/lib/xero-ruby/models/accounting/line_item_tracking.rb +++ b/lib/xero-ruby/models/accounting/line_item_tracking.rb @@ -3,7 +3,7 @@ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) -The version of the OpenAPI document: 2.2.2 +The version of the OpenAPI document: 2.2.11 Contact: api@xero.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 4.3.1 @@ -14,6 +14,8 @@ require 'date' module XeroRuby::Accounting + require 'bigdecimal' + class LineItemTracking # The Xero identifier for a tracking category attr_accessor :tracking_category_id @@ -173,6 +175,8 @@ def _deserialize(type, value) value.to_i when :Float value.to_f + when :BigDecimal + BigDecimal(value.to_s) when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true diff --git a/lib/xero-ruby/models/accounting/linked_transaction.rb b/lib/xero-ruby/models/accounting/linked_transaction.rb index 26475d28..a6170614 100644 --- a/lib/xero-ruby/models/accounting/linked_transaction.rb +++ b/lib/xero-ruby/models/accounting/linked_transaction.rb @@ -3,7 +3,7 @@ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) -The version of the OpenAPI document: 2.2.2 +The version of the OpenAPI document: 2.2.11 Contact: api@xero.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 4.3.1 @@ -14,6 +14,8 @@ require 'date' module XeroRuby::Accounting + require 'bigdecimal' + class LinkedTransaction # Filter by the SourceTransactionID. Get all the linked transactions created from a particular ACCPAY invoice attr_accessor :source_transaction_id @@ -296,6 +298,8 @@ def _deserialize(type, value) value.to_i when :Float value.to_f + when :BigDecimal + BigDecimal(value.to_s) when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true diff --git a/lib/xero-ruby/models/accounting/linked_transactions.rb b/lib/xero-ruby/models/accounting/linked_transactions.rb index ca527e97..3796906a 100644 --- a/lib/xero-ruby/models/accounting/linked_transactions.rb +++ b/lib/xero-ruby/models/accounting/linked_transactions.rb @@ -3,7 +3,7 @@ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) -The version of the OpenAPI document: 2.2.2 +The version of the OpenAPI document: 2.2.11 Contact: api@xero.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 4.3.1 @@ -14,6 +14,8 @@ require 'date' module XeroRuby::Accounting + require 'bigdecimal' + class LinkedTransactions attr_accessor :linked_transactions @@ -130,6 +132,8 @@ def _deserialize(type, value) value.to_i when :Float value.to_f + when :BigDecimal + BigDecimal(value.to_s) when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true diff --git a/lib/xero-ruby/models/accounting/manual_journal.rb b/lib/xero-ruby/models/accounting/manual_journal.rb index dd920550..833c6b56 100644 --- a/lib/xero-ruby/models/accounting/manual_journal.rb +++ b/lib/xero-ruby/models/accounting/manual_journal.rb @@ -3,7 +3,7 @@ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) -The version of the OpenAPI document: 2.2.2 +The version of the OpenAPI document: 2.2.11 Contact: api@xero.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 4.3.1 @@ -14,6 +14,8 @@ require 'date' module XeroRuby::Accounting + require 'bigdecimal' + class ManualJournal # Description of journal being posted attr_accessor :narration @@ -312,6 +314,8 @@ def _deserialize(type, value) value.to_i when :Float value.to_f + when :BigDecimal + BigDecimal(value.to_s) when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true diff --git a/lib/xero-ruby/models/accounting/manual_journal_line.rb b/lib/xero-ruby/models/accounting/manual_journal_line.rb index e55c4aed..cfcc1571 100644 --- a/lib/xero-ruby/models/accounting/manual_journal_line.rb +++ b/lib/xero-ruby/models/accounting/manual_journal_line.rb @@ -3,7 +3,7 @@ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) -The version of the OpenAPI document: 2.2.2 +The version of the OpenAPI document: 2.2.11 Contact: api@xero.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 4.3.1 @@ -14,6 +14,8 @@ require 'date' module XeroRuby::Accounting + require 'bigdecimal' + class ManualJournalLine # total for line. Debits are positive, credits are negative value attr_accessor :line_amount @@ -21,6 +23,9 @@ class ManualJournalLine # See Accounts attr_accessor :account_code + # See Accounts + attr_accessor :account_id + # Description for journal line attr_accessor :description @@ -41,6 +46,7 @@ def self.attribute_map { :'line_amount' => :'LineAmount', :'account_code' => :'AccountCode', + :'account_id' => :'AccountID', :'description' => :'Description', :'tax_type' => :'TaxType', :'tracking' => :'Tracking', @@ -52,12 +58,13 @@ def self.attribute_map # Attribute type mapping. def self.openapi_types { - :'line_amount' => :'Float', + :'line_amount' => :'BigDecimal', :'account_code' => :'String', + :'account_id' => :'String', :'description' => :'String', :'tax_type' => :'String', :'tracking' => :'Array', - :'tax_amount' => :'Float', + :'tax_amount' => :'BigDecimal', :'is_blank' => :'Boolean' } end @@ -85,6 +92,10 @@ def initialize(attributes = {}) self.account_code = attributes[:'account_code'] end + if attributes.key?(:'account_id') + self.account_id = attributes[:'account_id'] + end + if attributes.key?(:'description') self.description = attributes[:'description'] end @@ -128,6 +139,7 @@ def ==(o) self.class == o.class && line_amount == o.line_amount && account_code == o.account_code && + account_id == o.account_id && description == o.description && tax_type == o.tax_type && tracking == o.tracking && @@ -144,7 +156,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [line_amount, account_code, description, tax_type, tracking, tax_amount, is_blank].hash + [line_amount, account_code, account_id, description, tax_type, tracking, tax_amount, is_blank].hash end # Builds the object from hash @@ -190,6 +202,8 @@ def _deserialize(type, value) value.to_i when :Float value.to_f + when :BigDecimal + BigDecimal(value.to_s) when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true diff --git a/lib/xero-ruby/models/accounting/manual_journals.rb b/lib/xero-ruby/models/accounting/manual_journals.rb index 0f2a35bd..54c886bd 100644 --- a/lib/xero-ruby/models/accounting/manual_journals.rb +++ b/lib/xero-ruby/models/accounting/manual_journals.rb @@ -3,7 +3,7 @@ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) -The version of the OpenAPI document: 2.2.2 +The version of the OpenAPI document: 2.2.11 Contact: api@xero.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 4.3.1 @@ -14,6 +14,8 @@ require 'date' module XeroRuby::Accounting + require 'bigdecimal' + class ManualJournals attr_accessor :manual_journals @@ -130,6 +132,8 @@ def _deserialize(type, value) value.to_i when :Float value.to_f + when :BigDecimal + BigDecimal(value.to_s) when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true diff --git a/lib/xero-ruby/models/accounting/online_invoice.rb b/lib/xero-ruby/models/accounting/online_invoice.rb index 51b6e448..e5154ac6 100644 --- a/lib/xero-ruby/models/accounting/online_invoice.rb +++ b/lib/xero-ruby/models/accounting/online_invoice.rb @@ -3,7 +3,7 @@ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) -The version of the OpenAPI document: 2.2.2 +The version of the OpenAPI document: 2.2.11 Contact: api@xero.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 4.3.1 @@ -14,6 +14,8 @@ require 'date' module XeroRuby::Accounting + require 'bigdecimal' + class OnlineInvoice # the URL to an online invoice attr_accessor :online_invoice_url @@ -128,6 +130,8 @@ def _deserialize(type, value) value.to_i when :Float value.to_f + when :BigDecimal + BigDecimal(value.to_s) when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true diff --git a/lib/xero-ruby/models/accounting/online_invoices.rb b/lib/xero-ruby/models/accounting/online_invoices.rb index 8d1294db..e0ae1a7f 100644 --- a/lib/xero-ruby/models/accounting/online_invoices.rb +++ b/lib/xero-ruby/models/accounting/online_invoices.rb @@ -3,7 +3,7 @@ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) -The version of the OpenAPI document: 2.2.2 +The version of the OpenAPI document: 2.2.11 Contact: api@xero.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 4.3.1 @@ -14,6 +14,8 @@ require 'date' module XeroRuby::Accounting + require 'bigdecimal' + class OnlineInvoices attr_accessor :online_invoices @@ -130,6 +132,8 @@ def _deserialize(type, value) value.to_i when :Float value.to_f + when :BigDecimal + BigDecimal(value.to_s) when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true diff --git a/lib/xero-ruby/models/accounting/organisation.rb b/lib/xero-ruby/models/accounting/organisation.rb index 29e842e6..147b24c5 100644 --- a/lib/xero-ruby/models/accounting/organisation.rb +++ b/lib/xero-ruby/models/accounting/organisation.rb @@ -3,7 +3,7 @@ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) -The version of the OpenAPI document: 2.2.2 +The version of the OpenAPI document: 2.2.11 Contact: api@xero.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 4.3.1 @@ -14,6 +14,8 @@ require 'date' module XeroRuby::Accounting + require 'bigdecimal' + class Organisation # Unique Xero identifier attr_accessor :organisation_id @@ -112,7 +114,8 @@ class Organisation N6_MONTHLY = "6MONTHLY".freeze QUARTERLY = "QUARTERLY".freeze YEARLY = "YEARLY".freeze - NONE = "NONE".freeze + # duplicate definitions generated: https://github.com/XeroAPI/xero-ruby/issues/53#issuecomment-668893305 + # NONE = "NONE".freeze # The default for LineAmountTypes on sales transactions attr_accessor :default_sales_tax @@ -132,8 +135,21 @@ class Organisation attr_accessor :timezone - # Organisation Type + # Organisation Entity Type attr_accessor :organisation_entity_type + # duplicate definitions generated: https://github.com/XeroAPI/xero-ruby/issues/53#issuecomment-668893305 + # ACCOUNTING_PRACTICE = "ACCOUNTING_PRACTICE".freeze + # COMPANY = "COMPANY".freeze + # CHARITY = "CHARITY".freeze + # CLUB_OR_SOCIETY = "CLUB_OR_SOCIETY".freeze + # LOOK_THROUGH_COMPANY = "LOOK_THROUGH_COMPANY".freeze + # NOT_FOR_PROFIT = "NOT_FOR_PROFIT".freeze + # PARTNERSHIP = "PARTNERSHIP".freeze + # S_CORPORATION = "S_CORPORATION".freeze + # SELF_MANAGED_SUPERANNUATION_FUND = "SELF_MANAGED_SUPERANNUATION_FUND".freeze + # SOLE_TRADER = "SOLE_TRADER".freeze + # SUPERANNUATION_FUND = "SUPERANNUATION_FUND".freeze + # TRUST = "TRUST".freeze # A unique identifier for the organisation. Potential uses. attr_accessor :short_code @@ -444,6 +460,8 @@ def valid? return false unless sales_tax_basis_validator.valid?(@sales_tax_basis) sales_tax_period_validator = EnumAttributeValidator.new('String', ["MONTHLY", "QUARTERLY1", "QUARTERLY2", "QUARTERLY3", "ANNUALLY", "ONEMONTHS", "TWOMONTHS", "SIXMONTHS", "1MONTHLY", "2MONTHLY", "3MONTHLY", "6MONTHLY", "QUARTERLY", "YEARLY", "NONE"]) return false unless sales_tax_period_validator.valid?(@sales_tax_period) + organisation_entity_type_validator = EnumAttributeValidator.new('String', ["ACCOUNTING_PRACTICE", "COMPANY", "CHARITY", "CLUB_OR_SOCIETY", "LOOK_THROUGH_COMPANY", "NOT_FOR_PROFIT", "PARTNERSHIP", "S_CORPORATION", "SELF_MANAGED_SUPERANNUATION_FUND", "SOLE_TRADER", "SUPERANNUATION_FUND", "TRUST"]) + return false unless organisation_entity_type_validator.valid?(@organisation_entity_type) _class_validator = EnumAttributeValidator.new('String', ["DEMO", "TRIAL", "STARTER", "STANDARD", "PREMIUM", "PREMIUM_20", "PREMIUM_50", "PREMIUM_100", "LEDGER", "GST_CASHBOOK", "NON_GST_CASHBOOK"]) return false unless _class_validator.valid?(@_class) edition_validator = EnumAttributeValidator.new('String', ["BUSINESS", "PARTNER"]) @@ -491,6 +509,16 @@ def sales_tax_period=(sales_tax_period) @sales_tax_period = sales_tax_period end + # Custom attribute writer method checking allowed values (enum). + # @param [Object] organisation_entity_type Object to be assigned + def organisation_entity_type=(organisation_entity_type) + validator = EnumAttributeValidator.new('String', ["ACCOUNTING_PRACTICE", "COMPANY", "CHARITY", "CLUB_OR_SOCIETY", "LOOK_THROUGH_COMPANY", "NOT_FOR_PROFIT", "PARTNERSHIP", "S_CORPORATION", "SELF_MANAGED_SUPERANNUATION_FUND", "SOLE_TRADER", "SUPERANNUATION_FUND", "TRUST"]) + unless validator.valid?(organisation_entity_type) + fail ArgumentError, "invalid value for \"organisation_entity_type\", must be one of #{validator.allowable_values}." + end + @organisation_entity_type = organisation_entity_type + end + # Custom attribute writer method checking allowed values (enum). # @param [Object] _class Object to be assigned def _class=(_class) @@ -606,6 +634,8 @@ def _deserialize(type, value) value.to_i when :Float value.to_f + when :BigDecimal + BigDecimal(value.to_s) when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true diff --git a/lib/xero-ruby/models/accounting/organisations.rb b/lib/xero-ruby/models/accounting/organisations.rb index d1b035ee..61efad82 100644 --- a/lib/xero-ruby/models/accounting/organisations.rb +++ b/lib/xero-ruby/models/accounting/organisations.rb @@ -3,7 +3,7 @@ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) -The version of the OpenAPI document: 2.2.2 +The version of the OpenAPI document: 2.2.11 Contact: api@xero.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 4.3.1 @@ -14,6 +14,8 @@ require 'date' module XeroRuby::Accounting + require 'bigdecimal' + class Organisations attr_accessor :organisations @@ -130,6 +132,8 @@ def _deserialize(type, value) value.to_i when :Float value.to_f + when :BigDecimal + BigDecimal(value.to_s) when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true diff --git a/lib/xero-ruby/models/accounting/overpayment.rb b/lib/xero-ruby/models/accounting/overpayment.rb index b95fa81d..0f5d9019 100644 --- a/lib/xero-ruby/models/accounting/overpayment.rb +++ b/lib/xero-ruby/models/accounting/overpayment.rb @@ -3,7 +3,7 @@ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) -The version of the OpenAPI document: 2.2.2 +The version of the OpenAPI document: 2.2.11 Contact: api@xero.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 4.3.1 @@ -14,6 +14,8 @@ require 'date' module XeroRuby::Accounting + require 'bigdecimal' + class Overpayment # See Overpayment Types attr_accessor :type @@ -134,14 +136,14 @@ def self.openapi_types :'status' => :'String', :'line_amount_types' => :'LineAmountTypes', :'line_items' => :'Array', - :'sub_total' => :'Float', - :'total_tax' => :'Float', - :'total' => :'Float', + :'sub_total' => :'BigDecimal', + :'total_tax' => :'BigDecimal', + :'total' => :'BigDecimal', :'updated_date_utc' => :'DateTime', :'currency_code' => :'CurrencyCode', :'overpayment_id' => :'String', - :'currency_rate' => :'Float', - :'remaining_credit' => :'Float', + :'currency_rate' => :'BigDecimal', + :'remaining_credit' => :'BigDecimal', :'allocations' => :'Array', :'applied_amount' => :'Float', :'payments' => :'Array', @@ -370,6 +372,8 @@ def _deserialize(type, value) value.to_i when :Float value.to_f + when :BigDecimal + BigDecimal(value.to_s) when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true diff --git a/lib/xero-ruby/models/accounting/overpayments.rb b/lib/xero-ruby/models/accounting/overpayments.rb index 4b357b87..150412db 100644 --- a/lib/xero-ruby/models/accounting/overpayments.rb +++ b/lib/xero-ruby/models/accounting/overpayments.rb @@ -3,7 +3,7 @@ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) -The version of the OpenAPI document: 2.2.2 +The version of the OpenAPI document: 2.2.11 Contact: api@xero.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 4.3.1 @@ -14,6 +14,8 @@ require 'date' module XeroRuby::Accounting + require 'bigdecimal' + class Overpayments attr_accessor :overpayments @@ -130,6 +132,8 @@ def _deserialize(type, value) value.to_i when :Float value.to_f + when :BigDecimal + BigDecimal(value.to_s) when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true diff --git a/lib/xero-ruby/models/accounting/payment.rb b/lib/xero-ruby/models/accounting/payment.rb index 325dff32..3a223970 100644 --- a/lib/xero-ruby/models/accounting/payment.rb +++ b/lib/xero-ruby/models/accounting/payment.rb @@ -3,7 +3,7 @@ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) -The version of the OpenAPI document: 2.2.2 +The version of the OpenAPI document: 2.2.11 Contact: api@xero.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 4.3.1 @@ -14,6 +14,8 @@ require 'date' module XeroRuby::Accounting + require 'bigdecimal' + class Payment attr_accessor :invoice @@ -161,8 +163,8 @@ def self.openapi_types :'account' => :'Account', :'code' => :'String', :'date' => :'Date', - :'currency_rate' => :'Float', - :'amount' => :'Float', + :'currency_rate' => :'BigDecimal', + :'amount' => :'BigDecimal', :'reference' => :'String', :'is_reconciled' => :'Boolean', :'status' => :'String', @@ -420,6 +422,8 @@ def _deserialize(type, value) value.to_i when :Float value.to_f + when :BigDecimal + BigDecimal(value.to_s) when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true diff --git a/lib/xero-ruby/models/accounting/payment_delete.rb b/lib/xero-ruby/models/accounting/payment_delete.rb index 5e875d0d..bb7f57b0 100644 --- a/lib/xero-ruby/models/accounting/payment_delete.rb +++ b/lib/xero-ruby/models/accounting/payment_delete.rb @@ -3,7 +3,7 @@ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) -The version of the OpenAPI document: 2.2.2 +The version of the OpenAPI document: 2.2.11 Contact: api@xero.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 4.3.1 @@ -14,6 +14,8 @@ require 'date' module XeroRuby::Accounting + require 'bigdecimal' + class PaymentDelete # The status of the payment. attr_accessor :status @@ -135,6 +137,8 @@ def _deserialize(type, value) value.to_i when :Float value.to_f + when :BigDecimal + BigDecimal(value.to_s) when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true diff --git a/lib/xero-ruby/models/accounting/payment_service.rb b/lib/xero-ruby/models/accounting/payment_service.rb index bebc308f..013be7ef 100644 --- a/lib/xero-ruby/models/accounting/payment_service.rb +++ b/lib/xero-ruby/models/accounting/payment_service.rb @@ -3,7 +3,7 @@ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) -The version of the OpenAPI document: 2.2.2 +The version of the OpenAPI document: 2.2.11 Contact: api@xero.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 4.3.1 @@ -14,6 +14,8 @@ require 'date' module XeroRuby::Accounting + require 'bigdecimal' + class PaymentService # Xero identifier attr_accessor :payment_service_id @@ -180,6 +182,8 @@ def _deserialize(type, value) value.to_i when :Float value.to_f + when :BigDecimal + BigDecimal(value.to_s) when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true diff --git a/lib/xero-ruby/models/accounting/payment_services.rb b/lib/xero-ruby/models/accounting/payment_services.rb index cce3ea38..229fa53f 100644 --- a/lib/xero-ruby/models/accounting/payment_services.rb +++ b/lib/xero-ruby/models/accounting/payment_services.rb @@ -3,7 +3,7 @@ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) -The version of the OpenAPI document: 2.2.2 +The version of the OpenAPI document: 2.2.11 Contact: api@xero.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 4.3.1 @@ -14,6 +14,8 @@ require 'date' module XeroRuby::Accounting + require 'bigdecimal' + class PaymentServices attr_accessor :payment_services @@ -130,6 +132,8 @@ def _deserialize(type, value) value.to_i when :Float value.to_f + when :BigDecimal + BigDecimal(value.to_s) when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true diff --git a/lib/xero-ruby/models/accounting/payment_term.rb b/lib/xero-ruby/models/accounting/payment_term.rb index c94d008a..6aaac390 100644 --- a/lib/xero-ruby/models/accounting/payment_term.rb +++ b/lib/xero-ruby/models/accounting/payment_term.rb @@ -3,7 +3,7 @@ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) -The version of the OpenAPI document: 2.2.2 +The version of the OpenAPI document: 2.2.11 Contact: api@xero.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 4.3.1 @@ -14,6 +14,8 @@ require 'date' module XeroRuby::Accounting + require 'bigdecimal' + class PaymentTerm attr_accessor :bills @@ -138,6 +140,8 @@ def _deserialize(type, value) value.to_i when :Float value.to_f + when :BigDecimal + BigDecimal(value.to_s) when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true diff --git a/lib/xero-ruby/models/accounting/payment_term_type.rb b/lib/xero-ruby/models/accounting/payment_term_type.rb index 9ce43bda..3adbf305 100644 --- a/lib/xero-ruby/models/accounting/payment_term_type.rb +++ b/lib/xero-ruby/models/accounting/payment_term_type.rb @@ -3,7 +3,7 @@ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) -The version of the OpenAPI document: 2.2.2 +The version of the OpenAPI document: 2.2.11 Contact: api@xero.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 4.3.1 diff --git a/lib/xero-ruby/models/accounting/payments.rb b/lib/xero-ruby/models/accounting/payments.rb index 2d01d622..4eeaa62f 100644 --- a/lib/xero-ruby/models/accounting/payments.rb +++ b/lib/xero-ruby/models/accounting/payments.rb @@ -3,7 +3,7 @@ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) -The version of the OpenAPI document: 2.2.2 +The version of the OpenAPI document: 2.2.11 Contact: api@xero.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 4.3.1 @@ -14,6 +14,8 @@ require 'date' module XeroRuby::Accounting + require 'bigdecimal' + class Payments attr_accessor :payments @@ -130,6 +132,8 @@ def _deserialize(type, value) value.to_i when :Float value.to_f + when :BigDecimal + BigDecimal(value.to_s) when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true diff --git a/lib/xero-ruby/models/accounting/phone.rb b/lib/xero-ruby/models/accounting/phone.rb index b956390f..c0d646d5 100644 --- a/lib/xero-ruby/models/accounting/phone.rb +++ b/lib/xero-ruby/models/accounting/phone.rb @@ -3,7 +3,7 @@ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) -The version of the OpenAPI document: 2.2.2 +The version of the OpenAPI document: 2.2.11 Contact: api@xero.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 4.3.1 @@ -14,6 +14,8 @@ require 'date' module XeroRuby::Accounting + require 'bigdecimal' + class Phone attr_accessor :phone_type @@ -242,6 +244,8 @@ def _deserialize(type, value) value.to_i when :Float value.to_f + when :BigDecimal + BigDecimal(value.to_s) when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true diff --git a/lib/xero-ruby/models/accounting/prepayment.rb b/lib/xero-ruby/models/accounting/prepayment.rb index 27f1bb6d..de814d34 100644 --- a/lib/xero-ruby/models/accounting/prepayment.rb +++ b/lib/xero-ruby/models/accounting/prepayment.rb @@ -3,7 +3,7 @@ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) -The version of the OpenAPI document: 2.2.2 +The version of the OpenAPI document: 2.2.11 Contact: api@xero.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 4.3.1 @@ -14,6 +14,8 @@ require 'date' module XeroRuby::Accounting + require 'bigdecimal' + class Prepayment # See Prepayment Types attr_accessor :type @@ -135,15 +137,15 @@ def self.openapi_types :'status' => :'String', :'line_amount_types' => :'LineAmountTypes', :'line_items' => :'Array', - :'sub_total' => :'Float', - :'total_tax' => :'Float', - :'total' => :'Float', + :'sub_total' => :'BigDecimal', + :'total_tax' => :'BigDecimal', + :'total' => :'BigDecimal', :'reference' => :'String', :'updated_date_utc' => :'DateTime', :'currency_code' => :'CurrencyCode', :'prepayment_id' => :'String', - :'currency_rate' => :'Float', - :'remaining_credit' => :'Float', + :'currency_rate' => :'BigDecimal', + :'remaining_credit' => :'BigDecimal', :'allocations' => :'Array', :'applied_amount' => :'Float', :'has_attachments' => :'Boolean', @@ -369,6 +371,8 @@ def _deserialize(type, value) value.to_i when :Float value.to_f + when :BigDecimal + BigDecimal(value.to_s) when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true diff --git a/lib/xero-ruby/models/accounting/prepayments.rb b/lib/xero-ruby/models/accounting/prepayments.rb index d57cf1ac..b343476b 100644 --- a/lib/xero-ruby/models/accounting/prepayments.rb +++ b/lib/xero-ruby/models/accounting/prepayments.rb @@ -3,7 +3,7 @@ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) -The version of the OpenAPI document: 2.2.2 +The version of the OpenAPI document: 2.2.11 Contact: api@xero.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 4.3.1 @@ -14,6 +14,8 @@ require 'date' module XeroRuby::Accounting + require 'bigdecimal' + class Prepayments attr_accessor :prepayments @@ -130,6 +132,8 @@ def _deserialize(type, value) value.to_i when :Float value.to_f + when :BigDecimal + BigDecimal(value.to_s) when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true diff --git a/lib/xero-ruby/models/accounting/purchase.rb b/lib/xero-ruby/models/accounting/purchase.rb index c4e51a72..4aac1fe2 100644 --- a/lib/xero-ruby/models/accounting/purchase.rb +++ b/lib/xero-ruby/models/accounting/purchase.rb @@ -3,7 +3,7 @@ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) -The version of the OpenAPI document: 2.2.2 +The version of the OpenAPI document: 2.2.11 Contact: api@xero.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 4.3.1 @@ -14,6 +14,8 @@ require 'date' module XeroRuby::Accounting + require 'bigdecimal' + class Purchase # Unit Price of the item. By default UnitPrice is rounded to two decimal places. You can use 4 decimal places by adding the unitdp=4 querystring parameter to your request. attr_accessor :unit_price @@ -40,7 +42,7 @@ def self.attribute_map # Attribute type mapping. def self.openapi_types { - :'unit_price' => :'Float', + :'unit_price' => :'BigDecimal', :'account_code' => :'String', :'cogs_account_code' => :'String', :'tax_type' => :'String' @@ -158,6 +160,8 @@ def _deserialize(type, value) value.to_i when :Float value.to_f + when :BigDecimal + BigDecimal(value.to_s) when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true diff --git a/lib/xero-ruby/models/accounting/purchase_order.rb b/lib/xero-ruby/models/accounting/purchase_order.rb index 34a28b42..f0628686 100644 --- a/lib/xero-ruby/models/accounting/purchase_order.rb +++ b/lib/xero-ruby/models/accounting/purchase_order.rb @@ -3,7 +3,7 @@ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) -The version of the OpenAPI document: 2.2.2 +The version of the OpenAPI document: 2.2.11 Contact: api@xero.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 4.3.1 @@ -14,6 +14,8 @@ require 'date' module XeroRuby::Accounting + require 'bigdecimal' + class PurchaseOrder attr_accessor :contact @@ -180,11 +182,11 @@ def self.openapi_types :'delivery_instructions' => :'String', :'expected_arrival_date' => :'Date', :'purchase_order_id' => :'String', - :'currency_rate' => :'Float', - :'sub_total' => :'Float', - :'total_tax' => :'Float', - :'total' => :'Float', - :'total_discount' => :'Float', + :'currency_rate' => :'BigDecimal', + :'sub_total' => :'BigDecimal', + :'total_tax' => :'BigDecimal', + :'total' => :'BigDecimal', + :'total_discount' => :'BigDecimal', :'has_attachments' => :'Boolean', :'updated_date_utc' => :'DateTime', :'status_attribute_string' => :'String', @@ -447,6 +449,8 @@ def _deserialize(type, value) value.to_i when :Float value.to_f + when :BigDecimal + BigDecimal(value.to_s) when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true diff --git a/lib/xero-ruby/models/accounting/purchase_orders.rb b/lib/xero-ruby/models/accounting/purchase_orders.rb index 35d42682..ae6f55d8 100644 --- a/lib/xero-ruby/models/accounting/purchase_orders.rb +++ b/lib/xero-ruby/models/accounting/purchase_orders.rb @@ -3,7 +3,7 @@ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) -The version of the OpenAPI document: 2.2.2 +The version of the OpenAPI document: 2.2.11 Contact: api@xero.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 4.3.1 @@ -14,6 +14,8 @@ require 'date' module XeroRuby::Accounting + require 'bigdecimal' + class PurchaseOrders attr_accessor :purchase_orders @@ -130,6 +132,8 @@ def _deserialize(type, value) value.to_i when :Float value.to_f + when :BigDecimal + BigDecimal(value.to_s) when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true diff --git a/lib/xero-ruby/models/accounting/quote.rb b/lib/xero-ruby/models/accounting/quote.rb index c40d723d..5def9e7c 100644 --- a/lib/xero-ruby/models/accounting/quote.rb +++ b/lib/xero-ruby/models/accounting/quote.rb @@ -3,7 +3,7 @@ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) -The version of the OpenAPI document: 2.2.2 +The version of the OpenAPI document: 2.2.11 Contact: api@xero.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 4.3.1 @@ -14,6 +14,8 @@ require 'date' module XeroRuby::Accounting + require 'bigdecimal' + class Quote # QuoteID GUID is automatically generated and is returned after create or GET. attr_accessor :quote_id @@ -133,10 +135,10 @@ def self.openapi_types :'status' => :'QuoteStatusCodes', :'currency_code' => :'CurrencyCode', :'currency_rate' => :'Float', - :'sub_total' => :'Float', - :'total_tax' => :'Float', - :'total' => :'Float', - :'total_discount' => :'Float', + :'sub_total' => :'BigDecimal', + :'total_tax' => :'BigDecimal', + :'total' => :'BigDecimal', + :'total_discount' => :'BigDecimal', :'title' => :'String', :'summary' => :'String', :'branding_theme_id' => :'String', @@ -437,6 +439,8 @@ def _deserialize(type, value) value.to_i when :Float value.to_f + when :BigDecimal + BigDecimal(value.to_s) when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true diff --git a/lib/xero-ruby/models/accounting/quote_line_amount_types.rb b/lib/xero-ruby/models/accounting/quote_line_amount_types.rb index 19a37818..71ac20da 100644 --- a/lib/xero-ruby/models/accounting/quote_line_amount_types.rb +++ b/lib/xero-ruby/models/accounting/quote_line_amount_types.rb @@ -3,7 +3,7 @@ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) -The version of the OpenAPI document: 2.2.2 +The version of the OpenAPI document: 2.2.11 Contact: api@xero.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 4.3.1 diff --git a/lib/xero-ruby/models/accounting/quote_status_codes.rb b/lib/xero-ruby/models/accounting/quote_status_codes.rb index 40801dd7..f9bcdde1 100644 --- a/lib/xero-ruby/models/accounting/quote_status_codes.rb +++ b/lib/xero-ruby/models/accounting/quote_status_codes.rb @@ -3,7 +3,7 @@ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) -The version of the OpenAPI document: 2.2.2 +The version of the OpenAPI document: 2.2.11 Contact: api@xero.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 4.3.1 @@ -20,6 +20,7 @@ class QuoteStatusCodes DECLINED = "DECLINED".freeze ACCEPTED = "ACCEPTED".freeze INVOICED = "INVOICED".freeze + DELETED = "DELETED".freeze # Builds the enum from string # @param [String] The enum value in the form of the string diff --git a/lib/xero-ruby/models/accounting/quotes.rb b/lib/xero-ruby/models/accounting/quotes.rb index bc238513..21d6354e 100644 --- a/lib/xero-ruby/models/accounting/quotes.rb +++ b/lib/xero-ruby/models/accounting/quotes.rb @@ -3,7 +3,7 @@ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) -The version of the OpenAPI document: 2.2.2 +The version of the OpenAPI document: 2.2.11 Contact: api@xero.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 4.3.1 @@ -14,6 +14,8 @@ require 'date' module XeroRuby::Accounting + require 'bigdecimal' + class Quotes attr_accessor :quotes @@ -130,6 +132,8 @@ def _deserialize(type, value) value.to_i when :Float value.to_f + when :BigDecimal + BigDecimal(value.to_s) when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true diff --git a/lib/xero-ruby/models/accounting/receipt.rb b/lib/xero-ruby/models/accounting/receipt.rb index cb666403..0e87fc69 100644 --- a/lib/xero-ruby/models/accounting/receipt.rb +++ b/lib/xero-ruby/models/accounting/receipt.rb @@ -3,7 +3,7 @@ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) -The version of the OpenAPI document: 2.2.2 +The version of the OpenAPI document: 2.2.11 Contact: api@xero.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 4.3.1 @@ -14,6 +14,8 @@ require 'date' module XeroRuby::Accounting + require 'bigdecimal' + class Receipt # Date of receipt – YYYY-MM-DD attr_accessor :date @@ -129,9 +131,9 @@ def self.openapi_types :'user' => :'User', :'reference' => :'String', :'line_amount_types' => :'LineAmountTypes', - :'sub_total' => :'Float', - :'total_tax' => :'Float', - :'total' => :'Float', + :'sub_total' => :'BigDecimal', + :'total_tax' => :'BigDecimal', + :'total' => :'BigDecimal', :'receipt_id' => :'String', :'status' => :'String', :'receipt_number' => :'String', @@ -347,6 +349,8 @@ def _deserialize(type, value) value.to_i when :Float value.to_f + when :BigDecimal + BigDecimal(value.to_s) when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true diff --git a/lib/xero-ruby/models/accounting/receipts.rb b/lib/xero-ruby/models/accounting/receipts.rb index d4c6c0b8..b1533a3b 100644 --- a/lib/xero-ruby/models/accounting/receipts.rb +++ b/lib/xero-ruby/models/accounting/receipts.rb @@ -3,7 +3,7 @@ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) -The version of the OpenAPI document: 2.2.2 +The version of the OpenAPI document: 2.2.11 Contact: api@xero.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 4.3.1 @@ -14,6 +14,8 @@ require 'date' module XeroRuby::Accounting + require 'bigdecimal' + class Receipts attr_accessor :receipts @@ -130,6 +132,8 @@ def _deserialize(type, value) value.to_i when :Float value.to_f + when :BigDecimal + BigDecimal(value.to_s) when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true diff --git a/lib/xero-ruby/models/accounting/repeating_invoice.rb b/lib/xero-ruby/models/accounting/repeating_invoice.rb index 9f4570f3..fc037aad 100644 --- a/lib/xero-ruby/models/accounting/repeating_invoice.rb +++ b/lib/xero-ruby/models/accounting/repeating_invoice.rb @@ -3,7 +3,7 @@ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) -The version of the OpenAPI document: 2.2.2 +The version of the OpenAPI document: 2.2.11 Contact: api@xero.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 4.3.1 @@ -14,6 +14,8 @@ require 'date' module XeroRuby::Accounting + require 'bigdecimal' + class RepeatingInvoice # See Invoice Types attr_accessor :type @@ -124,9 +126,9 @@ def self.openapi_types :'branding_theme_id' => :'String', :'currency_code' => :'CurrencyCode', :'status' => :'String', - :'sub_total' => :'Float', - :'total_tax' => :'Float', - :'total' => :'Float', + :'sub_total' => :'BigDecimal', + :'total_tax' => :'BigDecimal', + :'total' => :'BigDecimal', :'repeating_invoice_id' => :'String', :'id' => :'String', :'has_attachments' => :'Boolean', @@ -335,6 +337,8 @@ def _deserialize(type, value) value.to_i when :Float value.to_f + when :BigDecimal + BigDecimal(value.to_s) when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true diff --git a/lib/xero-ruby/models/accounting/repeating_invoices.rb b/lib/xero-ruby/models/accounting/repeating_invoices.rb index ff4cea38..82bc4e52 100644 --- a/lib/xero-ruby/models/accounting/repeating_invoices.rb +++ b/lib/xero-ruby/models/accounting/repeating_invoices.rb @@ -3,7 +3,7 @@ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) -The version of the OpenAPI document: 2.2.2 +The version of the OpenAPI document: 2.2.11 Contact: api@xero.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 4.3.1 @@ -14,6 +14,8 @@ require 'date' module XeroRuby::Accounting + require 'bigdecimal' + class RepeatingInvoices attr_accessor :repeating_invoices @@ -130,6 +132,8 @@ def _deserialize(type, value) value.to_i when :Float value.to_f + when :BigDecimal + BigDecimal(value.to_s) when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true diff --git a/lib/xero-ruby/models/accounting/report.rb b/lib/xero-ruby/models/accounting/report.rb index d6543f71..2c27a0b7 100644 --- a/lib/xero-ruby/models/accounting/report.rb +++ b/lib/xero-ruby/models/accounting/report.rb @@ -3,7 +3,7 @@ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) -The version of the OpenAPI document: 2.2.2 +The version of the OpenAPI document: 2.2.11 Contact: api@xero.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 4.3.1 @@ -14,6 +14,8 @@ require 'date' module XeroRuby::Accounting + require 'bigdecimal' + class Report # See Prepayment Types attr_accessor :report_id @@ -81,7 +83,7 @@ def self.openapi_types :'report_title' => :'String', :'report_date' => :'String', :'updated_date_utc' => :'DateTime', - :'contacts' => :'Array' + :'contacts' => :'Array' } end @@ -225,6 +227,8 @@ def _deserialize(type, value) value.to_i when :Float value.to_f + when :BigDecimal + BigDecimal(value.to_s) when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true diff --git a/lib/xero-ruby/models/accounting/report_attribute.rb b/lib/xero-ruby/models/accounting/report_attribute.rb index b0207da5..f91479cf 100644 --- a/lib/xero-ruby/models/accounting/report_attribute.rb +++ b/lib/xero-ruby/models/accounting/report_attribute.rb @@ -3,7 +3,7 @@ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) -The version of the OpenAPI document: 2.2.2 +The version of the OpenAPI document: 2.2.11 Contact: api@xero.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 4.3.1 @@ -14,6 +14,8 @@ require 'date' module XeroRuby::Accounting + require 'bigdecimal' + class ReportAttribute attr_accessor :id @@ -138,6 +140,8 @@ def _deserialize(type, value) value.to_i when :Float value.to_f + when :BigDecimal + BigDecimal(value.to_s) when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true diff --git a/lib/xero-ruby/models/accounting/report_cell.rb b/lib/xero-ruby/models/accounting/report_cell.rb index 3f375373..a0de59b8 100644 --- a/lib/xero-ruby/models/accounting/report_cell.rb +++ b/lib/xero-ruby/models/accounting/report_cell.rb @@ -3,7 +3,7 @@ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) -The version of the OpenAPI document: 2.2.2 +The version of the OpenAPI document: 2.2.11 Contact: api@xero.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 4.3.1 @@ -14,6 +14,8 @@ require 'date' module XeroRuby::Accounting + require 'bigdecimal' + class ReportCell attr_accessor :value @@ -140,6 +142,8 @@ def _deserialize(type, value) value.to_i when :Float value.to_f + when :BigDecimal + BigDecimal(value.to_s) when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true diff --git a/lib/xero-ruby/models/accounting/report_fields.rb b/lib/xero-ruby/models/accounting/report_fields.rb index 58f1820d..690e8ff4 100644 --- a/lib/xero-ruby/models/accounting/report_fields.rb +++ b/lib/xero-ruby/models/accounting/report_fields.rb @@ -3,7 +3,7 @@ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) -The version of the OpenAPI document: 2.2.2 +The version of the OpenAPI document: 2.2.11 Contact: api@xero.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 4.3.1 @@ -14,6 +14,8 @@ require 'date' module XeroRuby::Accounting + require 'bigdecimal' + class ReportFields attr_accessor :field_id @@ -148,6 +150,8 @@ def _deserialize(type, value) value.to_i when :Float value.to_f + when :BigDecimal + BigDecimal(value.to_s) when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true diff --git a/lib/xero-ruby/models/accounting/report_row.rb b/lib/xero-ruby/models/accounting/report_row.rb index b5f36e1e..ab87ee16 100644 --- a/lib/xero-ruby/models/accounting/report_row.rb +++ b/lib/xero-ruby/models/accounting/report_row.rb @@ -3,7 +3,7 @@ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) -The version of the OpenAPI document: 2.2.2 +The version of the OpenAPI document: 2.2.11 Contact: api@xero.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 4.3.1 @@ -14,6 +14,8 @@ require 'date' module XeroRuby::Accounting + require 'bigdecimal' + class ReportRow attr_accessor :row_type @@ -150,6 +152,8 @@ def _deserialize(type, value) value.to_i when :Float value.to_f + when :BigDecimal + BigDecimal(value.to_s) when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true diff --git a/lib/xero-ruby/models/accounting/report_rows.rb b/lib/xero-ruby/models/accounting/report_rows.rb index bef9b6a5..f73a15a3 100644 --- a/lib/xero-ruby/models/accounting/report_rows.rb +++ b/lib/xero-ruby/models/accounting/report_rows.rb @@ -3,7 +3,7 @@ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) -The version of the OpenAPI document: 2.2.2 +The version of the OpenAPI document: 2.2.11 Contact: api@xero.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 4.3.1 @@ -14,6 +14,8 @@ require 'date' module XeroRuby::Accounting + require 'bigdecimal' + class ReportRows attr_accessor :row_type @@ -162,6 +164,8 @@ def _deserialize(type, value) value.to_i when :Float value.to_f + when :BigDecimal + BigDecimal(value.to_s) when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true diff --git a/lib/xero-ruby/models/accounting/report_with_row.rb b/lib/xero-ruby/models/accounting/report_with_row.rb index 8f87fff4..7ea5743b 100644 --- a/lib/xero-ruby/models/accounting/report_with_row.rb +++ b/lib/xero-ruby/models/accounting/report_with_row.rb @@ -3,7 +3,7 @@ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) -The version of the OpenAPI document: 2.2.2 +The version of the OpenAPI document: 2.2.11 Contact: api@xero.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 4.3.1 @@ -14,6 +14,8 @@ require 'date' module XeroRuby::Accounting + require 'bigdecimal' + class ReportWithRow # Report id attr_accessor :report_id @@ -214,6 +216,8 @@ def _deserialize(type, value) value.to_i when :Float value.to_f + when :BigDecimal + BigDecimal(value.to_s) when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true diff --git a/lib/xero-ruby/models/accounting/report_with_rows.rb b/lib/xero-ruby/models/accounting/report_with_rows.rb index 1af468a7..718b6feb 100644 --- a/lib/xero-ruby/models/accounting/report_with_rows.rb +++ b/lib/xero-ruby/models/accounting/report_with_rows.rb @@ -3,7 +3,7 @@ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) -The version of the OpenAPI document: 2.2.2 +The version of the OpenAPI document: 2.2.11 Contact: api@xero.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 4.3.1 @@ -14,6 +14,8 @@ require 'date' module XeroRuby::Accounting + require 'bigdecimal' + class ReportWithRows attr_accessor :reports @@ -130,6 +132,8 @@ def _deserialize(type, value) value.to_i when :Float value.to_f + when :BigDecimal + BigDecimal(value.to_s) when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true diff --git a/lib/xero-ruby/models/accounting/reports.rb b/lib/xero-ruby/models/accounting/reports.rb index 257589fd..f0961ad2 100644 --- a/lib/xero-ruby/models/accounting/reports.rb +++ b/lib/xero-ruby/models/accounting/reports.rb @@ -3,7 +3,7 @@ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) -The version of the OpenAPI document: 2.2.2 +The version of the OpenAPI document: 2.2.11 Contact: api@xero.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 4.3.1 @@ -14,6 +14,8 @@ require 'date' module XeroRuby::Accounting + require 'bigdecimal' + class Reports attr_accessor :reports @@ -130,6 +132,8 @@ def _deserialize(type, value) value.to_i when :Float value.to_f + when :BigDecimal + BigDecimal(value.to_s) when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true diff --git a/lib/xero-ruby/models/accounting/request_empty.rb b/lib/xero-ruby/models/accounting/request_empty.rb index 37a24a35..97102acf 100644 --- a/lib/xero-ruby/models/accounting/request_empty.rb +++ b/lib/xero-ruby/models/accounting/request_empty.rb @@ -3,7 +3,7 @@ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) -The version of the OpenAPI document: 2.2.2 +The version of the OpenAPI document: 2.2.11 Contact: api@xero.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 4.3.1 @@ -14,6 +14,8 @@ require 'date' module XeroRuby::Accounting + require 'bigdecimal' + class RequestEmpty # Need at least one field to create an empty JSON payload attr_accessor :status @@ -128,6 +130,8 @@ def _deserialize(type, value) value.to_i when :Float value.to_f + when :BigDecimal + BigDecimal(value.to_s) when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true diff --git a/lib/xero-ruby/models/accounting/row_type.rb b/lib/xero-ruby/models/accounting/row_type.rb index 87c0a6fa..027689ee 100644 --- a/lib/xero-ruby/models/accounting/row_type.rb +++ b/lib/xero-ruby/models/accounting/row_type.rb @@ -3,7 +3,7 @@ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) -The version of the OpenAPI document: 2.2.2 +The version of the OpenAPI document: 2.2.11 Contact: api@xero.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 4.3.1 diff --git a/lib/xero-ruby/models/accounting/sales_tracking_category.rb b/lib/xero-ruby/models/accounting/sales_tracking_category.rb index f77bf87a..9c1e7cbf 100644 --- a/lib/xero-ruby/models/accounting/sales_tracking_category.rb +++ b/lib/xero-ruby/models/accounting/sales_tracking_category.rb @@ -3,7 +3,7 @@ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) -The version of the OpenAPI document: 2.2.2 +The version of the OpenAPI document: 2.2.11 Contact: api@xero.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 4.3.1 @@ -14,6 +14,8 @@ require 'date' module XeroRuby::Accounting + require 'bigdecimal' + class SalesTrackingCategory # The default sales tracking category name for contacts attr_accessor :tracking_category_name @@ -138,6 +140,8 @@ def _deserialize(type, value) value.to_i when :Float value.to_f + when :BigDecimal + BigDecimal(value.to_s) when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true diff --git a/lib/xero-ruby/models/accounting/schedule.rb b/lib/xero-ruby/models/accounting/schedule.rb index 939782ae..29dbc0f4 100644 --- a/lib/xero-ruby/models/accounting/schedule.rb +++ b/lib/xero-ruby/models/accounting/schedule.rb @@ -3,7 +3,7 @@ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) -The version of the OpenAPI document: 2.2.2 +The version of the OpenAPI document: 2.2.11 Contact: api@xero.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 4.3.1 @@ -14,6 +14,8 @@ require 'date' module XeroRuby::Accounting + require 'bigdecimal' + class Schedule # Integer used with the unit e.g. 1 (every 1 week), 2 (every 2 months) attr_accessor :period @@ -242,6 +244,8 @@ def _deserialize(type, value) value.to_i when :Float value.to_f + when :BigDecimal + BigDecimal(value.to_s) when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true diff --git a/lib/xero-ruby/models/accounting/tax_component.rb b/lib/xero-ruby/models/accounting/tax_component.rb index 9b0bc267..0e675b75 100644 --- a/lib/xero-ruby/models/accounting/tax_component.rb +++ b/lib/xero-ruby/models/accounting/tax_component.rb @@ -3,7 +3,7 @@ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) -The version of the OpenAPI document: 2.2.2 +The version of the OpenAPI document: 2.2.11 Contact: api@xero.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 4.3.1 @@ -14,6 +14,8 @@ require 'date' module XeroRuby::Accounting + require 'bigdecimal' + class TaxComponent # Name of Tax Component attr_accessor :name @@ -41,7 +43,7 @@ def self.attribute_map def self.openapi_types { :'name' => :'String', - :'rate' => :'Float', + :'rate' => :'BigDecimal', :'is_compound' => :'Boolean', :'is_non_recoverable' => :'Boolean' } @@ -158,6 +160,8 @@ def _deserialize(type, value) value.to_i when :Float value.to_f + when :BigDecimal + BigDecimal(value.to_s) when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true diff --git a/lib/xero-ruby/models/accounting/tax_rate.rb b/lib/xero-ruby/models/accounting/tax_rate.rb index e2c6ee2b..d5563345 100644 --- a/lib/xero-ruby/models/accounting/tax_rate.rb +++ b/lib/xero-ruby/models/accounting/tax_rate.rb @@ -3,7 +3,7 @@ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) -The version of the OpenAPI document: 2.2.2 +The version of the OpenAPI document: 2.2.11 Contact: api@xero.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 4.3.1 @@ -14,6 +14,8 @@ require 'date' module XeroRuby::Accounting + require 'bigdecimal' + class TaxRate # Name of tax rate attr_accessor :name @@ -182,8 +184,8 @@ def self.openapi_types :'can_apply_to_expenses' => :'Boolean', :'can_apply_to_liabilities' => :'Boolean', :'can_apply_to_revenue' => :'Boolean', - :'display_tax_rate' => :'Float', - :'effective_rate' => :'Float' + :'display_tax_rate' => :'BigDecimal', + :'effective_rate' => :'BigDecimal' } end @@ -364,6 +366,8 @@ def _deserialize(type, value) value.to_i when :Float value.to_f + when :BigDecimal + BigDecimal(value.to_s) when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true diff --git a/lib/xero-ruby/models/accounting/tax_rates.rb b/lib/xero-ruby/models/accounting/tax_rates.rb index c367fef2..f0961add 100644 --- a/lib/xero-ruby/models/accounting/tax_rates.rb +++ b/lib/xero-ruby/models/accounting/tax_rates.rb @@ -3,7 +3,7 @@ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) -The version of the OpenAPI document: 2.2.2 +The version of the OpenAPI document: 2.2.11 Contact: api@xero.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 4.3.1 @@ -14,6 +14,8 @@ require 'date' module XeroRuby::Accounting + require 'bigdecimal' + class TaxRates attr_accessor :tax_rates @@ -130,6 +132,8 @@ def _deserialize(type, value) value.to_i when :Float value.to_f + when :BigDecimal + BigDecimal(value.to_s) when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true diff --git a/lib/xero-ruby/models/accounting/tax_type.rb b/lib/xero-ruby/models/accounting/tax_type.rb index 673c0af3..0af61da8 100644 --- a/lib/xero-ruby/models/accounting/tax_type.rb +++ b/lib/xero-ruby/models/accounting/tax_type.rb @@ -3,7 +3,7 @@ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) -The version of the OpenAPI document: 2.2.2 +The version of the OpenAPI document: 2.2.11 Contact: api@xero.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 4.3.1 diff --git a/lib/xero-ruby/models/accounting/ten_nintey_nine_contact.rb b/lib/xero-ruby/models/accounting/ten_ninety_nine_contact.rb similarity index 93% rename from lib/xero-ruby/models/accounting/ten_nintey_nine_contact.rb rename to lib/xero-ruby/models/accounting/ten_ninety_nine_contact.rb index f4ff26b8..14d11682 100644 --- a/lib/xero-ruby/models/accounting/ten_nintey_nine_contact.rb +++ b/lib/xero-ruby/models/accounting/ten_ninety_nine_contact.rb @@ -3,7 +3,7 @@ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) -The version of the OpenAPI document: 2.2.2 +The version of the OpenAPI document: 2.2.11 Contact: api@xero.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 4.3.1 @@ -14,7 +14,9 @@ require 'date' module XeroRuby::Accounting - class TenNinteyNineContact + require 'bigdecimal' + + class TenNinetyNineContact # Box 1 on 1099 Form attr_accessor :box1 @@ -112,19 +114,19 @@ def self.attribute_map # Attribute type mapping. def self.openapi_types { - :'box1' => :'Float', - :'box2' => :'Float', - :'box3' => :'Float', - :'box4' => :'Float', - :'box5' => :'Float', - :'box6' => :'Float', - :'box7' => :'Float', - :'box8' => :'Float', - :'box9' => :'Float', - :'box10' => :'Float', - :'box11' => :'Float', - :'box13' => :'Float', - :'box14' => :'Float', + :'box1' => :'BigDecimal', + :'box2' => :'BigDecimal', + :'box3' => :'BigDecimal', + :'box4' => :'BigDecimal', + :'box5' => :'BigDecimal', + :'box6' => :'BigDecimal', + :'box7' => :'BigDecimal', + :'box8' => :'BigDecimal', + :'box9' => :'BigDecimal', + :'box10' => :'BigDecimal', + :'box11' => :'BigDecimal', + :'box13' => :'BigDecimal', + :'box14' => :'BigDecimal', :'name' => :'String', :'federal_tax_id_type' => :'String', :'city' => :'String', @@ -141,13 +143,13 @@ def self.openapi_types # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `XeroRuby::Accounting::TenNinteyNineContact` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `XeroRuby::Accounting::TenNinetyNineContact` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `XeroRuby::Accounting::TenNinteyNineContact`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `XeroRuby::Accounting::TenNinetyNineContact`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } @@ -338,6 +340,8 @@ def _deserialize(type, value) value.to_i when :Float value.to_f + when :BigDecimal + BigDecimal(value.to_s) when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true diff --git a/lib/xero-ruby/models/accounting/time_zone.rb b/lib/xero-ruby/models/accounting/time_zone.rb index 19a4f9fb..cdcdcfd1 100644 --- a/lib/xero-ruby/models/accounting/time_zone.rb +++ b/lib/xero-ruby/models/accounting/time_zone.rb @@ -3,7 +3,7 @@ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) -The version of the OpenAPI document: 2.2.2 +The version of the OpenAPI document: 2.2.11 Contact: api@xero.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 4.3.1 diff --git a/lib/xero-ruby/models/accounting/tracking_categories.rb b/lib/xero-ruby/models/accounting/tracking_categories.rb index df3ef618..65c1c38d 100644 --- a/lib/xero-ruby/models/accounting/tracking_categories.rb +++ b/lib/xero-ruby/models/accounting/tracking_categories.rb @@ -3,7 +3,7 @@ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) -The version of the OpenAPI document: 2.2.2 +The version of the OpenAPI document: 2.2.11 Contact: api@xero.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 4.3.1 @@ -14,6 +14,8 @@ require 'date' module XeroRuby::Accounting + require 'bigdecimal' + class TrackingCategories attr_accessor :tracking_categories @@ -130,6 +132,8 @@ def _deserialize(type, value) value.to_i when :Float value.to_f + when :BigDecimal + BigDecimal(value.to_s) when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true diff --git a/lib/xero-ruby/models/accounting/tracking_category.rb b/lib/xero-ruby/models/accounting/tracking_category.rb index bec6d92b..96a631aa 100644 --- a/lib/xero-ruby/models/accounting/tracking_category.rb +++ b/lib/xero-ruby/models/accounting/tracking_category.rb @@ -3,7 +3,7 @@ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) -The version of the OpenAPI document: 2.2.2 +The version of the OpenAPI document: 2.2.11 Contact: api@xero.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 4.3.1 @@ -14,6 +14,8 @@ require 'date' module XeroRuby::Accounting + require 'bigdecimal' + class TrackingCategory # The Xero identifier for a tracking category e.g. 297c2dc5-cc47-4afd-8ec8-74990b8761e9 attr_accessor :tracking_category_id @@ -247,6 +249,8 @@ def _deserialize(type, value) value.to_i when :Float value.to_f + when :BigDecimal + BigDecimal(value.to_s) when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true diff --git a/lib/xero-ruby/models/accounting/tracking_option.rb b/lib/xero-ruby/models/accounting/tracking_option.rb index 3ecbbf67..bcd6632b 100644 --- a/lib/xero-ruby/models/accounting/tracking_option.rb +++ b/lib/xero-ruby/models/accounting/tracking_option.rb @@ -3,7 +3,7 @@ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) -The version of the OpenAPI document: 2.2.2 +The version of the OpenAPI document: 2.2.11 Contact: api@xero.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 4.3.1 @@ -14,6 +14,8 @@ require 'date' module XeroRuby::Accounting + require 'bigdecimal' + class TrackingOption # The Xero identifier for a tracking optione.g. ae777a87-5ef3-4fa0-a4f0-d10e1f13073a attr_accessor :tracking_option_id @@ -210,6 +212,8 @@ def _deserialize(type, value) value.to_i when :Float value.to_f + when :BigDecimal + BigDecimal(value.to_s) when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true diff --git a/lib/xero-ruby/models/accounting/tracking_options.rb b/lib/xero-ruby/models/accounting/tracking_options.rb index d06e5a9a..a51a1aa3 100644 --- a/lib/xero-ruby/models/accounting/tracking_options.rb +++ b/lib/xero-ruby/models/accounting/tracking_options.rb @@ -3,7 +3,7 @@ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) -The version of the OpenAPI document: 2.2.2 +The version of the OpenAPI document: 2.2.11 Contact: api@xero.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 4.3.1 @@ -14,6 +14,8 @@ require 'date' module XeroRuby::Accounting + require 'bigdecimal' + class TrackingOptions attr_accessor :options @@ -130,6 +132,8 @@ def _deserialize(type, value) value.to_i when :Float value.to_f + when :BigDecimal + BigDecimal(value.to_s) when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true diff --git a/lib/xero-ruby/models/accounting/user.rb b/lib/xero-ruby/models/accounting/user.rb index cadc0708..d2cbb6c5 100644 --- a/lib/xero-ruby/models/accounting/user.rb +++ b/lib/xero-ruby/models/accounting/user.rb @@ -3,7 +3,7 @@ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) -The version of the OpenAPI document: 2.2.2 +The version of the OpenAPI document: 2.2.11 Contact: api@xero.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 4.3.1 @@ -14,6 +14,8 @@ require 'date' module XeroRuby::Accounting + require 'bigdecimal' + class User # Xero identifier attr_accessor :user_id @@ -229,6 +231,8 @@ def _deserialize(type, value) value.to_i when :Float value.to_f + when :BigDecimal + BigDecimal(value.to_s) when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true diff --git a/lib/xero-ruby/models/accounting/users.rb b/lib/xero-ruby/models/accounting/users.rb index 8b160305..700996dd 100644 --- a/lib/xero-ruby/models/accounting/users.rb +++ b/lib/xero-ruby/models/accounting/users.rb @@ -3,7 +3,7 @@ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) -The version of the OpenAPI document: 2.2.2 +The version of the OpenAPI document: 2.2.11 Contact: api@xero.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 4.3.1 @@ -14,6 +14,8 @@ require 'date' module XeroRuby::Accounting + require 'bigdecimal' + class Users attr_accessor :users @@ -130,6 +132,8 @@ def _deserialize(type, value) value.to_i when :Float value.to_f + when :BigDecimal + BigDecimal(value.to_s) when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true diff --git a/lib/xero-ruby/models/accounting/validation_error.rb b/lib/xero-ruby/models/accounting/validation_error.rb index 60987aee..9d61e081 100644 --- a/lib/xero-ruby/models/accounting/validation_error.rb +++ b/lib/xero-ruby/models/accounting/validation_error.rb @@ -3,7 +3,7 @@ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) -The version of the OpenAPI document: 2.2.2 +The version of the OpenAPI document: 2.2.11 Contact: api@xero.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 4.3.1 @@ -14,6 +14,8 @@ require 'date' module XeroRuby::Accounting + require 'bigdecimal' + class ValidationError # Validation error message attr_accessor :message @@ -128,6 +130,8 @@ def _deserialize(type, value) value.to_i when :Float value.to_f + when :BigDecimal + BigDecimal(value.to_s) when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true diff --git a/lib/xero-ruby/models/assets/asset.rb b/lib/xero-ruby/models/assets/asset.rb index 4cf74508..d9480724 100644 --- a/lib/xero-ruby/models/assets/asset.rb +++ b/lib/xero-ruby/models/assets/asset.rb @@ -3,7 +3,7 @@ #This is the Xero Assets API -The version of the OpenAPI document: 2.2.6 +The version of the OpenAPI document: 2.2.11 Contact: api@xero.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 4.3.1 @@ -14,6 +14,8 @@ require 'date' module XeroRuby::Assets + require 'bigdecimal' + class Asset # The Xero-generated Id for the asset attr_accessor :asset_id @@ -89,15 +91,15 @@ def self.openapi_types :'asset_type_id' => :'String', :'asset_number' => :'String', :'purchase_date' => :'Date', - :'purchase_price' => :'Float', - :'disposal_price' => :'Float', + :'purchase_price' => :'BigDecimal', + :'disposal_price' => :'BigDecimal', :'asset_status' => :'AssetStatus', :'warranty_expiry_date' => :'String', :'serial_number' => :'String', :'book_depreciation_setting' => :'BookDepreciationSetting', :'book_depreciation_detail' => :'BookDepreciationDetail', :'can_rollback' => :'Boolean', - :'accounting_book_value' => :'Float', + :'accounting_book_value' => :'BigDecimal', :'is_delete_enabled_for_date' => :'Boolean' } end @@ -273,6 +275,8 @@ def _deserialize(type, value) value.to_i when :Float value.to_f + when :BigDecimal + BigDecimal(value.to_s) when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true diff --git a/lib/xero-ruby/models/assets/asset_status.rb b/lib/xero-ruby/models/assets/asset_status.rb index eb6522bc..a7efce8f 100644 --- a/lib/xero-ruby/models/assets/asset_status.rb +++ b/lib/xero-ruby/models/assets/asset_status.rb @@ -3,7 +3,7 @@ #This is the Xero Assets API -The version of the OpenAPI document: 2.2.6 +The version of the OpenAPI document: 2.2.11 Contact: api@xero.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 4.3.1 diff --git a/lib/xero-ruby/models/assets/asset_status_query_param.rb b/lib/xero-ruby/models/assets/asset_status_query_param.rb index 5c4caee8..996b0df3 100644 --- a/lib/xero-ruby/models/assets/asset_status_query_param.rb +++ b/lib/xero-ruby/models/assets/asset_status_query_param.rb @@ -3,7 +3,7 @@ #This is the Xero Assets API -The version of the OpenAPI document: 2.2.6 +The version of the OpenAPI document: 2.2.11 Contact: api@xero.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 4.3.1 diff --git a/lib/xero-ruby/models/assets/asset_type.rb b/lib/xero-ruby/models/assets/asset_type.rb index 7cf715b0..32bbb430 100644 --- a/lib/xero-ruby/models/assets/asset_type.rb +++ b/lib/xero-ruby/models/assets/asset_type.rb @@ -3,7 +3,7 @@ #This is the Xero Assets API -The version of the OpenAPI document: 2.2.6 +The version of the OpenAPI document: 2.2.11 Contact: api@xero.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 4.3.1 @@ -14,6 +14,8 @@ require 'date' module XeroRuby::Assets + require 'bigdecimal' + class AssetType # Xero generated unique identifier for asset types attr_accessor :asset_type_id @@ -198,6 +200,8 @@ def _deserialize(type, value) value.to_i when :Float value.to_f + when :BigDecimal + BigDecimal(value.to_s) when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true diff --git a/lib/xero-ruby/models/assets/assets.rb b/lib/xero-ruby/models/assets/assets.rb index 21940e74..071e8657 100644 --- a/lib/xero-ruby/models/assets/assets.rb +++ b/lib/xero-ruby/models/assets/assets.rb @@ -3,7 +3,7 @@ #This is the Xero Assets API -The version of the OpenAPI document: 2.2.6 +The version of the OpenAPI document: 2.2.11 Contact: api@xero.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 4.3.1 @@ -14,6 +14,8 @@ require 'date' module XeroRuby::Assets + require 'bigdecimal' + class Assets attr_accessor :pagination @@ -140,6 +142,8 @@ def _deserialize(type, value) value.to_i when :Float value.to_f + when :BigDecimal + BigDecimal(value.to_s) when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true diff --git a/lib/xero-ruby/models/assets/book_depreciation_detail.rb b/lib/xero-ruby/models/assets/book_depreciation_detail.rb index 7e5ed608..4ed402a7 100644 --- a/lib/xero-ruby/models/assets/book_depreciation_detail.rb +++ b/lib/xero-ruby/models/assets/book_depreciation_detail.rb @@ -3,7 +3,7 @@ #This is the Xero Assets API -The version of the OpenAPI document: 2.2.6 +The version of the OpenAPI document: 2.2.11 Contact: api@xero.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 4.3.1 @@ -14,6 +14,8 @@ require 'date' module XeroRuby::Assets + require 'bigdecimal' + class BookDepreciationDetail # When an asset is disposed, this will be the sell price minus the purchase price if a profit was made. attr_accessor :current_capital_gain @@ -52,13 +54,13 @@ def self.attribute_map # Attribute type mapping. def self.openapi_types { - :'current_capital_gain' => :'Float', - :'current_gain_loss' => :'Float', + :'current_capital_gain' => :'BigDecimal', + :'current_gain_loss' => :'BigDecimal', :'depreciation_start_date' => :'Date', - :'cost_limit' => :'Float', - :'residual_value' => :'Float', - :'prior_accum_depreciation_amount' => :'Float', - :'current_accum_depreciation_amount' => :'Float' + :'cost_limit' => :'BigDecimal', + :'residual_value' => :'BigDecimal', + :'prior_accum_depreciation_amount' => :'BigDecimal', + :'current_accum_depreciation_amount' => :'BigDecimal' } end @@ -188,6 +190,8 @@ def _deserialize(type, value) value.to_i when :Float value.to_f + when :BigDecimal + BigDecimal(value.to_s) when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true diff --git a/lib/xero-ruby/models/assets/book_depreciation_setting.rb b/lib/xero-ruby/models/assets/book_depreciation_setting.rb index 9dfcb759..dc0ded62 100644 --- a/lib/xero-ruby/models/assets/book_depreciation_setting.rb +++ b/lib/xero-ruby/models/assets/book_depreciation_setting.rb @@ -3,7 +3,7 @@ #This is the Xero Assets API -The version of the OpenAPI document: 2.2.6 +The version of the OpenAPI document: 2.2.11 Contact: api@xero.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 4.3.1 @@ -14,6 +14,8 @@ require 'date' module XeroRuby::Assets + require 'bigdecimal' + class BookDepreciationSetting # The method of depreciation applied to this asset. See Depreciation Methods attr_accessor :depreciation_method @@ -91,7 +93,7 @@ def self.openapi_types { :'depreciation_method' => :'String', :'averaging_method' => :'String', - :'depreciation_rate' => :'Float', + :'depreciation_rate' => :'BigDecimal', :'effective_life_years' => :'Integer', :'depreciation_calculation_method' => :'String', :'depreciable_object_id' => :'String', @@ -267,6 +269,8 @@ def _deserialize(type, value) value.to_i when :Float value.to_f + when :BigDecimal + BigDecimal(value.to_s) when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true diff --git a/lib/xero-ruby/models/assets/error.rb b/lib/xero-ruby/models/assets/error.rb index 4773e6f5..365d4638 100644 --- a/lib/xero-ruby/models/assets/error.rb +++ b/lib/xero-ruby/models/assets/error.rb @@ -3,7 +3,7 @@ #This is the Xero Assets API -The version of the OpenAPI document: 2.2.6 +The version of the OpenAPI document: 2.2.11 Contact: api@xero.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 4.3.1 @@ -14,6 +14,8 @@ require 'date' module XeroRuby::Assets + require 'bigdecimal' + class Error # Array of elements of resource validation errors attr_accessor :resource_validation_errors @@ -172,6 +174,8 @@ def _deserialize(type, value) value.to_i when :Float value.to_f + when :BigDecimal + BigDecimal(value.to_s) when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true diff --git a/lib/xero-ruby/models/assets/field_validation_errors_element.rb b/lib/xero-ruby/models/assets/field_validation_errors_element.rb index f71b439a..a151ae0f 100644 --- a/lib/xero-ruby/models/assets/field_validation_errors_element.rb +++ b/lib/xero-ruby/models/assets/field_validation_errors_element.rb @@ -3,7 +3,7 @@ #This is the Xero Assets API -The version of the OpenAPI document: 2.2.6 +The version of the OpenAPI document: 2.2.11 Contact: api@xero.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 4.3.1 @@ -14,6 +14,8 @@ require 'date' module XeroRuby::Assets + require 'bigdecimal' + class FieldValidationErrorsElement # The field name of the erroneous field attr_accessor :field_name @@ -178,6 +180,8 @@ def _deserialize(type, value) value.to_i when :Float value.to_f + when :BigDecimal + BigDecimal(value.to_s) when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true diff --git a/lib/xero-ruby/models/assets/pagination.rb b/lib/xero-ruby/models/assets/pagination.rb index dea85e2e..7d21391c 100644 --- a/lib/xero-ruby/models/assets/pagination.rb +++ b/lib/xero-ruby/models/assets/pagination.rb @@ -3,7 +3,7 @@ #This is the Xero Assets API -The version of the OpenAPI document: 2.2.6 +The version of the OpenAPI document: 2.2.11 Contact: api@xero.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 4.3.1 @@ -14,6 +14,8 @@ require 'date' module XeroRuby::Assets + require 'bigdecimal' + class Pagination attr_accessor :page @@ -158,6 +160,8 @@ def _deserialize(type, value) value.to_i when :Float value.to_f + when :BigDecimal + BigDecimal(value.to_s) when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true diff --git a/lib/xero-ruby/models/assets/resource_validation_errors_element.rb b/lib/xero-ruby/models/assets/resource_validation_errors_element.rb index 4a48745b..c0ba586d 100644 --- a/lib/xero-ruby/models/assets/resource_validation_errors_element.rb +++ b/lib/xero-ruby/models/assets/resource_validation_errors_element.rb @@ -3,7 +3,7 @@ #This is the Xero Assets API -The version of the OpenAPI document: 2.2.6 +The version of the OpenAPI document: 2.2.11 Contact: api@xero.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 4.3.1 @@ -14,6 +14,8 @@ require 'date' module XeroRuby::Assets + require 'bigdecimal' + class ResourceValidationErrorsElement # The field name of the erroneous field attr_accessor :resource_name @@ -168,6 +170,8 @@ def _deserialize(type, value) value.to_i when :Float value.to_f + when :BigDecimal + BigDecimal(value.to_s) when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true diff --git a/lib/xero-ruby/models/assets/setting.rb b/lib/xero-ruby/models/assets/setting.rb index 08ceb34c..4b7ceace 100644 --- a/lib/xero-ruby/models/assets/setting.rb +++ b/lib/xero-ruby/models/assets/setting.rb @@ -3,7 +3,7 @@ #This is the Xero Assets API -The version of the OpenAPI document: 2.2.6 +The version of the OpenAPI document: 2.2.11 Contact: api@xero.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 4.3.1 @@ -14,6 +14,8 @@ require 'date' module XeroRuby::Assets + require 'bigdecimal' + class Setting # The prefix used for fixed asset numbers (“FA-” by default) attr_accessor :asset_number_prefix @@ -198,6 +200,8 @@ def _deserialize(type, value) value.to_i when :Float value.to_f + when :BigDecimal + BigDecimal(value.to_s) when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true diff --git a/lib/xero-ruby/models/projects/amount.rb b/lib/xero-ruby/models/projects/amount.rb index df2c25b0..6c9d20db 100644 --- a/lib/xero-ruby/models/projects/amount.rb +++ b/lib/xero-ruby/models/projects/amount.rb @@ -3,7 +3,7 @@ #This is the Xero Projects API -The version of the OpenAPI document: 2.2.6 +The version of the OpenAPI document: 2.2.11 Contact: api@xero.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 4.3.1 @@ -14,6 +14,8 @@ require 'date' module XeroRuby::Projects + require 'bigdecimal' + class Amount attr_accessor :currency @@ -33,7 +35,7 @@ def self.attribute_map def self.openapi_types { :'currency' => :'CurrencyCode', - :'value' => :'Float' + :'value' => :'BigDecimal' } end @@ -138,6 +140,8 @@ def _deserialize(type, value) value.to_i when :Float value.to_f + when :BigDecimal + BigDecimal(value.to_s) when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true diff --git a/lib/xero-ruby/models/projects/charge_type.rb b/lib/xero-ruby/models/projects/charge_type.rb index 69fe7a20..0656417b 100644 --- a/lib/xero-ruby/models/projects/charge_type.rb +++ b/lib/xero-ruby/models/projects/charge_type.rb @@ -3,7 +3,7 @@ #This is the Xero Projects API -The version of the OpenAPI document: 2.2.6 +The version of the OpenAPI document: 2.2.11 Contact: api@xero.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 4.3.1 diff --git a/lib/xero-ruby/models/projects/currency_code.rb b/lib/xero-ruby/models/projects/currency_code.rb index 1fdc00a1..1671247f 100644 --- a/lib/xero-ruby/models/projects/currency_code.rb +++ b/lib/xero-ruby/models/projects/currency_code.rb @@ -3,7 +3,7 @@ #This is the Xero Projects API -The version of the OpenAPI document: 2.2.6 +The version of the OpenAPI document: 2.2.11 Contact: api@xero.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 4.3.1 diff --git a/lib/xero-ruby/models/projects/error.rb b/lib/xero-ruby/models/projects/error.rb index 5cb68bd8..069c2d9f 100644 --- a/lib/xero-ruby/models/projects/error.rb +++ b/lib/xero-ruby/models/projects/error.rb @@ -3,7 +3,7 @@ #This is the Xero Projects API -The version of the OpenAPI document: 2.2.6 +The version of the OpenAPI document: 2.2.11 Contact: api@xero.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 4.3.1 @@ -14,6 +14,8 @@ require 'date' module XeroRuby::Projects + require 'bigdecimal' + class Error # Exception message attr_accessor :message @@ -138,6 +140,8 @@ def _deserialize(type, value) value.to_i when :Float value.to_f + when :BigDecimal + BigDecimal(value.to_s) when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true diff --git a/lib/xero-ruby/models/projects/pagination.rb b/lib/xero-ruby/models/projects/pagination.rb index dee8c4dd..2cd7d102 100644 --- a/lib/xero-ruby/models/projects/pagination.rb +++ b/lib/xero-ruby/models/projects/pagination.rb @@ -3,7 +3,7 @@ #This is the Xero Projects API -The version of the OpenAPI document: 2.2.6 +The version of the OpenAPI document: 2.2.11 Contact: api@xero.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 4.3.1 @@ -14,6 +14,8 @@ require 'date' module XeroRuby::Projects + require 'bigdecimal' + class Pagination # Set to 1 by default. The requested number of the page in paged response - Must be a number greater than 0. attr_accessor :page @@ -158,6 +160,8 @@ def _deserialize(type, value) value.to_i when :Float value.to_f + when :BigDecimal + BigDecimal(value.to_s) when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true diff --git a/lib/xero-ruby/models/projects/project.rb b/lib/xero-ruby/models/projects/project.rb index df0c0640..a929e7b5 100644 --- a/lib/xero-ruby/models/projects/project.rb +++ b/lib/xero-ruby/models/projects/project.rb @@ -3,7 +3,7 @@ #This is the Xero Projects API -The version of the OpenAPI document: 2.2.6 +The version of the OpenAPI document: 2.2.11 Contact: api@xero.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 4.3.1 @@ -14,6 +14,8 @@ require 'date' module XeroRuby::Projects + require 'bigdecimal' + class Project # Identifier of the project. attr_accessor :project_id @@ -343,6 +345,8 @@ def _deserialize(type, value) value.to_i when :Float value.to_f + when :BigDecimal + BigDecimal(value.to_s) when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true diff --git a/lib/xero-ruby/models/projects/project_create_or_update.rb b/lib/xero-ruby/models/projects/project_create_or_update.rb index c6be2367..4e399aad 100644 --- a/lib/xero-ruby/models/projects/project_create_or_update.rb +++ b/lib/xero-ruby/models/projects/project_create_or_update.rb @@ -3,7 +3,7 @@ #This is the Xero Projects API -The version of the OpenAPI document: 2.2.6 +The version of the OpenAPI document: 2.2.11 Contact: api@xero.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 4.3.1 @@ -14,6 +14,8 @@ require 'date' module XeroRuby::Projects + require 'bigdecimal' + class ProjectCreateOrUpdate # Identifier of the contact this project was created for. attr_accessor :contact_id @@ -42,7 +44,7 @@ def self.openapi_types { :'contact_id' => :'String', :'name' => :'String', - :'estimate_amount' => :'Float', + :'estimate_amount' => :'BigDecimal', :'deadline_utc' => :'DateTime' } end @@ -163,6 +165,8 @@ def _deserialize(type, value) value.to_i when :Float value.to_f + when :BigDecimal + BigDecimal(value.to_s) when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true diff --git a/lib/xero-ruby/models/projects/project_patch.rb b/lib/xero-ruby/models/projects/project_patch.rb index 9abe8074..257f00f3 100644 --- a/lib/xero-ruby/models/projects/project_patch.rb +++ b/lib/xero-ruby/models/projects/project_patch.rb @@ -3,7 +3,7 @@ #This is the Xero Projects API -The version of the OpenAPI document: 2.2.6 +The version of the OpenAPI document: 2.2.11 Contact: api@xero.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 4.3.1 @@ -14,6 +14,8 @@ require 'date' module XeroRuby::Projects + require 'bigdecimal' + class ProjectPatch attr_accessor :status @@ -133,6 +135,8 @@ def _deserialize(type, value) value.to_i when :Float value.to_f + when :BigDecimal + BigDecimal(value.to_s) when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true diff --git a/lib/xero-ruby/models/projects/project_status.rb b/lib/xero-ruby/models/projects/project_status.rb index 0da2a0f3..5186e11c 100644 --- a/lib/xero-ruby/models/projects/project_status.rb +++ b/lib/xero-ruby/models/projects/project_status.rb @@ -3,7 +3,7 @@ #This is the Xero Projects API -The version of the OpenAPI document: 2.2.6 +The version of the OpenAPI document: 2.2.11 Contact: api@xero.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 4.3.1 diff --git a/lib/xero-ruby/models/projects/project_user.rb b/lib/xero-ruby/models/projects/project_user.rb index 27892a4f..5a20b1a2 100644 --- a/lib/xero-ruby/models/projects/project_user.rb +++ b/lib/xero-ruby/models/projects/project_user.rb @@ -3,7 +3,7 @@ #This is the Xero Projects API -The version of the OpenAPI document: 2.2.6 +The version of the OpenAPI document: 2.2.11 Contact: api@xero.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 4.3.1 @@ -14,6 +14,8 @@ require 'date' module XeroRuby::Projects + require 'bigdecimal' + class ProjectUser # Identifier of the user of the project. attr_accessor :user_id @@ -148,6 +150,8 @@ def _deserialize(type, value) value.to_i when :Float value.to_f + when :BigDecimal + BigDecimal(value.to_s) when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true diff --git a/lib/xero-ruby/models/projects/project_users.rb b/lib/xero-ruby/models/projects/project_users.rb index 90f42836..f6658298 100644 --- a/lib/xero-ruby/models/projects/project_users.rb +++ b/lib/xero-ruby/models/projects/project_users.rb @@ -3,7 +3,7 @@ #This is the Xero Projects API -The version of the OpenAPI document: 2.2.6 +The version of the OpenAPI document: 2.2.11 Contact: api@xero.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 4.3.1 @@ -14,6 +14,8 @@ require 'date' module XeroRuby::Projects + require 'bigdecimal' + class ProjectUsers attr_accessor :pagination @@ -140,6 +142,8 @@ def _deserialize(type, value) value.to_i when :Float value.to_f + when :BigDecimal + BigDecimal(value.to_s) when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true diff --git a/lib/xero-ruby/models/projects/projects.rb b/lib/xero-ruby/models/projects/projects.rb index 41c136dc..ac93fed1 100644 --- a/lib/xero-ruby/models/projects/projects.rb +++ b/lib/xero-ruby/models/projects/projects.rb @@ -3,7 +3,7 @@ #This is the Xero Projects API -The version of the OpenAPI document: 2.2.6 +The version of the OpenAPI document: 2.2.11 Contact: api@xero.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 4.3.1 @@ -14,6 +14,8 @@ require 'date' module XeroRuby::Projects + require 'bigdecimal' + class Projects attr_accessor :pagination @@ -140,6 +142,8 @@ def _deserialize(type, value) value.to_i when :Float value.to_f + when :BigDecimal + BigDecimal(value.to_s) when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true diff --git a/lib/xero-ruby/models/projects/task.rb b/lib/xero-ruby/models/projects/task.rb index 901300e3..ce67431f 100644 --- a/lib/xero-ruby/models/projects/task.rb +++ b/lib/xero-ruby/models/projects/task.rb @@ -3,7 +3,7 @@ #This is the Xero Projects API -The version of the OpenAPI document: 2.2.6 +The version of the OpenAPI document: 2.2.11 Contact: api@xero.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 4.3.1 @@ -14,6 +14,8 @@ require 'date' module XeroRuby::Projects + require 'bigdecimal' + class Task # Identifier of the task. attr_accessor :task_id @@ -305,6 +307,8 @@ def _deserialize(type, value) value.to_i when :Float value.to_f + when :BigDecimal + BigDecimal(value.to_s) when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true diff --git a/lib/xero-ruby/models/projects/task_create_or_update.rb b/lib/xero-ruby/models/projects/task_create_or_update.rb index ba47e44e..92f93499 100644 --- a/lib/xero-ruby/models/projects/task_create_or_update.rb +++ b/lib/xero-ruby/models/projects/task_create_or_update.rb @@ -3,7 +3,7 @@ #This is the Xero Projects API -The version of the OpenAPI document: 2.2.6 +The version of the OpenAPI document: 2.2.11 Contact: api@xero.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 4.3.1 @@ -14,6 +14,8 @@ require 'date' module XeroRuby::Projects + require 'bigdecimal' + class TaskCreateOrUpdate # Name of the task. Max length 100 characters. attr_accessor :name @@ -173,6 +175,8 @@ def _deserialize(type, value) value.to_i when :Float value.to_f + when :BigDecimal + BigDecimal(value.to_s) when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true diff --git a/lib/xero-ruby/models/projects/tasks.rb b/lib/xero-ruby/models/projects/tasks.rb index 7f8f95f9..fea6c64d 100644 --- a/lib/xero-ruby/models/projects/tasks.rb +++ b/lib/xero-ruby/models/projects/tasks.rb @@ -3,7 +3,7 @@ #This is the Xero Projects API -The version of the OpenAPI document: 2.2.6 +The version of the OpenAPI document: 2.2.11 Contact: api@xero.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 4.3.1 @@ -14,6 +14,8 @@ require 'date' module XeroRuby::Projects + require 'bigdecimal' + class Tasks attr_accessor :pagination @@ -140,6 +142,8 @@ def _deserialize(type, value) value.to_i when :Float value.to_f + when :BigDecimal + BigDecimal(value.to_s) when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true diff --git a/lib/xero-ruby/models/projects/time_entries.rb b/lib/xero-ruby/models/projects/time_entries.rb index af66bf25..56bac60d 100644 --- a/lib/xero-ruby/models/projects/time_entries.rb +++ b/lib/xero-ruby/models/projects/time_entries.rb @@ -3,7 +3,7 @@ #This is the Xero Projects API -The version of the OpenAPI document: 2.2.6 +The version of the OpenAPI document: 2.2.11 Contact: api@xero.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 4.3.1 @@ -14,6 +14,8 @@ require 'date' module XeroRuby::Projects + require 'bigdecimal' + class TimeEntries attr_accessor :pagination @@ -140,6 +142,8 @@ def _deserialize(type, value) value.to_i when :Float value.to_f + when :BigDecimal + BigDecimal(value.to_s) when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true diff --git a/lib/xero-ruby/models/projects/time_entry.rb b/lib/xero-ruby/models/projects/time_entry.rb index bb151bbf..4e313bbf 100644 --- a/lib/xero-ruby/models/projects/time_entry.rb +++ b/lib/xero-ruby/models/projects/time_entry.rb @@ -3,7 +3,7 @@ #This is the Xero Projects API -The version of the OpenAPI document: 2.2.6 +The version of the OpenAPI document: 2.2.11 Contact: api@xero.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 4.3.1 @@ -14,6 +14,8 @@ require 'date' module XeroRuby::Projects + require 'bigdecimal' + class TimeEntry # Identifier of the time entry. attr_accessor :time_entry_id @@ -244,6 +246,8 @@ def _deserialize(type, value) value.to_i when :Float value.to_f + when :BigDecimal + BigDecimal(value.to_s) when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true diff --git a/lib/xero-ruby/models/projects/time_entry_create_or_update.rb b/lib/xero-ruby/models/projects/time_entry_create_or_update.rb index d551e415..fc378956 100644 --- a/lib/xero-ruby/models/projects/time_entry_create_or_update.rb +++ b/lib/xero-ruby/models/projects/time_entry_create_or_update.rb @@ -3,7 +3,7 @@ #This is the Xero Projects API -The version of the OpenAPI document: 2.2.6 +The version of the OpenAPI document: 2.2.11 Contact: api@xero.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 4.3.1 @@ -14,6 +14,8 @@ require 'date' module XeroRuby::Projects + require 'bigdecimal' + class TimeEntryCreateOrUpdate # The xero user identifier of the person logging the time. attr_accessor :user_id @@ -188,6 +190,8 @@ def _deserialize(type, value) value.to_i when :Float value.to_f + when :BigDecimal + BigDecimal(value.to_s) when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true diff --git a/lib/xero-ruby/version.rb b/lib/xero-ruby/version.rb index 2e05fb74..f9853171 100644 --- a/lib/xero-ruby/version.rb +++ b/lib/xero-ruby/version.rb @@ -3,7 +3,7 @@ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) -The version of the OpenAPI document: 2.2.2 +The version of the OpenAPI document: 2.2.11 Contact: api@xero.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 4.3.1 @@ -11,5 +11,5 @@ =end module XeroRuby - VERSION = '1.2.0' + VERSION = '2.0.0' end diff --git a/spec/accounting/models/ten_nintey_nine_contact_spec.rb b/spec/accounting/models/ten_nintey_nine_contact_spec.rb index ea961c45..77c701c5 100644 --- a/spec/accounting/models/ten_nintey_nine_contact_spec.rb +++ b/spec/accounting/models/ten_nintey_nine_contact_spec.rb @@ -14,22 +14,22 @@ require 'json' require 'date' -# Unit tests for XeroRuby::Accounting::TenNinteyNineContact +# Unit tests for XeroRuby::Accounting::TenNinetyNineContact # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe 'TenNinteyNineContact' do +describe 'TenNinetyNineContact' do before do # run before each test - @instance = XeroRuby::Accounting::TenNinteyNineContact.new + @instance = XeroRuby::Accounting::TenNinetyNineContact.new end after do # run after each test end - describe 'test an instance of TenNinteyNineContact' do - it 'should create an instance of TenNinteyNineContact' do - expect(@instance).to be_instance_of(XeroRuby::Accounting::TenNinteyNineContact) + describe 'test an instance of TenNinetyNineContact' do + it 'should create an instance of TenNinetyNineContact' do + expect(@instance).to be_instance_of(XeroRuby::Accounting::TenNinetyNineContact) end end describe 'test attribute "box1"' do diff --git a/spec/api_client_spec.rb b/spec/api_client_spec.rb index 4fb6d555..6d888f24 100644 --- a/spec/api_client_spec.rb +++ b/spec/api_client_spec.rb @@ -80,17 +80,15 @@ end end - describe "#object_to_hash" do - it 'ignores nils and includes empty arrays' do - # uncomment below to test object_to_hash for model - # api_client = XeroRuby::ApiClient.new - # _model = XeroRuby::Accounting::ModelName.new - # update the model attribute below - # _model.id = 1 - # update the expected value (hash) below - # expected = {id: 1, name: '', tags: []} - # expect(api_client.object_to_hash(_model)).to eq(expected) + describe "#object_to_hash modifies a hash from snake_case to PascalCase" do + it 'Maniuplates a contact object correctly' do + contact_before = {:contacts=>[{:name=>"Bruce Banner", :email_address=>"hulk@avengers.com", :phones=>[{:phone_type=>"MOBILE", :phone_number=>"555-1212", :phone_area_code=>"415"}], :payment_terms=>{:bills=>{:day=>15, :type=>"OFCURRENTMONTH"}, :sales=>{:day=>10, :type=>"DAYSAFTERBILLMONTH"}}}]} + contact_after = {:Contacts=>[{:Name=>"Bruce Banner", :EmailAddress=>"hulk@avengers.com", :Phones=>[{:PhoneType=>"MOBILE", :PhoneNumber=>"555-1212", :PhoneAreaCode=>"415"}], :PaymentTerms=>{:Bills=>{:Day=>15, :Type=>"OFCURRENTMONTH"}, :Sales=>{:Day=>10, :Type=>"DAYSAFTERBILLMONTH"}}}]} + api_client = XeroRuby::ApiClient.new + expect(api_client.object_to_hash(contact_before)).to eq(contact_after) end + + # todo - insert every model PascalCase conversion as they are added as sample app examples end describe '#build_collection_param' do diff --git a/xero-ruby.gemspec b/xero-ruby.gemspec index 7b74677b..b4988df4 100644 --- a/xero-ruby.gemspec +++ b/xero-ruby.gemspec @@ -5,7 +5,7 @@ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) -The version of the OpenAPI document: 2.2.2 +The version of the OpenAPI document: 2.2.11 Contact: api@xero.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 4.3.1 @@ -29,7 +29,6 @@ Gem::Specification.new do |s| s.add_runtime_dependency 'faraday', '~> 1.0.1', '>= 1.0.1' s.add_runtime_dependency 'json', '~> 2.1', '>= 2.1.0' - s.add_development_dependency 'rspec', '~> 3.6', '>= 3.6.0' s.files = `find *`.split("\n").uniq.sort.select { |f| !f.empty? }