From e4687081e3c613f992ddd357c4853f04ec047755 Mon Sep 17 00:00:00 2001 From: serknight Date: Thu, 27 May 2021 13:43:41 -0600 Subject: [PATCH 1/4] fix reports index for bas gst, and add the budgets endpoints --- docs/accounting/AccountingApi.md | 267 +++++++++++---- docs/accounting/Budget.md | 27 ++ docs/accounting/BudgetLines.md | 23 ++ docs/accounting/Budgets.md | 17 + docs/accounting/Report.md | 4 +- docs/accounting/ReportWithRow.md | 2 +- docs/accounting/index.html | 14 +- docs/assets/AssetApi.md | 2 +- docs/assets/index.html | 23 +- lib/xero-ruby.rb | 3 + lib/xero-ruby/api/accounting_api.rb | 291 ++++++++++++---- lib/xero-ruby/models/accounting/budget.rb | 321 ++++++++++++++++++ .../models/accounting/budget_lines.rb | 265 +++++++++++++++ lib/xero-ruby/models/accounting/budgets.rb | 222 ++++++++++++ lib/xero-ruby/models/accounting/report.rb | 12 +- .../models/accounting/report_with_row.rb | 2 +- 16 files changed, 1340 insertions(+), 155 deletions(-) create mode 100644 docs/accounting/Budget.md create mode 100644 docs/accounting/BudgetLines.md create mode 100644 docs/accounting/Budgets.md create mode 100644 lib/xero-ruby/models/accounting/budget.rb create mode 100644 lib/xero-ruby/models/accounting/budget_lines.rb create mode 100644 lib/xero-ruby/models/accounting/budgets.rb diff --git a/docs/accounting/AccountingApi.md b/docs/accounting/AccountingApi.md index e1ccf660..90b871a2 100644 --- a/docs/accounting/AccountingApi.md +++ b/docs/accounting/AccountingApi.md @@ -90,6 +90,8 @@ Method | HTTP request | Description [**get_branding_theme**](AccountingApi.md#get_branding_theme) | **GET** /BrandingThemes/{BrandingThemeID} | Retrieves a specific branding theme using a unique branding theme Id [**get_branding_theme_payment_services**](AccountingApi.md#get_branding_theme_payment_services) | **GET** /BrandingThemes/{BrandingThemeID}/PaymentServices | Retrieves the payment services for a specific branding theme [**get_branding_themes**](AccountingApi.md#get_branding_themes) | **GET** /BrandingThemes | Retrieves all the branding themes +[**get_budget**](AccountingApi.md#get_budget) | **GET** /Budgets/{BudgetID} | Retrieves a specific budgets, which includes budget lines +[**get_budgets**](AccountingApi.md#get_budgets) | **GET** /Budgets | Retrieve a list of budgets [**get_contact**](AccountingApi.md#get_contact) | **GET** /Contacts/{ContactID} | Retrieves a specific contacts in a Xero organisation using a unique contact Id [**get_contact_attachment_by_file_name**](AccountingApi.md#get_contact_attachment_by_file_name) | **GET** /Contacts/{ContactID}/Attachments/{FileName} | Retrieves a specific attachment from a specific contact by file name [**get_contact_attachment_by_id**](AccountingApi.md#get_contact_attachment_by_id) | **GET** /Contacts/{ContactID}/Attachments/{AttachmentID} | Retrieves a specific attachment from a specific contact using a unique attachment Id @@ -138,6 +140,7 @@ Method | HTTP request | Description [**get_organisation_actions**](AccountingApi.md#get_organisation_actions) | **GET** /Organisation/Actions | Retrieves a list of the key actions your app has permission to perform in the connected Xero organisation. [**get_organisation_cis_settings**](AccountingApi.md#get_organisation_cis_settings) | **GET** /Organisation/{OrganisationID}/CISSettings | Retrieves the CIS settings for the Xero organistaion. [**get_organisations**](AccountingApi.md#get_organisations) | **GET** /Organisation | Retrieves Xero organisation details +[**get_other_reports_list**](AccountingApi.md#get_other_reports_list) | **GET** /Reports | Retrieves a list of org dynamic reports that require `/Reports/{uuid}` [**get_overpayment**](AccountingApi.md#get_overpayment) | **GET** /Overpayments/{OverpaymentID} | Retrieves a specific overpayment using a unique overpayment Id [**get_overpayment_history**](AccountingApi.md#get_overpayment_history) | **GET** /Overpayments/{OverpaymentID}/History | Retrieves history records of a specific overpayment [**get_overpayments**](AccountingApi.md#get_overpayments) | **GET** /Overpayments | Retrieves overpayments @@ -178,7 +181,6 @@ Method | HTTP request | Description [**get_report_aged_payables_by_contact**](AccountingApi.md#get_report_aged_payables_by_contact) | **GET** /Reports/AgedPayablesByContact | Retrieves report for aged payables by contact [**get_report_aged_receivables_by_contact**](AccountingApi.md#get_report_aged_receivables_by_contact) | **GET** /Reports/AgedReceivablesByContact | Retrieves report for aged receivables by contact [**get_report_ba_sor_gst**](AccountingApi.md#get_report_ba_sor_gst) | **GET** /Reports/{ReportID} | Retrieves a specific report for BAS using a unique report Id (only valid for AU orgs) -[**get_report_ba_sor_gst_list**](AccountingApi.md#get_report_ba_sor_gst_list) | **GET** /Reports | Retrieves report for BAS (only valid for AU orgs) [**get_report_balance_sheet**](AccountingApi.md#get_report_balance_sheet) | **GET** /Reports/BalanceSheet | Retrieves report for balancesheet [**get_report_bank_summary**](AccountingApi.md#get_report_bank_summary) | **GET** /Reports/BankSummary | Retrieves report for bank summary [**get_report_budget_summary**](AccountingApi.md#get_report_budget_summary) | **GET** /Reports/BudgetSummary | Retrieves report for budget summary @@ -934,7 +936,7 @@ api_instance = xero_client. xero_tenant_id = 'YOUR_XERO_TENANT_ID' # String | Xero identifier for Tenant branding_theme_id = '00000000-0000-0000-0000-000000000000' # String | Unique identifier for a Branding Theme -payment_service = { "PaymentServiceID": "00000000-0000-0000-0000-000000000000", "PaymentServiceName": "ACME Payments", "PaymentServiceUrl": "https://www.payupnow.com/", "PayNowText": "Pay Now" } # PaymentService | PaymentService object in body of request +payment_service = { "PaymentServiceID": "00000000-0000-0000-0000-000000000000", "PaymentServiceName": "Payments Service", "PaymentServiceUrl": "https://www.paymentservice.com/", "PayNowText": "Pay Now" } # PaymentService | PaymentService object in body of request begin #Creates a new custom payment service for a specific branding theme result = api_instance.create_branding_theme_payment_services(xero_tenant_id, branding_theme_id, payment_service) @@ -5990,6 +5992,143 @@ Name | Type | Description | Notes - **Accept**: application/json +## get_budget + +> Budget get_budget(xero_tenant_id, budget_id) + +Retrieves a specific budgets, which includes budget lines + +### Example + +```ruby +# load the gem +require 'xero-ruby' + +creds = { + client_id: ENV['CLIENT_ID'], + client_secret: ENV['CLIENT_SECRET'], + redirect_uri: ENV['REDIRECT_URI'], + scopes: ENV['SCOPES'] +} +xero_client = XeroRuby::ApiClient.new(credentials: creds) + +token_set = fetch_valid_token_set(user) # example + +xero_client.refresh_token_set(token_set) + +# You need to namespace your api method call to one of the following api sets +# [:accounting_api, :assets_api, :projects_api, :files_api, :payroll_au_api, :payroll_nz_api, :payroll_uk_api] + +api_instance = xero_client. + + + +xero_tenant_id = 'YOUR_XERO_TENANT_ID' # String | Xero identifier for Tenant +budget_id = '00000000-0000-0000-0000-000000000000' # String | Unique identifier for Budgets +begin + #Retrieves a specific budgets, which includes budget lines + result = api_instance.get_budget(xero_tenant_id, budget_id) + p result +rescue XeroRuby::Accounting::ApiError => e + puts "Exception when calling AccountingApi->get_budget: #{e}" +end +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **xero_tenant_id** | **String**| Xero identifier for Tenant | + **budget_id** | [**String**](.md)| Unique identifier for Budgets | + +### Return type + +[**Budget**](Budget.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## get_budgets + +> Budgets get_budgets(xero_tenant_id, opts) + +Retrieve a list of budgets + +### Example + +```ruby +# load the gem +require 'xero-ruby' + +creds = { + client_id: ENV['CLIENT_ID'], + client_secret: ENV['CLIENT_SECRET'], + redirect_uri: ENV['REDIRECT_URI'], + scopes: ENV['SCOPES'] +} +xero_client = XeroRuby::ApiClient.new(credentials: creds) + +token_set = fetch_valid_token_set(user) # example + +xero_client.refresh_token_set(token_set) + +# You need to namespace your api method call to one of the following api sets +# [:accounting_api, :assets_api, :projects_api, :files_api, :payroll_au_api, :payroll_nz_api, :payroll_uk_api] + +api_instance = xero_client. + + + +xero_tenant_id = 'YOUR_XERO_TENANT_ID' # String | Xero identifier for Tenant +opts = { + i_ds: ['"00000000-0000-0000-0000-000000000000"'], # Array | Filter by BudgetID. Allows you to retrieve a specific individual budget. + + date_to: Date.parse('2013-10-20'), # Date | Filter by start date + + date_from: Date.parse('2013-10-20') # Date | Filter by end date +} + +begin + #Retrieve a list of budgets + result = api_instance.get_budgets(xero_tenant_id, opts) + p result +rescue XeroRuby::Accounting::ApiError => e + puts "Exception when calling AccountingApi->get_budgets: #{e}" +end +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **xero_tenant_id** | **String**| Xero identifier for Tenant | + **i_ds** | [**Array<String>**](String.md)| Filter by BudgetID. Allows you to retrieve a specific individual budget. | [optional] + **date_to** | **Date**| Filter by start date | [optional] + **date_from** | **Date**| Filter by end date | [optional] + +### Return type + +[**Budgets**](Budgets.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + ## get_contact > Contacts get_contact(xero_tenant_id, contact_id) @@ -9256,6 +9395,68 @@ Name | Type | Description | Notes - **Accept**: application/json +## get_other_reports_list + +> ReportWithRows get_other_reports_list(xero_tenant_id) + +Retrieves a list of org dynamic reports that require `/Reports/{uuid}` + +### Example + +```ruby +# load the gem +require 'xero-ruby' + +creds = { + client_id: ENV['CLIENT_ID'], + client_secret: ENV['CLIENT_SECRET'], + redirect_uri: ENV['REDIRECT_URI'], + scopes: ENV['SCOPES'] +} +xero_client = XeroRuby::ApiClient.new(credentials: creds) + +token_set = fetch_valid_token_set(user) # example + +xero_client.refresh_token_set(token_set) + +# You need to namespace your api method call to one of the following api sets +# [:accounting_api, :assets_api, :projects_api, :files_api, :payroll_au_api, :payroll_nz_api, :payroll_uk_api] + +api_instance = xero_client. + + + +xero_tenant_id = 'YOUR_XERO_TENANT_ID' # String | Xero identifier for Tenant +begin + #Retrieves a list of org dynamic reports that require `/Reports/{uuid}` + result = api_instance.get_other_reports_list(xero_tenant_id) + p result +rescue XeroRuby::Accounting::ApiError => e + puts "Exception when calling AccountingApi->get_other_reports_list: #{e}" +end +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **xero_tenant_id** | **String**| Xero identifier for Tenant | + +### Return type + +[**ReportWithRows**](ReportWithRows.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + ## get_overpayment > Overpayments get_overpayment(xero_tenant_id, overpayment_id) @@ -11981,68 +12182,6 @@ Name | Type | Description | Notes - **Accept**: application/json -## get_report_ba_sor_gst_list - -> ReportWithRows get_report_ba_sor_gst_list(xero_tenant_id) - -Retrieves report for BAS (only valid for AU orgs) - -### Example - -```ruby -# load the gem -require 'xero-ruby' - -creds = { - client_id: ENV['CLIENT_ID'], - client_secret: ENV['CLIENT_SECRET'], - redirect_uri: ENV['REDIRECT_URI'], - scopes: ENV['SCOPES'] -} -xero_client = XeroRuby::ApiClient.new(credentials: creds) - -token_set = fetch_valid_token_set(user) # example - -xero_client.refresh_token_set(token_set) - -# You need to namespace your api method call to one of the following api sets -# [:accounting_api, :assets_api, :projects_api, :files_api, :payroll_au_api, :payroll_nz_api, :payroll_uk_api] - -api_instance = xero_client. - - - -xero_tenant_id = 'YOUR_XERO_TENANT_ID' # String | Xero identifier for Tenant -begin - #Retrieves report for BAS (only valid for AU orgs) - result = api_instance.get_report_ba_sor_gst_list(xero_tenant_id) - p result -rescue XeroRuby::Accounting::ApiError => e - puts "Exception when calling AccountingApi->get_report_ba_sor_gst_list: #{e}" -end -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **xero_tenant_id** | **String**| Xero identifier for Tenant | - -### Return type - -[**ReportWithRows**](ReportWithRows.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - - ## get_report_balance_sheet > ReportWithRows get_report_balance_sheet(xero_tenant_id, opts) diff --git a/docs/accounting/Budget.md b/docs/accounting/Budget.md new file mode 100644 index 00000000..bb00501a --- /dev/null +++ b/docs/accounting/Budget.md @@ -0,0 +1,27 @@ +# XeroRuby::Accounting::Budget + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**budget_id** | **String** | Xero identifier | [optional] +**type** | **String** | Type of Budget. OVERALL or TRACKING | [optional] +**description** | **String** | The Budget description | [optional] +**updated_date_utc** | **DateTime** | UTC timestamp of last update to budget | [optional] +**budget_lines** | [**BudgetLines**](BudgetLines.md) | | [optional] +**tracking** | [**TrackingCategory**](TrackingCategory.md) | | [optional] + +## Code Sample + +```ruby +require 'XeroRuby::Accounting' + +instance = XeroRuby::Accounting::Budget.new(budget_id: null, + type: null, + description: null, + updated_date_utc: /Date(1573755038314)/, + budget_lines: null, + tracking: null) +``` + + diff --git a/docs/accounting/BudgetLines.md b/docs/accounting/BudgetLines.md new file mode 100644 index 00000000..12d8ed5a --- /dev/null +++ b/docs/accounting/BudgetLines.md @@ -0,0 +1,23 @@ +# XeroRuby::Accounting::BudgetLines + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**period** | **Date** | Period the amount applies to (e.g. “2019-08”) | [optional] +**amount** | **Integer** | LineItem Quantity | [optional] +**unit_amount** | **Integer** | Budgeted amount | [optional] +**notes** | **String** | Any footnotes associated with this balance | [optional] + +## Code Sample + +```ruby +require 'XeroRuby::Accounting' + +instance = XeroRuby::Accounting::BudgetLines.new(period: null, + amount: null, + unit_amount: null, + notes: null) +``` + + diff --git a/docs/accounting/Budgets.md b/docs/accounting/Budgets.md new file mode 100644 index 00000000..57ad9220 --- /dev/null +++ b/docs/accounting/Budgets.md @@ -0,0 +1,17 @@ +# XeroRuby::Accounting::Budgets + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**invoices** | [**Array<Budget>**](Budget.md) | | [optional] + +## Code Sample + +```ruby +require 'XeroRuby::Accounting' + +instance = XeroRuby::Accounting::Budgets.new(invoices: null) +``` + + diff --git a/docs/accounting/Report.md b/docs/accounting/Report.md index 2cc678c4..68d39a78 100644 --- a/docs/accounting/Report.md +++ b/docs/accounting/Report.md @@ -4,7 +4,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**report_id** | **String** | See Prepayment Types | [optional] **report_name** | **String** | See Prepayment Types | [optional] **report_type** | **String** | See Prepayment Types | [optional] **report_title** | **String** | See Prepayment Types | [optional] @@ -17,8 +16,7 @@ Name | Type | Description | Notes ```ruby require 'XeroRuby::Accounting' -instance = XeroRuby::Accounting::Report.new(report_id: null, - report_name: null, +instance = XeroRuby::Accounting::Report.new(report_name: null, report_type: null, report_title: null, report_date: null, diff --git a/docs/accounting/ReportWithRow.md b/docs/accounting/ReportWithRow.md index af9c9af9..b5e71fab 100644 --- a/docs/accounting/ReportWithRow.md +++ b/docs/accounting/ReportWithRow.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**report_id** | **String** | Report id | [optional] +**report_id** | **String** | ID of the Report | [optional] **report_name** | **String** | Name of the report | [optional] **report_title** | **String** | Title of the report | [optional] **report_type** | **String** | The type of report (BalanceSheet,ProfitLoss, etc) | [optional] diff --git a/docs/accounting/index.html b/docs/accounting/index.html index 0d0a8ea0..b9c2b9a9 100644 --- a/docs/accounting/index.html +++ b/docs/accounting/index.html @@ -3370,6 +3370,12 @@ "type" : "string", "description" : "See Accounts" }, + "AccountID" : { + "type" : "string", + "description" : "The associated account ID related to this line item", + "format" : "uuid", + "example" : "00000000-0000-0000-0000-000000000000" + }, "TaxType" : { "type" : "string", "description" : "The tax type from TaxRates" @@ -32303,11 +32309,11 @@

Usage and SDK Samples

xero_tenant_id = 'YOUR_XERO_TENANT_ID' date = "2019-03-31" -period = 2 +periods = 2 time_frame = 3 begin - response = xero_client.accounting_api.get_report_budget_summary(xero_tenant_id, date, period, time_frame) + response = xero_client.accounting_api.get_report_budget_summary(xero_tenant_id, date, periods, time_frame) return response rescue XeroRuby::ApiError => e puts "Exception when calling get_report_budget_summary: #{e}" @@ -32384,11 +32390,11 @@

Parameters

- period + periods -
+
diff --git a/docs/assets/AssetApi.md b/docs/assets/AssetApi.md index f549cdf4..b43e623b 100644 --- a/docs/assets/AssetApi.md +++ b/docs/assets/AssetApi.md @@ -182,7 +182,7 @@ api_instance = xero_client. xero_tenant_id = 'YOUR_XERO_TENANT_ID' # String | Xero identifier for Tenant -id = '4f7bcdcb-5ec1-4258-9558-19f662fccdfe' # String | fixed asset id for single object +id = '00000000-0000-0000-0000-000000000000' # String | fixed asset id for single object begin #Retrieves fixed asset by id result = api_instance.get_asset_by_id(xero_tenant_id, id) diff --git a/docs/assets/index.html b/docs/assets/index.html index 174f24b4..a1df29c6 100644 --- a/docs/assets/index.html +++ b/docs/assets/index.html @@ -1454,6 +1454,12 @@

Usage and SDK Samples

xeroTenantId = 'YOUR_XERO_TENANT_ID' +asset = { + asset_name: "Other Computer", + asset_number: "FA-00210", + status: XeroRuby::Asset::AssetStatus::DRAFT +} + begin response = xero_client.accounting_api.create_asset(xeroTenantId, asset) return response @@ -1570,6 +1576,21 @@

Usage and SDK Samples

xeroTenantId = 'YOUR_XERO_TENANT_ID' +bookDepreciationSetting = { + depreciation_method: "DiminishingValue100", + averaging_method: "ActualDays", + deprecitation_rate: 40, + depreciation_calculation_method: "None" +} + +assetType = { + asset_type_name: "Computer Equipment", + fixed_asset_account_id: "00000000-0000-0000-0000-000000000000", + depreciation_expense_account_id: "00000000-0000-0000-0000-000000000000", + accumulated_depreciation_account_id: "00000000-0000-0000-0000-000000000000", + bookDepreciationSetting: book_depreciation_setting +} + begin response = xero_client.accounting_api.create_asset_type(xeroTenantId, assetType) return response @@ -1682,7 +1703,7 @@

Usage and SDK Samples

xero_client.set_token_set(user.token_set)
 
 xeroTenantId = 'YOUR_XERO_TENANT_ID'
-id = '4f7bcdcb-5ec1-4258-9558-19f662fccdfe'
+id = '00000000-0000-0000-0000-000000000000'
 
 begin
   response = xero_client.accounting_api.get_asset_by_id(xeroTenantId, id)
diff --git a/lib/xero-ruby.rb b/lib/xero-ruby.rb
index 9f1bc062..7bc1b71c 100644
--- a/lib/xero-ruby.rb
+++ b/lib/xero-ruby.rb
@@ -349,6 +349,9 @@
 require 'xero-ruby/models/accounting/bill'
 require 'xero-ruby/models/accounting/branding_theme'
 require 'xero-ruby/models/accounting/branding_themes'
+require 'xero-ruby/models/accounting/budget'
+require 'xero-ruby/models/accounting/budget_lines'
+require 'xero-ruby/models/accounting/budgets'
 require 'xero-ruby/models/accounting/cis_org_setting'
 require 'xero-ruby/models/accounting/cis_org_settings'
 require 'xero-ruby/models/accounting/cis_setting'
diff --git a/lib/xero-ruby/api/accounting_api.rb b/lib/xero-ruby/api/accounting_api.rb
index 9f01bf59..879ec401 100644
--- a/lib/xero-ruby/api/accounting_api.rb
+++ b/lib/xero-ruby/api/accounting_api.rb
@@ -7018,6 +7018,159 @@ def get_branding_themes_with_http_info(xero_tenant_id, options = {})
       return data, status_code, headers
     end
 
+    # Retrieves a specific budgets, which includes budget lines
+    # @param xero_tenant_id [String] Xero identifier for Tenant
+    # @param budget_id [String] Unique identifier for Budgets
+    # @param [Hash] opts the optional parameters
+    # @return [Budget]
+    def get_budget(xero_tenant_id, budget_id, opts = {})
+      data, _status_code, _headers = get_budget_with_http_info(xero_tenant_id, budget_id, opts)
+      data
+    end
+
+    # Retrieves a specific budgets, which includes budget lines
+    # @param xero_tenant_id [String] Xero identifier for Tenant
+    # @param budget_id [String] Unique identifier for Budgets
+    # @param [Hash] opts the optional parameters
+    # @return [Array<(Budget, Integer, Hash)>] Budget data, response status code and response headers
+    def get_budget_with_http_info(xero_tenant_id, budget_id, options = {})
+      opts = options.dup
+      if @api_client.config.debugging
+        @api_client.config.logger.debug 'Calling API: AccountingApi.get_budget ...'
+      end
+      # verify the required parameter 'xero_tenant_id' is set
+      if @api_client.config.client_side_validation && xero_tenant_id.nil?
+        fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.get_budget"
+      end
+      # verify the required parameter 'budget_id' is set
+      if @api_client.config.client_side_validation && budget_id.nil?
+        fail ArgumentError, "Missing the required parameter 'budget_id' when calling AccountingApi.get_budget"
+      end
+      # resource path
+      local_var_path = '/Budgets/{BudgetID}'.sub('{' + 'BudgetID' + '}', budget_id.to_s)
+
+      # camelize keys of incoming `where` opts
+      opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
+
+      # query parameters
+      query_params = opts[:query_params] || {}
+      
+      # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
+      query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
+      query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?
+
+      # header parameters
+      header_params = opts[:header_params] || {}
+      # HTTP header 'Accept' (if needed)
+      header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+      header_params[:'xero-tenant-id'] = xero_tenant_id
+
+      # form parameters
+      form_params = opts[:form_params] || {}
+
+      # http body (model)
+      post_body = opts[:body] 
+
+      # return_type
+      return_type = opts[:return_type] || 'Budget' 
+
+      # auth_names
+      auth_names = opts[:auth_names] || ['OAuth2']
+
+      new_options = opts.merge(
+        :header_params => header_params,
+        :query_params => query_params,
+        :form_params => form_params,
+        :body => post_body,
+        :auth_names => auth_names,
+        :return_type => return_type
+      )
+
+      data, status_code, headers = @api_client.call_api(:GET, local_var_path, "AccountingApi", new_options)
+      if @api_client.config.debugging
+        @api_client.config.logger.debug "API called: AccountingApi#get_budget\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+      end
+      return data, status_code, headers
+    end
+
+    # Retrieve a list of budgets
+    # @param xero_tenant_id [String] Xero identifier for Tenant
+    # @param [Hash] opts the optional parameters
+    # @option opts [Array] :i_ds Filter by BudgetID. Allows you to retrieve a specific individual budget.
+    # @option opts [Date] :date_to Filter by start date
+    # @option opts [Date] :date_from Filter by end date
+    # @return [Budgets]
+    def get_budgets(xero_tenant_id, opts = {})
+      data, _status_code, _headers = get_budgets_with_http_info(xero_tenant_id, opts)
+      data
+    end
+
+    # Retrieve a list of budgets
+    # @param xero_tenant_id [String] Xero identifier for Tenant
+    # @param [Hash] opts the optional parameters
+    # @option opts [Array] :i_ds Filter by BudgetID. Allows you to retrieve a specific individual budget.
+    # @option opts [Date] :date_to Filter by start date
+    # @option opts [Date] :date_from Filter by end date
+    # @return [Array<(Budgets, Integer, Hash)>] Budgets data, response status code and response headers
+    def get_budgets_with_http_info(xero_tenant_id, options = {})
+      opts = options.dup
+      if @api_client.config.debugging
+        @api_client.config.logger.debug 'Calling API: AccountingApi.get_budgets ...'
+      end
+      # verify the required parameter 'xero_tenant_id' is set
+      if @api_client.config.client_side_validation && xero_tenant_id.nil?
+        fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.get_budgets"
+      end
+      # resource path
+      local_var_path = '/Budgets'
+
+      # camelize keys of incoming `where` opts
+      opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
+
+      # query parameters
+      query_params = opts[:query_params] || {}
+      query_params[:'IDs'] = @api_client.build_collection_param(opts[:'i_ds'], :csv) if !opts[:'i_ds'].nil?
+      query_params[:'DateTo'] = opts[:'date_to'] if !opts[:'date_to'].nil?
+      query_params[:'DateFrom'] = opts[:'date_from'] if !opts[:'date_from'].nil?
+      
+      # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
+      query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
+      query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?
+
+      # header parameters
+      header_params = opts[:header_params] || {}
+      # HTTP header 'Accept' (if needed)
+      header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+      header_params[:'xero-tenant-id'] = xero_tenant_id
+
+      # form parameters
+      form_params = opts[:form_params] || {}
+
+      # http body (model)
+      post_body = opts[:body] 
+
+      # return_type
+      return_type = opts[:return_type] || 'Budgets' 
+
+      # auth_names
+      auth_names = opts[:auth_names] || ['OAuth2']
+
+      new_options = opts.merge(
+        :header_params => header_params,
+        :query_params => query_params,
+        :form_params => form_params,
+        :body => post_body,
+        :auth_names => auth_names,
+        :return_type => return_type
+      )
+
+      data, status_code, headers = @api_client.call_api(:GET, local_var_path, "AccountingApi", new_options)
+      if @api_client.config.debugging
+        @api_client.config.logger.debug "API called: AccountingApi#get_budgets\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+      end
+      return data, status_code, headers
+    end
+
     # Retrieves a specific contacts in a Xero organisation using a unique contact Id
     # @param xero_tenant_id [String] Xero identifier for Tenant
     # @param contact_id [String] Unique identifier for a Contact
@@ -10800,6 +10953,75 @@ def get_organisations_with_http_info(xero_tenant_id, options = {})
       return data, status_code, headers
     end
 
+    # Retrieves a list of org dynamic reports that require `/Reports/{uuid}`
+    # @param xero_tenant_id [String] Xero identifier for Tenant
+    # @param [Hash] opts the optional parameters
+    # @return [ReportWithRows]
+    def get_other_reports_list(xero_tenant_id, opts = {})
+      data, _status_code, _headers = get_other_reports_list_with_http_info(xero_tenant_id, opts)
+      data
+    end
+
+    # Retrieves a list of org dynamic reports that require `/Reports/{uuid}`
+    # @param xero_tenant_id [String] Xero identifier for Tenant
+    # @param [Hash] opts the optional parameters
+    # @return [Array<(ReportWithRows, Integer, Hash)>] ReportWithRows data, response status code and response headers
+    def get_other_reports_list_with_http_info(xero_tenant_id, options = {})
+      opts = options.dup
+      if @api_client.config.debugging
+        @api_client.config.logger.debug 'Calling API: AccountingApi.get_other_reports_list ...'
+      end
+      # verify the required parameter 'xero_tenant_id' is set
+      if @api_client.config.client_side_validation && xero_tenant_id.nil?
+        fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.get_other_reports_list"
+      end
+      # resource path
+      local_var_path = '/Reports'
+
+      # camelize keys of incoming `where` opts
+      opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
+
+      # query parameters
+      query_params = opts[:query_params] || {}
+      
+      # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
+      query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
+      query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?
+
+      # header parameters
+      header_params = opts[:header_params] || {}
+      # HTTP header 'Accept' (if needed)
+      header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+      header_params[:'xero-tenant-id'] = xero_tenant_id
+
+      # form parameters
+      form_params = opts[:form_params] || {}
+
+      # http body (model)
+      post_body = opts[:body] 
+
+      # return_type
+      return_type = opts[:return_type] || 'ReportWithRows' 
+
+      # auth_names
+      auth_names = opts[:auth_names] || ['OAuth2']
+
+      new_options = opts.merge(
+        :header_params => header_params,
+        :query_params => query_params,
+        :form_params => form_params,
+        :body => post_body,
+        :auth_names => auth_names,
+        :return_type => return_type
+      )
+
+      data, status_code, headers = @api_client.call_api(:GET, local_var_path, "AccountingApi", new_options)
+      if @api_client.config.debugging
+        @api_client.config.logger.debug "API called: AccountingApi#get_other_reports_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+      end
+      return data, status_code, headers
+    end
+
     # Retrieves a specific overpayment using a unique overpayment Id
     # @param xero_tenant_id [String] Xero identifier for Tenant
     # @param overpayment_id [String] Unique identifier for a Overpayment
@@ -13991,75 +14213,6 @@ def get_report_ba_sor_gst_with_http_info(xero_tenant_id, report_id, options = {}
       return data, status_code, headers
     end
 
-    # Retrieves report for BAS (only valid for AU orgs)
-    # @param xero_tenant_id [String] Xero identifier for Tenant
-    # @param [Hash] opts the optional parameters
-    # @return [ReportWithRows]
-    def get_report_ba_sor_gst_list(xero_tenant_id, opts = {})
-      data, _status_code, _headers = get_report_ba_sor_gst_list_with_http_info(xero_tenant_id, opts)
-      data
-    end
-
-    # Retrieves report for BAS (only valid for AU orgs)
-    # @param xero_tenant_id [String] Xero identifier for Tenant
-    # @param [Hash] opts the optional parameters
-    # @return [Array<(ReportWithRows, Integer, Hash)>] ReportWithRows data, response status code and response headers
-    def get_report_ba_sor_gst_list_with_http_info(xero_tenant_id, options = {})
-      opts = options.dup
-      if @api_client.config.debugging
-        @api_client.config.logger.debug 'Calling API: AccountingApi.get_report_ba_sor_gst_list ...'
-      end
-      # verify the required parameter 'xero_tenant_id' is set
-      if @api_client.config.client_side_validation && xero_tenant_id.nil?
-        fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.get_report_ba_sor_gst_list"
-      end
-      # resource path
-      local_var_path = '/Reports'
-
-      # camelize keys of incoming `where` opts
-      opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
-
-      # query parameters
-      query_params = opts[:query_params] || {}
-      
-      # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
-      query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
-      query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?
-
-      # header parameters
-      header_params = opts[:header_params] || {}
-      # HTTP header 'Accept' (if needed)
-      header_params['Accept'] = @api_client.select_header_accept(['application/json'])
-      header_params[:'xero-tenant-id'] = xero_tenant_id
-
-      # form parameters
-      form_params = opts[:form_params] || {}
-
-      # http body (model)
-      post_body = opts[:body] 
-
-      # return_type
-      return_type = opts[:return_type] || 'ReportWithRows' 
-
-      # auth_names
-      auth_names = opts[:auth_names] || ['OAuth2']
-
-      new_options = opts.merge(
-        :header_params => header_params,
-        :query_params => query_params,
-        :form_params => form_params,
-        :body => post_body,
-        :auth_names => auth_names,
-        :return_type => return_type
-      )
-
-      data, status_code, headers = @api_client.call_api(:GET, local_var_path, "AccountingApi", new_options)
-      if @api_client.config.debugging
-        @api_client.config.logger.debug "API called: AccountingApi#get_report_ba_sor_gst_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
-      end
-      return data, status_code, headers
-    end
-
     # Retrieves report for balancesheet
     # @param xero_tenant_id [String] Xero identifier for Tenant
     # @param [Hash] opts the optional parameters
diff --git a/lib/xero-ruby/models/accounting/budget.rb b/lib/xero-ruby/models/accounting/budget.rb
new file mode 100644
index 00000000..e3e94b30
--- /dev/null
+++ b/lib/xero-ruby/models/accounting/budget.rb
@@ -0,0 +1,321 @@
+=begin
+#Xero Accounting API
+
+#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
+
+Contact: api@xero.com
+Generated by: https://openapi-generator.tech
+OpenAPI Generator version: 4.3.1
+
+=end
+
+require 'time'
+require 'date'
+
+module XeroRuby::Accounting
+  require 'bigdecimal'
+
+  class Budget
+    # Xero identifier
+    attr_accessor :budget_id
+    
+    # Type of Budget. OVERALL or TRACKING
+    attr_accessor :type
+    OVERALL = "OVERALL".freeze
+    TRACKING = "TRACKING".freeze
+    
+    # The Budget description
+    attr_accessor :description
+    
+    # UTC timestamp of last update to budget
+    attr_accessor :updated_date_utc
+    
+
+    attr_accessor :budget_lines
+    
+
+    attr_accessor :tracking
+    
+    class EnumAttributeValidator
+      attr_reader :datatype
+      attr_reader :allowable_values
+
+      def initialize(datatype, allowable_values)
+        @allowable_values = allowable_values.map do |value|
+          case datatype.to_s
+          when /Integer/i
+            value.to_i
+          when /Float/i
+            value.to_f
+          else
+            value
+          end
+        end
+      end
+
+      def valid?(value)
+        !value || allowable_values.include?(value)
+      end
+    end
+
+    # Attribute mapping from ruby-style variable name to JSON key.
+    def self.attribute_map
+      {
+        :'budget_id' => :'BudgetID',
+        :'type' => :'Type',
+        :'description' => :'Description',
+        :'updated_date_utc' => :'UpdatedDateUTC',
+        :'budget_lines' => :'BudgetLines',
+        :'tracking' => :'Tracking'
+      }
+    end
+
+    # Attribute type mapping.
+    def self.openapi_types
+      {
+        :'budget_id' => :'String',
+        :'type' => :'String',
+        :'description' => :'String',
+        :'updated_date_utc' => :'DateTime',
+        :'budget_lines' => :'BudgetLines',
+        :'tracking' => :'TrackingCategory'
+      }
+    end
+
+    # Initializes the object
+    # @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::Budget` 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::Budget`. 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
+      }
+
+      if attributes.key?(:'budget_id')
+        self.budget_id = attributes[:'budget_id']
+      end
+
+      if attributes.key?(:'type')
+        self.type = attributes[:'type']
+      end
+
+      if attributes.key?(:'description')
+        self.description = attributes[:'description']
+      end
+
+      if attributes.key?(:'updated_date_utc')
+        self.updated_date_utc = attributes[:'updated_date_utc']
+      end
+
+      if attributes.key?(:'budget_lines')
+        self.budget_lines = attributes[:'budget_lines']
+      end
+
+      if attributes.key?(:'tracking')
+        self.tracking = attributes[:'tracking']
+      end
+    end
+
+    # Show invalid properties with the reasons. Usually used together with valid?
+    # @return Array for valid properties with the reasons
+    def list_invalid_properties
+      invalid_properties = Array.new
+      if !@description.nil? && @description.to_s.length > 255
+        invalid_properties.push('invalid value for "description", the character length must be smaller than or equal to 255.')
+      end
+
+      invalid_properties
+    end
+
+    # Check to see if the all the properties in the model are valid
+    # @return true if the model is valid
+    def valid?
+      type_validator = EnumAttributeValidator.new('String', ["OVERALL", "TRACKING"])
+      return false unless type_validator.valid?(@type)
+      return false if !@description.nil? && @description.to_s.length > 255
+      true
+    end
+
+    # Custom attribute writer method checking allowed values (enum).
+    # @param [Object] type Object to be assigned
+    def type=(type)
+      validator = EnumAttributeValidator.new('String', ["OVERALL", "TRACKING"])
+      unless validator.valid?(type)
+        fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}."
+      end
+      @type = type
+    end
+
+    # Custom attribute writer method with validation
+    # @param [Object] description Value to be assigned
+    def description=(description)
+      if !description.nil? && description.to_s.length > 255
+        fail ArgumentError, 'invalid value for "description", the character length must be smaller than or equal to 255.'
+      end
+
+      @description = description
+    end
+
+    # Checks equality by comparing each attribute.
+    # @param [Object] Object to be compared
+    def ==(o)
+      return true if self.equal?(o)
+      self.class == o.class &&
+          budget_id == o.budget_id &&
+          type == o.type &&
+          description == o.description &&
+          updated_date_utc == o.updated_date_utc &&
+          budget_lines == o.budget_lines &&
+          tracking == o.tracking
+    end
+
+    # @see the `==` method
+    # @param [Object] Object to be compared
+    def eql?(o)
+      self == o
+    end
+
+    # Calculates hash code according to all attributes.
+    # @return [Integer] Hash code
+    def hash
+      [budget_id, type, description, updated_date_utc, budget_lines, tracking].hash
+    end
+
+    # Builds the object from hash
+    # @param [Hash] attributes Model attributes in the form of hash
+    # @return [Object] Returns the model itself
+    def self.build_from_hash(attributes)
+      new.build_from_hash(attributes)
+    end
+
+    # Builds the object from hash
+    # @param [Hash] attributes Model attributes in the form of hash
+    # @return [Object] Returns the model itself
+    def build_from_hash(attributes)
+      return nil unless attributes.is_a?(Hash)
+      self.class.openapi_types.each_pair do |key, type|
+        if type =~ /\AArray<(.*)>/i
+          # check to ensure the input is an array given that the attribute
+          # is documented as an array but the input is not
+          if attributes[self.class.attribute_map[key]].is_a?(Array)
+            self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
+          end
+        elsif !attributes[self.class.attribute_map[key]].nil?
+          self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
+        end # or else data not found in attributes(hash), not an issue as the data can be optional
+      end
+
+      self
+    end
+
+    # Deserializes the data based on type
+    # @param string type Data type
+    # @param string value Value to be deserialized
+    # @return [Object] Deserialized data
+    def _deserialize(type, value)
+      case type.to_sym
+      when :DateTime
+        DateTime.parse(parse_date(value))
+      when :Date
+        Date.parse(parse_date(value))
+      when :String
+        value.to_s
+      when :Integer
+        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
+        else
+          false
+        end
+      when :Object
+        # generic object (usually a Hash), return directly
+        value
+      when /\AArray<(?.+)>\z/
+        inner_type = Regexp.last_match[:inner_type]
+        value.map { |v| _deserialize(inner_type, v) }
+      when /\AHash<(?.+?), (?.+)>\z/
+        k_type = Regexp.last_match[:k_type]
+        v_type = Regexp.last_match[:v_type]
+        {}.tap do |hash|
+          value.each do |k, v|
+            hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
+          end
+        end
+      else # model
+        XeroRuby::Accounting.const_get(type).build_from_hash(value)
+      end
+    end
+
+    # Returns the string representation of the object
+    # @return [String] String presentation of the object
+    def to_s
+      to_hash.to_s
+    end
+
+    # to_body is an alias to to_hash (backward compatibility)
+    # @return [Hash] Returns the object in the form of hash
+    def to_body
+      to_hash
+    end
+
+    # Returns the object in the form of hash
+    # @return [Hash] Returns the object in the form of hash
+    def to_hash(downcase: false)
+      hash = {}
+      self.class.attribute_map.each_pair do |attr, param|
+        value = self.send(attr)
+        next if value.nil?
+        key = downcase ? attr : param
+        hash[key] = _to_hash(value, downcase: downcase)
+      end
+      hash
+    end
+
+    # Returns the object in the form of hash with snake_case
+    def to_attributes
+      to_hash(downcase: true)
+    end
+
+    # Outputs non-array value in the form of hash
+    # For object, use to_hash. Otherwise, just return the value
+    # @param [Object] value Any valid value
+    # @return [Hash] Returns the value in the form of hash
+    def _to_hash(value, downcase: false)
+      if value.is_a?(Array)
+        value.map do |v|
+          v.to_hash(downcase: downcase)
+        end
+      elsif value.is_a?(Hash)
+        {}.tap do |hash|
+          value.map { |k, v| hash[k] = _to_hash(v, downcase: downcase) }
+        end
+      elsif value.respond_to? :to_hash
+        value.to_hash(downcase: downcase)
+      else
+        value
+      end
+    end
+
+    def parse_date(datestring)
+      if datestring.include?('Date')
+        date_pattern = /\/Date\((-?\d+)(\+\d+)?\)\//
+        original, date, timezone = *date_pattern.match(datestring)
+        date = (date.to_i / 1000)
+        Time.at(date).utc.strftime('%Y-%m-%dT%H:%M:%S%z').to_s
+      else # handle date 'types' for small subset of payroll API's
+        Time.parse(datestring).strftime('%Y-%m-%dT%H:%M:%S').to_s
+      end
+    end
+  end
+end
diff --git a/lib/xero-ruby/models/accounting/budget_lines.rb b/lib/xero-ruby/models/accounting/budget_lines.rb
new file mode 100644
index 00000000..411e3590
--- /dev/null
+++ b/lib/xero-ruby/models/accounting/budget_lines.rb
@@ -0,0 +1,265 @@
+=begin
+#Xero Accounting API
+
+#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
+
+Contact: api@xero.com
+Generated by: https://openapi-generator.tech
+OpenAPI Generator version: 4.3.1
+
+=end
+
+require 'time'
+require 'date'
+
+module XeroRuby::Accounting
+  require 'bigdecimal'
+
+  class BudgetLines
+    # Period the amount applies to (e.g. “2019-08”)
+    attr_accessor :period
+    
+    # LineItem Quantity
+    attr_accessor :amount
+    
+    # Budgeted amount
+    attr_accessor :unit_amount
+    
+    # Any footnotes associated with this balance
+    attr_accessor :notes
+    
+    # Attribute mapping from ruby-style variable name to JSON key.
+    def self.attribute_map
+      {
+        :'period' => :'Period',
+        :'amount' => :'Amount',
+        :'unit_amount' => :'UnitAmount',
+        :'notes' => :'Notes'
+      }
+    end
+
+    # Attribute type mapping.
+    def self.openapi_types
+      {
+        :'period' => :'Date',
+        :'amount' => :'Integer',
+        :'unit_amount' => :'Integer',
+        :'notes' => :'String'
+      }
+    end
+
+    # Initializes the object
+    # @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::BudgetLines` 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::BudgetLines`. 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
+      }
+
+      if attributes.key?(:'period')
+        self.period = attributes[:'period']
+      end
+
+      if attributes.key?(:'amount')
+        self.amount = attributes[:'amount']
+      end
+
+      if attributes.key?(:'unit_amount')
+        self.unit_amount = attributes[:'unit_amount']
+      end
+
+      if attributes.key?(:'notes')
+        self.notes = attributes[:'notes']
+      end
+    end
+
+    # Show invalid properties with the reasons. Usually used together with valid?
+    # @return Array for valid properties with the reasons
+    def list_invalid_properties
+      invalid_properties = Array.new
+      if !@notes.nil? && @notes.to_s.length > 255
+        invalid_properties.push('invalid value for "notes", the character length must be smaller than or equal to 255.')
+      end
+
+      invalid_properties
+    end
+
+    # Check to see if the all the properties in the model are valid
+    # @return true if the model is valid
+    def valid?
+      return false if !@notes.nil? && @notes.to_s.length > 255
+      true
+    end
+
+    # Custom attribute writer method with validation
+    # @param [Object] notes Value to be assigned
+    def notes=(notes)
+      if !notes.nil? && notes.to_s.length > 255
+        fail ArgumentError, 'invalid value for "notes", the character length must be smaller than or equal to 255.'
+      end
+
+      @notes = notes
+    end
+
+    # Checks equality by comparing each attribute.
+    # @param [Object] Object to be compared
+    def ==(o)
+      return true if self.equal?(o)
+      self.class == o.class &&
+          period == o.period &&
+          amount == o.amount &&
+          unit_amount == o.unit_amount &&
+          notes == o.notes
+    end
+
+    # @see the `==` method
+    # @param [Object] Object to be compared
+    def eql?(o)
+      self == o
+    end
+
+    # Calculates hash code according to all attributes.
+    # @return [Integer] Hash code
+    def hash
+      [period, amount, unit_amount, notes].hash
+    end
+
+    # Builds the object from hash
+    # @param [Hash] attributes Model attributes in the form of hash
+    # @return [Object] Returns the model itself
+    def self.build_from_hash(attributes)
+      new.build_from_hash(attributes)
+    end
+
+    # Builds the object from hash
+    # @param [Hash] attributes Model attributes in the form of hash
+    # @return [Object] Returns the model itself
+    def build_from_hash(attributes)
+      return nil unless attributes.is_a?(Hash)
+      self.class.openapi_types.each_pair do |key, type|
+        if type =~ /\AArray<(.*)>/i
+          # check to ensure the input is an array given that the attribute
+          # is documented as an array but the input is not
+          if attributes[self.class.attribute_map[key]].is_a?(Array)
+            self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
+          end
+        elsif !attributes[self.class.attribute_map[key]].nil?
+          self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
+        end # or else data not found in attributes(hash), not an issue as the data can be optional
+      end
+
+      self
+    end
+
+    # Deserializes the data based on type
+    # @param string type Data type
+    # @param string value Value to be deserialized
+    # @return [Object] Deserialized data
+    def _deserialize(type, value)
+      case type.to_sym
+      when :DateTime
+        DateTime.parse(parse_date(value))
+      when :Date
+        Date.parse(parse_date(value))
+      when :String
+        value.to_s
+      when :Integer
+        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
+        else
+          false
+        end
+      when :Object
+        # generic object (usually a Hash), return directly
+        value
+      when /\AArray<(?.+)>\z/
+        inner_type = Regexp.last_match[:inner_type]
+        value.map { |v| _deserialize(inner_type, v) }
+      when /\AHash<(?.+?), (?.+)>\z/
+        k_type = Regexp.last_match[:k_type]
+        v_type = Regexp.last_match[:v_type]
+        {}.tap do |hash|
+          value.each do |k, v|
+            hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
+          end
+        end
+      else # model
+        XeroRuby::Accounting.const_get(type).build_from_hash(value)
+      end
+    end
+
+    # Returns the string representation of the object
+    # @return [String] String presentation of the object
+    def to_s
+      to_hash.to_s
+    end
+
+    # to_body is an alias to to_hash (backward compatibility)
+    # @return [Hash] Returns the object in the form of hash
+    def to_body
+      to_hash
+    end
+
+    # Returns the object in the form of hash
+    # @return [Hash] Returns the object in the form of hash
+    def to_hash(downcase: false)
+      hash = {}
+      self.class.attribute_map.each_pair do |attr, param|
+        value = self.send(attr)
+        next if value.nil?
+        key = downcase ? attr : param
+        hash[key] = _to_hash(value, downcase: downcase)
+      end
+      hash
+    end
+
+    # Returns the object in the form of hash with snake_case
+    def to_attributes
+      to_hash(downcase: true)
+    end
+
+    # Outputs non-array value in the form of hash
+    # For object, use to_hash. Otherwise, just return the value
+    # @param [Object] value Any valid value
+    # @return [Hash] Returns the value in the form of hash
+    def _to_hash(value, downcase: false)
+      if value.is_a?(Array)
+        value.map do |v|
+          v.to_hash(downcase: downcase)
+        end
+      elsif value.is_a?(Hash)
+        {}.tap do |hash|
+          value.map { |k, v| hash[k] = _to_hash(v, downcase: downcase) }
+        end
+      elsif value.respond_to? :to_hash
+        value.to_hash(downcase: downcase)
+      else
+        value
+      end
+    end
+
+    def parse_date(datestring)
+      if datestring.include?('Date')
+        date_pattern = /\/Date\((-?\d+)(\+\d+)?\)\//
+        original, date, timezone = *date_pattern.match(datestring)
+        date = (date.to_i / 1000)
+        Time.at(date).utc.strftime('%Y-%m-%dT%H:%M:%S%z').to_s
+      else # handle date 'types' for small subset of payroll API's
+        Time.parse(datestring).strftime('%Y-%m-%dT%H:%M:%S').to_s
+      end
+    end
+  end
+end
diff --git a/lib/xero-ruby/models/accounting/budgets.rb b/lib/xero-ruby/models/accounting/budgets.rb
new file mode 100644
index 00000000..832bda99
--- /dev/null
+++ b/lib/xero-ruby/models/accounting/budgets.rb
@@ -0,0 +1,222 @@
+=begin
+#Xero Accounting API
+
+#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
+
+Contact: api@xero.com
+Generated by: https://openapi-generator.tech
+OpenAPI Generator version: 4.3.1
+
+=end
+
+require 'time'
+require 'date'
+
+module XeroRuby::Accounting
+  require 'bigdecimal'
+
+  class Budgets
+
+    attr_accessor :invoices
+    
+    # Attribute mapping from ruby-style variable name to JSON key.
+    def self.attribute_map
+      {
+        :'invoices' => :'Invoices'
+      }
+    end
+
+    # Attribute type mapping.
+    def self.openapi_types
+      {
+        :'invoices' => :'Array'
+      }
+    end
+
+    # Initializes the object
+    # @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::Budgets` 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::Budgets`. 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
+      }
+
+      if attributes.key?(:'invoices')
+        if (value = attributes[:'invoices']).is_a?(Array)
+          self.invoices = value
+        end
+      end
+    end
+
+    # Show invalid properties with the reasons. Usually used together with valid?
+    # @return Array for valid properties with the reasons
+    def list_invalid_properties
+      invalid_properties = Array.new
+      invalid_properties
+    end
+
+    # Check to see if the all the properties in the model are valid
+    # @return true if the model is valid
+    def valid?
+      true
+    end
+
+    # Checks equality by comparing each attribute.
+    # @param [Object] Object to be compared
+    def ==(o)
+      return true if self.equal?(o)
+      self.class == o.class &&
+          invoices == o.invoices
+    end
+
+    # @see the `==` method
+    # @param [Object] Object to be compared
+    def eql?(o)
+      self == o
+    end
+
+    # Calculates hash code according to all attributes.
+    # @return [Integer] Hash code
+    def hash
+      [invoices].hash
+    end
+
+    # Builds the object from hash
+    # @param [Hash] attributes Model attributes in the form of hash
+    # @return [Object] Returns the model itself
+    def self.build_from_hash(attributes)
+      new.build_from_hash(attributes)
+    end
+
+    # Builds the object from hash
+    # @param [Hash] attributes Model attributes in the form of hash
+    # @return [Object] Returns the model itself
+    def build_from_hash(attributes)
+      return nil unless attributes.is_a?(Hash)
+      self.class.openapi_types.each_pair do |key, type|
+        if type =~ /\AArray<(.*)>/i
+          # check to ensure the input is an array given that the attribute
+          # is documented as an array but the input is not
+          if attributes[self.class.attribute_map[key]].is_a?(Array)
+            self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
+          end
+        elsif !attributes[self.class.attribute_map[key]].nil?
+          self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
+        end # or else data not found in attributes(hash), not an issue as the data can be optional
+      end
+
+      self
+    end
+
+    # Deserializes the data based on type
+    # @param string type Data type
+    # @param string value Value to be deserialized
+    # @return [Object] Deserialized data
+    def _deserialize(type, value)
+      case type.to_sym
+      when :DateTime
+        DateTime.parse(parse_date(value))
+      when :Date
+        Date.parse(parse_date(value))
+      when :String
+        value.to_s
+      when :Integer
+        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
+        else
+          false
+        end
+      when :Object
+        # generic object (usually a Hash), return directly
+        value
+      when /\AArray<(?.+)>\z/
+        inner_type = Regexp.last_match[:inner_type]
+        value.map { |v| _deserialize(inner_type, v) }
+      when /\AHash<(?.+?), (?.+)>\z/
+        k_type = Regexp.last_match[:k_type]
+        v_type = Regexp.last_match[:v_type]
+        {}.tap do |hash|
+          value.each do |k, v|
+            hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
+          end
+        end
+      else # model
+        XeroRuby::Accounting.const_get(type).build_from_hash(value)
+      end
+    end
+
+    # Returns the string representation of the object
+    # @return [String] String presentation of the object
+    def to_s
+      to_hash.to_s
+    end
+
+    # to_body is an alias to to_hash (backward compatibility)
+    # @return [Hash] Returns the object in the form of hash
+    def to_body
+      to_hash
+    end
+
+    # Returns the object in the form of hash
+    # @return [Hash] Returns the object in the form of hash
+    def to_hash(downcase: false)
+      hash = {}
+      self.class.attribute_map.each_pair do |attr, param|
+        value = self.send(attr)
+        next if value.nil?
+        key = downcase ? attr : param
+        hash[key] = _to_hash(value, downcase: downcase)
+      end
+      hash
+    end
+
+    # Returns the object in the form of hash with snake_case
+    def to_attributes
+      to_hash(downcase: true)
+    end
+
+    # Outputs non-array value in the form of hash
+    # For object, use to_hash. Otherwise, just return the value
+    # @param [Object] value Any valid value
+    # @return [Hash] Returns the value in the form of hash
+    def _to_hash(value, downcase: false)
+      if value.is_a?(Array)
+        value.map do |v|
+          v.to_hash(downcase: downcase)
+        end
+      elsif value.is_a?(Hash)
+        {}.tap do |hash|
+          value.map { |k, v| hash[k] = _to_hash(v, downcase: downcase) }
+        end
+      elsif value.respond_to? :to_hash
+        value.to_hash(downcase: downcase)
+      else
+        value
+      end
+    end
+
+    def parse_date(datestring)
+      if datestring.include?('Date')
+        date_pattern = /\/Date\((-?\d+)(\+\d+)?\)\//
+        original, date, timezone = *date_pattern.match(datestring)
+        date = (date.to_i / 1000)
+        Time.at(date).utc.strftime('%Y-%m-%dT%H:%M:%S%z').to_s
+      else # handle date 'types' for small subset of payroll API's
+        Time.parse(datestring).strftime('%Y-%m-%dT%H:%M:%S').to_s
+      end
+    end
+  end
+end
diff --git a/lib/xero-ruby/models/accounting/report.rb b/lib/xero-ruby/models/accounting/report.rb
index 20c4a0be..5f99ee4d 100644
--- a/lib/xero-ruby/models/accounting/report.rb
+++ b/lib/xero-ruby/models/accounting/report.rb
@@ -16,9 +16,6 @@ module XeroRuby::Accounting
   require 'bigdecimal'
 
   class Report
