From 1acb615bfecb8a520adbab1a982435797e688a7d Mon Sep 17 00:00:00 2001 From: manishT72x <157379374+manishT72x@users.noreply.github.com> Date: Thu, 2 May 2024 18:55:45 +0530 Subject: [PATCH 1/3] Build from OAS 3.0.3 --- docs/accounting/AccountingApi.md | 70 +++++++- docs/accounting/Payment.md | 4 +- docs/accounting/index.html | 154 +++++++++++++++--- docs/app_store/index.html | 2 +- docs/assets/index.html | 2 +- docs/files/index.html | 2 +- docs/finance/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 | 78 ++++++++- lib/xero-ruby/models/accounting/allocation.rb | 4 +- lib/xero-ruby/models/accounting/payment.rb | 20 ++- lib/xero-ruby/models/accounting/tax_rate.rb | 5 +- lib/xero-ruby/models/accounting/tax_type.rb | 3 + .../accounting/ten_ninety_nine_contact.rb | 6 +- lib/xero-ruby/models/payroll_nz/employee.rb | 2 +- lib/xero-ruby/version.rb | 2 +- 19 files changed, 310 insertions(+), 54 deletions(-) diff --git a/docs/accounting/AccountingApi.md b/docs/accounting/AccountingApi.md index e43662fa..c51bd7c2 100644 --- a/docs/accounting/AccountingApi.md +++ b/docs/accounting/AccountingApi.md @@ -196,6 +196,7 @@ Method | HTTP request | Description [**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_rate_by_tax_type**](AccountingApi.md#get_tax_rate_by_tax_type) | **GET** /TaxRates/{TaxType} | Retrieves a specific tax rate according to given TaxType code [**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 @@ -13518,6 +13519,70 @@ Name | Type | Description | Notes - **Accept**: application/json +## get_tax_rate_by_tax_type + +> TaxRates get_tax_rate_by_tax_type(xero_tenant_id, tax_type) + +Retrieves a specific tax rate according to given TaxType code + +### 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, :app_store_api] + +api_instance = xero_client. + + + +xero_tenant_id = 'YOUR_XERO_TENANT_ID' # String | Xero identifier for Tenant +tax_type = 'INPUT2' # String | A valid TaxType code +begin + #Retrieves a specific tax rate according to given TaxType code + result = api_instance.get_tax_rate_by_tax_type(xero_tenant_id, tax_type) + p result +rescue XeroRuby::Accounting::ApiError => e + puts "Exception when calling AccountingApi->get_tax_rate_by_tax_type: #{e}" +end +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **xero_tenant_id** | **String**| Xero identifier for Tenant | + **tax_type** | **String**| A valid TaxType code | + +### Return type + +[**TaxRates**](TaxRates.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) @@ -13553,9 +13618,7 @@ xero_tenant_id = 'YOUR_XERO_TENANT_ID' # String | Xero identifier for Tenant opts = { where: 'Status==\"ACTIVE\"', # String | Filter by an any element - order: 'Name ASC', # String | Order by an any element - - tax_type: 'INPUT' # String | Filter by tax type + order: 'Name ASC' # String | Order by an any element } begin @@ -13575,7 +13638,6 @@ Name | Type | Description | Notes **xero_tenant_id** | **String**| Xero identifier for Tenant | **where** | **String**| Filter by an any element | [optional] **order** | **String**| Order by an any element | [optional] - **tax_type** | **String**| Filter by tax type | [optional] ### Return type diff --git a/docs/accounting/Payment.md b/docs/accounting/Payment.md index 6e200f12..c7dddee1 100644 --- a/docs/accounting/Payment.md +++ b/docs/accounting/Payment.md @@ -31,6 +31,7 @@ Name | Type | Description | Notes **has_validation_errors** | **Boolean** | A boolean to indicate if a contact has an validation errors | [optional] [default to false] **status_attribute_string** | **String** | A string to indicate if a invoice status | [optional] **validation_errors** | [**Array<ValidationError>**](ValidationError.md) | Displays array of validation error messages from the API | [optional] +**warnings** | [**Array<ValidationError>**](ValidationError.md) | Displays array of warning messages from the API | [optional] ## Code Sample @@ -63,7 +64,8 @@ instance = XeroRuby::Accounting::Payment.new(invoice: null, has_account: false, has_validation_errors: false, status_attribute_string: null, - validation_errors: null) + validation_errors: null, + warnings: null) ``` diff --git a/docs/accounting/index.html b/docs/accounting/index.html index 360f8268..5844b925 100644 --- a/docs/accounting/index.html +++ b/docs/accounting/index.html @@ -4377,6 +4377,13 @@ "items" : { "$ref" : "#/components/schemas/ValidationError" } + }, + "Warnings" : { + "type" : "array", + "description" : "Displays array of warning messages from the API", + "items" : { + "$ref" : "#/components/schemas/ValidationError" + } } }, "description" : "", @@ -5632,7 +5639,7 @@ "ReportTaxType" : { "type" : "string", "description" : "See ReportTaxTypes", - "enum" : [ "AVALARA", "BASEXCLUDED", "CAPITALSALESOUTPUT", "CAPITALEXPENSESINPUT", "ECOUTPUT", "ECOUTPUTSERVICES", "ECINPUT", "ECACQUISITIONS", "EXEMPTEXPENSES", "EXEMPTINPUT", "EXEMPTOUTPUT", "GSTONIMPORTS", "INPUT", "INPUTTAXED", "MOSSSALES", "NONE", "NONEOUTPUT", "OUTPUT", "PURCHASESINPUT", "SALESOUTPUT", "EXEMPTCAPITAL", "EXEMPTEXPORT", "CAPITALEXINPUT", "GSTONCAPIMPORTS", "GSTONCAPITALIMPORTS", "REVERSECHARGES", "PAYMENTS", "INVOICE", "CASH", "ACCRUAL", "FLATRATECASH", "FLATRATEACCRUAL", "ACCRUALS", "TXCA", "SRCAS", "DSOUTPUT", "BLINPUT2", "EPINPUT", "IMINPUT2", "MEINPUT", "IGDSINPUT2", "ESN33OUTPUT", "OPINPUT", "OSOUTPUT", "TXN33INPUT", "TXESSINPUT", "TXREINPUT", "TXPETINPUT", "NRINPUT", "ES33OUTPUT", "ZERORATEDINPUT", "ZERORATEDOUTPUT", "DRCHARGESUPPLY", "DRCHARGE", "CAPINPUT", "CAPIMPORTS", "IMINPUT", "INPUT2", "CIUINPUT", "SRINPUT", "OUTPUT2", "SROUTPUT", "CAPOUTPUT", "SROUTPUT2", "CIUOUTPUT", "ZROUTPUT", "ZREXPORT", "ACC28PLUS", "ACCUPTO28", "OTHEROUTPUT", "SHOUTPUT", "ZRINPUT", "BADDEBT", "OTHERINPUT", "BADDEBTRELIEF", "IGDSINPUT3", "SROVR", "TOURISTREFUND", "TXRCN33", "TXRCRE", "TXRCESS", "TXRCTS", "CAPEXINPUT", "UNDEFINED", "CAPEXOUTPUT", "ZEROEXPOUTPUT", "GOODSIMPORT", "NONEINPUT", "NOTREPORTED", "SROVRRS", "SROVRLVG", "SRLVG", "IM", "IMESS", "IMN33", "IMRE", "BADDEBTRECOVERY", "USSALESTAX" ] + "enum" : [ "AVALARA", "BASEXCLUDED", "CAPITALSALESOUTPUT", "CAPITALEXPENSESINPUT", "ECOUTPUT", "ECOUTPUTSERVICES", "ECINPUT", "ECACQUISITIONS", "EXEMPTEXPENSES", "EXEMPTINPUT", "EXEMPTOUTPUT", "GSTONIMPORTS", "INPUT", "INPUTTAXED", "MOSSSALES", "NONE", "NONEOUTPUT", "OUTPUT", "PURCHASESINPUT", "SALESOUTPUT", "EXEMPTCAPITAL", "EXEMPTEXPORT", "CAPITALEXINPUT", "GSTONCAPIMPORTS", "GSTONCAPITALIMPORTS", "REVERSECHARGES", "PAYMENTS", "INVOICE", "CASH", "ACCRUAL", "FLATRATECASH", "FLATRATEACCRUAL", "ACCRUALS", "TXCA", "SRCAS", "DSOUTPUT", "BLINPUT2", "EPINPUT", "IMINPUT2", "MEINPUT", "IGDSINPUT2", "ESN33OUTPUT", "OPINPUT", "OSOUTPUT", "TXN33INPUT", "TXESSINPUT", "TXREINPUT", "TXPETINPUT", "NRINPUT", "ES33OUTPUT", "ZERORATEDINPUT", "ZERORATEDOUTPUT", "DRCHARGESUPPLY", "DRCHARGE", "CAPINPUT", "CAPIMPORTS", "IMINPUT", "INPUT2", "CIUINPUT", "SRINPUT", "OUTPUT2", "SROUTPUT", "CAPOUTPUT", "SROUTPUT2", "CIUOUTPUT", "ZROUTPUT", "ZREXPORT", "ACC28PLUS", "ACCUPTO28", "OTHEROUTPUT", "SHOUTPUT", "ZRINPUT", "BADDEBT", "OTHERINPUT", "BADDEBTRELIEF", "IGDSINPUT3", "SROVR", "TOURISTREFUND", "TXRCN33", "TXRCRE", "TXRCESS", "TXRCTS", "CAPEXINPUT", "UNDEFINED", "CAPEXOUTPUT", "ZEROEXPOUTPUT", "GOODSIMPORT", "NONEINPUT", "NOTREPORTED", "SROVRRS", "SROVRLVG", "SRLVG", "IM", "IMESS", "IMN33", "IMRE", "BADDEBTRECOVERY", "USSALESTAX", "BLINPUT3" ] }, "CanApplyToAssets" : { "type" : "boolean", @@ -5697,7 +5704,7 @@ "title" : "", "type" : "string", "description" : "See Tax Types – can only be used on update calls", - "enum" : [ "OUTPUT", "INPUT", "CAPEXINPUT", "EXEMPTEXPORT", "EXEMPTEXPENSES", "EXEMPTCAPITAL", "EXEMPTOUTPUT", "INPUTTAXED", "BASEXCLUDED", "GSTONCAPIMPORTS", "GSTONIMPORTS", "NONE", "INPUT2", "ZERORATED", "OUTPUT2", "CAPEXINPUT2", "CAPEXOUTPUT", "CAPEXOUTPUT2", "CAPEXSRINPUT", "CAPEXSROUTPUT", "ECACQUISITIONS", "ECZRINPUT", "ECZROUTPUT", "ECZROUTPUTSERVICES", "EXEMPTINPUT", "REVERSECHARGES", "RRINPUT", "RROUTPUT", "SRINPUT", "SROUTPUT", "ZERORATEDINPUT", "ZERORATEDOUTPUT", "BLINPUT", "DSOUTPUT", "EPINPUT", "ES33OUTPUT", "ESN33OUTPUT", "IGDSINPUT2", "IMINPUT2", "MEINPUT", "NRINPUT", "OPINPUT", "OSOUTPUT", "TXESSINPUT", "TXN33INPUT", "TXPETINPUT", "TXREINPUT", "INPUT3", "INPUT4", "OUTPUT3", "OUTPUT4", "SROUTPUT2", "TXCA", "SRCAS", "BLINPUT2", "DRCHARGESUPPLY20", "DRCHARGE20", "DRCHARGESUPPLY5", "DRCHARGE5", "BADDEBTRELIEF", "IGDSINPUT3", "SROVR", "TOURISTREFUND", "TXRCN33", "TXRCRE", "TXRCESS", "TXRCTS", "OUTPUTY23", "DSOUTPUTY23", "INPUTY23", "IMINPUT2Y23", "IGDSINPUT2Y23", "TXPETINPUTY23", "TXESSINPUTY23", "TXN33INPUTY23", "TXREINPUTY23", "TXCAY23", "BADDEBTRELIEFY23", "IGDSINPUT3Y23", "SROVRRSY23", "SROVRLVGY23", "SRLVGY23", "TXRCN33Y23", "TXRCREY23", "TXRCESSY23", "TXRCTSY23", "IM", "IMY23", "IMESS", "IMESSY23", "IMN33", "IMN33Y23", "IMRE", "IMREY23", "BADDEBTRECOVERY", "BADDEBTRECOVERYY23", "OUTPUTY24", "DSOUTPUTY24", "INPUTY24", "IGDSINPUT2Y24", "TXPETINPUTY24", "TXESSINPUTY24", "TXN33INPUTY24", "TXREINPUTY24", "TXCAY24", "BADDEBTRELIEFY24", "IGDSINPUT3Y24", "SROVRRSY24", "SROVRLVGY24", "SRLVGY24", "TXRCTSY24", "TXRCESSY24", "TXRCN33Y24", "TXRCREY24", "IMY24", "IMESSY24", "IMN33Y24", "IMREY24", "BADDEBTRECOVERYY24", "OSOUTPUT2" ] + "enum" : [ "OUTPUT", "INPUT", "CAPEXINPUT", "EXEMPTEXPORT", "EXEMPTEXPENSES", "EXEMPTCAPITAL", "EXEMPTOUTPUT", "INPUTTAXED", "BASEXCLUDED", "GSTONCAPIMPORTS", "GSTONIMPORTS", "NONE", "INPUT2", "ZERORATED", "OUTPUT2", "CAPEXINPUT2", "CAPEXOUTPUT", "CAPEXOUTPUT2", "CAPEXSRINPUT", "CAPEXSROUTPUT", "ECACQUISITIONS", "ECZRINPUT", "ECZROUTPUT", "ECZROUTPUTSERVICES", "EXEMPTINPUT", "REVERSECHARGES", "RRINPUT", "RROUTPUT", "SRINPUT", "SROUTPUT", "ZERORATEDINPUT", "ZERORATEDOUTPUT", "BLINPUT", "DSOUTPUT", "EPINPUT", "ES33OUTPUT", "ESN33OUTPUT", "IGDSINPUT2", "IMINPUT2", "MEINPUT", "NRINPUT", "OPINPUT", "OSOUTPUT", "TXESSINPUT", "TXN33INPUT", "TXPETINPUT", "TXREINPUT", "INPUT3", "INPUT4", "OUTPUT3", "OUTPUT4", "SROUTPUT2", "TXCA", "SRCAS", "BLINPUT2", "DRCHARGESUPPLY20", "DRCHARGE20", "DRCHARGESUPPLY5", "DRCHARGE5", "BADDEBTRELIEF", "IGDSINPUT3", "SROVR", "TOURISTREFUND", "TXRCN33", "TXRCRE", "TXRCESS", "TXRCTS", "OUTPUTY23", "DSOUTPUTY23", "INPUTY23", "IMINPUT2Y23", "IGDSINPUT2Y23", "TXPETINPUTY23", "TXESSINPUTY23", "TXN33INPUTY23", "TXREINPUTY23", "TXCAY23", "BADDEBTRELIEFY23", "IGDSINPUT3Y23", "SROVRRSY23", "SROVRLVGY23", "SRLVGY23", "TXRCN33Y23", "TXRCREY23", "TXRCESSY23", "TXRCTSY23", "IM", "IMY23", "IMESS", "IMESSY23", "IMN33", "IMN33Y23", "IMRE", "IMREY23", "BADDEBTRECOVERY", "BADDEBTRECOVERYY23", "OUTPUTY24", "DSOUTPUTY24", "INPUTY24", "IGDSINPUT2Y24", "TXPETINPUTY24", "TXESSINPUTY24", "TXN33INPUTY24", "TXREINPUTY24", "TXCAY24", "BADDEBTRELIEFY24", "IGDSINPUT3Y24", "SROVRRSY24", "SROVRLVGY24", "SRLVGY24", "TXRCTSY24", "TXRCESSY24", "TXRCN33Y24", "TXRCREY24", "IMY24", "IMESSY24", "IMN33Y24", "IMREY24", "BADDEBTRECOVERYY24", "OSOUTPUT2", "BLINPUT3", "BLINPUT3Y23", "BLINPUT3Y24" ] }; defs["TenNinetyNineContact"] = { "title" : "", @@ -6093,7 +6100,7 @@