From 1a32f51f09de5bf34c89a0971ee8ed7ca4e6458d Mon Sep 17 00:00:00 2001 From: serknight Date: Tue, 22 Sep 2020 13:55:53 -0600 Subject: [PATCH 1/4] new serialize of where params --- docs/assets/AssetApi.md | 12 +- lib/xero-ruby/api/accounting_api.rb | 3010 +++++++++++++++-- lib/xero-ruby/api/asset_api.rb | 96 +- lib/xero-ruby/api/project_api.rb | 182 +- lib/xero-ruby/models/accounting/account.rb | 3 +- .../models/accounting/organisation.rb | 28 +- 6 files changed, 3068 insertions(+), 263 deletions(-) diff --git a/docs/assets/AssetApi.md b/docs/assets/AssetApi.md index 71ecfaae..40fd33aa 100644 --- a/docs/assets/AssetApi.md +++ b/docs/assets/AssetApi.md @@ -48,7 +48,7 @@ api_instance = xero_client.asset_api api_instance = xero_client.projects_api -xero_tenant_id = 'xero_tenant_id_example' # String | Xero identifier for Tenant +xero_tenant_id = 'YOUR_XERO_TENANT_ID' # String | Xero identifier for Tenant asset = { "assetName":"Computer74863", "assetNumber":"123477544", "purchaseDate":"2020-01-01", "purchasePrice":100.0, "disposalPrice":23.23, "assetStatus":"Draft", "bookDepreciationSetting":{ "depreciationMethod":"StraightLine", "averagingMethod":"ActualDays", "depreciationRate":0.5, "depreciationCalculationMethod":"None" }, "bookDepreciationDetail":{ "currentCapitalGain":5.32, "currentGainLoss":3.88, "depreciationStartDate":"2020-01-02", "costLimit":100.0, "currentAccumDepreciationAmount":2.25 }, "AccountingBookValue":99.5 } # Asset | Fixed asset you are creating begin #adds a fixed asset @@ -116,7 +116,7 @@ api_instance = xero_client.asset_api api_instance = xero_client.projects_api -xero_tenant_id = 'xero_tenant_id_example' # String | Xero identifier for Tenant +xero_tenant_id = 'YOUR_XERO_TENANT_ID' # String | Xero identifier for Tenant opts = { asset_type: { "assetTypeName":"Machinery11004", "fixedAssetAccountId":"3d8d063a-c148-4bb8-8b3c-a5e2ad3b1e82", "depreciationExpenseAccountId":"d1602f69-f900-4616-8d34-90af393fa368", "accumulatedDepreciationAccountId":"9195cadd-8645-41e6-9f67-7bcd421defe8", "bookDepreciationSetting":{ "depreciationMethod":"DiminishingValue100", "averagingMethod":"ActualDays", "depreciationRate":0.05, "depreciationCalculationMethod":"None" } } # AssetType | Asset type to add } @@ -187,7 +187,7 @@ api_instance = xero_client.asset_api api_instance = xero_client.projects_api -xero_tenant_id = 'xero_tenant_id_example' # String | Xero identifier for Tenant +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 begin #retrieves fixed asset by id @@ -255,7 +255,7 @@ api_instance = xero_client.asset_api api_instance = xero_client.projects_api -xero_tenant_id = 'xero_tenant_id_example' # String | Xero identifier for Tenant +xero_tenant_id = 'YOUR_XERO_TENANT_ID' # String | Xero identifier for Tenant begin #searches fixed asset settings result = api_instance.get_asset_settings(xero_tenant_id) @@ -321,7 +321,7 @@ api_instance = xero_client.asset_api api_instance = xero_client.projects_api -xero_tenant_id = 'xero_tenant_id_example' # String | Xero identifier for Tenant +xero_tenant_id = 'YOUR_XERO_TENANT_ID' # String | Xero identifier for Tenant begin #searches fixed asset types result = api_instance.get_asset_types(xero_tenant_id) @@ -387,7 +387,7 @@ api_instance = xero_client.asset_api api_instance = xero_client.projects_api -xero_tenant_id = 'xero_tenant_id_example' # String | Xero identifier for Tenant +xero_tenant_id = 'YOUR_XERO_TENANT_ID' # String | Xero identifier for Tenant status = XeroRuby::Assets::AssetStatusQueryParam.new # AssetStatusQueryParam | Required when retrieving a collection of assets. See Asset Status Codes opts = { page: 1, # Integer | Results are paged. This specifies which page of the results to return. The default page is 1. diff --git a/lib/xero-ruby/api/accounting_api.rb b/lib/xero-ruby/api/accounting_api.rb index 5c02a7b9..8be182d5 100644 --- a/lib/xero-ruby/api/accounting_api.rb +++ b/lib/xero-ruby/api/accounting_api.rb @@ -50,7 +50,19 @@ def create_account_with_http_info(xero_tenant_id, account, opts = {}) local_var_path = '/Accounts' # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} @@ -137,7 +149,19 @@ def create_account_attachment_by_file_name_with_http_info(xero_tenant_id, accoun local_var_path = '/Accounts/{AccountID}/Attachments/{FileName}'.sub('{' + 'AccountID' + '}', account_id.to_s).sub('{' + 'FileName' + '}', file_name.to_s) # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} @@ -224,7 +248,19 @@ def create_bank_transaction_attachment_by_file_name_with_http_info(xero_tenant_i local_var_path = '/BankTransactions/{BankTransactionID}/Attachments/{FileName}'.sub('{' + 'BankTransactionID' + '}', bank_transaction_id.to_s).sub('{' + 'FileName' + '}', file_name.to_s) # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} @@ -305,7 +341,19 @@ def create_bank_transaction_history_record_with_http_info(xero_tenant_id, bank_t local_var_path = '/BankTransactions/{BankTransactionID}/History'.sub('{' + 'BankTransactionID' + '}', bank_transaction_id.to_s) # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} @@ -384,7 +432,19 @@ def create_bank_transactions_with_http_info(xero_tenant_id, bank_transactions, o local_var_path = '/BankTransactions' # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} query_params[:'summarizeErrors'] = opts[:'summarize_errors'] if !opts[:'summarize_errors'].nil? @@ -461,7 +521,19 @@ def create_bank_transfer_with_http_info(xero_tenant_id, bank_transfers, opts = { local_var_path = '/BankTransfers' # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} @@ -546,7 +618,19 @@ def create_bank_transfer_attachment_by_file_name_with_http_info(xero_tenant_id, local_var_path = '/BankTransfers/{BankTransferID}/Attachments/{FileName}'.sub('{' + 'BankTransferID' + '}', bank_transfer_id.to_s).sub('{' + 'FileName' + '}', file_name.to_s) # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} @@ -625,7 +709,19 @@ def create_bank_transfer_history_record_with_http_info(xero_tenant_id, bank_tran local_var_path = '/BankTransfers/{BankTransferID}/History'.sub('{' + 'BankTransferID' + '}', bank_transfer_id.to_s) # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} @@ -702,7 +798,19 @@ def create_batch_payment_with_http_info(xero_tenant_id, batch_payments, opts = { local_var_path = '/BatchPayments' # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} query_params[:'summarizeErrors'] = opts[:'summarize_errors'] if !opts[:'summarize_errors'].nil? @@ -784,7 +892,19 @@ def create_batch_payment_history_record_with_http_info(xero_tenant_id, batch_pay local_var_path = '/BatchPayments/{BatchPaymentID}/History'.sub('{' + 'BatchPaymentID' + '}', batch_payment_id.to_s) # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} @@ -865,7 +985,19 @@ def create_branding_theme_payment_services_with_http_info(xero_tenant_id, brandi local_var_path = '/BrandingThemes/{BrandingThemeID}/PaymentServices'.sub('{' + 'BrandingThemeID' + '}', branding_theme_id.to_s) # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} @@ -950,7 +1082,19 @@ def create_contact_attachment_by_file_name_with_http_info(xero_tenant_id, contac local_var_path = '/Contacts/{ContactID}/Attachments/{FileName}'.sub('{' + 'ContactID' + '}', contact_id.to_s).sub('{' + 'FileName' + '}', file_name.to_s) # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} @@ -1025,7 +1169,19 @@ def create_contact_group_with_http_info(xero_tenant_id, contact_groups, opts = { local_var_path = '/ContactGroups' # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} @@ -1106,7 +1262,19 @@ def create_contact_group_contacts_with_http_info(xero_tenant_id, contact_group_i local_var_path = '/ContactGroups/{ContactGroupID}/Contacts'.sub('{' + 'ContactGroupID' + '}', contact_group_id.to_s) # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} @@ -1187,7 +1355,19 @@ def create_contact_history_with_http_info(xero_tenant_id, contact_id, history_re local_var_path = '/Contacts/{ContactID}/History'.sub('{' + 'ContactID' + '}', contact_id.to_s) # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} @@ -1264,7 +1444,19 @@ def create_contacts_with_http_info(xero_tenant_id, contacts, opts = {}) local_var_path = '/Contacts' # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} query_params[:'summarizeErrors'] = opts[:'summarize_errors'] if !opts[:'summarize_errors'].nil? @@ -1348,7 +1540,19 @@ def create_credit_note_allocation_with_http_info(xero_tenant_id, credit_note_id, local_var_path = '/CreditNotes/{CreditNoteID}/Allocations'.sub('{' + 'CreditNoteID' + '}', credit_note_id.to_s) # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} query_params[:'summarizeErrors'] = opts[:'summarize_errors'] if !opts[:'summarize_errors'].nil? @@ -1438,7 +1642,19 @@ def create_credit_note_attachment_by_file_name_with_http_info(xero_tenant_id, cr local_var_path = '/CreditNotes/{CreditNoteID}/Attachments/{FileName}'.sub('{' + 'CreditNoteID' + '}', credit_note_id.to_s).sub('{' + 'FileName' + '}', file_name.to_s) # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} query_params[:'IncludeOnline'] = opts[:'include_online'] if !opts[:'include_online'].nil? @@ -1520,7 +1736,19 @@ def create_credit_note_history_with_http_info(xero_tenant_id, credit_note_id, hi local_var_path = '/CreditNotes/{CreditNoteID}/History'.sub('{' + 'CreditNoteID' + '}', credit_note_id.to_s) # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} @@ -1599,7 +1827,19 @@ def create_credit_notes_with_http_info(xero_tenant_id, credit_notes, opts = {}) local_var_path = '/CreditNotes' # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} query_params[:'summarizeErrors'] = opts[:'summarize_errors'] if !opts[:'summarize_errors'].nil? @@ -1674,7 +1914,19 @@ def create_currency_with_http_info(xero_tenant_id, currency, opts = {}) local_var_path = '/Currencies' # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} @@ -1751,7 +2003,19 @@ def create_employees_with_http_info(xero_tenant_id, employees, opts = {}) local_var_path = '/Employees' # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} query_params[:'summarizeErrors'] = opts[:'summarize_errors'] if !opts[:'summarize_errors'].nil? @@ -1833,7 +2097,19 @@ def create_expense_claim_history_with_http_info(xero_tenant_id, expense_claim_id local_var_path = '/ExpenseClaims/{ExpenseClaimID}/History'.sub('{' + 'ExpenseClaimID' + '}', expense_claim_id.to_s) # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} @@ -1908,7 +2184,19 @@ def create_expense_claims_with_http_info(xero_tenant_id, expense_claims, opts = local_var_path = '/ExpenseClaims' # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} @@ -1997,7 +2285,19 @@ def create_invoice_attachment_by_file_name_with_http_info(xero_tenant_id, invoic local_var_path = '/Invoices/{InvoiceID}/Attachments/{FileName}'.sub('{' + 'InvoiceID' + '}', invoice_id.to_s).sub('{' + 'FileName' + '}', file_name.to_s) # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} query_params[:'IncludeOnline'] = opts[:'include_online'] if !opts[:'include_online'].nil? @@ -2079,7 +2379,19 @@ def create_invoice_history_with_http_info(xero_tenant_id, invoice_id, history_re local_var_path = '/Invoices/{InvoiceID}/History'.sub('{' + 'InvoiceID' + '}', invoice_id.to_s) # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} @@ -2158,7 +2470,19 @@ def create_invoices_with_http_info(xero_tenant_id, invoices, opts = {}) local_var_path = '/Invoices' # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} query_params[:'summarizeErrors'] = opts[:'summarize_errors'] if !opts[:'summarize_errors'].nil? @@ -2241,7 +2565,19 @@ def create_item_history_with_http_info(xero_tenant_id, item_id, history_records, local_var_path = '/Items/{ItemID}/History'.sub('{' + 'ItemID' + '}', item_id.to_s) # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} @@ -2320,7 +2656,19 @@ def create_items_with_http_info(xero_tenant_id, items, opts = {}) local_var_path = '/Items' # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} query_params[:'summarizeErrors'] = opts[:'summarize_errors'] if !opts[:'summarize_errors'].nil? @@ -2397,7 +2745,19 @@ def create_linked_transaction_with_http_info(xero_tenant_id, linked_transaction, local_var_path = '/LinkedTransactions' # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} @@ -2484,7 +2844,19 @@ def create_manual_journal_attachment_by_file_name_with_http_info(xero_tenant_id, local_var_path = '/ManualJournals/{ManualJournalID}/Attachments/{FileName}'.sub('{' + 'ManualJournalID' + '}', manual_journal_id.to_s).sub('{' + 'FileName' + '}', file_name.to_s) # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} @@ -2561,7 +2933,19 @@ def create_manual_journals_with_http_info(xero_tenant_id, manual_journals, opts local_var_path = '/ManualJournals' # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} query_params[:'summarizeErrors'] = opts[:'summarize_errors'] if !opts[:'summarize_errors'].nil? @@ -2645,7 +3029,19 @@ def create_overpayment_allocations_with_http_info(xero_tenant_id, overpayment_id local_var_path = '/Overpayments/{OverpaymentID}/Allocations'.sub('{' + 'OverpaymentID' + '}', overpayment_id.to_s) # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} query_params[:'summarizeErrors'] = opts[:'summarize_errors'] if !opts[:'summarize_errors'].nil? @@ -2727,7 +3123,19 @@ def create_overpayment_history_with_http_info(xero_tenant_id, overpayment_id, hi local_var_path = '/Overpayments/{OverpaymentID}/History'.sub('{' + 'OverpaymentID' + '}', overpayment_id.to_s) # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} @@ -2802,7 +3210,19 @@ def create_payment_with_http_info(xero_tenant_id, payment, opts = {}) local_var_path = '/Payments' # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} @@ -2883,7 +3303,19 @@ def create_payment_history_with_http_info(xero_tenant_id, payment_id, history_re local_var_path = '/Payments/{PaymentID}/History'.sub('{' + 'PaymentID' + '}', payment_id.to_s) # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} @@ -2958,7 +3390,19 @@ def create_payment_service_with_http_info(xero_tenant_id, payment_services, opts local_var_path = '/PaymentServices' # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} @@ -3035,7 +3479,19 @@ def create_payments_with_http_info(xero_tenant_id, payments, opts = {}) local_var_path = '/Payments' # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} query_params[:'summarizeErrors'] = opts[:'summarize_errors'] if !opts[:'summarize_errors'].nil? @@ -3119,7 +3575,19 @@ def create_prepayment_allocations_with_http_info(xero_tenant_id, prepayment_id, local_var_path = '/Prepayments/{PrepaymentID}/Allocations'.sub('{' + 'PrepaymentID' + '}', prepayment_id.to_s) # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} query_params[:'summarizeErrors'] = opts[:'summarize_errors'] if !opts[:'summarize_errors'].nil? @@ -3201,7 +3669,19 @@ def create_prepayment_history_with_http_info(xero_tenant_id, prepayment_id, hist local_var_path = '/Prepayments/{PrepaymentID}/History'.sub('{' + 'PrepaymentID' + '}', prepayment_id.to_s) # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} @@ -3282,7 +3762,19 @@ def create_purchase_order_history_with_http_info(xero_tenant_id, purchase_order_ local_var_path = '/PurchaseOrders/{PurchaseOrderID}/History'.sub('{' + 'PurchaseOrderID' + '}', purchase_order_id.to_s) # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} @@ -3359,7 +3851,19 @@ def create_purchase_orders_with_http_info(xero_tenant_id, purchase_orders, opts local_var_path = '/PurchaseOrders' # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} query_params[:'summarizeErrors'] = opts[:'summarize_errors'] if !opts[:'summarize_errors'].nil? @@ -3447,7 +3951,19 @@ def create_quote_attachment_by_file_name_with_http_info(xero_tenant_id, quote_id local_var_path = '/Quotes/{QuoteID}/Attachments/{FileName}'.sub('{' + 'QuoteID' + '}', quote_id.to_s).sub('{' + 'FileName' + '}', file_name.to_s) # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} @@ -3528,7 +4044,19 @@ def create_quote_history_with_http_info(xero_tenant_id, quote_id, history_record local_var_path = '/Quotes/{QuoteID}/History'.sub('{' + 'QuoteID' + '}', quote_id.to_s) # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} @@ -3605,7 +4133,19 @@ def create_quotes_with_http_info(xero_tenant_id, quotes, opts = {}) local_var_path = '/Quotes' # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} query_params[:'summarizeErrors'] = opts[:'summarize_errors'] if !opts[:'summarize_errors'].nil? @@ -3683,7 +4223,19 @@ def create_receipt_with_http_info(xero_tenant_id, receipts, opts = {}) local_var_path = '/Receipts' # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} query_params[:'unitdp'] = opts[:'unitdp'] if !opts[:'unitdp'].nil? @@ -3771,7 +4323,19 @@ def create_receipt_attachment_by_file_name_with_http_info(xero_tenant_id, receip local_var_path = '/Receipts/{ReceiptID}/Attachments/{FileName}'.sub('{' + 'ReceiptID' + '}', receipt_id.to_s).sub('{' + 'FileName' + '}', file_name.to_s) # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} @@ -3852,7 +4416,19 @@ def create_receipt_history_with_http_info(xero_tenant_id, receipt_id, history_re local_var_path = '/Receipts/{ReceiptID}/History'.sub('{' + 'ReceiptID' + '}', receipt_id.to_s) # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} @@ -3939,7 +4515,19 @@ def create_repeating_invoice_attachment_by_file_name_with_http_info(xero_tenant_ local_var_path = '/RepeatingInvoices/{RepeatingInvoiceID}/Attachments/{FileName}'.sub('{' + 'RepeatingInvoiceID' + '}', repeating_invoice_id.to_s).sub('{' + 'FileName' + '}', file_name.to_s) # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} @@ -4020,7 +4608,19 @@ def create_repeating_invoice_history_with_http_info(xero_tenant_id, repeating_in local_var_path = '/RepeatingInvoices/{RepeatingInvoiceID}/History'.sub('{' + 'RepeatingInvoiceID' + '}', repeating_invoice_id.to_s) # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} @@ -4095,7 +4695,19 @@ def create_tax_rates_with_http_info(xero_tenant_id, tax_rates, opts = {}) local_var_path = '/TaxRates' # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} @@ -4170,7 +4782,19 @@ def create_tracking_category_with_http_info(xero_tenant_id, tracking_category, o local_var_path = '/TrackingCategories' # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} @@ -4251,7 +4875,19 @@ def create_tracking_options_with_http_info(xero_tenant_id, tracking_category_id, local_var_path = '/TrackingCategories/{TrackingCategoryID}/Options'.sub('{' + 'TrackingCategoryID' + '}', tracking_category_id.to_s) # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} @@ -4326,7 +4962,19 @@ def delete_account_with_http_info(xero_tenant_id, account_id, opts = {}) local_var_path = '/Accounts/{AccountID}'.sub('{' + 'AccountID' + '}', account_id.to_s) # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} @@ -4405,7 +5053,19 @@ def delete_contact_group_contact_with_http_info(xero_tenant_id, contact_group_id local_var_path = '/ContactGroups/{ContactGroupID}/Contacts/{ContactID}'.sub('{' + 'ContactGroupID' + '}', contact_group_id.to_s).sub('{' + 'ContactID' + '}', contact_id.to_s) # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} @@ -4478,7 +5138,19 @@ def delete_contact_group_contacts_with_http_info(xero_tenant_id, contact_group_i local_var_path = '/ContactGroups/{ContactGroupID}/Contacts'.sub('{' + 'ContactGroupID' + '}', contact_group_id.to_s) # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} @@ -4549,7 +5221,19 @@ def delete_item_with_http_info(xero_tenant_id, item_id, opts = {}) local_var_path = '/Items/{ItemID}'.sub('{' + 'ItemID' + '}', item_id.to_s) # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} @@ -4622,7 +5306,19 @@ def delete_linked_transaction_with_http_info(xero_tenant_id, linked_transaction_ local_var_path = '/LinkedTransactions/{LinkedTransactionID}'.sub('{' + 'LinkedTransactionID' + '}', linked_transaction_id.to_s) # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} @@ -4701,7 +5397,19 @@ def delete_payment_with_http_info(xero_tenant_id, payment_id, payment_delete, op local_var_path = '/Payments/{PaymentID}'.sub('{' + 'PaymentID' + '}', payment_id.to_s) # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} @@ -4776,7 +5484,19 @@ def delete_tracking_category_with_http_info(xero_tenant_id, tracking_category_id local_var_path = '/TrackingCategories/{TrackingCategoryID}'.sub('{' + 'TrackingCategoryID' + '}', tracking_category_id.to_s) # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} @@ -4855,7 +5575,19 @@ def delete_tracking_options_with_http_info(xero_tenant_id, tracking_category_id, local_var_path = '/TrackingCategories/{TrackingCategoryID}/Options/{TrackingOptionID}'.sub('{' + 'TrackingCategoryID' + '}', tracking_category_id.to_s).sub('{' + 'TrackingOptionID' + '}', tracking_option_id.to_s) # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} @@ -4934,7 +5666,19 @@ def email_invoice_with_http_info(xero_tenant_id, invoice_id, request_empty, opts local_var_path = '/Invoices/{InvoiceID}/Email'.sub('{' + 'InvoiceID' + '}', invoice_id.to_s) # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} @@ -5009,7 +5753,19 @@ def get_account_with_http_info(xero_tenant_id, account_id, opts = {}) local_var_path = '/Accounts/{AccountID}'.sub('{' + 'AccountID' + '}', account_id.to_s) # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} @@ -5094,7 +5850,19 @@ def get_account_attachment_by_file_name_with_http_info(xero_tenant_id, account_i local_var_path = '/Accounts/{AccountID}/Attachments/{FileName}'.sub('{' + 'AccountID' + '}', account_id.to_s).sub('{' + 'FileName' + '}', file_name.to_s) # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} @@ -5180,7 +5948,19 @@ def get_account_attachment_by_id_with_http_info(xero_tenant_id, account_id, atta local_var_path = '/Accounts/{AccountID}/Attachments/{AttachmentID}'.sub('{' + 'AccountID' + '}', account_id.to_s).sub('{' + 'AttachmentID' + '}', attachment_id.to_s) # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} @@ -5254,7 +6034,19 @@ def get_account_attachments_with_http_info(xero_tenant_id, account_id, opts = {} local_var_path = '/Accounts/{AccountID}/Attachments'.sub('{' + 'AccountID' + '}', account_id.to_s) # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} @@ -5327,7 +6119,19 @@ def get_accounts_with_http_info(xero_tenant_id, opts = {}) local_var_path = '/Accounts' # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} query_params[:'where'] = opts[:'where'] if !opts[:'where'].nil? @@ -5405,7 +6209,19 @@ def get_bank_transaction_with_http_info(xero_tenant_id, bank_transaction_id, opt local_var_path = '/BankTransactions/{BankTransactionID}'.sub('{' + 'BankTransactionID' + '}', bank_transaction_id.to_s) # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} query_params[:'unitdp'] = opts[:'unitdp'] if !opts[:'unitdp'].nil? @@ -5491,7 +6307,19 @@ def get_bank_transaction_attachment_by_file_name_with_http_info(xero_tenant_id, local_var_path = '/BankTransactions/{BankTransactionID}/Attachments/{FileName}'.sub('{' + 'BankTransactionID' + '}', bank_transaction_id.to_s).sub('{' + 'FileName' + '}', file_name.to_s) # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} @@ -5577,7 +6405,19 @@ def get_bank_transaction_attachment_by_id_with_http_info(xero_tenant_id, bank_tr local_var_path = '/BankTransactions/{BankTransactionID}/Attachments/{AttachmentID}'.sub('{' + 'BankTransactionID' + '}', bank_transaction_id.to_s).sub('{' + 'AttachmentID' + '}', attachment_id.to_s) # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} @@ -5651,7 +6491,19 @@ def get_bank_transaction_attachments_with_http_info(xero_tenant_id, bank_transac local_var_path = '/BankTransactions/{BankTransactionID}/Attachments'.sub('{' + 'BankTransactionID' + '}', bank_transaction_id.to_s) # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} @@ -5728,7 +6580,19 @@ def get_bank_transactions_with_http_info(xero_tenant_id, opts = {}) local_var_path = '/BankTransactions' # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} query_params[:'where'] = opts[:'where'] if !opts[:'where'].nil? @@ -5806,7 +6670,19 @@ def get_bank_transactions_history_with_http_info(xero_tenant_id, bank_transactio local_var_path = '/BankTransactions/{BankTransactionID}/History'.sub('{' + 'BankTransactionID' + '}', bank_transaction_id.to_s) # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} @@ -5879,7 +6755,19 @@ def get_bank_transfer_with_http_info(xero_tenant_id, bank_transfer_id, opts = {} local_var_path = '/BankTransfers/{BankTransferID}'.sub('{' + 'BankTransferID' + '}', bank_transfer_id.to_s) # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} @@ -5964,7 +6852,19 @@ def get_bank_transfer_attachment_by_file_name_with_http_info(xero_tenant_id, ban local_var_path = '/BankTransfers/{BankTransferID}/Attachments/{FileName}'.sub('{' + 'BankTransferID' + '}', bank_transfer_id.to_s).sub('{' + 'FileName' + '}', file_name.to_s) # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} @@ -6050,7 +6950,19 @@ def get_bank_transfer_attachment_by_id_with_http_info(xero_tenant_id, bank_trans local_var_path = '/BankTransfers/{BankTransferID}/Attachments/{AttachmentID}'.sub('{' + 'BankTransferID' + '}', bank_transfer_id.to_s).sub('{' + 'AttachmentID' + '}', attachment_id.to_s) # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} @@ -6124,7 +7036,19 @@ def get_bank_transfer_attachments_with_http_info(xero_tenant_id, bank_transfer_i local_var_path = '/BankTransfers/{BankTransferID}/Attachments'.sub('{' + 'BankTransferID' + '}', bank_transfer_id.to_s) # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} @@ -6197,7 +7121,19 @@ def get_bank_transfer_history_with_http_info(xero_tenant_id, bank_transfer_id, o local_var_path = '/BankTransfers/{BankTransferID}/History'.sub('{' + 'BankTransferID' + '}', bank_transfer_id.to_s) # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} @@ -6270,7 +7206,19 @@ def get_bank_transfers_with_http_info(xero_tenant_id, opts = {}) local_var_path = '/BankTransfers' # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} query_params[:'where'] = opts[:'where'] if !opts[:'where'].nil? @@ -6346,7 +7294,19 @@ def get_batch_payment_history_with_http_info(xero_tenant_id, batch_payment_id, o local_var_path = '/BatchPayments/{BatchPaymentID}/History'.sub('{' + 'BatchPaymentID' + '}', batch_payment_id.to_s) # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} @@ -6419,7 +7379,19 @@ def get_batch_payments_with_http_info(xero_tenant_id, opts = {}) local_var_path = '/BatchPayments' # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} query_params[:'where'] = opts[:'where'] if !opts[:'where'].nil? @@ -6495,7 +7467,19 @@ def get_branding_theme_with_http_info(xero_tenant_id, branding_theme_id, opts = local_var_path = '/BrandingThemes/{BrandingThemeID}'.sub('{' + 'BrandingThemeID' + '}', branding_theme_id.to_s) # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} @@ -6568,7 +7552,19 @@ def get_branding_theme_payment_services_with_http_info(xero_tenant_id, branding_ local_var_path = '/BrandingThemes/{BrandingThemeID}/PaymentServices'.sub('{' + 'BrandingThemeID' + '}', branding_theme_id.to_s) # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} @@ -6635,7 +7631,19 @@ def get_branding_themes_with_http_info(xero_tenant_id, opts = {}) local_var_path = '/BrandingThemes' # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} @@ -6708,7 +7716,19 @@ def get_contact_with_http_info(xero_tenant_id, contact_id, opts = {}) local_var_path = '/Contacts/{ContactID}'.sub('{' + 'ContactID' + '}', contact_id.to_s) # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} @@ -6793,7 +7813,19 @@ def get_contact_attachment_by_file_name_with_http_info(xero_tenant_id, contact_i local_var_path = '/Contacts/{ContactID}/Attachments/{FileName}'.sub('{' + 'ContactID' + '}', contact_id.to_s).sub('{' + 'FileName' + '}', file_name.to_s) # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} @@ -6879,7 +7911,19 @@ def get_contact_attachment_by_id_with_http_info(xero_tenant_id, contact_id, atta local_var_path = '/Contacts/{ContactID}/Attachments/{AttachmentID}'.sub('{' + 'ContactID' + '}', contact_id.to_s).sub('{' + 'AttachmentID' + '}', attachment_id.to_s) # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} @@ -6953,7 +7997,19 @@ def get_contact_attachments_with_http_info(xero_tenant_id, contact_id, opts = {} local_var_path = '/Contacts/{ContactID}/Attachments'.sub('{' + 'ContactID' + '}', contact_id.to_s) # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} @@ -7026,7 +8082,19 @@ def get_contact_by_contact_number_with_http_info(xero_tenant_id, contact_number, local_var_path = '/Contacts/{ContactNumber}'.sub('{' + 'ContactNumber' + '}', contact_number.to_s) # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} @@ -7099,7 +8167,19 @@ def get_contact_cis_settings_with_http_info(xero_tenant_id, contact_id, opts = { local_var_path = '/Contacts/{ContactID}/CISSettings'.sub('{' + 'ContactID' + '}', contact_id.to_s) # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} @@ -7172,7 +8252,19 @@ def get_contact_group_with_http_info(xero_tenant_id, contact_group_id, opts = {} local_var_path = '/ContactGroups/{ContactGroupID}'.sub('{' + 'ContactGroupID' + '}', contact_group_id.to_s) # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} @@ -7243,7 +8335,19 @@ def get_contact_groups_with_http_info(xero_tenant_id, opts = {}) local_var_path = '/ContactGroups' # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} query_params[:'where'] = opts[:'where'] if !opts[:'where'].nil? @@ -7318,7 +8422,19 @@ def get_contact_history_with_http_info(xero_tenant_id, contact_id, opts = {}) local_var_path = '/Contacts/{ContactID}/History'.sub('{' + 'ContactID' + '}', contact_id.to_s) # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} @@ -7397,7 +8513,19 @@ def get_contacts_with_http_info(xero_tenant_id, opts = {}) local_var_path = '/Contacts' # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} query_params[:'where'] = opts[:'where'] if !opts[:'where'].nil? @@ -7478,7 +8606,19 @@ def get_credit_note_with_http_info(xero_tenant_id, credit_note_id, opts = {}) local_var_path = '/CreditNotes/{CreditNoteID}'.sub('{' + 'CreditNoteID' + '}', credit_note_id.to_s) # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} query_params[:'unitdp'] = opts[:'unitdp'] if !opts[:'unitdp'].nil? @@ -7552,7 +8692,19 @@ def get_credit_note_as_pdf_with_http_info(xero_tenant_id, credit_note_id, opts = local_var_path = '/CreditNotes/{CreditNoteID}'.sub('{' + 'CreditNoteID' + '}', credit_note_id.to_s) # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} @@ -7637,7 +8789,19 @@ def get_credit_note_attachment_by_file_name_with_http_info(xero_tenant_id, credi local_var_path = '/CreditNotes/{CreditNoteID}/Attachments/{FileName}'.sub('{' + 'CreditNoteID' + '}', credit_note_id.to_s).sub('{' + 'FileName' + '}', file_name.to_s) # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} @@ -7723,7 +8887,19 @@ def get_credit_note_attachment_by_id_with_http_info(xero_tenant_id, credit_note_ local_var_path = '/CreditNotes/{CreditNoteID}/Attachments/{AttachmentID}'.sub('{' + 'CreditNoteID' + '}', credit_note_id.to_s).sub('{' + 'AttachmentID' + '}', attachment_id.to_s) # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} @@ -7797,7 +8973,19 @@ def get_credit_note_attachments_with_http_info(xero_tenant_id, credit_note_id, o local_var_path = '/CreditNotes/{CreditNoteID}/Attachments'.sub('{' + 'CreditNoteID' + '}', credit_note_id.to_s) # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} @@ -7870,7 +9058,19 @@ def get_credit_note_history_with_http_info(xero_tenant_id, credit_note_id, opts local_var_path = '/CreditNotes/{CreditNoteID}/History'.sub('{' + 'CreditNoteID' + '}', credit_note_id.to_s) # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} @@ -7947,7 +9147,19 @@ def get_credit_notes_with_http_info(xero_tenant_id, opts = {}) local_var_path = '/CreditNotes' # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} query_params[:'where'] = opts[:'where'] if !opts[:'where'].nil? @@ -8023,7 +9235,19 @@ def get_currencies_with_http_info(xero_tenant_id, opts = {}) local_var_path = '/Currencies' # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} query_params[:'where'] = opts[:'where'] if !opts[:'where'].nil? @@ -8098,7 +9322,19 @@ def get_employee_with_http_info(xero_tenant_id, employee_id, opts = {}) local_var_path = '/Employees/{EmployeeID}'.sub('{' + 'EmployeeID' + '}', employee_id.to_s) # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} @@ -8171,7 +9407,19 @@ def get_employees_with_http_info(xero_tenant_id, opts = {}) local_var_path = '/Employees' # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} query_params[:'where'] = opts[:'where'] if !opts[:'where'].nil? @@ -8247,7 +9495,19 @@ def get_expense_claim_with_http_info(xero_tenant_id, expense_claim_id, opts = {} local_var_path = '/ExpenseClaims/{ExpenseClaimID}'.sub('{' + 'ExpenseClaimID' + '}', expense_claim_id.to_s) # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} @@ -8320,7 +9580,19 @@ def get_expense_claim_history_with_http_info(xero_tenant_id, expense_claim_id, o local_var_path = '/ExpenseClaims/{ExpenseClaimID}/History'.sub('{' + 'ExpenseClaimID' + '}', expense_claim_id.to_s) # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} @@ -8393,7 +9665,19 @@ def get_expense_claims_with_http_info(xero_tenant_id, opts = {}) local_var_path = '/ExpenseClaims' # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} query_params[:'where'] = opts[:'where'] if !opts[:'where'].nil? @@ -8471,7 +9755,19 @@ def get_invoice_with_http_info(xero_tenant_id, invoice_id, opts = {}) local_var_path = '/Invoices/{InvoiceID}'.sub('{' + 'InvoiceID' + '}', invoice_id.to_s) # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} query_params[:'unitdp'] = opts[:'unitdp'] if !opts[:'unitdp'].nil? @@ -8545,7 +9841,19 @@ def get_invoice_as_pdf_with_http_info(xero_tenant_id, invoice_id, opts = {}) local_var_path = '/Invoices/{InvoiceID}'.sub('{' + 'InvoiceID' + '}', invoice_id.to_s) # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} @@ -8630,7 +9938,19 @@ def get_invoice_attachment_by_file_name_with_http_info(xero_tenant_id, invoice_i local_var_path = '/Invoices/{InvoiceID}/Attachments/{FileName}'.sub('{' + 'InvoiceID' + '}', invoice_id.to_s).sub('{' + 'FileName' + '}', file_name.to_s) # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} @@ -8716,7 +10036,19 @@ def get_invoice_attachment_by_id_with_http_info(xero_tenant_id, invoice_id, atta local_var_path = '/Invoices/{InvoiceID}/Attachments/{AttachmentID}'.sub('{' + 'InvoiceID' + '}', invoice_id.to_s).sub('{' + 'AttachmentID' + '}', attachment_id.to_s) # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} @@ -8790,7 +10122,19 @@ def get_invoice_attachments_with_http_info(xero_tenant_id, invoice_id, opts = {} local_var_path = '/Invoices/{InvoiceID}/Attachments'.sub('{' + 'InvoiceID' + '}', invoice_id.to_s) # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} @@ -8863,7 +10207,19 @@ def get_invoice_history_with_http_info(xero_tenant_id, invoice_id, opts = {}) local_var_path = '/Invoices/{InvoiceID}/History'.sub('{' + 'InvoiceID' + '}', invoice_id.to_s) # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} @@ -8930,7 +10286,19 @@ def get_invoice_reminders_with_http_info(xero_tenant_id, opts = {}) local_var_path = '/InvoiceReminders/Settings' # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} @@ -9019,7 +10387,19 @@ def get_invoices_with_http_info(xero_tenant_id, opts = {}) local_var_path = '/Invoices' # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} query_params[:'where'] = opts[:'where'] if !opts[:'where'].nil? @@ -9105,7 +10485,19 @@ def get_item_with_http_info(xero_tenant_id, item_id, opts = {}) local_var_path = '/Items/{ItemID}'.sub('{' + 'ItemID' + '}', item_id.to_s) # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} query_params[:'unitdp'] = opts[:'unitdp'] if !opts[:'unitdp'].nil? @@ -9179,7 +10571,19 @@ def get_item_history_with_http_info(xero_tenant_id, item_id, opts = {}) local_var_path = '/Items/{ItemID}/History'.sub('{' + 'ItemID' + '}', item_id.to_s) # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} @@ -9254,7 +10658,19 @@ def get_items_with_http_info(xero_tenant_id, opts = {}) local_var_path = '/Items' # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} query_params[:'where'] = opts[:'where'] if !opts[:'where'].nil? @@ -9331,7 +10747,19 @@ def get_journal_with_http_info(xero_tenant_id, journal_id, opts = {}) local_var_path = '/Journals/{JournalID}'.sub('{' + 'JournalID' + '}', journal_id.to_s) # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} @@ -9404,7 +10832,19 @@ def get_journals_with_http_info(xero_tenant_id, opts = {}) local_var_path = '/Journals' # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? @@ -9480,7 +10920,19 @@ def get_linked_transaction_with_http_info(xero_tenant_id, linked_transaction_id, local_var_path = '/LinkedTransactions/{LinkedTransactionID}'.sub('{' + 'LinkedTransactionID' + '}', linked_transaction_id.to_s) # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} @@ -9559,7 +11011,19 @@ def get_linked_transactions_with_http_info(xero_tenant_id, opts = {}) local_var_path = '/LinkedTransactions' # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil? @@ -9638,7 +11102,19 @@ def get_manual_journal_with_http_info(xero_tenant_id, manual_journal_id, opts = local_var_path = '/ManualJournals/{ManualJournalID}'.sub('{' + 'ManualJournalID' + '}', manual_journal_id.to_s) # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} @@ -9723,7 +11199,19 @@ def get_manual_journal_attachment_by_file_name_with_http_info(xero_tenant_id, ma local_var_path = '/ManualJournals/{ManualJournalID}/Attachments/{FileName}'.sub('{' + 'ManualJournalID' + '}', manual_journal_id.to_s).sub('{' + 'FileName' + '}', file_name.to_s) # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} @@ -9809,7 +11297,19 @@ def get_manual_journal_attachment_by_id_with_http_info(xero_tenant_id, manual_jo local_var_path = '/ManualJournals/{ManualJournalID}/Attachments/{AttachmentID}'.sub('{' + 'ManualJournalID' + '}', manual_journal_id.to_s).sub('{' + 'AttachmentID' + '}', attachment_id.to_s) # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} @@ -9883,7 +11383,19 @@ def get_manual_journal_attachments_with_http_info(xero_tenant_id, manual_journal local_var_path = '/ManualJournals/{ManualJournalID}/Attachments'.sub('{' + 'ManualJournalID' + '}', manual_journal_id.to_s) # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} @@ -9958,7 +11470,19 @@ def get_manual_journals_with_http_info(xero_tenant_id, opts = {}) local_var_path = '/ManualJournals' # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} query_params[:'where'] = opts[:'where'] if !opts[:'where'].nil? @@ -10035,7 +11559,19 @@ def get_online_invoice_with_http_info(xero_tenant_id, invoice_id, opts = {}) local_var_path = '/Invoices/{InvoiceID}/OnlineInvoice'.sub('{' + 'InvoiceID' + '}', invoice_id.to_s) # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} @@ -10108,7 +11644,19 @@ def get_organisation_cis_settings_with_http_info(xero_tenant_id, organisation_id local_var_path = '/Organisation/{OrganisationID}/CISSettings'.sub('{' + 'OrganisationID' + '}', organisation_id.to_s) # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} @@ -10175,7 +11723,19 @@ def get_organisations_with_http_info(xero_tenant_id, opts = {}) local_var_path = '/Organisation' # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} @@ -10248,7 +11808,19 @@ def get_overpayment_with_http_info(xero_tenant_id, overpayment_id, opts = {}) local_var_path = '/Overpayments/{OverpaymentID}'.sub('{' + 'OverpaymentID' + '}', overpayment_id.to_s) # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} @@ -10321,7 +11893,19 @@ def get_overpayment_history_with_http_info(xero_tenant_id, overpayment_id, opts local_var_path = '/Overpayments/{OverpaymentID}/History'.sub('{' + 'OverpaymentID' + '}', overpayment_id.to_s) # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} @@ -10398,7 +11982,19 @@ def get_overpayments_with_http_info(xero_tenant_id, opts = {}) local_var_path = '/Overpayments' # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} query_params[:'where'] = opts[:'where'] if !opts[:'where'].nil? @@ -10476,7 +12072,19 @@ def get_payment_with_http_info(xero_tenant_id, payment_id, opts = {}) local_var_path = '/Payments/{PaymentID}'.sub('{' + 'PaymentID' + '}', payment_id.to_s) # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} @@ -10549,7 +12157,19 @@ def get_payment_history_with_http_info(xero_tenant_id, payment_id, opts = {}) local_var_path = '/Payments/{PaymentID}/History'.sub('{' + 'PaymentID' + '}', payment_id.to_s) # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} @@ -10616,7 +12236,19 @@ def get_payment_services_with_http_info(xero_tenant_id, opts = {}) local_var_path = '/PaymentServices' # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} @@ -10691,7 +12323,19 @@ def get_payments_with_http_info(xero_tenant_id, opts = {}) local_var_path = '/Payments' # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} query_params[:'where'] = opts[:'where'] if !opts[:'where'].nil? @@ -10768,7 +12412,19 @@ def get_prepayment_with_http_info(xero_tenant_id, prepayment_id, opts = {}) local_var_path = '/Prepayments/{PrepaymentID}'.sub('{' + 'PrepaymentID' + '}', prepayment_id.to_s) # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} @@ -10841,7 +12497,19 @@ def get_prepayment_history_with_http_info(xero_tenant_id, prepayment_id, opts = local_var_path = '/Prepayments/{PrepaymentID}/History'.sub('{' + 'PrepaymentID' + '}', prepayment_id.to_s) # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} @@ -10918,7 +12586,19 @@ def get_prepayments_with_http_info(xero_tenant_id, opts = {}) local_var_path = '/Prepayments' # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} query_params[:'where'] = opts[:'where'] if !opts[:'where'].nil? @@ -10996,7 +12676,19 @@ def get_purchase_order_with_http_info(xero_tenant_id, purchase_order_id, opts = local_var_path = '/PurchaseOrders/{PurchaseOrderID}'.sub('{' + 'PurchaseOrderID' + '}', purchase_order_id.to_s) # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} @@ -11069,7 +12761,19 @@ def get_purchase_order_as_pdf_with_http_info(xero_tenant_id, purchase_order_id, local_var_path = '/PurchaseOrders/{PurchaseOrderID}'.sub('{' + 'PurchaseOrderID' + '}', purchase_order_id.to_s) # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} @@ -11142,7 +12846,19 @@ def get_purchase_order_by_number_with_http_info(xero_tenant_id, purchase_order_n local_var_path = '/PurchaseOrders/{PurchaseOrderNumber}'.sub('{' + 'PurchaseOrderNumber' + '}', purchase_order_number.to_s) # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} @@ -11215,7 +12931,19 @@ def get_purchase_order_history_with_http_info(xero_tenant_id, purchase_order_id, local_var_path = '/PurchaseOrders/{PurchaseOrderID}/History'.sub('{' + 'PurchaseOrderID' + '}', purchase_order_id.to_s) # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} @@ -11298,7 +13026,19 @@ def get_purchase_orders_with_http_info(xero_tenant_id, opts = {}) local_var_path = '/PurchaseOrders' # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} query_params[:'Status'] = opts[:'status'] if !opts[:'status'].nil? @@ -11377,7 +13117,19 @@ def get_quote_with_http_info(xero_tenant_id, quote_id, opts = {}) local_var_path = '/Quotes/{QuoteID}'.sub('{' + 'QuoteID' + '}', quote_id.to_s) # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} @@ -11450,7 +13202,19 @@ def get_quote_as_pdf_with_http_info(xero_tenant_id, quote_id, opts = {}) local_var_path = '/Quotes/{QuoteID}'.sub('{' + 'QuoteID' + '}', quote_id.to_s) # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} @@ -11535,7 +13299,19 @@ def get_quote_attachment_by_file_name_with_http_info(xero_tenant_id, quote_id, f local_var_path = '/Quotes/{QuoteID}/Attachments/{FileName}'.sub('{' + 'QuoteID' + '}', quote_id.to_s).sub('{' + 'FileName' + '}', file_name.to_s) # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} @@ -11621,7 +13397,19 @@ def get_quote_attachment_by_id_with_http_info(xero_tenant_id, quote_id, attachme local_var_path = '/Quotes/{QuoteID}/Attachments/{AttachmentID}'.sub('{' + 'QuoteID' + '}', quote_id.to_s).sub('{' + 'AttachmentID' + '}', attachment_id.to_s) # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} @@ -11695,7 +13483,19 @@ def get_quote_attachments_with_http_info(xero_tenant_id, quote_id, opts = {}) local_var_path = '/Quotes/{QuoteID}/Attachments'.sub('{' + 'QuoteID' + '}', quote_id.to_s) # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} @@ -11768,7 +13568,19 @@ def get_quote_history_with_http_info(xero_tenant_id, quote_id, opts = {}) local_var_path = '/Quotes/{QuoteID}/History'.sub('{' + 'QuoteID' + '}', quote_id.to_s) # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} @@ -11853,7 +13665,19 @@ def get_quotes_with_http_info(xero_tenant_id, opts = {}) local_var_path = '/Quotes' # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} query_params[:'DateFrom'] = opts[:'date_from'] if !opts[:'date_from'].nil? @@ -11937,7 +13761,19 @@ def get_receipt_with_http_info(xero_tenant_id, receipt_id, opts = {}) local_var_path = '/Receipts/{ReceiptID}'.sub('{' + 'ReceiptID' + '}', receipt_id.to_s) # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} query_params[:'unitdp'] = opts[:'unitdp'] if !opts[:'unitdp'].nil? @@ -12023,7 +13859,19 @@ def get_receipt_attachment_by_file_name_with_http_info(xero_tenant_id, receipt_i local_var_path = '/Receipts/{ReceiptID}/Attachments/{FileName}'.sub('{' + 'ReceiptID' + '}', receipt_id.to_s).sub('{' + 'FileName' + '}', file_name.to_s) # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} @@ -12109,7 +13957,19 @@ def get_receipt_attachment_by_id_with_http_info(xero_tenant_id, receipt_id, atta local_var_path = '/Receipts/{ReceiptID}/Attachments/{AttachmentID}'.sub('{' + 'ReceiptID' + '}', receipt_id.to_s).sub('{' + 'AttachmentID' + '}', attachment_id.to_s) # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} @@ -12183,7 +14043,19 @@ def get_receipt_attachments_with_http_info(xero_tenant_id, receipt_id, opts = {} local_var_path = '/Receipts/{ReceiptID}/Attachments'.sub('{' + 'ReceiptID' + '}', receipt_id.to_s) # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} @@ -12256,7 +14128,19 @@ def get_receipt_history_with_http_info(xero_tenant_id, receipt_id, opts = {}) local_var_path = '/Receipts/{ReceiptID}/History'.sub('{' + 'ReceiptID' + '}', receipt_id.to_s) # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} @@ -12331,7 +14215,19 @@ def get_receipts_with_http_info(xero_tenant_id, opts = {}) local_var_path = '/Receipts' # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} query_params[:'where'] = opts[:'where'] if !opts[:'where'].nil? @@ -12408,7 +14304,19 @@ def get_repeating_invoice_with_http_info(xero_tenant_id, repeating_invoice_id, o local_var_path = '/RepeatingInvoices/{RepeatingInvoiceID}'.sub('{' + 'RepeatingInvoiceID' + '}', repeating_invoice_id.to_s) # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} @@ -12493,7 +14401,19 @@ def get_repeating_invoice_attachment_by_file_name_with_http_info(xero_tenant_id, local_var_path = '/RepeatingInvoices/{RepeatingInvoiceID}/Attachments/{FileName}'.sub('{' + 'RepeatingInvoiceID' + '}', repeating_invoice_id.to_s).sub('{' + 'FileName' + '}', file_name.to_s) # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} @@ -12579,7 +14499,19 @@ def get_repeating_invoice_attachment_by_id_with_http_info(xero_tenant_id, repeat local_var_path = '/RepeatingInvoices/{RepeatingInvoiceID}/Attachments/{AttachmentID}'.sub('{' + 'RepeatingInvoiceID' + '}', repeating_invoice_id.to_s).sub('{' + 'AttachmentID' + '}', attachment_id.to_s) # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} @@ -12653,7 +14585,19 @@ def get_repeating_invoice_attachments_with_http_info(xero_tenant_id, repeating_i local_var_path = '/RepeatingInvoices/{RepeatingInvoiceID}/Attachments'.sub('{' + 'RepeatingInvoiceID' + '}', repeating_invoice_id.to_s) # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} @@ -12726,7 +14670,19 @@ def get_repeating_invoice_history_with_http_info(xero_tenant_id, repeating_invoi local_var_path = '/RepeatingInvoices/{RepeatingInvoiceID}/History'.sub('{' + 'RepeatingInvoiceID' + '}', repeating_invoice_id.to_s) # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} @@ -12797,7 +14753,19 @@ def get_repeating_invoices_with_http_info(xero_tenant_id, opts = {}) local_var_path = '/RepeatingInvoices' # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} query_params[:'where'] = opts[:'where'] if !opts[:'where'].nil? @@ -12878,7 +14846,19 @@ def get_report_aged_payables_by_contact_with_http_info(xero_tenant_id, contact_i local_var_path = '/Reports/AgedPayablesByContact' # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} query_params[:'contactId'] = contact_id @@ -12961,7 +14941,19 @@ def get_report_aged_receivables_by_contact_with_http_info(xero_tenant_id, contac local_var_path = '/Reports/AgedReceivablesByContact' # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} query_params[:'contactId'] = contact_id @@ -13038,7 +15030,19 @@ def get_report_ba_sor_gst_with_http_info(xero_tenant_id, report_id, opts = {}) local_var_path = '/Reports/{ReportID}'.sub('{' + 'ReportID' + '}', report_id.to_s) # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} @@ -13105,7 +15109,19 @@ def get_report_ba_sor_gst_list_with_http_info(xero_tenant_id, opts = {}) local_var_path = '/Reports' # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} @@ -13190,7 +15206,19 @@ def get_report_balance_sheet_with_http_info(xero_tenant_id, opts = {}) local_var_path = '/Reports/BalanceSheet' # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} query_params[:'date'] = opts[:'date'] if !opts[:'date'].nil? @@ -13268,7 +15296,19 @@ def get_report_bank_summary_with_http_info(xero_tenant_id, opts = {}) local_var_path = '/Reports/BankSummary' # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} query_params[:'fromDate'] = opts[:'from_date'] if !opts[:'from_date'].nil? @@ -13343,7 +15383,19 @@ def get_report_budget_summary_with_http_info(xero_tenant_id, opts = {}) local_var_path = '/Reports/BudgetSummary' # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} query_params[:'date'] = opts[:'date'] if !opts[:'date'].nil? @@ -13415,7 +15467,19 @@ def get_report_executive_summary_with_http_info(xero_tenant_id, opts = {}) local_var_path = '/Reports/ExecutiveSummary' # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} query_params[:'date'] = opts[:'date'] if !opts[:'date'].nil? @@ -13507,7 +15571,19 @@ def get_report_profit_and_loss_with_http_info(xero_tenant_id, opts = {}) local_var_path = '/Reports/ProfitAndLoss' # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} query_params[:'fromDate'] = opts[:'from_date'] if !opts[:'from_date'].nil? @@ -13586,7 +15662,19 @@ def get_report_ten_ninety_nine_with_http_info(xero_tenant_id, opts = {}) local_var_path = '/Reports/TenNinetyNine' # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} query_params[:'reportYear'] = opts[:'report_year'] if !opts[:'report_year'].nil? @@ -13658,7 +15746,19 @@ def get_report_trial_balance_with_http_info(xero_tenant_id, opts = {}) local_var_path = '/Reports/TrialBalance' # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} query_params[:'date'] = opts[:'date'] if !opts[:'date'].nil? @@ -13733,7 +15833,19 @@ def get_tax_rates_with_http_info(xero_tenant_id, opts = {}) local_var_path = '/TaxRates' # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} query_params[:'where'] = opts[:'where'] if !opts[:'where'].nil? @@ -13809,7 +15921,19 @@ def get_tracking_categories_with_http_info(xero_tenant_id, opts = {}) local_var_path = '/TrackingCategories' # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} query_params[:'where'] = opts[:'where'] if !opts[:'where'].nil? @@ -13885,7 +16009,19 @@ def get_tracking_category_with_http_info(xero_tenant_id, tracking_category_id, o local_var_path = '/TrackingCategories/{TrackingCategoryID}'.sub('{' + 'TrackingCategoryID' + '}', tracking_category_id.to_s) # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} @@ -13958,7 +16094,19 @@ def get_user_with_http_info(xero_tenant_id, user_id, opts = {}) local_var_path = '/Users/{UserID}'.sub('{' + 'UserID' + '}', user_id.to_s) # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} @@ -14031,7 +16179,19 @@ def get_users_with_http_info(xero_tenant_id, opts = {}) local_var_path = '/Users' # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} query_params[:'where'] = opts[:'where'] if !opts[:'where'].nil? @@ -14113,7 +16273,19 @@ def update_account_with_http_info(xero_tenant_id, account_id, accounts, opts = { local_var_path = '/Accounts/{AccountID}'.sub('{' + 'AccountID' + '}', account_id.to_s) # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} @@ -14200,7 +16372,19 @@ def update_account_attachment_by_file_name_with_http_info(xero_tenant_id, accoun local_var_path = '/Accounts/{AccountID}/Attachments/{FileName}'.sub('{' + 'AccountID' + '}', account_id.to_s).sub('{' + 'FileName' + '}', file_name.to_s) # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} @@ -14283,7 +16467,19 @@ def update_bank_transaction_with_http_info(xero_tenant_id, bank_transaction_id, local_var_path = '/BankTransactions/{BankTransactionID}'.sub('{' + 'BankTransactionID' + '}', bank_transaction_id.to_s) # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} query_params[:'unitdp'] = opts[:'unitdp'] if !opts[:'unitdp'].nil? @@ -14371,7 +16567,19 @@ def update_bank_transaction_attachment_by_file_name_with_http_info(xero_tenant_i local_var_path = '/BankTransactions/{BankTransactionID}/Attachments/{FileName}'.sub('{' + 'BankTransactionID' + '}', bank_transaction_id.to_s).sub('{' + 'FileName' + '}', file_name.to_s) # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} @@ -14456,7 +16664,19 @@ def update_bank_transfer_attachment_by_file_name_with_http_info(xero_tenant_id, local_var_path = '/BankTransfers/{BankTransferID}/Attachments/{FileName}'.sub('{' + 'BankTransferID' + '}', bank_transfer_id.to_s).sub('{' + 'FileName' + '}', file_name.to_s) # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} @@ -14535,7 +16755,19 @@ def update_contact_with_http_info(xero_tenant_id, contact_id, contacts, opts = { local_var_path = '/Contacts/{ContactID}'.sub('{' + 'ContactID' + '}', contact_id.to_s) # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} @@ -14620,7 +16852,19 @@ def update_contact_attachment_by_file_name_with_http_info(xero_tenant_id, contac local_var_path = '/Contacts/{ContactID}/Attachments/{FileName}'.sub('{' + 'ContactID' + '}', contact_id.to_s).sub('{' + 'FileName' + '}', file_name.to_s) # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} @@ -14701,7 +16945,19 @@ def update_contact_group_with_http_info(xero_tenant_id, contact_group_id, contac local_var_path = '/ContactGroups/{ContactGroupID}'.sub('{' + 'ContactGroupID' + '}', contact_group_id.to_s) # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} @@ -14784,7 +17040,19 @@ def update_credit_note_with_http_info(xero_tenant_id, credit_note_id, credit_not local_var_path = '/CreditNotes/{CreditNoteID}'.sub('{' + 'CreditNoteID' + '}', credit_note_id.to_s) # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} query_params[:'unitdp'] = opts[:'unitdp'] if !opts[:'unitdp'].nil? @@ -14872,7 +17140,19 @@ def update_credit_note_attachment_by_file_name_with_http_info(xero_tenant_id, cr local_var_path = '/CreditNotes/{CreditNoteID}/Attachments/{FileName}'.sub('{' + 'CreditNoteID' + '}', credit_note_id.to_s).sub('{' + 'FileName' + '}', file_name.to_s) # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} @@ -14953,7 +17233,19 @@ def update_expense_claim_with_http_info(xero_tenant_id, expense_claim_id, expens local_var_path = '/ExpenseClaims/{ExpenseClaimID}'.sub('{' + 'ExpenseClaimID' + '}', expense_claim_id.to_s) # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} @@ -15036,7 +17328,19 @@ def update_invoice_with_http_info(xero_tenant_id, invoice_id, invoices, opts = { local_var_path = '/Invoices/{InvoiceID}'.sub('{' + 'InvoiceID' + '}', invoice_id.to_s) # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} query_params[:'unitdp'] = opts[:'unitdp'] if !opts[:'unitdp'].nil? @@ -15124,7 +17428,19 @@ def update_invoice_attachment_by_file_name_with_http_info(xero_tenant_id, invoic local_var_path = '/Invoices/{InvoiceID}/Attachments/{FileName}'.sub('{' + 'InvoiceID' + '}', invoice_id.to_s).sub('{' + 'FileName' + '}', file_name.to_s) # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} @@ -15207,7 +17523,19 @@ def update_item_with_http_info(xero_tenant_id, item_id, items, opts = {}) local_var_path = '/Items/{ItemID}'.sub('{' + 'ItemID' + '}', item_id.to_s) # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} query_params[:'unitdp'] = opts[:'unitdp'] if !opts[:'unitdp'].nil? @@ -15289,7 +17617,19 @@ def update_linked_transaction_with_http_info(xero_tenant_id, linked_transaction_ local_var_path = '/LinkedTransactions/{LinkedTransactionID}'.sub('{' + 'LinkedTransactionID' + '}', linked_transaction_id.to_s) # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} @@ -15370,7 +17710,19 @@ def update_manual_journal_with_http_info(xero_tenant_id, manual_journal_id, manu local_var_path = '/ManualJournals/{ManualJournalID}'.sub('{' + 'ManualJournalID' + '}', manual_journal_id.to_s) # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} @@ -15457,7 +17809,19 @@ def update_manual_journal_attachment_by_file_name_with_http_info(xero_tenant_id, local_var_path = '/ManualJournals/{ManualJournalID}/Attachments/{FileName}'.sub('{' + 'ManualJournalID' + '}', manual_journal_id.to_s).sub('{' + 'FileName' + '}', file_name.to_s) # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} @@ -15536,7 +17900,19 @@ def update_or_create_bank_transactions_with_http_info(xero_tenant_id, bank_trans local_var_path = '/BankTransactions' # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} query_params[:'summarizeErrors'] = opts[:'summarize_errors'] if !opts[:'summarize_errors'].nil? @@ -15615,7 +17991,19 @@ def update_or_create_contacts_with_http_info(xero_tenant_id, contacts, opts = {} local_var_path = '/Contacts' # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} query_params[:'summarizeErrors'] = opts[:'summarize_errors'] if !opts[:'summarize_errors'].nil? @@ -15695,7 +18083,19 @@ def update_or_create_credit_notes_with_http_info(xero_tenant_id, credit_notes, o local_var_path = '/CreditNotes' # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} query_params[:'summarizeErrors'] = opts[:'summarize_errors'] if !opts[:'summarize_errors'].nil? @@ -15774,7 +18174,19 @@ def update_or_create_employees_with_http_info(xero_tenant_id, employees, opts = local_var_path = '/Employees' # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} query_params[:'summarizeErrors'] = opts[:'summarize_errors'] if !opts[:'summarize_errors'].nil? @@ -15854,7 +18266,19 @@ def update_or_create_invoices_with_http_info(xero_tenant_id, invoices, opts = {} local_var_path = '/Invoices' # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} query_params[:'summarizeErrors'] = opts[:'summarize_errors'] if !opts[:'summarize_errors'].nil? @@ -15935,7 +18359,19 @@ def update_or_create_items_with_http_info(xero_tenant_id, items, opts = {}) local_var_path = '/Items' # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} query_params[:'summarizeErrors'] = opts[:'summarize_errors'] if !opts[:'summarize_errors'].nil? @@ -16014,7 +18450,19 @@ def update_or_create_manual_journals_with_http_info(xero_tenant_id, manual_journ local_var_path = '/ManualJournals' # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} query_params[:'summarizeErrors'] = opts[:'summarize_errors'] if !opts[:'summarize_errors'].nil? @@ -16092,7 +18540,19 @@ def update_or_create_purchase_orders_with_http_info(xero_tenant_id, purchase_ord local_var_path = '/PurchaseOrders' # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} query_params[:'summarizeErrors'] = opts[:'summarize_errors'] if !opts[:'summarize_errors'].nil? @@ -16170,7 +18630,19 @@ def update_or_create_quotes_with_http_info(xero_tenant_id, quotes, opts = {}) local_var_path = '/Quotes' # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} query_params[:'summarizeErrors'] = opts[:'summarize_errors'] if !opts[:'summarize_errors'].nil? @@ -16252,7 +18724,19 @@ def update_purchase_order_with_http_info(xero_tenant_id, purchase_order_id, purc local_var_path = '/PurchaseOrders/{PurchaseOrderID}'.sub('{' + 'PurchaseOrderID' + '}', purchase_order_id.to_s) # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} @@ -16333,7 +18817,19 @@ def update_quote_with_http_info(xero_tenant_id, quote_id, quotes, opts = {}) local_var_path = '/Quotes/{QuoteID}'.sub('{' + 'QuoteID' + '}', quote_id.to_s) # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} @@ -16420,7 +18916,19 @@ def update_quote_attachment_by_file_name_with_http_info(xero_tenant_id, quote_id local_var_path = '/Quotes/{QuoteID}/Attachments/{FileName}'.sub('{' + 'QuoteID' + '}', quote_id.to_s).sub('{' + 'FileName' + '}', file_name.to_s) # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} @@ -16503,7 +19011,19 @@ def update_receipt_with_http_info(xero_tenant_id, receipt_id, receipts, opts = { local_var_path = '/Receipts/{ReceiptID}'.sub('{' + 'ReceiptID' + '}', receipt_id.to_s) # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} query_params[:'unitdp'] = opts[:'unitdp'] if !opts[:'unitdp'].nil? @@ -16591,7 +19111,19 @@ def update_receipt_attachment_by_file_name_with_http_info(xero_tenant_id, receip local_var_path = '/Receipts/{ReceiptID}/Attachments/{FileName}'.sub('{' + 'ReceiptID' + '}', receipt_id.to_s).sub('{' + 'FileName' + '}', file_name.to_s) # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} @@ -16678,7 +19210,19 @@ def update_repeating_invoice_attachment_by_file_name_with_http_info(xero_tenant_ local_var_path = '/RepeatingInvoices/{RepeatingInvoiceID}/Attachments/{FileName}'.sub('{' + 'RepeatingInvoiceID' + '}', repeating_invoice_id.to_s).sub('{' + 'FileName' + '}', file_name.to_s) # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} @@ -16753,7 +19297,19 @@ def update_tax_rate_with_http_info(xero_tenant_id, tax_rates, opts = {}) local_var_path = '/TaxRates' # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} @@ -16834,7 +19390,19 @@ def update_tracking_category_with_http_info(xero_tenant_id, tracking_category_id local_var_path = '/TrackingCategories/{TrackingCategoryID}'.sub('{' + 'TrackingCategoryID' + '}', tracking_category_id.to_s) # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} @@ -16921,7 +19489,19 @@ def update_tracking_options_with_http_info(xero_tenant_id, tracking_category_id, local_var_path = '/TrackingCategories/{TrackingCategoryID}/Options/{TrackingOptionID}'.sub('{' + 'TrackingCategoryID' + '}', tracking_category_id.to_s).sub('{' + 'TrackingOptionID' + '}', tracking_option_id.to_s) # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} diff --git a/lib/xero-ruby/api/asset_api.rb b/lib/xero-ruby/api/asset_api.rb index 95ee8447..6ab2e005 100644 --- a/lib/xero-ruby/api/asset_api.rb +++ b/lib/xero-ruby/api/asset_api.rb @@ -52,7 +52,19 @@ def create_asset_with_http_info(xero_tenant_id, asset, opts = {}) local_var_path = '/Assets' # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} @@ -66,7 +78,7 @@ def create_asset_with_http_info(xero_tenant_id, asset, opts = {}) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) - header_params[:'Xero-Tenant-Id'] = xero_tenant_id + header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} @@ -125,7 +137,19 @@ def create_asset_type_with_http_info(xero_tenant_id, opts = {}) local_var_path = '/AssetTypes' # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} @@ -139,7 +163,7 @@ def create_asset_type_with_http_info(xero_tenant_id, opts = {}) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) - header_params[:'Xero-Tenant-Id'] = xero_tenant_id + header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} @@ -202,7 +226,19 @@ def get_asset_by_id_with_http_info(xero_tenant_id, id, opts = {}) local_var_path = '/Assets/{id}'.sub('{' + 'id' + '}', id.to_s) # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} @@ -214,7 +250,7 @@ def get_asset_by_id_with_http_info(xero_tenant_id, id, opts = {}) 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 + header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} @@ -271,7 +307,19 @@ def get_asset_settings_with_http_info(xero_tenant_id, opts = {}) local_var_path = '/Settings' # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} @@ -283,7 +331,7 @@ def get_asset_settings_with_http_info(xero_tenant_id, opts = {}) 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 + header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} @@ -340,7 +388,19 @@ def get_asset_types_with_http_info(xero_tenant_id, opts = {}) local_var_path = '/AssetTypes' # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} @@ -352,7 +412,7 @@ def get_asset_types_with_http_info(xero_tenant_id, opts = {}) 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 + header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} @@ -437,7 +497,19 @@ def get_assets_with_http_info(xero_tenant_id, status, opts = {}) local_var_path = '/Assets' # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} query_params[:'status'] = status @@ -455,7 +527,7 @@ def get_assets_with_http_info(xero_tenant_id, status, opts = {}) 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 + header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} diff --git a/lib/xero-ruby/api/project_api.rb b/lib/xero-ruby/api/project_api.rb index 30a5900c..0b2db397 100644 --- a/lib/xero-ruby/api/project_api.rb +++ b/lib/xero-ruby/api/project_api.rb @@ -50,7 +50,19 @@ def create_project_with_http_info(xero_tenant_id, project_create_or_update, opts local_var_path = '/projects' # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} @@ -133,7 +145,19 @@ def create_time_entry_with_http_info(xero_tenant_id, project_id, time_entry_crea local_var_path = '/projects/{projectId}/time'.sub('{' + 'projectId' + '}', project_id.to_s) # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} @@ -216,7 +240,19 @@ def delete_time_entry_with_http_info(xero_tenant_id, project_id, time_entry_id, local_var_path = '/projects/{projectId}/time/{timeEntryId}'.sub('{' + 'projectId' + '}', project_id.to_s).sub('{' + 'timeEntryId' + '}', time_entry_id.to_s) # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} @@ -289,7 +325,19 @@ def get_project_with_http_info(xero_tenant_id, project_id, opts = {}) local_var_path = '/projects/{projectId}'.sub('{' + 'projectId' + '}', project_id.to_s) # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} @@ -370,7 +418,19 @@ def get_project_users_with_http_info(xero_tenant_id, opts = {}) local_var_path = '/projectsusers' # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil? @@ -459,7 +519,19 @@ def get_projects_with_http_info(xero_tenant_id, opts = {}) local_var_path = '/projects' # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} query_params[:'projectIds'] = @api_client.build_collection_param(opts[:'project_ids'], :multi) if !opts[:'project_ids'].nil? @@ -545,7 +617,19 @@ def get_task_with_http_info(xero_tenant_id, project_id, task_id, opts = {}) local_var_path = '/projects/{projectId}/tasks/{taskId}'.sub('{' + 'projectId' + '}', project_id.to_s).sub('{' + 'taskId' + '}', task_id.to_s) # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} @@ -626,7 +710,19 @@ def get_tasks_with_http_info(xero_tenant_id, project_id, opts = {}) local_var_path = '/projects/{projectId}/tasks'.sub('{' + 'projectId' + '}', project_id.to_s) # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil? @@ -724,7 +820,19 @@ def get_time_entries_with_http_info(xero_tenant_id, project_id, opts = {}) local_var_path = '/projects/{projectId}/time'.sub('{' + 'projectId' + '}', project_id.to_s) # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} query_params[:'userId'] = opts[:'user_id'] if !opts[:'user_id'].nil? @@ -815,7 +923,19 @@ def get_time_entry_with_http_info(xero_tenant_id, project_id, time_entry_id, opt local_var_path = '/projects/{projectId}/time/{timeEntryId}'.sub('{' + 'projectId' + '}', project_id.to_s).sub('{' + 'timeEntryId' + '}', time_entry_id.to_s) # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} @@ -896,7 +1016,19 @@ def patch_project_with_http_info(xero_tenant_id, project_id, project_patch, opts local_var_path = '/projects/{projectId}'.sub('{' + 'projectId' + '}', project_id.to_s) # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} @@ -979,7 +1111,19 @@ def update_project_with_http_info(xero_tenant_id, project_id, project_create_or_ local_var_path = '/projects/{projectId}'.sub('{' + 'projectId' + '}', project_id.to_s) # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} @@ -1068,7 +1212,19 @@ def update_time_entry_with_http_info(xero_tenant_id, project_id, time_entry_id, local_var_path = '/projects/{projectId}/time/{timeEntryId}'.sub('{' + 'projectId' + '}', project_id.to_s).sub('{' + 'timeEntryId' + '}', time_entry_id.to_s) # camelize keys of incoming `where` opts - opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil? + if !opts[:'where'].nil? + all_wheres = opts[:'where'].map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end + opts[:'where'] = all_wheres.join(' AND ') + end + # query parameters query_params = opts[:query_params] || {} diff --git a/lib/xero-ruby/models/accounting/account.rb b/lib/xero-ruby/models/accounting/account.rb index 1bcdda17..52391b19 100644 --- a/lib/xero-ruby/models/accounting/account.rb +++ b/lib/xero-ruby/models/accounting/account.rb @@ -91,8 +91,7 @@ class Account CISLABOURINCOME = "CISLABOURINCOME".freeze CISLIABILITY = "CISLIABILITY".freeze CISMATERIALS = "CISMATERIALS".freeze - # duplicate definitions generated: https://github.com/XeroAPI/xero-ruby/issues/53#issuecomment-668893305 - # EMPTY = "".freeze + EMPTY = "".freeze # Shown if set attr_accessor :reporting_code diff --git a/lib/xero-ruby/models/accounting/organisation.rb b/lib/xero-ruby/models/accounting/organisation.rb index 68f45fb7..21dbe6cd 100644 --- a/lib/xero-ruby/models/accounting/organisation.rb +++ b/lib/xero-ruby/models/accounting/organisation.rb @@ -114,8 +114,7 @@ class Organisation N6_MONTHLY = "6MONTHLY".freeze QUARTERLY = "QUARTERLY".freeze YEARLY = "YEARLY".freeze - # duplicate definitions generated: https://github.com/XeroAPI/xero-ruby/issues/53#issuecomment-668893305 - # NONE = "NONE".freeze + NONE = "NONE".freeze # The default for LineAmountTypes on sales transactions attr_accessor :default_sales_tax @@ -137,19 +136,18 @@ class Organisation # Organisation Entity Type attr_accessor :organisation_entity_type - # duplicate definitions generated: https://github.com/XeroAPI/xero-ruby/issues/53#issuecomment-668893305 - # ACCOUNTING_PRACTICE = "ACCOUNTING_PRACTICE".freeze - # COMPANY = "COMPANY".freeze - # CHARITY = "CHARITY".freeze - # CLUB_OR_SOCIETY = "CLUB_OR_SOCIETY".freeze - # LOOK_THROUGH_COMPANY = "LOOK_THROUGH_COMPANY".freeze - # NOT_FOR_PROFIT = "NOT_FOR_PROFIT".freeze - # PARTNERSHIP = "PARTNERSHIP".freeze - # S_CORPORATION = "S_CORPORATION".freeze - # SELF_MANAGED_SUPERANNUATION_FUND = "SELF_MANAGED_SUPERANNUATION_FUND".freeze - # SOLE_TRADER = "SOLE_TRADER".freeze - # SUPERANNUATION_FUND = "SUPERANNUATION_FUND".freeze - # TRUST = "TRUST".freeze + ACCOUNTING_PRACTICE = "ACCOUNTING_PRACTICE".freeze + COMPANY = "COMPANY".freeze + CHARITY = "CHARITY".freeze + CLUB_OR_SOCIETY = "CLUB_OR_SOCIETY".freeze + LOOK_THROUGH_COMPANY = "LOOK_THROUGH_COMPANY".freeze + NOT_FOR_PROFIT = "NOT_FOR_PROFIT".freeze + PARTNERSHIP = "PARTNERSHIP".freeze + S_CORPORATION = "S_CORPORATION".freeze + SELF_MANAGED_SUPERANNUATION_FUND = "SELF_MANAGED_SUPERANNUATION_FUND".freeze + SOLE_TRADER = "SOLE_TRADER".freeze + SUPERANNUATION_FUND = "SUPERANNUATION_FUND".freeze + TRUST = "TRUST".freeze # A unique identifier for the organisation. Potential uses. attr_accessor :short_code From d335efb2c6b74a79678809d5422fbc4b244977d4 Mon Sep 17 00:00:00 2001 From: serknight Date: Wed, 23 Sep 2020 07:39:57 -0600 Subject: [PATCH 2/4] work in progress but going to link PR --- lib/xero-ruby/api/accounting_api.rb | 2795 +++------------------------ lib/xero-ruby/api/asset_api.rb | 78 +- lib/xero-ruby/api/project_api.rb | 169 +- lib/xero-ruby/api_client.rb | 12 + lib/xero-ruby/version.rb | 2 +- 5 files changed, 247 insertions(+), 2809 deletions(-) diff --git a/lib/xero-ruby/api/accounting_api.rb b/lib/xero-ruby/api/accounting_api.rb index 8be182d5..c0bc0cb1 100644 --- a/lib/xero-ruby/api/accounting_api.rb +++ b/lib/xero-ruby/api/accounting_api.rb @@ -50,18 +50,7 @@ def create_account_with_http_info(xero_tenant_id, account, opts = {}) local_var_path = '/Accounts' # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -149,18 +138,7 @@ def create_account_attachment_by_file_name_with_http_info(xero_tenant_id, accoun local_var_path = '/Accounts/{AccountID}/Attachments/{FileName}'.sub('{' + 'AccountID' + '}', account_id.to_s).sub('{' + 'FileName' + '}', file_name.to_s) # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -248,18 +226,7 @@ def create_bank_transaction_attachment_by_file_name_with_http_info(xero_tenant_i local_var_path = '/BankTransactions/{BankTransactionID}/Attachments/{FileName}'.sub('{' + 'BankTransactionID' + '}', bank_transaction_id.to_s).sub('{' + 'FileName' + '}', file_name.to_s) # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -341,18 +308,7 @@ def create_bank_transaction_history_record_with_http_info(xero_tenant_id, bank_t local_var_path = '/BankTransactions/{BankTransactionID}/History'.sub('{' + 'BankTransactionID' + '}', bank_transaction_id.to_s) # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -432,18 +388,7 @@ def create_bank_transactions_with_http_info(xero_tenant_id, bank_transactions, o local_var_path = '/BankTransactions' # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -521,18 +466,7 @@ def create_bank_transfer_with_http_info(xero_tenant_id, bank_transfers, opts = { local_var_path = '/BankTransfers' # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -618,18 +552,7 @@ def create_bank_transfer_attachment_by_file_name_with_http_info(xero_tenant_id, local_var_path = '/BankTransfers/{BankTransferID}/Attachments/{FileName}'.sub('{' + 'BankTransferID' + '}', bank_transfer_id.to_s).sub('{' + 'FileName' + '}', file_name.to_s) # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -709,18 +632,7 @@ def create_bank_transfer_history_record_with_http_info(xero_tenant_id, bank_tran local_var_path = '/BankTransfers/{BankTransferID}/History'.sub('{' + 'BankTransferID' + '}', bank_transfer_id.to_s) # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -798,18 +710,7 @@ def create_batch_payment_with_http_info(xero_tenant_id, batch_payments, opts = { local_var_path = '/BatchPayments' # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -892,18 +793,7 @@ def create_batch_payment_history_record_with_http_info(xero_tenant_id, batch_pay local_var_path = '/BatchPayments/{BatchPaymentID}/History'.sub('{' + 'BatchPaymentID' + '}', batch_payment_id.to_s) # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -985,18 +875,7 @@ def create_branding_theme_payment_services_with_http_info(xero_tenant_id, brandi local_var_path = '/BrandingThemes/{BrandingThemeID}/PaymentServices'.sub('{' + 'BrandingThemeID' + '}', branding_theme_id.to_s) # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -1082,18 +961,7 @@ def create_contact_attachment_by_file_name_with_http_info(xero_tenant_id, contac local_var_path = '/Contacts/{ContactID}/Attachments/{FileName}'.sub('{' + 'ContactID' + '}', contact_id.to_s).sub('{' + 'FileName' + '}', file_name.to_s) # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -1169,18 +1037,7 @@ def create_contact_group_with_http_info(xero_tenant_id, contact_groups, opts = { local_var_path = '/ContactGroups' # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -1262,18 +1119,7 @@ def create_contact_group_contacts_with_http_info(xero_tenant_id, contact_group_i local_var_path = '/ContactGroups/{ContactGroupID}/Contacts'.sub('{' + 'ContactGroupID' + '}', contact_group_id.to_s) # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -1355,18 +1201,7 @@ def create_contact_history_with_http_info(xero_tenant_id, contact_id, history_re local_var_path = '/Contacts/{ContactID}/History'.sub('{' + 'ContactID' + '}', contact_id.to_s) # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -1444,18 +1279,7 @@ def create_contacts_with_http_info(xero_tenant_id, contacts, opts = {}) local_var_path = '/Contacts' # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -1540,18 +1364,7 @@ def create_credit_note_allocation_with_http_info(xero_tenant_id, credit_note_id, local_var_path = '/CreditNotes/{CreditNoteID}/Allocations'.sub('{' + 'CreditNoteID' + '}', credit_note_id.to_s) # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -1642,18 +1455,7 @@ def create_credit_note_attachment_by_file_name_with_http_info(xero_tenant_id, cr local_var_path = '/CreditNotes/{CreditNoteID}/Attachments/{FileName}'.sub('{' + 'CreditNoteID' + '}', credit_note_id.to_s).sub('{' + 'FileName' + '}', file_name.to_s) # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -1736,18 +1538,7 @@ def create_credit_note_history_with_http_info(xero_tenant_id, credit_note_id, hi local_var_path = '/CreditNotes/{CreditNoteID}/History'.sub('{' + 'CreditNoteID' + '}', credit_note_id.to_s) # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -1827,18 +1618,7 @@ def create_credit_notes_with_http_info(xero_tenant_id, credit_notes, opts = {}) local_var_path = '/CreditNotes' # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -1914,18 +1694,7 @@ def create_currency_with_http_info(xero_tenant_id, currency, opts = {}) local_var_path = '/Currencies' # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -2003,18 +1772,7 @@ def create_employees_with_http_info(xero_tenant_id, employees, opts = {}) local_var_path = '/Employees' # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -2097,18 +1855,7 @@ def create_expense_claim_history_with_http_info(xero_tenant_id, expense_claim_id local_var_path = '/ExpenseClaims/{ExpenseClaimID}/History'.sub('{' + 'ExpenseClaimID' + '}', expense_claim_id.to_s) # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -2184,18 +1931,7 @@ def create_expense_claims_with_http_info(xero_tenant_id, expense_claims, opts = local_var_path = '/ExpenseClaims' # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -2285,18 +2021,7 @@ def create_invoice_attachment_by_file_name_with_http_info(xero_tenant_id, invoic local_var_path = '/Invoices/{InvoiceID}/Attachments/{FileName}'.sub('{' + 'InvoiceID' + '}', invoice_id.to_s).sub('{' + 'FileName' + '}', file_name.to_s) # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -2379,18 +2104,7 @@ def create_invoice_history_with_http_info(xero_tenant_id, invoice_id, history_re local_var_path = '/Invoices/{InvoiceID}/History'.sub('{' + 'InvoiceID' + '}', invoice_id.to_s) # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -2470,18 +2184,7 @@ def create_invoices_with_http_info(xero_tenant_id, invoices, opts = {}) local_var_path = '/Invoices' # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -2565,18 +2268,7 @@ def create_item_history_with_http_info(xero_tenant_id, item_id, history_records, local_var_path = '/Items/{ItemID}/History'.sub('{' + 'ItemID' + '}', item_id.to_s) # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -2656,18 +2348,7 @@ def create_items_with_http_info(xero_tenant_id, items, opts = {}) local_var_path = '/Items' # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -2745,18 +2426,7 @@ def create_linked_transaction_with_http_info(xero_tenant_id, linked_transaction, local_var_path = '/LinkedTransactions' # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -2844,18 +2514,7 @@ def create_manual_journal_attachment_by_file_name_with_http_info(xero_tenant_id, local_var_path = '/ManualJournals/{ManualJournalID}/Attachments/{FileName}'.sub('{' + 'ManualJournalID' + '}', manual_journal_id.to_s).sub('{' + 'FileName' + '}', file_name.to_s) # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -2933,18 +2592,7 @@ def create_manual_journals_with_http_info(xero_tenant_id, manual_journals, opts local_var_path = '/ManualJournals' # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -3029,18 +2677,7 @@ def create_overpayment_allocations_with_http_info(xero_tenant_id, overpayment_id local_var_path = '/Overpayments/{OverpaymentID}/Allocations'.sub('{' + 'OverpaymentID' + '}', overpayment_id.to_s) # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -3123,18 +2760,7 @@ def create_overpayment_history_with_http_info(xero_tenant_id, overpayment_id, hi local_var_path = '/Overpayments/{OverpaymentID}/History'.sub('{' + 'OverpaymentID' + '}', overpayment_id.to_s) # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -3210,18 +2836,7 @@ def create_payment_with_http_info(xero_tenant_id, payment, opts = {}) local_var_path = '/Payments' # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -3303,18 +2918,7 @@ def create_payment_history_with_http_info(xero_tenant_id, payment_id, history_re local_var_path = '/Payments/{PaymentID}/History'.sub('{' + 'PaymentID' + '}', payment_id.to_s) # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -3390,18 +2994,7 @@ def create_payment_service_with_http_info(xero_tenant_id, payment_services, opts local_var_path = '/PaymentServices' # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -3479,18 +3072,7 @@ def create_payments_with_http_info(xero_tenant_id, payments, opts = {}) local_var_path = '/Payments' # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -3575,18 +3157,7 @@ def create_prepayment_allocations_with_http_info(xero_tenant_id, prepayment_id, local_var_path = '/Prepayments/{PrepaymentID}/Allocations'.sub('{' + 'PrepaymentID' + '}', prepayment_id.to_s) # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -3669,18 +3240,7 @@ def create_prepayment_history_with_http_info(xero_tenant_id, prepayment_id, hist local_var_path = '/Prepayments/{PrepaymentID}/History'.sub('{' + 'PrepaymentID' + '}', prepayment_id.to_s) # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -3762,18 +3322,7 @@ def create_purchase_order_history_with_http_info(xero_tenant_id, purchase_order_ local_var_path = '/PurchaseOrders/{PurchaseOrderID}/History'.sub('{' + 'PurchaseOrderID' + '}', purchase_order_id.to_s) # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -3851,18 +3400,7 @@ def create_purchase_orders_with_http_info(xero_tenant_id, purchase_orders, opts local_var_path = '/PurchaseOrders' # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -3951,18 +3489,7 @@ def create_quote_attachment_by_file_name_with_http_info(xero_tenant_id, quote_id local_var_path = '/Quotes/{QuoteID}/Attachments/{FileName}'.sub('{' + 'QuoteID' + '}', quote_id.to_s).sub('{' + 'FileName' + '}', file_name.to_s) # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -4044,18 +3571,7 @@ def create_quote_history_with_http_info(xero_tenant_id, quote_id, history_record local_var_path = '/Quotes/{QuoteID}/History'.sub('{' + 'QuoteID' + '}', quote_id.to_s) # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -4133,18 +3649,7 @@ def create_quotes_with_http_info(xero_tenant_id, quotes, opts = {}) local_var_path = '/Quotes' # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -4223,18 +3728,7 @@ def create_receipt_with_http_info(xero_tenant_id, receipts, opts = {}) local_var_path = '/Receipts' # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -4323,18 +3817,7 @@ def create_receipt_attachment_by_file_name_with_http_info(xero_tenant_id, receip local_var_path = '/Receipts/{ReceiptID}/Attachments/{FileName}'.sub('{' + 'ReceiptID' + '}', receipt_id.to_s).sub('{' + 'FileName' + '}', file_name.to_s) # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -4416,18 +3899,7 @@ def create_receipt_history_with_http_info(xero_tenant_id, receipt_id, history_re local_var_path = '/Receipts/{ReceiptID}/History'.sub('{' + 'ReceiptID' + '}', receipt_id.to_s) # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -4515,18 +3987,7 @@ def create_repeating_invoice_attachment_by_file_name_with_http_info(xero_tenant_ local_var_path = '/RepeatingInvoices/{RepeatingInvoiceID}/Attachments/{FileName}'.sub('{' + 'RepeatingInvoiceID' + '}', repeating_invoice_id.to_s).sub('{' + 'FileName' + '}', file_name.to_s) # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -4608,18 +4069,7 @@ def create_repeating_invoice_history_with_http_info(xero_tenant_id, repeating_in local_var_path = '/RepeatingInvoices/{RepeatingInvoiceID}/History'.sub('{' + 'RepeatingInvoiceID' + '}', repeating_invoice_id.to_s) # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -4695,18 +4145,7 @@ def create_tax_rates_with_http_info(xero_tenant_id, tax_rates, opts = {}) local_var_path = '/TaxRates' # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -4782,18 +4221,7 @@ def create_tracking_category_with_http_info(xero_tenant_id, tracking_category, o local_var_path = '/TrackingCategories' # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -4875,18 +4303,7 @@ def create_tracking_options_with_http_info(xero_tenant_id, tracking_category_id, local_var_path = '/TrackingCategories/{TrackingCategoryID}/Options'.sub('{' + 'TrackingCategoryID' + '}', tracking_category_id.to_s) # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -4962,18 +4379,7 @@ def delete_account_with_http_info(xero_tenant_id, account_id, opts = {}) local_var_path = '/Accounts/{AccountID}'.sub('{' + 'AccountID' + '}', account_id.to_s) # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -5053,18 +4459,7 @@ def delete_contact_group_contact_with_http_info(xero_tenant_id, contact_group_id local_var_path = '/ContactGroups/{ContactGroupID}/Contacts/{ContactID}'.sub('{' + 'ContactGroupID' + '}', contact_group_id.to_s).sub('{' + 'ContactID' + '}', contact_id.to_s) # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -5138,18 +4533,7 @@ def delete_contact_group_contacts_with_http_info(xero_tenant_id, contact_group_i local_var_path = '/ContactGroups/{ContactGroupID}/Contacts'.sub('{' + 'ContactGroupID' + '}', contact_group_id.to_s) # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -5221,18 +4605,7 @@ def delete_item_with_http_info(xero_tenant_id, item_id, opts = {}) local_var_path = '/Items/{ItemID}'.sub('{' + 'ItemID' + '}', item_id.to_s) # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -5306,18 +4679,7 @@ def delete_linked_transaction_with_http_info(xero_tenant_id, linked_transaction_ local_var_path = '/LinkedTransactions/{LinkedTransactionID}'.sub('{' + 'LinkedTransactionID' + '}', linked_transaction_id.to_s) # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -5397,18 +4759,7 @@ def delete_payment_with_http_info(xero_tenant_id, payment_id, payment_delete, op local_var_path = '/Payments/{PaymentID}'.sub('{' + 'PaymentID' + '}', payment_id.to_s) # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -5484,18 +4835,7 @@ def delete_tracking_category_with_http_info(xero_tenant_id, tracking_category_id local_var_path = '/TrackingCategories/{TrackingCategoryID}'.sub('{' + 'TrackingCategoryID' + '}', tracking_category_id.to_s) # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -5575,18 +4915,7 @@ def delete_tracking_options_with_http_info(xero_tenant_id, tracking_category_id, local_var_path = '/TrackingCategories/{TrackingCategoryID}/Options/{TrackingOptionID}'.sub('{' + 'TrackingCategoryID' + '}', tracking_category_id.to_s).sub('{' + 'TrackingOptionID' + '}', tracking_option_id.to_s) # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -5666,18 +4995,7 @@ def email_invoice_with_http_info(xero_tenant_id, invoice_id, request_empty, opts local_var_path = '/Invoices/{InvoiceID}/Email'.sub('{' + 'InvoiceID' + '}', invoice_id.to_s) # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -5753,18 +5071,7 @@ def get_account_with_http_info(xero_tenant_id, account_id, opts = {}) local_var_path = '/Accounts/{AccountID}'.sub('{' + 'AccountID' + '}', account_id.to_s) # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -5850,18 +5157,7 @@ def get_account_attachment_by_file_name_with_http_info(xero_tenant_id, account_i local_var_path = '/Accounts/{AccountID}/Attachments/{FileName}'.sub('{' + 'AccountID' + '}', account_id.to_s).sub('{' + 'FileName' + '}', file_name.to_s) # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -5948,18 +5244,7 @@ def get_account_attachment_by_id_with_http_info(xero_tenant_id, account_id, atta local_var_path = '/Accounts/{AccountID}/Attachments/{AttachmentID}'.sub('{' + 'AccountID' + '}', account_id.to_s).sub('{' + 'AttachmentID' + '}', attachment_id.to_s) # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -6034,18 +5319,7 @@ def get_account_attachments_with_http_info(xero_tenant_id, account_id, opts = {} local_var_path = '/Accounts/{AccountID}/Attachments'.sub('{' + 'AccountID' + '}', account_id.to_s) # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -6119,18 +5393,7 @@ def get_accounts_with_http_info(xero_tenant_id, opts = {}) local_var_path = '/Accounts' # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -6209,18 +5472,7 @@ def get_bank_transaction_with_http_info(xero_tenant_id, bank_transaction_id, opt local_var_path = '/BankTransactions/{BankTransactionID}'.sub('{' + 'BankTransactionID' + '}', bank_transaction_id.to_s) # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -6307,18 +5559,7 @@ def get_bank_transaction_attachment_by_file_name_with_http_info(xero_tenant_id, local_var_path = '/BankTransactions/{BankTransactionID}/Attachments/{FileName}'.sub('{' + 'BankTransactionID' + '}', bank_transaction_id.to_s).sub('{' + 'FileName' + '}', file_name.to_s) # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -6405,18 +5646,7 @@ def get_bank_transaction_attachment_by_id_with_http_info(xero_tenant_id, bank_tr local_var_path = '/BankTransactions/{BankTransactionID}/Attachments/{AttachmentID}'.sub('{' + 'BankTransactionID' + '}', bank_transaction_id.to_s).sub('{' + 'AttachmentID' + '}', attachment_id.to_s) # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -6491,18 +5721,7 @@ def get_bank_transaction_attachments_with_http_info(xero_tenant_id, bank_transac local_var_path = '/BankTransactions/{BankTransactionID}/Attachments'.sub('{' + 'BankTransactionID' + '}', bank_transaction_id.to_s) # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -6580,18 +5799,7 @@ def get_bank_transactions_with_http_info(xero_tenant_id, opts = {}) local_var_path = '/BankTransactions' # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -6670,18 +5878,7 @@ def get_bank_transactions_history_with_http_info(xero_tenant_id, bank_transactio local_var_path = '/BankTransactions/{BankTransactionID}/History'.sub('{' + 'BankTransactionID' + '}', bank_transaction_id.to_s) # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -6755,18 +5952,7 @@ def get_bank_transfer_with_http_info(xero_tenant_id, bank_transfer_id, opts = {} local_var_path = '/BankTransfers/{BankTransferID}'.sub('{' + 'BankTransferID' + '}', bank_transfer_id.to_s) # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -6852,18 +6038,7 @@ def get_bank_transfer_attachment_by_file_name_with_http_info(xero_tenant_id, ban local_var_path = '/BankTransfers/{BankTransferID}/Attachments/{FileName}'.sub('{' + 'BankTransferID' + '}', bank_transfer_id.to_s).sub('{' + 'FileName' + '}', file_name.to_s) # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -6950,18 +6125,7 @@ def get_bank_transfer_attachment_by_id_with_http_info(xero_tenant_id, bank_trans local_var_path = '/BankTransfers/{BankTransferID}/Attachments/{AttachmentID}'.sub('{' + 'BankTransferID' + '}', bank_transfer_id.to_s).sub('{' + 'AttachmentID' + '}', attachment_id.to_s) # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -7036,18 +6200,7 @@ def get_bank_transfer_attachments_with_http_info(xero_tenant_id, bank_transfer_i local_var_path = '/BankTransfers/{BankTransferID}/Attachments'.sub('{' + 'BankTransferID' + '}', bank_transfer_id.to_s) # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -7121,18 +6274,7 @@ def get_bank_transfer_history_with_http_info(xero_tenant_id, bank_transfer_id, o local_var_path = '/BankTransfers/{BankTransferID}/History'.sub('{' + 'BankTransferID' + '}', bank_transfer_id.to_s) # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -7206,18 +6348,7 @@ def get_bank_transfers_with_http_info(xero_tenant_id, opts = {}) local_var_path = '/BankTransfers' # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -7294,18 +6425,7 @@ def get_batch_payment_history_with_http_info(xero_tenant_id, batch_payment_id, o local_var_path = '/BatchPayments/{BatchPaymentID}/History'.sub('{' + 'BatchPaymentID' + '}', batch_payment_id.to_s) # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -7379,18 +6499,7 @@ def get_batch_payments_with_http_info(xero_tenant_id, opts = {}) local_var_path = '/BatchPayments' # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -7467,18 +6576,7 @@ def get_branding_theme_with_http_info(xero_tenant_id, branding_theme_id, opts = local_var_path = '/BrandingThemes/{BrandingThemeID}'.sub('{' + 'BrandingThemeID' + '}', branding_theme_id.to_s) # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -7552,18 +6650,7 @@ def get_branding_theme_payment_services_with_http_info(xero_tenant_id, branding_ local_var_path = '/BrandingThemes/{BrandingThemeID}/PaymentServices'.sub('{' + 'BrandingThemeID' + '}', branding_theme_id.to_s) # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -7631,18 +6718,7 @@ def get_branding_themes_with_http_info(xero_tenant_id, opts = {}) local_var_path = '/BrandingThemes' # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -7716,18 +6792,7 @@ def get_contact_with_http_info(xero_tenant_id, contact_id, opts = {}) local_var_path = '/Contacts/{ContactID}'.sub('{' + 'ContactID' + '}', contact_id.to_s) # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -7813,18 +6878,7 @@ def get_contact_attachment_by_file_name_with_http_info(xero_tenant_id, contact_i local_var_path = '/Contacts/{ContactID}/Attachments/{FileName}'.sub('{' + 'ContactID' + '}', contact_id.to_s).sub('{' + 'FileName' + '}', file_name.to_s) # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -7911,18 +6965,7 @@ def get_contact_attachment_by_id_with_http_info(xero_tenant_id, contact_id, atta local_var_path = '/Contacts/{ContactID}/Attachments/{AttachmentID}'.sub('{' + 'ContactID' + '}', contact_id.to_s).sub('{' + 'AttachmentID' + '}', attachment_id.to_s) # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -7997,18 +7040,7 @@ def get_contact_attachments_with_http_info(xero_tenant_id, contact_id, opts = {} local_var_path = '/Contacts/{ContactID}/Attachments'.sub('{' + 'ContactID' + '}', contact_id.to_s) # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -8082,18 +7114,7 @@ def get_contact_by_contact_number_with_http_info(xero_tenant_id, contact_number, local_var_path = '/Contacts/{ContactNumber}'.sub('{' + 'ContactNumber' + '}', contact_number.to_s) # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -8167,18 +7188,7 @@ def get_contact_cis_settings_with_http_info(xero_tenant_id, contact_id, opts = { local_var_path = '/Contacts/{ContactID}/CISSettings'.sub('{' + 'ContactID' + '}', contact_id.to_s) # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -8252,18 +7262,7 @@ def get_contact_group_with_http_info(xero_tenant_id, contact_group_id, opts = {} local_var_path = '/ContactGroups/{ContactGroupID}'.sub('{' + 'ContactGroupID' + '}', contact_group_id.to_s) # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -8335,18 +7334,7 @@ def get_contact_groups_with_http_info(xero_tenant_id, opts = {}) local_var_path = '/ContactGroups' # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -8422,18 +7410,7 @@ def get_contact_history_with_http_info(xero_tenant_id, contact_id, opts = {}) local_var_path = '/Contacts/{ContactID}/History'.sub('{' + 'ContactID' + '}', contact_id.to_s) # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -8513,18 +7490,7 @@ def get_contacts_with_http_info(xero_tenant_id, opts = {}) local_var_path = '/Contacts' # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -8606,18 +7572,7 @@ def get_credit_note_with_http_info(xero_tenant_id, credit_note_id, opts = {}) local_var_path = '/CreditNotes/{CreditNoteID}'.sub('{' + 'CreditNoteID' + '}', credit_note_id.to_s) # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -8692,18 +7647,7 @@ def get_credit_note_as_pdf_with_http_info(xero_tenant_id, credit_note_id, opts = local_var_path = '/CreditNotes/{CreditNoteID}'.sub('{' + 'CreditNoteID' + '}', credit_note_id.to_s) # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -8789,18 +7733,7 @@ def get_credit_note_attachment_by_file_name_with_http_info(xero_tenant_id, credi local_var_path = '/CreditNotes/{CreditNoteID}/Attachments/{FileName}'.sub('{' + 'CreditNoteID' + '}', credit_note_id.to_s).sub('{' + 'FileName' + '}', file_name.to_s) # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -8887,18 +7820,7 @@ def get_credit_note_attachment_by_id_with_http_info(xero_tenant_id, credit_note_ local_var_path = '/CreditNotes/{CreditNoteID}/Attachments/{AttachmentID}'.sub('{' + 'CreditNoteID' + '}', credit_note_id.to_s).sub('{' + 'AttachmentID' + '}', attachment_id.to_s) # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -8973,18 +7895,7 @@ def get_credit_note_attachments_with_http_info(xero_tenant_id, credit_note_id, o local_var_path = '/CreditNotes/{CreditNoteID}/Attachments'.sub('{' + 'CreditNoteID' + '}', credit_note_id.to_s) # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -9058,18 +7969,7 @@ def get_credit_note_history_with_http_info(xero_tenant_id, credit_note_id, opts local_var_path = '/CreditNotes/{CreditNoteID}/History'.sub('{' + 'CreditNoteID' + '}', credit_note_id.to_s) # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -9147,18 +8047,7 @@ def get_credit_notes_with_http_info(xero_tenant_id, opts = {}) local_var_path = '/CreditNotes' # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -9235,18 +8124,7 @@ def get_currencies_with_http_info(xero_tenant_id, opts = {}) local_var_path = '/Currencies' # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -9322,18 +8200,7 @@ def get_employee_with_http_info(xero_tenant_id, employee_id, opts = {}) local_var_path = '/Employees/{EmployeeID}'.sub('{' + 'EmployeeID' + '}', employee_id.to_s) # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -9407,18 +8274,7 @@ def get_employees_with_http_info(xero_tenant_id, opts = {}) local_var_path = '/Employees' # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -9495,18 +8351,7 @@ def get_expense_claim_with_http_info(xero_tenant_id, expense_claim_id, opts = {} local_var_path = '/ExpenseClaims/{ExpenseClaimID}'.sub('{' + 'ExpenseClaimID' + '}', expense_claim_id.to_s) # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -9580,18 +8425,7 @@ def get_expense_claim_history_with_http_info(xero_tenant_id, expense_claim_id, o local_var_path = '/ExpenseClaims/{ExpenseClaimID}/History'.sub('{' + 'ExpenseClaimID' + '}', expense_claim_id.to_s) # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -9665,18 +8499,7 @@ def get_expense_claims_with_http_info(xero_tenant_id, opts = {}) local_var_path = '/ExpenseClaims' # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -9755,18 +8578,7 @@ def get_invoice_with_http_info(xero_tenant_id, invoice_id, opts = {}) local_var_path = '/Invoices/{InvoiceID}'.sub('{' + 'InvoiceID' + '}', invoice_id.to_s) # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -9841,18 +8653,7 @@ def get_invoice_as_pdf_with_http_info(xero_tenant_id, invoice_id, opts = {}) local_var_path = '/Invoices/{InvoiceID}'.sub('{' + 'InvoiceID' + '}', invoice_id.to_s) # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -9938,18 +8739,7 @@ def get_invoice_attachment_by_file_name_with_http_info(xero_tenant_id, invoice_i local_var_path = '/Invoices/{InvoiceID}/Attachments/{FileName}'.sub('{' + 'InvoiceID' + '}', invoice_id.to_s).sub('{' + 'FileName' + '}', file_name.to_s) # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -10036,18 +8826,7 @@ def get_invoice_attachment_by_id_with_http_info(xero_tenant_id, invoice_id, atta local_var_path = '/Invoices/{InvoiceID}/Attachments/{AttachmentID}'.sub('{' + 'InvoiceID' + '}', invoice_id.to_s).sub('{' + 'AttachmentID' + '}', attachment_id.to_s) # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -10122,18 +8901,7 @@ def get_invoice_attachments_with_http_info(xero_tenant_id, invoice_id, opts = {} local_var_path = '/Invoices/{InvoiceID}/Attachments'.sub('{' + 'InvoiceID' + '}', invoice_id.to_s) # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -10207,18 +8975,7 @@ def get_invoice_history_with_http_info(xero_tenant_id, invoice_id, opts = {}) local_var_path = '/Invoices/{InvoiceID}/History'.sub('{' + 'InvoiceID' + '}', invoice_id.to_s) # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -10286,18 +9043,7 @@ def get_invoice_reminders_with_http_info(xero_tenant_id, opts = {}) local_var_path = '/InvoiceReminders/Settings' # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -10387,18 +9133,7 @@ def get_invoices_with_http_info(xero_tenant_id, opts = {}) local_var_path = '/Invoices' # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -10485,18 +9220,7 @@ def get_item_with_http_info(xero_tenant_id, item_id, opts = {}) local_var_path = '/Items/{ItemID}'.sub('{' + 'ItemID' + '}', item_id.to_s) # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -10571,18 +9295,7 @@ def get_item_history_with_http_info(xero_tenant_id, item_id, opts = {}) local_var_path = '/Items/{ItemID}/History'.sub('{' + 'ItemID' + '}', item_id.to_s) # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -10658,18 +9371,7 @@ def get_items_with_http_info(xero_tenant_id, opts = {}) local_var_path = '/Items' # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -10747,18 +9449,7 @@ def get_journal_with_http_info(xero_tenant_id, journal_id, opts = {}) local_var_path = '/Journals/{JournalID}'.sub('{' + 'JournalID' + '}', journal_id.to_s) # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -10832,18 +9523,7 @@ def get_journals_with_http_info(xero_tenant_id, opts = {}) local_var_path = '/Journals' # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -10920,18 +9600,7 @@ def get_linked_transaction_with_http_info(xero_tenant_id, linked_transaction_id, local_var_path = '/LinkedTransactions/{LinkedTransactionID}'.sub('{' + 'LinkedTransactionID' + '}', linked_transaction_id.to_s) # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -11011,18 +9680,7 @@ def get_linked_transactions_with_http_info(xero_tenant_id, opts = {}) local_var_path = '/LinkedTransactions' # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -11102,18 +9760,7 @@ def get_manual_journal_with_http_info(xero_tenant_id, manual_journal_id, opts = local_var_path = '/ManualJournals/{ManualJournalID}'.sub('{' + 'ManualJournalID' + '}', manual_journal_id.to_s) # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -11199,18 +9846,7 @@ def get_manual_journal_attachment_by_file_name_with_http_info(xero_tenant_id, ma local_var_path = '/ManualJournals/{ManualJournalID}/Attachments/{FileName}'.sub('{' + 'ManualJournalID' + '}', manual_journal_id.to_s).sub('{' + 'FileName' + '}', file_name.to_s) # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -11297,18 +9933,7 @@ def get_manual_journal_attachment_by_id_with_http_info(xero_tenant_id, manual_jo local_var_path = '/ManualJournals/{ManualJournalID}/Attachments/{AttachmentID}'.sub('{' + 'ManualJournalID' + '}', manual_journal_id.to_s).sub('{' + 'AttachmentID' + '}', attachment_id.to_s) # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -11383,18 +10008,7 @@ def get_manual_journal_attachments_with_http_info(xero_tenant_id, manual_journal local_var_path = '/ManualJournals/{ManualJournalID}/Attachments'.sub('{' + 'ManualJournalID' + '}', manual_journal_id.to_s) # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -11470,18 +10084,7 @@ def get_manual_journals_with_http_info(xero_tenant_id, opts = {}) local_var_path = '/ManualJournals' # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -11559,18 +10162,7 @@ def get_online_invoice_with_http_info(xero_tenant_id, invoice_id, opts = {}) local_var_path = '/Invoices/{InvoiceID}/OnlineInvoice'.sub('{' + 'InvoiceID' + '}', invoice_id.to_s) # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -11644,18 +10236,7 @@ def get_organisation_cis_settings_with_http_info(xero_tenant_id, organisation_id local_var_path = '/Organisation/{OrganisationID}/CISSettings'.sub('{' + 'OrganisationID' + '}', organisation_id.to_s) # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -11723,18 +10304,7 @@ def get_organisations_with_http_info(xero_tenant_id, opts = {}) local_var_path = '/Organisation' # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -11808,18 +10378,7 @@ def get_overpayment_with_http_info(xero_tenant_id, overpayment_id, opts = {}) local_var_path = '/Overpayments/{OverpaymentID}'.sub('{' + 'OverpaymentID' + '}', overpayment_id.to_s) # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -11893,18 +10452,7 @@ def get_overpayment_history_with_http_info(xero_tenant_id, overpayment_id, opts local_var_path = '/Overpayments/{OverpaymentID}/History'.sub('{' + 'OverpaymentID' + '}', overpayment_id.to_s) # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -11982,18 +10530,7 @@ def get_overpayments_with_http_info(xero_tenant_id, opts = {}) local_var_path = '/Overpayments' # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -12072,18 +10609,7 @@ def get_payment_with_http_info(xero_tenant_id, payment_id, opts = {}) local_var_path = '/Payments/{PaymentID}'.sub('{' + 'PaymentID' + '}', payment_id.to_s) # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -12157,18 +10683,7 @@ def get_payment_history_with_http_info(xero_tenant_id, payment_id, opts = {}) local_var_path = '/Payments/{PaymentID}/History'.sub('{' + 'PaymentID' + '}', payment_id.to_s) # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -12236,18 +10751,7 @@ def get_payment_services_with_http_info(xero_tenant_id, opts = {}) local_var_path = '/PaymentServices' # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -12323,18 +10827,7 @@ def get_payments_with_http_info(xero_tenant_id, opts = {}) local_var_path = '/Payments' # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -12412,18 +10905,7 @@ def get_prepayment_with_http_info(xero_tenant_id, prepayment_id, opts = {}) local_var_path = '/Prepayments/{PrepaymentID}'.sub('{' + 'PrepaymentID' + '}', prepayment_id.to_s) # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -12497,18 +10979,7 @@ def get_prepayment_history_with_http_info(xero_tenant_id, prepayment_id, opts = local_var_path = '/Prepayments/{PrepaymentID}/History'.sub('{' + 'PrepaymentID' + '}', prepayment_id.to_s) # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -12586,18 +11057,7 @@ def get_prepayments_with_http_info(xero_tenant_id, opts = {}) local_var_path = '/Prepayments' # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -12676,18 +11136,7 @@ def get_purchase_order_with_http_info(xero_tenant_id, purchase_order_id, opts = local_var_path = '/PurchaseOrders/{PurchaseOrderID}'.sub('{' + 'PurchaseOrderID' + '}', purchase_order_id.to_s) # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -12761,18 +11210,7 @@ def get_purchase_order_as_pdf_with_http_info(xero_tenant_id, purchase_order_id, local_var_path = '/PurchaseOrders/{PurchaseOrderID}'.sub('{' + 'PurchaseOrderID' + '}', purchase_order_id.to_s) # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -12846,18 +11284,7 @@ def get_purchase_order_by_number_with_http_info(xero_tenant_id, purchase_order_n local_var_path = '/PurchaseOrders/{PurchaseOrderNumber}'.sub('{' + 'PurchaseOrderNumber' + '}', purchase_order_number.to_s) # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -12931,18 +11358,7 @@ def get_purchase_order_history_with_http_info(xero_tenant_id, purchase_order_id, local_var_path = '/PurchaseOrders/{PurchaseOrderID}/History'.sub('{' + 'PurchaseOrderID' + '}', purchase_order_id.to_s) # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -13026,18 +11442,7 @@ def get_purchase_orders_with_http_info(xero_tenant_id, opts = {}) local_var_path = '/PurchaseOrders' # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -13117,18 +11522,7 @@ def get_quote_with_http_info(xero_tenant_id, quote_id, opts = {}) local_var_path = '/Quotes/{QuoteID}'.sub('{' + 'QuoteID' + '}', quote_id.to_s) # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -13202,18 +11596,7 @@ def get_quote_as_pdf_with_http_info(xero_tenant_id, quote_id, opts = {}) local_var_path = '/Quotes/{QuoteID}'.sub('{' + 'QuoteID' + '}', quote_id.to_s) # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -13299,18 +11682,7 @@ def get_quote_attachment_by_file_name_with_http_info(xero_tenant_id, quote_id, f local_var_path = '/Quotes/{QuoteID}/Attachments/{FileName}'.sub('{' + 'QuoteID' + '}', quote_id.to_s).sub('{' + 'FileName' + '}', file_name.to_s) # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -13397,18 +11769,7 @@ def get_quote_attachment_by_id_with_http_info(xero_tenant_id, quote_id, attachme local_var_path = '/Quotes/{QuoteID}/Attachments/{AttachmentID}'.sub('{' + 'QuoteID' + '}', quote_id.to_s).sub('{' + 'AttachmentID' + '}', attachment_id.to_s) # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -13483,18 +11844,7 @@ def get_quote_attachments_with_http_info(xero_tenant_id, quote_id, opts = {}) local_var_path = '/Quotes/{QuoteID}/Attachments'.sub('{' + 'QuoteID' + '}', quote_id.to_s) # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -13568,18 +11918,7 @@ def get_quote_history_with_http_info(xero_tenant_id, quote_id, opts = {}) local_var_path = '/Quotes/{QuoteID}/History'.sub('{' + 'QuoteID' + '}', quote_id.to_s) # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -13665,18 +12004,7 @@ def get_quotes_with_http_info(xero_tenant_id, opts = {}) local_var_path = '/Quotes' # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -13761,18 +12089,7 @@ def get_receipt_with_http_info(xero_tenant_id, receipt_id, opts = {}) local_var_path = '/Receipts/{ReceiptID}'.sub('{' + 'ReceiptID' + '}', receipt_id.to_s) # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -13859,18 +12176,7 @@ def get_receipt_attachment_by_file_name_with_http_info(xero_tenant_id, receipt_i local_var_path = '/Receipts/{ReceiptID}/Attachments/{FileName}'.sub('{' + 'ReceiptID' + '}', receipt_id.to_s).sub('{' + 'FileName' + '}', file_name.to_s) # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -13957,18 +12263,7 @@ def get_receipt_attachment_by_id_with_http_info(xero_tenant_id, receipt_id, atta local_var_path = '/Receipts/{ReceiptID}/Attachments/{AttachmentID}'.sub('{' + 'ReceiptID' + '}', receipt_id.to_s).sub('{' + 'AttachmentID' + '}', attachment_id.to_s) # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -14043,18 +12338,7 @@ def get_receipt_attachments_with_http_info(xero_tenant_id, receipt_id, opts = {} local_var_path = '/Receipts/{ReceiptID}/Attachments'.sub('{' + 'ReceiptID' + '}', receipt_id.to_s) # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -14128,18 +12412,7 @@ def get_receipt_history_with_http_info(xero_tenant_id, receipt_id, opts = {}) local_var_path = '/Receipts/{ReceiptID}/History'.sub('{' + 'ReceiptID' + '}', receipt_id.to_s) # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -14215,18 +12488,7 @@ def get_receipts_with_http_info(xero_tenant_id, opts = {}) local_var_path = '/Receipts' # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -14304,18 +12566,7 @@ def get_repeating_invoice_with_http_info(xero_tenant_id, repeating_invoice_id, o local_var_path = '/RepeatingInvoices/{RepeatingInvoiceID}'.sub('{' + 'RepeatingInvoiceID' + '}', repeating_invoice_id.to_s) # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -14401,18 +12652,7 @@ def get_repeating_invoice_attachment_by_file_name_with_http_info(xero_tenant_id, local_var_path = '/RepeatingInvoices/{RepeatingInvoiceID}/Attachments/{FileName}'.sub('{' + 'RepeatingInvoiceID' + '}', repeating_invoice_id.to_s).sub('{' + 'FileName' + '}', file_name.to_s) # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -14499,18 +12739,7 @@ def get_repeating_invoice_attachment_by_id_with_http_info(xero_tenant_id, repeat local_var_path = '/RepeatingInvoices/{RepeatingInvoiceID}/Attachments/{AttachmentID}'.sub('{' + 'RepeatingInvoiceID' + '}', repeating_invoice_id.to_s).sub('{' + 'AttachmentID' + '}', attachment_id.to_s) # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -14585,18 +12814,7 @@ def get_repeating_invoice_attachments_with_http_info(xero_tenant_id, repeating_i local_var_path = '/RepeatingInvoices/{RepeatingInvoiceID}/Attachments'.sub('{' + 'RepeatingInvoiceID' + '}', repeating_invoice_id.to_s) # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -14670,18 +12888,7 @@ def get_repeating_invoice_history_with_http_info(xero_tenant_id, repeating_invoi local_var_path = '/RepeatingInvoices/{RepeatingInvoiceID}/History'.sub('{' + 'RepeatingInvoiceID' + '}', repeating_invoice_id.to_s) # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -14753,18 +12960,7 @@ def get_repeating_invoices_with_http_info(xero_tenant_id, opts = {}) local_var_path = '/RepeatingInvoices' # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -14846,18 +13042,7 @@ def get_report_aged_payables_by_contact_with_http_info(xero_tenant_id, contact_i local_var_path = '/Reports/AgedPayablesByContact' # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -14941,18 +13126,7 @@ def get_report_aged_receivables_by_contact_with_http_info(xero_tenant_id, contac local_var_path = '/Reports/AgedReceivablesByContact' # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -15030,18 +13204,7 @@ def get_report_ba_sor_gst_with_http_info(xero_tenant_id, report_id, opts = {}) local_var_path = '/Reports/{ReportID}'.sub('{' + 'ReportID' + '}', report_id.to_s) # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -15109,18 +13272,7 @@ def get_report_ba_sor_gst_list_with_http_info(xero_tenant_id, opts = {}) local_var_path = '/Reports' # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -15206,18 +13358,7 @@ def get_report_balance_sheet_with_http_info(xero_tenant_id, opts = {}) local_var_path = '/Reports/BalanceSheet' # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -15296,18 +13437,7 @@ def get_report_bank_summary_with_http_info(xero_tenant_id, opts = {}) local_var_path = '/Reports/BankSummary' # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -15383,18 +13513,7 @@ def get_report_budget_summary_with_http_info(xero_tenant_id, opts = {}) local_var_path = '/Reports/BudgetSummary' # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -15467,18 +13586,7 @@ def get_report_executive_summary_with_http_info(xero_tenant_id, opts = {}) local_var_path = '/Reports/ExecutiveSummary' # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -15571,18 +13679,7 @@ def get_report_profit_and_loss_with_http_info(xero_tenant_id, opts = {}) local_var_path = '/Reports/ProfitAndLoss' # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -15662,18 +13759,7 @@ def get_report_ten_ninety_nine_with_http_info(xero_tenant_id, opts = {}) local_var_path = '/Reports/TenNinetyNine' # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -15746,18 +13832,7 @@ def get_report_trial_balance_with_http_info(xero_tenant_id, opts = {}) local_var_path = '/Reports/TrialBalance' # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -15833,18 +13908,7 @@ def get_tax_rates_with_http_info(xero_tenant_id, opts = {}) local_var_path = '/TaxRates' # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -15921,18 +13985,7 @@ def get_tracking_categories_with_http_info(xero_tenant_id, opts = {}) local_var_path = '/TrackingCategories' # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -16009,18 +14062,7 @@ def get_tracking_category_with_http_info(xero_tenant_id, tracking_category_id, o local_var_path = '/TrackingCategories/{TrackingCategoryID}'.sub('{' + 'TrackingCategoryID' + '}', tracking_category_id.to_s) # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -16094,18 +14136,7 @@ def get_user_with_http_info(xero_tenant_id, user_id, opts = {}) local_var_path = '/Users/{UserID}'.sub('{' + 'UserID' + '}', user_id.to_s) # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -16179,18 +14210,7 @@ def get_users_with_http_info(xero_tenant_id, opts = {}) local_var_path = '/Users' # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -16273,18 +14293,7 @@ def update_account_with_http_info(xero_tenant_id, account_id, accounts, opts = { local_var_path = '/Accounts/{AccountID}'.sub('{' + 'AccountID' + '}', account_id.to_s) # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -16372,18 +14381,7 @@ def update_account_attachment_by_file_name_with_http_info(xero_tenant_id, accoun local_var_path = '/Accounts/{AccountID}/Attachments/{FileName}'.sub('{' + 'AccountID' + '}', account_id.to_s).sub('{' + 'FileName' + '}', file_name.to_s) # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -16467,18 +14465,7 @@ def update_bank_transaction_with_http_info(xero_tenant_id, bank_transaction_id, local_var_path = '/BankTransactions/{BankTransactionID}'.sub('{' + 'BankTransactionID' + '}', bank_transaction_id.to_s) # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -16567,18 +14554,7 @@ def update_bank_transaction_attachment_by_file_name_with_http_info(xero_tenant_i local_var_path = '/BankTransactions/{BankTransactionID}/Attachments/{FileName}'.sub('{' + 'BankTransactionID' + '}', bank_transaction_id.to_s).sub('{' + 'FileName' + '}', file_name.to_s) # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -16664,18 +14640,7 @@ def update_bank_transfer_attachment_by_file_name_with_http_info(xero_tenant_id, local_var_path = '/BankTransfers/{BankTransferID}/Attachments/{FileName}'.sub('{' + 'BankTransferID' + '}', bank_transfer_id.to_s).sub('{' + 'FileName' + '}', file_name.to_s) # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -16755,18 +14720,7 @@ def update_contact_with_http_info(xero_tenant_id, contact_id, contacts, opts = { local_var_path = '/Contacts/{ContactID}'.sub('{' + 'ContactID' + '}', contact_id.to_s) # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -16852,18 +14806,7 @@ def update_contact_attachment_by_file_name_with_http_info(xero_tenant_id, contac local_var_path = '/Contacts/{ContactID}/Attachments/{FileName}'.sub('{' + 'ContactID' + '}', contact_id.to_s).sub('{' + 'FileName' + '}', file_name.to_s) # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -16945,18 +14888,7 @@ def update_contact_group_with_http_info(xero_tenant_id, contact_group_id, contac local_var_path = '/ContactGroups/{ContactGroupID}'.sub('{' + 'ContactGroupID' + '}', contact_group_id.to_s) # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -17040,18 +14972,7 @@ def update_credit_note_with_http_info(xero_tenant_id, credit_note_id, credit_not local_var_path = '/CreditNotes/{CreditNoteID}'.sub('{' + 'CreditNoteID' + '}', credit_note_id.to_s) # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -17140,18 +15061,7 @@ def update_credit_note_attachment_by_file_name_with_http_info(xero_tenant_id, cr local_var_path = '/CreditNotes/{CreditNoteID}/Attachments/{FileName}'.sub('{' + 'CreditNoteID' + '}', credit_note_id.to_s).sub('{' + 'FileName' + '}', file_name.to_s) # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -17233,18 +15143,7 @@ def update_expense_claim_with_http_info(xero_tenant_id, expense_claim_id, expens local_var_path = '/ExpenseClaims/{ExpenseClaimID}'.sub('{' + 'ExpenseClaimID' + '}', expense_claim_id.to_s) # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -17328,18 +15227,7 @@ def update_invoice_with_http_info(xero_tenant_id, invoice_id, invoices, opts = { local_var_path = '/Invoices/{InvoiceID}'.sub('{' + 'InvoiceID' + '}', invoice_id.to_s) # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -17428,18 +15316,7 @@ def update_invoice_attachment_by_file_name_with_http_info(xero_tenant_id, invoic local_var_path = '/Invoices/{InvoiceID}/Attachments/{FileName}'.sub('{' + 'InvoiceID' + '}', invoice_id.to_s).sub('{' + 'FileName' + '}', file_name.to_s) # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -17523,18 +15400,7 @@ def update_item_with_http_info(xero_tenant_id, item_id, items, opts = {}) local_var_path = '/Items/{ItemID}'.sub('{' + 'ItemID' + '}', item_id.to_s) # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -17617,18 +15483,7 @@ def update_linked_transaction_with_http_info(xero_tenant_id, linked_transaction_ local_var_path = '/LinkedTransactions/{LinkedTransactionID}'.sub('{' + 'LinkedTransactionID' + '}', linked_transaction_id.to_s) # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -17710,18 +15565,7 @@ def update_manual_journal_with_http_info(xero_tenant_id, manual_journal_id, manu local_var_path = '/ManualJournals/{ManualJournalID}'.sub('{' + 'ManualJournalID' + '}', manual_journal_id.to_s) # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -17809,18 +15653,7 @@ def update_manual_journal_attachment_by_file_name_with_http_info(xero_tenant_id, local_var_path = '/ManualJournals/{ManualJournalID}/Attachments/{FileName}'.sub('{' + 'ManualJournalID' + '}', manual_journal_id.to_s).sub('{' + 'FileName' + '}', file_name.to_s) # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -17900,18 +15733,7 @@ def update_or_create_bank_transactions_with_http_info(xero_tenant_id, bank_trans local_var_path = '/BankTransactions' # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -17991,18 +15813,7 @@ def update_or_create_contacts_with_http_info(xero_tenant_id, contacts, opts = {} local_var_path = '/Contacts' # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -18083,18 +15894,7 @@ def update_or_create_credit_notes_with_http_info(xero_tenant_id, credit_notes, o local_var_path = '/CreditNotes' # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -18174,18 +15974,7 @@ def update_or_create_employees_with_http_info(xero_tenant_id, employees, opts = local_var_path = '/Employees' # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -18266,18 +16055,7 @@ def update_or_create_invoices_with_http_info(xero_tenant_id, invoices, opts = {} local_var_path = '/Invoices' # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -18359,18 +16137,7 @@ def update_or_create_items_with_http_info(xero_tenant_id, items, opts = {}) local_var_path = '/Items' # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -18450,18 +16217,7 @@ def update_or_create_manual_journals_with_http_info(xero_tenant_id, manual_journ local_var_path = '/ManualJournals' # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -18540,18 +16296,7 @@ def update_or_create_purchase_orders_with_http_info(xero_tenant_id, purchase_ord local_var_path = '/PurchaseOrders' # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -18630,18 +16375,7 @@ def update_or_create_quotes_with_http_info(xero_tenant_id, quotes, opts = {}) local_var_path = '/Quotes' # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -18724,18 +16458,7 @@ def update_purchase_order_with_http_info(xero_tenant_id, purchase_order_id, purc local_var_path = '/PurchaseOrders/{PurchaseOrderID}'.sub('{' + 'PurchaseOrderID' + '}', purchase_order_id.to_s) # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -18817,18 +16540,7 @@ def update_quote_with_http_info(xero_tenant_id, quote_id, quotes, opts = {}) local_var_path = '/Quotes/{QuoteID}'.sub('{' + 'QuoteID' + '}', quote_id.to_s) # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -18916,18 +16628,7 @@ def update_quote_attachment_by_file_name_with_http_info(xero_tenant_id, quote_id local_var_path = '/Quotes/{QuoteID}/Attachments/{FileName}'.sub('{' + 'QuoteID' + '}', quote_id.to_s).sub('{' + 'FileName' + '}', file_name.to_s) # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -19011,18 +16712,7 @@ def update_receipt_with_http_info(xero_tenant_id, receipt_id, receipts, opts = { local_var_path = '/Receipts/{ReceiptID}'.sub('{' + 'ReceiptID' + '}', receipt_id.to_s) # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -19111,18 +16801,7 @@ def update_receipt_attachment_by_file_name_with_http_info(xero_tenant_id, receip local_var_path = '/Receipts/{ReceiptID}/Attachments/{FileName}'.sub('{' + 'ReceiptID' + '}', receipt_id.to_s).sub('{' + 'FileName' + '}', file_name.to_s) # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -19210,18 +16889,7 @@ def update_repeating_invoice_attachment_by_file_name_with_http_info(xero_tenant_ local_var_path = '/RepeatingInvoices/{RepeatingInvoiceID}/Attachments/{FileName}'.sub('{' + 'RepeatingInvoiceID' + '}', repeating_invoice_id.to_s).sub('{' + 'FileName' + '}', file_name.to_s) # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -19297,18 +16965,7 @@ def update_tax_rate_with_http_info(xero_tenant_id, tax_rates, opts = {}) local_var_path = '/TaxRates' # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -19390,18 +17047,7 @@ def update_tracking_category_with_http_info(xero_tenant_id, tracking_category_id local_var_path = '/TrackingCategories/{TrackingCategoryID}'.sub('{' + 'TrackingCategoryID' + '}', tracking_category_id.to_s) # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -19489,18 +17135,7 @@ def update_tracking_options_with_http_info(xero_tenant_id, tracking_category_id, local_var_path = '/TrackingCategories/{TrackingCategoryID}/Options/{TrackingOptionID}'.sub('{' + 'TrackingCategoryID' + '}', tracking_category_id.to_s).sub('{' + 'TrackingOptionID' + '}', tracking_option_id.to_s) # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} diff --git a/lib/xero-ruby/api/asset_api.rb b/lib/xero-ruby/api/asset_api.rb index 6ab2e005..fc39ed0a 100644 --- a/lib/xero-ruby/api/asset_api.rb +++ b/lib/xero-ruby/api/asset_api.rb @@ -52,18 +52,7 @@ def create_asset_with_http_info(xero_tenant_id, asset, opts = {}) local_var_path = '/Assets' # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -137,18 +126,7 @@ def create_asset_type_with_http_info(xero_tenant_id, opts = {}) local_var_path = '/AssetTypes' # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -226,18 +204,7 @@ def get_asset_by_id_with_http_info(xero_tenant_id, id, opts = {}) local_var_path = '/Assets/{id}'.sub('{' + 'id' + '}', id.to_s) # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -307,18 +274,7 @@ def get_asset_settings_with_http_info(xero_tenant_id, opts = {}) local_var_path = '/Settings' # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -388,18 +344,7 @@ def get_asset_types_with_http_info(xero_tenant_id, opts = {}) local_var_path = '/AssetTypes' # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -497,18 +442,7 @@ def get_assets_with_http_info(xero_tenant_id, status, opts = {}) local_var_path = '/Assets' # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} diff --git a/lib/xero-ruby/api/project_api.rb b/lib/xero-ruby/api/project_api.rb index 0b2db397..88f0969d 100644 --- a/lib/xero-ruby/api/project_api.rb +++ b/lib/xero-ruby/api/project_api.rb @@ -50,18 +50,7 @@ def create_project_with_http_info(xero_tenant_id, project_create_or_update, opts local_var_path = '/projects' # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -145,18 +134,7 @@ def create_time_entry_with_http_info(xero_tenant_id, project_id, time_entry_crea local_var_path = '/projects/{projectId}/time'.sub('{' + 'projectId' + '}', project_id.to_s) # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -240,18 +218,7 @@ def delete_time_entry_with_http_info(xero_tenant_id, project_id, time_entry_id, local_var_path = '/projects/{projectId}/time/{timeEntryId}'.sub('{' + 'projectId' + '}', project_id.to_s).sub('{' + 'timeEntryId' + '}', time_entry_id.to_s) # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -325,18 +292,7 @@ def get_project_with_http_info(xero_tenant_id, project_id, opts = {}) local_var_path = '/projects/{projectId}'.sub('{' + 'projectId' + '}', project_id.to_s) # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -418,18 +374,7 @@ def get_project_users_with_http_info(xero_tenant_id, opts = {}) local_var_path = '/projectsusers' # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -519,18 +464,7 @@ def get_projects_with_http_info(xero_tenant_id, opts = {}) local_var_path = '/projects' # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -617,18 +551,7 @@ def get_task_with_http_info(xero_tenant_id, project_id, task_id, opts = {}) local_var_path = '/projects/{projectId}/tasks/{taskId}'.sub('{' + 'projectId' + '}', project_id.to_s).sub('{' + 'taskId' + '}', task_id.to_s) # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -710,18 +633,7 @@ def get_tasks_with_http_info(xero_tenant_id, project_id, opts = {}) local_var_path = '/projects/{projectId}/tasks'.sub('{' + 'projectId' + '}', project_id.to_s) # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -820,18 +732,7 @@ def get_time_entries_with_http_info(xero_tenant_id, project_id, opts = {}) local_var_path = '/projects/{projectId}/time'.sub('{' + 'projectId' + '}', project_id.to_s) # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -923,18 +824,7 @@ def get_time_entry_with_http_info(xero_tenant_id, project_id, time_entry_id, opt local_var_path = '/projects/{projectId}/time/{timeEntryId}'.sub('{' + 'projectId' + '}', project_id.to_s).sub('{' + 'timeEntryId' + '}', time_entry_id.to_s) # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -1016,18 +906,7 @@ def patch_project_with_http_info(xero_tenant_id, project_id, project_patch, opts local_var_path = '/projects/{projectId}'.sub('{' + 'projectId' + '}', project_id.to_s) # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -1111,18 +990,7 @@ def update_project_with_http_info(xero_tenant_id, project_id, project_create_or_ local_var_path = '/projects/{projectId}'.sub('{' + 'projectId' + '}', project_id.to_s) # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} @@ -1212,18 +1080,7 @@ def update_time_entry_with_http_info(xero_tenant_id, project_id, time_entry_id, local_var_path = '/projects/{projectId}/time/{timeEntryId}'.sub('{' + 'projectId' + '}', project_id.to_s).sub('{' + 'timeEntryId' + '}', time_entry_id.to_s) # camelize keys of incoming `where` opts - if !opts[:'where'].nil? - all_wheres = opts[:'where'].map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" - end - else - "#{@api_client.camelize_key(k)}#{v}" - end - end - opts[:'where'] = all_wheres.join(' AND ') - end + opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} diff --git a/lib/xero-ruby/api_client.rb b/lib/xero-ruby/api_client.rb index 1908ecb5..f9046d44 100644 --- a/lib/xero-ruby/api_client.rb +++ b/lib/xero-ruby/api_client.rb @@ -550,5 +550,17 @@ def build_collection_param(param, collection_format) fail "unknown collection format: #{collection_format.inspect}" end end + + def parameterize_where(where_opts) + where_opts.map do |k,v| + if v.is_a?(Array) + v.map do |val| + "#{@api_client.camelize_key(k)}#{val}" + end + else + "#{@api_client.camelize_key(k)}#{v}" + end + end.join(' AND ') + end end end diff --git a/lib/xero-ruby/version.rb b/lib/xero-ruby/version.rb index 4538d155..294caa98 100644 --- a/lib/xero-ruby/version.rb +++ b/lib/xero-ruby/version.rb @@ -11,5 +11,5 @@ =end module XeroRuby - VERSION = '2.1.2' + VERSION = '2.2.2' end From 90f233422a4d00be0583a2a992c747466131f8b3 Mon Sep 17 00:00:00 2001 From: serknight Date: Wed, 23 Sep 2020 16:30:25 -0600 Subject: [PATCH 3/4] support all the complext API query and filtering --- README.md | 31 +++++++++++++------ lib/xero-ruby/api_client.rb | 29 ++++++++++++++--- lib/xero-ruby/models/accounting/account.rb | 2 +- .../models/accounting/organisation.rb | 26 ++++++++-------- 4 files changed, 61 insertions(+), 27 deletions(-) diff --git a/README.md b/README.md index 440b61c2..f454e1dc 100644 --- a/README.md +++ b/README.md @@ -219,23 +219,35 @@ All monetary and fields and a couple quantity fields utilize BigDecimal ``` ## Querying & Filtering -Examples for the `opts` (_options_) parameters most endpoints support. +Examples for the `opts` (_options_) parameters most endpoints support. This is an area of focus and improvement. If you have a complex filering/sorting/where usage that is not supported please [open an issue](https://github.com/XeroAPI/xero-ruby/issues). ```ruby # Invoices -opts = { - statuses: [XeroRuby::Accounting::Invoice::PAID], - where: { amount_due: '=0' }, - if_modified_since: (DateTime.now - 1.hour).to_s + opts = { + page: 1, + where: { + type: ['=', XeroRuby::Accounting::Invoice::ACCREC], + fully_paid_on_date: (DateTime.now - 6.month)..DateTime.now, + amount_due: ['>=', 0], + reference: ['=', "Website Design"], + invoice_number: ['=', "INV-0001"], + contact_id: ['=', 'contact-uuid-xxxx-xxx-xxxxxxx'], + contact_number: ['=', "the-contact-number"], + # date: (DateTime.now - 2.year)..DateTime.now + # ▲ you can pass a range ▼ or a date & operator + date: ['>=', DateTime.now - 2.year], + status: ['=', XeroRuby::Accounting::Invoice::PAID] + } } xero_client.accounting_api.get_invoices(tenant_id, opts).invoices # Contacts opts = { if_modified_since: (DateTime.now - 1.weeks).to_s, + # ▼ ordering by strings needs PascalCase convention order: 'UpdatedDateUtc DESC', where: { - is_customer: '==true', - is_supplier: '==true', + is_customer: ['==', true], + is_supplier: ['==', true] } } xero_client.accounting_api.get_contacts(tenant_id, opts).contacts @@ -243,7 +255,7 @@ xero_client.accounting_api.get_contacts(tenant_id, opts).contacts # Bank Transactions opts = { if_modified_since: (DateTime.now - 1.year).to_s, - where: { type: %{=="#{XeroRuby::Accounting::BankTransaction::SPEND}"}}, + where: { type: ['==', XeroRuby::Accounting::BankTransaction::SPEND] }, order: 'UpdatedDateUtc DESC', page: 2, unitdp: 4 # (Unit Decimal Places) @@ -252,8 +264,9 @@ xero_client.accounting_api.get_bank_transactions(tenant_id, opts).bank_transacti # Bank Transfers opts = { + if_modified_since: (DateTime.now - 1.month).to_s, where: { - amount: "> 999.99" + amount: [">=" , 999.99] }, order: 'Amount ASC' } diff --git a/lib/xero-ruby/api_client.rb b/lib/xero-ruby/api_client.rb index f9046d44..7436e1e6 100644 --- a/lib/xero-ruby/api_client.rb +++ b/lib/xero-ruby/api_client.rb @@ -553,12 +553,33 @@ def build_collection_param(param, collection_format) def parameterize_where(where_opts) where_opts.map do |k,v| - if v.is_a?(Array) - v.map do |val| - "#{@api_client.camelize_key(k)}#{val}" + case v + when Array + operator = v.first + query = v.last + if query.is_a?(Date) + "#{camelize_key(k)} #{operator} DateTime(#{query.strftime("%Y,%m,%d")})" + elsif [Float, Integer].member?(query.class) + %{#{camelize_key(k)} #{operator} #{query}} + elsif [true, false].member?(query) + %{#{camelize_key(k)} #{operator} #{query}} + else + if k == :contact_id + %{Contact.ContactID #{operator} guid("#{query}")} + elsif k == :contact_number + %{Contact.ContactNumber #{operator} "#{query}"} + else + %{#{camelize_key(k)} #{operator} "#{query}"} + end + end + when Range + if v.first.is_a?(DateTime) || v.first.is_a?(Date) || v.first.is_a?(Time) + "#{camelize_key(k)} >= DateTime(#{v.first.strftime("%Y,%m,%d")}) AND #{camelize_key(k)} <= DateTime(#{v.last.strftime("%Y,%m,%d")})" + else + "#{camelize_key(k)} >= #{v.first} AND #{camelize_key(k)} <= #{v.last}" end else - "#{@api_client.camelize_key(k)}#{v}" + %{#{camelize_key(k)} #{v}} end end.join(' AND ') end diff --git a/lib/xero-ruby/models/accounting/account.rb b/lib/xero-ruby/models/accounting/account.rb index 52391b19..1b858c71 100644 --- a/lib/xero-ruby/models/accounting/account.rb +++ b/lib/xero-ruby/models/accounting/account.rb @@ -91,7 +91,7 @@ class Account CISLABOURINCOME = "CISLABOURINCOME".freeze CISLIABILITY = "CISLIABILITY".freeze CISMATERIALS = "CISMATERIALS".freeze - EMPTY = "".freeze + # EMPTY = "".freeze # Shown if set attr_accessor :reporting_code diff --git a/lib/xero-ruby/models/accounting/organisation.rb b/lib/xero-ruby/models/accounting/organisation.rb index 21dbe6cd..e28346d3 100644 --- a/lib/xero-ruby/models/accounting/organisation.rb +++ b/lib/xero-ruby/models/accounting/organisation.rb @@ -114,7 +114,7 @@ class Organisation N6_MONTHLY = "6MONTHLY".freeze QUARTERLY = "QUARTERLY".freeze YEARLY = "YEARLY".freeze - NONE = "NONE".freeze + # NONE = "NONE".freeze # The default for LineAmountTypes on sales transactions attr_accessor :default_sales_tax @@ -136,18 +136,18 @@ class Organisation # Organisation Entity Type attr_accessor :organisation_entity_type - ACCOUNTING_PRACTICE = "ACCOUNTING_PRACTICE".freeze - COMPANY = "COMPANY".freeze - CHARITY = "CHARITY".freeze - CLUB_OR_SOCIETY = "CLUB_OR_SOCIETY".freeze - LOOK_THROUGH_COMPANY = "LOOK_THROUGH_COMPANY".freeze - NOT_FOR_PROFIT = "NOT_FOR_PROFIT".freeze - PARTNERSHIP = "PARTNERSHIP".freeze - S_CORPORATION = "S_CORPORATION".freeze - SELF_MANAGED_SUPERANNUATION_FUND = "SELF_MANAGED_SUPERANNUATION_FUND".freeze - SOLE_TRADER = "SOLE_TRADER".freeze - SUPERANNUATION_FUND = "SUPERANNUATION_FUND".freeze - TRUST = "TRUST".freeze + # ACCOUNTING_PRACTICE = "ACCOUNTING_PRACTICE".freeze + # COMPANY = "COMPANY".freeze + # CHARITY = "CHARITY".freeze + # CLUB_OR_SOCIETY = "CLUB_OR_SOCIETY".freeze + # LOOK_THROUGH_COMPANY = "LOOK_THROUGH_COMPANY".freeze + # NOT_FOR_PROFIT = "NOT_FOR_PROFIT".freeze + # PARTNERSHIP = "PARTNERSHIP".freeze + # S_CORPORATION = "S_CORPORATION".freeze + # SELF_MANAGED_SUPERANNUATION_FUND = "SELF_MANAGED_SUPERANNUATION_FUND".freeze + # SOLE_TRADER = "SOLE_TRADER".freeze + # SUPERANNUATION_FUND = "SUPERANNUATION_FUND".freeze + # TRUST = "TRUST".freeze # A unique identifier for the organisation. Potential uses. attr_accessor :short_code From 57620d945fc32ad0ea6177af5e86f58109f660fc Mon Sep 17 00:00:00 2001 From: serknight Date: Wed, 23 Sep 2020 17:17:03 -0600 Subject: [PATCH 4/4] add new tz --- lib/xero-ruby/models/accounting/time_zone.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/xero-ruby/models/accounting/time_zone.rb b/lib/xero-ruby/models/accounting/time_zone.rb index e0ac1950..1703e56b 100644 --- a/lib/xero-ruby/models/accounting/time_zone.rb +++ b/lib/xero-ruby/models/accounting/time_zone.rb @@ -84,6 +84,7 @@ class TimeZone RUSSIATIMEZONE11 = "RUSSIATIMEZONE11".freeze NEWZEALANDSTANDARDTIME = "NEWZEALANDSTANDARDTIME".freeze UTC12 = "UTC+12".freeze + UTC13 = "UTC+13".freeze FIJISTANDARDTIME = "FIJISTANDARDTIME".freeze KAMCHATKASTANDARDTIME = "KAMCHATKASTANDARDTIME".freeze TONGASTANDARDTIME = "TONGASTANDARDTIME".freeze