-    # See Prepayment Types
-    attr_accessor :report_id
-    
     # See Prepayment Types
     attr_accessor :report_name
     
@@ -63,7 +60,6 @@ def valid?(value)
     # Attribute mapping from ruby-style variable name to JSON key.
     def self.attribute_map
       {
-        :'report_id' => :'ReportID',
         :'report_name' => :'ReportName',
         :'report_type' => :'ReportType',
         :'report_title' => :'ReportTitle',
@@ -76,7 +72,6 @@ def self.attribute_map
     # Attribute type mapping.
     def self.openapi_types
       {
-        :'report_id' => :'String',
         :'report_name' => :'String',
         :'report_type' => :'String',
         :'report_title' => :'String',
@@ -101,10 +96,6 @@ def initialize(attributes = {})
         h[k.to_sym] = v
       }
 
-      if attributes.key?(:'report_id')
-        self.report_id = attributes[:'report_id']
-      end
-
       if attributes.key?(:'report_name')
         self.report_name = attributes[:'report_name']
       end
@@ -162,7 +153,6 @@ def report_type=(report_type)
     def ==(o)
       return true if self.equal?(o)
       self.class == o.class &&
-          report_id == o.report_id &&
           report_name == o.report_name &&
           report_type == o.report_type &&
           report_title == o.report_title &&
@@ -180,7 +170,7 @@ def eql?(o)
     # Calculates hash code according to all attributes.
     # @return [Integer] Hash code
     def hash
-      [report_id, report_name, report_type, report_title, report_date, updated_date_utc, contacts].hash
+      [report_name, report_type, report_title, report_date, updated_date_utc, contacts].hash
     end
 
     # Builds the object from hash
diff --git a/lib/xero-ruby/models/accounting/report_with_row.rb b/lib/xero-ruby/models/accounting/report_with_row.rb
index da48b2de..18f3fdea 100644
--- a/lib/xero-ruby/models/accounting/report_with_row.rb
+++ b/lib/xero-ruby/models/accounting/report_with_row.rb
@@ -16,7 +16,7 @@ module XeroRuby::Accounting
   require 'bigdecimal'
 
   class ReportWithRow
-    # Report id
+    # ID of the Report
     attr_accessor :report_id
     
     # Name of the report

From b7c19f335ec367e84b2a8ce41a2d50d624042a1d Mon Sep 17 00:00:00 2001
From: serknight 
Date: Thu, 27 May 2021 14:20:32 -0600
Subject: [PATCH 2/4] fix mispelling to budgets

---
 docs/accounting/Budgets.md                 |  4 ++--
 lib/xero-ruby/models/accounting/budgets.rb | 16 ++++++++--------
 2 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/docs/accounting/Budgets.md b/docs/accounting/Budgets.md
index 57ad9220..a1ca6ca3 100644
--- a/docs/accounting/Budgets.md
+++ b/docs/accounting/Budgets.md
@@ -4,14 +4,14 @@
 
 Name | Type | Description | Notes
 ------------ | ------------- | ------------- | -------------
-**invoices** | [**Array<Budget>**](Budget.md) |  | [optional] 
+**budgets** | [**Array<Budget>**](Budget.md) |  | [optional] 
 
 ## Code Sample
 
 ```ruby
 require 'XeroRuby::Accounting'
 
-instance = XeroRuby::Accounting::Budgets.new(invoices: null)
+instance = XeroRuby::Accounting::Budgets.new(budgets: null)
 ```
 
 
diff --git a/lib/xero-ruby/models/accounting/budgets.rb b/lib/xero-ruby/models/accounting/budgets.rb
index 832bda99..633ea8be 100644
--- a/lib/xero-ruby/models/accounting/budgets.rb
+++ b/lib/xero-ruby/models/accounting/budgets.rb
@@ -17,19 +17,19 @@ module XeroRuby::Accounting
 
   class Budgets
 
-    attr_accessor :invoices
+    attr_accessor :budgets
     
     # Attribute mapping from ruby-style variable name to JSON key.
     def self.attribute_map
       {
-        :'invoices' => :'Invoices'
+        :'budgets' => :'Budgets'
       }
     end
 
     # Attribute type mapping.
     def self.openapi_types
       {
-        :'invoices' => :'Array'
+        :'budgets' => :'Array'
       }
     end
 
@@ -48,9 +48,9 @@ def initialize(attributes = {})
         h[k.to_sym] = v
       }
 
-      if attributes.key?(:'invoices')
-        if (value = attributes[:'invoices']).is_a?(Array)
-          self.invoices = value
+      if attributes.key?(:'budgets')
+        if (value = attributes[:'budgets']).is_a?(Array)
+          self.budgets = value
         end
       end
     end
@@ -73,7 +73,7 @@ def valid?
     def ==(o)
       return true if self.equal?(o)
       self.class == o.class &&
-          invoices == o.invoices
+          budgets == o.budgets
     end
 
     # @see the `==` method
@@ -85,7 +85,7 @@ def eql?(o)
     # Calculates hash code according to all attributes.
     # @return [Integer] Hash code
     def hash
-      [invoices].hash
+      [budgets].hash
     end
 
     # Builds the object from hash

From eb6bb08d65255391e8698a2b0ff3a46a34c0a6f6 Mon Sep 17 00:00:00 2001
From: serknight 
Date: Fri, 28 May 2021 12:22:36 -0600
Subject: [PATCH 3/4] Finalize support for reports and budgets

---
 docs/accounting/AccountingApi.md    | 260 ++++++++++++------------
 docs/accounting/index.html          |   2 +-
 docs/assets/index.html              |   2 +-
 docs/files/index.html               |   2 +-
 docs/payroll_au/index.html          |   2 +-
 docs/payroll_nz/index.html          |   2 +-
 docs/payroll_uk/index.html          |   2 +-
 docs/projects/index.html            |   2 +-
 lib/xero-ruby/api/accounting_api.rb | 294 ++++++++++++++--------------
 lib/xero-ruby/version.rb            |   4 +-
 10 files changed, 286 insertions(+), 286 deletions(-)

diff --git a/docs/accounting/AccountingApi.md b/docs/accounting/AccountingApi.md
index 90b871a2..6fe1a9bc 100644
--- a/docs/accounting/AccountingApi.md
+++ b/docs/accounting/AccountingApi.md
@@ -140,7 +140,6 @@ Method | HTTP request | Description
 [**get_organisation_actions**](AccountingApi.md#get_organisation_actions) | **GET** /Organisation/Actions | Retrieves a list of the key actions your app has permission to perform in the connected Xero organisation.
 [**get_organisation_cis_settings**](AccountingApi.md#get_organisation_cis_settings) | **GET** /Organisation/{OrganisationID}/CISSettings | Retrieves the CIS settings for the Xero organistaion.
 [**get_organisations**](AccountingApi.md#get_organisations) | **GET** /Organisation | Retrieves Xero organisation details
-[**get_other_reports_list**](AccountingApi.md#get_other_reports_list) | **GET** /Reports | Retrieves a list of org dynamic reports that require `/Reports/{uuid}`
 [**get_overpayment**](AccountingApi.md#get_overpayment) | **GET** /Overpayments/{OverpaymentID} | Retrieves a specific overpayment using a unique overpayment Id
 [**get_overpayment_history**](AccountingApi.md#get_overpayment_history) | **GET** /Overpayments/{OverpaymentID}/History | Retrieves history records of a specific overpayment
 [**get_overpayments**](AccountingApi.md#get_overpayments) | **GET** /Overpayments | Retrieves overpayments
@@ -180,14 +179,15 @@ Method | HTTP request | Description
 [**get_repeating_invoices**](AccountingApi.md#get_repeating_invoices) | **GET** /RepeatingInvoices | Retrieves repeating invoices
 [**get_report_aged_payables_by_contact**](AccountingApi.md#get_report_aged_payables_by_contact) | **GET** /Reports/AgedPayablesByContact | Retrieves report for aged payables by contact
 [**get_report_aged_receivables_by_contact**](AccountingApi.md#get_report_aged_receivables_by_contact) | **GET** /Reports/AgedReceivablesByContact | Retrieves report for aged receivables by contact
-[**get_report_ba_sor_gst**](AccountingApi.md#get_report_ba_sor_gst) | **GET** /Reports/{ReportID} | Retrieves a specific report for BAS using a unique report Id (only valid for AU orgs)
 [**get_report_balance_sheet**](AccountingApi.md#get_report_balance_sheet) | **GET** /Reports/BalanceSheet | Retrieves report for balancesheet
 [**get_report_bank_summary**](AccountingApi.md#get_report_bank_summary) | **GET** /Reports/BankSummary | Retrieves report for bank summary
 [**get_report_budget_summary**](AccountingApi.md#get_report_budget_summary) | **GET** /Reports/BudgetSummary | Retrieves report for budget summary
 [**get_report_executive_summary**](AccountingApi.md#get_report_executive_summary) | **GET** /Reports/ExecutiveSummary | Retrieves report for executive summary
+[**get_report_from_id**](AccountingApi.md#get_report_from_id) | **GET** /Reports/{ReportID} | Retrieves a specific report using a unique ReportID
 [**get_report_profit_and_loss**](AccountingApi.md#get_report_profit_and_loss) | **GET** /Reports/ProfitAndLoss | Retrieves report for profit and loss
 [**get_report_ten_ninety_nine**](AccountingApi.md#get_report_ten_ninety_nine) | **GET** /Reports/TenNinetyNine | Retrieve reports for 1099
 [**get_report_trial_balance**](AccountingApi.md#get_report_trial_balance) | **GET** /Reports/TrialBalance | Retrieves report for trial balance
+[**get_reports_list**](AccountingApi.md#get_reports_list) | **GET** /Reports | Retrieves a list of the organistaions unique reports that require a uuid to fetch
 [**get_tax_rates**](AccountingApi.md#get_tax_rates) | **GET** /TaxRates | Retrieves tax rates
 [**get_tracking_categories**](AccountingApi.md#get_tracking_categories) | **GET** /TrackingCategories | Retrieves tracking categories and options
 [**get_tracking_category**](AccountingApi.md#get_tracking_category) | **GET** /TrackingCategories/{TrackingCategoryID} | Retrieves specific tracking categories and options using a unique tracking category Id
@@ -5994,7 +5994,7 @@ Name | Type | Description  | Notes
 
 ## get_budget
 
-> Budget get_budget(xero_tenant_id, budget_id)
+> Budgets get_budget(xero_tenant_id, budget_id)
 
 Retrieves a specific budgets, which includes budget lines
 
@@ -6044,7 +6044,7 @@ Name | Type | Description  | Notes
 
 ### Return type
 
-[**Budget**](Budget.md)
+[**Budgets**](Budgets.md)
 
 ### Authorization
 
@@ -9395,68 +9395,6 @@ Name | Type | Description  | Notes
 - **Accept**: application/json
 
 
-## get_other_reports_list
-
-> ReportWithRows get_other_reports_list(xero_tenant_id)
-
-Retrieves a list of org dynamic reports that require `/Reports/{uuid}`
-
-### Example
-
-```ruby
-# load the gem
-require 'xero-ruby'
-
-creds = {
-  client_id: ENV['CLIENT_ID'],
-  client_secret: ENV['CLIENT_SECRET'],
-  redirect_uri: ENV['REDIRECT_URI'],
-  scopes: ENV['SCOPES']
-}
-xero_client = XeroRuby::ApiClient.new(credentials: creds)
-
-token_set = fetch_valid_token_set(user) # example
-
-xero_client.refresh_token_set(token_set)
-
-# You need to namespace your api method call to one of the following api sets
-# [:accounting_api, :assets_api, :projects_api, :files_api, :payroll_au_api, :payroll_nz_api, :payroll_uk_api]
-
-api_instance = xero_client.
-
-
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID' # String | Xero identifier for Tenant
-begin
-  #Retrieves a list of org dynamic reports that require `/Reports/{uuid}`
-  result = api_instance.get_other_reports_list(xero_tenant_id)
-  p result
-rescue XeroRuby::Accounting::ApiError => e
-  puts "Exception when calling AccountingApi->get_other_reports_list: #{e}"
-end
-```
-
-### Parameters
-
-
-Name | Type | Description  | Notes
-------------- | ------------- | ------------- | -------------
- **xero_tenant_id** | **String**| Xero identifier for Tenant | 
-
-### Return type
-
-[**ReportWithRows**](ReportWithRows.md)
-
-### Authorization
-
-[OAuth2](../README.md#OAuth2)
-
-### HTTP request headers
-
-- **Content-Type**: Not defined
-- **Accept**: application/json
-
-
 ## get_overpayment
 
 > Overpayments get_overpayment(xero_tenant_id, overpayment_id)
@@ -12118,70 +12056,6 @@ Name | Type | Description  | Notes
 - **Accept**: application/json
 
 
-## get_report_ba_sor_gst
-
-> ReportWithRows get_report_ba_sor_gst(xero_tenant_id, report_id)
-
-Retrieves a specific report for BAS using a unique report Id (only valid for AU orgs)
-
-### Example
-
-```ruby
-# load the gem
-require 'xero-ruby'
-
-creds = {
-  client_id: ENV['CLIENT_ID'],
-  client_secret: ENV['CLIENT_SECRET'],
-  redirect_uri: ENV['REDIRECT_URI'],
-  scopes: ENV['SCOPES']
-}
-xero_client = XeroRuby::ApiClient.new(credentials: creds)
-
-token_set = fetch_valid_token_set(user) # example
-
-xero_client.refresh_token_set(token_set)
-
-# You need to namespace your api method call to one of the following api sets
-# [:accounting_api, :assets_api, :projects_api, :files_api, :payroll_au_api, :payroll_nz_api, :payroll_uk_api]
-
-api_instance = xero_client.
-
-
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID' # String | Xero identifier for Tenant
-report_id = '00000000-0000-0000-0000-000000000000' # String | Unique identifier for a Report
-begin
-  #Retrieves a specific report for BAS using a unique report Id (only valid for AU orgs)
-  result = api_instance.get_report_ba_sor_gst(xero_tenant_id, report_id)
-  p result
-rescue XeroRuby::Accounting::ApiError => e
-  puts "Exception when calling AccountingApi->get_report_ba_sor_gst: #{e}"
-end
-```
-
-### Parameters
-
-
-Name | Type | Description  | Notes
-------------- | ------------- | ------------- | -------------
- **xero_tenant_id** | **String**| Xero identifier for Tenant | 
- **report_id** | **String**| Unique identifier for a Report | 
-
-### Return type
-
-[**ReportWithRows**](ReportWithRows.md)
-
-### Authorization
-
-[OAuth2](../README.md#OAuth2)
-
-### HTTP request headers
-
-- **Content-Type**: Not defined
-- **Accept**: application/json
-
-
 ## get_report_balance_sheet
 
 > ReportWithRows get_report_balance_sheet(xero_tenant_id, opts)
@@ -12477,6 +12351,70 @@ Name | Type | Description  | Notes
 - **Accept**: application/json
 
 
+## get_report_from_id
+
+> ReportWithRows get_report_from_id(xero_tenant_id, report_id)
+
+Retrieves a specific report using a unique ReportID
+
+### Example
+
+```ruby
+# load the gem
+require 'xero-ruby'
+
+creds = {
+  client_id: ENV['CLIENT_ID'],
+  client_secret: ENV['CLIENT_SECRET'],
+  redirect_uri: ENV['REDIRECT_URI'],
+  scopes: ENV['SCOPES']
+}
+xero_client = XeroRuby::ApiClient.new(credentials: creds)
+
+token_set = fetch_valid_token_set(user) # example
+
+xero_client.refresh_token_set(token_set)
+
+# You need to namespace your api method call to one of the following api sets
+# [:accounting_api, :assets_api, :projects_api, :files_api, :payroll_au_api, :payroll_nz_api, :payroll_uk_api]
+
+api_instance = xero_client.
+
+
+
+xero_tenant_id = 'YOUR_XERO_TENANT_ID' # String | Xero identifier for Tenant
+report_id = '00000000-0000-0000-0000-000000000000' # String | Unique identifier for a Report
+begin
+  #Retrieves a specific report using a unique ReportID
+  result = api_instance.get_report_from_id(xero_tenant_id, report_id)
+  p result
+rescue XeroRuby::Accounting::ApiError => e
+  puts "Exception when calling AccountingApi->get_report_from_id: #{e}"
+end
+```
+
+### Parameters
+
+
+Name | Type | Description  | Notes
+------------- | ------------- | ------------- | -------------
+ **xero_tenant_id** | **String**| Xero identifier for Tenant | 
+ **report_id** | **String**| Unique identifier for a Report | 
+
+### Return type
+
+[**ReportWithRows**](ReportWithRows.md)
+
+### Authorization
+
+[OAuth2](../README.md#OAuth2)
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: application/json
+
+
 ## get_report_profit_and_loss
 
 > ReportWithRows get_report_profit_and_loss(xero_tenant_id, opts)
@@ -12708,6 +12646,68 @@ Name | Type | Description  | Notes
 - **Accept**: application/json
 
 
+## get_reports_list
+
+> ReportWithRows get_reports_list(xero_tenant_id)
+
+Retrieves a list of the organistaions unique reports that require a uuid to fetch
+
+### Example
+
+```ruby
+# load the gem
+require 'xero-ruby'
+
+creds = {
+  client_id: ENV['CLIENT_ID'],
+  client_secret: ENV['CLIENT_SECRET'],
+  redirect_uri: ENV['REDIRECT_URI'],
+  scopes: ENV['SCOPES']
+}
+xero_client = XeroRuby::ApiClient.new(credentials: creds)
+
+token_set = fetch_valid_token_set(user) # example
+
+xero_client.refresh_token_set(token_set)
+
+# You need to namespace your api method call to one of the following api sets
+# [:accounting_api, :assets_api, :projects_api, :files_api, :payroll_au_api, :payroll_nz_api, :payroll_uk_api]
+
+api_instance = xero_client.
+
+
+
+xero_tenant_id = 'YOUR_XERO_TENANT_ID' # String | Xero identifier for Tenant
+begin
+  #Retrieves a list of the organistaions unique reports that require a uuid to fetch
+  result = api_instance.get_reports_list(xero_tenant_id)
+  p result
+rescue XeroRuby::Accounting::ApiError => e
+  puts "Exception when calling AccountingApi->get_reports_list: #{e}"
+end
+```
+
+### Parameters
+
+
+Name | Type | Description  | Notes
+------------- | ------------- | ------------- | -------------
+ **xero_tenant_id** | **String**| Xero identifier for Tenant | 
+
+### Return type
+
+[**ReportWithRows**](ReportWithRows.md)
+
+### Authorization
+
+[OAuth2](../README.md#OAuth2)
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: application/json
+
+
 ## get_tax_rates
 
 > TaxRates get_tax_rates(xero_tenant_id, opts)
diff --git a/docs/accounting/index.html b/docs/accounting/index.html
index b9c2b9a9..496f3701 100644
--- a/docs/accounting/index.html
+++ b/docs/accounting/index.html
@@ -5831,7 +5831,7 @@
           

-
-
+
+
-

getContact

-

Retrieves a specific contacts in a Xero organisation using a unique contact Id

+

getBudget

+

Retrieves a specific budgets, which includes budget lines

@@ -19579,27 +19661,27 @@

getContact


-
/Contacts/{ContactID}
+
/Budgets/{BudgetID}

Usage and SDK Samples

-
+
xero_client.set_token_set(user.token_set)
 
 xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-contact_id = '00000000-0000-0000-0000-000000000000'
+budget_id = '00000000-0000-0000-0000-000000000000'
 
 begin
-  response = xero_client.accounting_api.get_contact(xero_tenant_id, contact_id)
+  response = xero_client.accounting_api.get_budget(xero_tenant_id, budget_id)
   return response
 rescue XeroRuby::ApiError => e
-  puts "Exception when calling get_contact: #{e}"
+  puts "Exception when calling get_budget: #{e}"
 end
 
@@ -19608,8 +19690,8 @@

Scopes

- - + +
accounting.contacts.readGrant read-only access to contacts and contact groupsaccounting.budgets.read
@@ -19620,11 +19702,11 @@

Parameters

Name Description - ContactID* + BudgetID* -
+
@@ -19635,7 +19717,7 @@

Parameters

-Unique identifier for a Contact +Unique identifier for Budgets
@@ -19657,7 +19739,7 @@

Parameters

-
+
@@ -19680,11 +19762,11 @@

Parameters


-
-
+
+
-

getContactAttachmentByFileName

-

Retrieves a specific attachment from a specific contact by file name

+

getBudgets

+

Retrieve a list of budgets

@@ -19692,29 +19774,29 @@

getContactAttachmentByFileName


-
/Contacts/{ContactID}/Attachments/{FileName}
+
/Budgets

Usage and SDK Samples

-
+
xero_client.set_token_set(user.token_set)
 
 xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-contact_id = '00000000-0000-0000-0000-000000000000'
-file_name = 'xero-dev.jpg'
-content_type = 'image/jpg'
+ids = ["00000000-0000-0000-0000-000000000000"]
+dateTo = "2013-10-20"
+dateFrom = "2013-10-20"
 
 begin
-  response = xero_client.accounting_api.get_contact_attachment_by_file_name(xero_tenant_id, contact_id, file_name, content_type)
+  response = xero_client.accounting_api.get_budgets(xero_tenant_id, ids, dateTo, dateFrom)
   return response
 rescue XeroRuby::ApiError => e
-  puts "Exception when calling get_contact_attachment_by_file_name: #{e}"
+  puts "Exception when calling get_budgets: #{e}"
 end
 
@@ -19723,34 +19805,31 @@

Scopes

- - + +
accounting.attachments.readGrant read-only access to attachmentsaccounting.budgets.read

Parameters

-
Path parameters
+
Header parameters
- + - +
Name Description
ContactID*
xero-tenant-id* -
+
- UUID + String - - (uuid) -
-Unique identifier for a Contact +Xero identifier for Tenant
@@ -19761,77 +19840,77 @@

Parameters

FileName*
+
Query parameters
+ + + + + + -
NameDescription
IDs -
+
- String + array[UUID] + + (uuid) +
-Name of the attachment +Filter by BudgetID. Allows you to retrieve a specific individual budget.
-
- Required -
-
Header parameters
- - - - - - + - + @@ -19841,11 +19920,11 @@

Parameters


-
-
+
+
-

getContactAttachmentById

-

Retrieves a specific attachment from a specific contact using a unique attachment Id

+

getContact

+

Retrieves a specific contacts in a Xero organisation using a unique contact Id

@@ -19853,29 +19932,27 @@

getContactAttachmentById


-
/Contacts/{ContactID}/Attachments/{AttachmentID}
+
/Contacts/{ContactID}

Usage and SDK Samples

-
+
xero_client.set_token_set(user.token_set)
 
 xero_tenant_id = 'YOUR_XERO_TENANT_ID'
 contact_id = '00000000-0000-0000-0000-000000000000'
-attachment_id = '00000000-0000-0000-0000-000000000000'
-content_type = 'image/jpg'
 
 begin
-  response = xero_client.accounting_api.get_contact_attachment_by_id(xero_tenant_id, contact_id, attachment_id, content_type)
+  response = xero_client.accounting_api.get_contact(xero_tenant_id, contact_id)
   return response
 rescue XeroRuby::ApiError => e
-  puts "Exception when calling get_contact_attachment_by_id: #{e}"
+  puts "Exception when calling get_contact: #{e}"
 end
 
@@ -19884,8 +19961,8 @@

Scopes

NameDescription
xero-tenant-id*
DateTo -
+
- String + date + + (date) +
-Xero identifier for Tenant +Filter by start date
-
- Required -
contentType*
DateFrom -
+
- String + date + + (date) +
-The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf +Filter by end date
-
- Required -
- - + +
accounting.attachments.readGrant read-only access to attachmentsaccounting.contacts.readGrant read-only access to contacts and contact groups
@@ -19900,7 +19977,7 @@

Parameters

-
+
@@ -19920,32 +19997,6 @@

Parameters

- - - AttachmentID* - - - -
-
-
- - UUID - - - (uuid) - - -
-Unique identifier for Attachment object -
-
-
- Required -
-
-
- @@ -19959,7 +20010,7 @@

Parameters

-
+
@@ -19976,40 +20027,17 @@

Parameters

- - - contentType* - - - -
-
-
- - String - - -
-The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf -
-
-
- Required -
-
-
-

-
-
+
+
-

getContactAttachments

-

Retrieves attachments for a specific contact in a Xero organisation

+

getContactAttachmentByFileName

+

Retrieves a specific attachment from a specific contact by file name

@@ -20017,17 +20045,342 @@

getContactAttachments


-
/Contacts/{ContactID}/Attachments
+
/Contacts/{ContactID}/Attachments/{FileName}

Usage and SDK Samples

-
+
+
xero_client.set_token_set(user.token_set)
+
+xero_tenant_id = 'YOUR_XERO_TENANT_ID'
+contact_id = '00000000-0000-0000-0000-000000000000'
+file_name = 'xero-dev.jpg'
+content_type = 'image/jpg'
+
+begin
+  response = xero_client.accounting_api.get_contact_attachment_by_file_name(xero_tenant_id, contact_id, file_name, content_type)
+  return response
+rescue XeroRuby::ApiError => e
+  puts "Exception when calling get_contact_attachment_by_file_name: #{e}"
+end
+
+
+
+

Scopes

+ + + + + + + +
accounting.attachments.readGrant read-only access to attachments
+

Parameters

+
Path parameters
+ + + + + + + + + + + + + +
NameDescription
ContactID* + + +
+
+
+ + UUID + + + (uuid) + + +
+Unique identifier for a Contact +
+
+
+ Required +
+
+
+
FileName* + + +
+
+
+ + String + + +
+Name of the attachment +
+
+
+ Required +
+
+
+
+
Header parameters
+ + + + + + + + + + + + + +
NameDescription
xero-tenant-id* + + +
+
+
+ + String + + +
+Xero identifier for Tenant +
+
+
+ Required +
+
+
+
contentType* + + +
+
+
+ + String + + +
+The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf +
+
+
+ Required +
+
+
+
+
+
+
+
+
+
+

getContactAttachmentById

+

Retrieves a specific attachment from a specific contact using a unique attachment Id

+
+
+
+

+

+

+
+
/Contacts/{ContactID}/Attachments/{AttachmentID}
+

+

Usage and SDK Samples

+

+ +
+ +
+
xero_client.set_token_set(user.token_set)
+
+xero_tenant_id = 'YOUR_XERO_TENANT_ID'
+contact_id = '00000000-0000-0000-0000-000000000000'
+attachment_id = '00000000-0000-0000-0000-000000000000'
+content_type = 'image/jpg'
+
+begin
+  response = xero_client.accounting_api.get_contact_attachment_by_id(xero_tenant_id, contact_id, attachment_id, content_type)
+  return response
+rescue XeroRuby::ApiError => e
+  puts "Exception when calling get_contact_attachment_by_id: #{e}"
+end
+
+
+
+

Scopes

+ + + + + + + +
accounting.attachments.readGrant read-only access to attachments
+

Parameters

+
Path parameters
+ + + + + + + + + + + + + +
NameDescription
ContactID* + + +
+
+
+ + UUID + + + (uuid) + + +
+Unique identifier for a Contact +
+
+
+ Required +
+
+
+
AttachmentID* + + +
+
+
+ + UUID + + + (uuid) + + +
+Unique identifier for Attachment object +
+
+
+ Required +
+
+
+
+
Header parameters
+ + + + + + + + + + + + + +
NameDescription
xero-tenant-id* + + +
+
+
+ + String + + +
+Xero identifier for Tenant +
+
+
+ Required +
+
+
+
contentType* + + +
+
+
+ + String + + +
+The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf +
+
+
+ Required +
+
+
+
+
+
+
+
+
+
+

getContactAttachments

+

Retrieves attachments for a specific contact in a Xero organisation

+
+
+
+

+

+

+
+
/Contacts/{ContactID}/Attachments
+

+

Usage and SDK Samples

+

+ +
+ +
xero_client.set_token_set(user.token_set)
 
 xero_tenant_id = 'YOUR_XERO_TENANT_ID'
@@ -31665,244 +32018,55 @@ 

Parameters

-The date of the Aged Receivables By Contact report -
-
-
-
- - - - fromDate - - - -
-
-
- - date - - - (date) - - -
-filter by the from date of the report e.g. 2021-02-01 -
-
-
-
- - - - toDate - - - -
-
-
- - date - - - (date) - - -
-filter by the to date of the report e.g. 2021-02-28 -
-
-
-
- - - - -
-
-
-
-
-
-

getReportBASorGST

-

Retrieves a specific report for BAS using a unique report Id (only valid for AU orgs)

-
-
-
-

-

-

-
-
/Reports/{ReportID}
-

-

Usage and SDK Samples

-

- -
- -
-
xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-report_id = '00000000-0000-0000-0000-000000000000'
-
-begin
-  response = xero_client.accounting_api.get_report_ba_sor_gst(xero_tenant_id, report_id)
-  return response
-rescue XeroRuby::ApiError => e
-  puts "Exception when calling get_report_ba_sor_gst: #{e}"
-end
-
-
-
-

Scopes

- - - - - - - -
accounting.reports.readGrant read-only access to accounting reports
-

Parameters

-
Path parameters
- - - - - - - -
NameDescription
ReportID* - - -
-
-
- - String - - -
-Unique identifier for a Report +The date of the Aged Receivables By Contact report
-
- Required -
-
Header parameters
- - - - - - + -
NameDescription
xero-tenant-id*
fromDate -
+
- String + date + + (date) +
-Xero identifier for Tenant +filter by the from date of the report e.g. 2021-02-01
-
- Required -
-
-
-
-
-
-
-

getReportBASorGSTList

-

Retrieves report for BAS (only valid for AU orgs)

-
-
-
-

-

-

-
-
/Reports
-

-

Usage and SDK Samples

-

- -
- -
-
xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-
-begin
-  response = xero_client.accounting_api.get_report_ba_sor_gst_list(xero_tenant_id)
-  return response
-rescue XeroRuby::ApiError => e
-  puts "Exception when calling get_report_ba_sor_gst_list: #{e}"
-end
-
-
-
-

Scopes

- - - - - - - -
accounting.reports.readGrant read-only access to accounting reports
-

Parameters

-
Header parameters
- - - - - - + @@ -32538,6 +32702,116 @@

Parameters

+ + +
NameDescription
xero-tenant-id*
toDate -
+
- String + date + + (date) +
-Xero identifier for Tenant +filter by the to date of the report e.g. 2021-02-28
-
- Required -
+
+
+
+
+
+
+

getReportFromId

+

Retrieves a specific report using a unique ReportID

+
+
+
+

+

+

+
+
/Reports/{ReportID}
+

+

Usage and SDK Samples

+

+ +
+ +
+
xero_client.set_token_set(user.token_set)
+
+xero_tenant_id = 'YOUR_XERO_TENANT_ID'
+report_id = '00000000-0000-0000-0000-000000000000'
+
+begin
+  response = xero_client.accounting_api.get_report_from_id(xero_tenant_id, report_id)
+  return response
+rescue XeroRuby::ApiError => e
+  puts "Exception when calling get_report_from_id: #{e}"
+end
+
+
+
+

Scopes

+ + + + + + + +
accounting.reports.readGrant read-only access to accounting reports
+

Parameters

+
Path parameters
+ + + + + + + + + +
NameDescription
ReportID* + + +
+
+
+ + String + + +
+Unique identifier for a Report +
+
+
+ Required +
+
+
+
+
Header parameters
+ + + + + + +
NameDescription
xero-tenant-id* + + +
+
+
+ + String + + +
+Xero identifier for Tenant +
+
+
+ Required +
+
+
+
@@ -33078,6 +33352,85 @@

Parameters

+ + + +
+
+
+
+
+
+

getReportsList

+

Retrieves a list of the organistaions unique reports that require a uuid to fetch

+
+
+
+

+

+

+
+
/Reports
+

+

Usage and SDK Samples

+

+ +
+ +
+
xero_client.set_token_set(user.token_set)
+
+xero_tenant_id = 'YOUR_XERO_TENANT_ID'
+
+begin
+  response = xero_client.accounting_api.get_reports_list(xero_tenant_id)
+  return response
+rescue XeroRuby::ApiError => e
+  puts "Exception when calling get_reports_list: #{e}"
+end
+
+
+
+

Scopes

+ + + + + + + +
accounting.reports.readGrant read-only access to accounting reports
+

Parameters

+
Header parameters
+ + + + + + +
NameDescription
xero-tenant-id* + + +
+
+
+ + String + + +
+Xero identifier for Tenant +
+
+
+ Required +
+
+
+
diff --git a/lib/xero-ruby/api/accounting_api.rb b/lib/xero-ruby/api/accounting_api.rb index 1bc10ec7..06f0d594 100644 --- a/lib/xero-ruby/api/accounting_api.rb +++ b/lib/xero-ruby/api/accounting_api.rb @@ -14242,7 +14242,7 @@ def get_report_bank_summary_with_http_info(xero_tenant_id, options = {}) # @param xero_tenant_id [String] Xero identifier for Tenant # @param [Hash] opts the optional parameters # @option opts [Date] :date The date for the Bank Summary report e.g. 2018-03-31 - # @option opts [Integer] :period The number of periods to compare (integer between 1 and 12) + # @option opts [Integer] :periods The number of periods to compare (integer between 1 and 12) # @option opts [Integer] :timeframe The period size to compare to (1=month, 3=quarter, 12=year) # @return [ReportWithRows] def get_report_budget_summary(xero_tenant_id, opts = {}) @@ -14254,7 +14254,7 @@ def get_report_budget_summary(xero_tenant_id, opts = {}) # @param xero_tenant_id [String] Xero identifier for Tenant # @param [Hash] opts the optional parameters # @option opts [Date] :date The date for the Bank Summary report e.g. 2018-03-31 - # @option opts [Integer] :period The number of periods to compare (integer between 1 and 12) + # @option opts [Integer] :periods The number of periods to compare (integer between 1 and 12) # @option opts [Integer] :timeframe The period size to compare to (1=month, 3=quarter, 12=year) # @return [Array<(ReportWithRows, Integer, Hash)>] ReportWithRows data, response status code and response headers def get_report_budget_summary_with_http_info(xero_tenant_id, options = {}) @@ -14275,7 +14275,7 @@ def get_report_budget_summary_with_http_info(xero_tenant_id, options = {}) # query parameters query_params = opts[:query_params] || {} query_params[:'date'] = opts[:'date'] if !opts[:'date'].nil? - query_params[:'period'] = opts[:'period'] if !opts[:'period'].nil? + query_params[:'periods'] = opts[:'periods'] if !opts[:'periods'].nil? query_params[:'timeframe'] = opts[:'timeframe'] if !opts[:'timeframe'].nil? # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: diff --git a/lib/xero-ruby/models/accounting/line_item.rb b/lib/xero-ruby/models/accounting/line_item.rb index 3708a0b7..a9ce5d81 100644 --- a/lib/xero-ruby/models/accounting/line_item.rb +++ b/lib/xero-ruby/models/accounting/line_item.rb @@ -34,6 +34,9 @@ class LineItem # See Accounts attr_accessor :account_code + # The associated account ID related to this line item + attr_accessor :account_id + # The tax type from TaxRates attr_accessor :tax_type @@ -64,6 +67,7 @@ def self.attribute_map :'unit_amount' => :'UnitAmount', :'item_code' => :'ItemCode', :'account_code' => :'AccountCode', + :'account_id' => :'AccountID', :'tax_type' => :'TaxType', :'tax_amount' => :'TaxAmount', :'line_amount' => :'LineAmount', @@ -83,6 +87,7 @@ def self.openapi_types :'unit_amount' => :'BigDecimal', :'item_code' => :'String', :'account_code' => :'String', + :'account_id' => :'String', :'tax_type' => :'String', :'tax_amount' => :'BigDecimal', :'line_amount' => :'BigDecimal', @@ -132,6 +137,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?(:'tax_type') self.tax_type = attributes[:'tax_type'] end @@ -187,6 +196,7 @@ def ==(o) unit_amount == o.unit_amount && item_code == o.item_code && account_code == o.account_code && + account_id == o.account_id && tax_type == o.tax_type && tax_amount == o.tax_amount && line_amount == o.line_amount && @@ -205,7 +215,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [line_item_id, description, quantity, unit_amount, item_code, account_code, tax_type, tax_amount, line_amount, tracking, discount_rate, discount_amount, repeating_invoice_id].hash + [line_item_id, description, quantity, unit_amount, item_code, account_code, account_id, tax_type, tax_amount, line_amount, tracking, discount_rate, discount_amount, repeating_invoice_id].hash end # Builds the object from hash