class XeroRuby::AccountingApi
Attributes
Public Class Methods
# File lib/xero-ruby/api/accounting_api.rb, line 16 def initialize(api_client = ApiClient.new) @api_client = api_client end
Public Instance Methods
Creates a new chart of accounts @param xero_tenant_id [String] Xero identifier for Tenant @param account [Account] Account object in body of request @param [Hash] opts the optional parameters @return [Accounts]
# File lib/xero-ruby/api/accounting_api.rb, line 24 def create_account(xero_tenant_id, account, opts = {}) data, _status_code, _headers = create_account_with_http_info(xero_tenant_id, account, opts) data end
Creates an attachment on a specific account @param xero_tenant_id [String] Xero identifier for Tenant @param account_id [String] Unique identifier for Account object @param file_name [String] Name of the attachment @param body [String] Byte array of file in body of request @param [Hash] opts the optional parameters @return [Attachments]
# File lib/xero-ruby/api/accounting_api.rb, line 103 def create_account_attachment_by_file_name(xero_tenant_id, account_id, file_name, body, opts = {}) data, _status_code, _headers = create_account_attachment_by_file_name_with_http_info(xero_tenant_id, account_id, file_name, body, opts) data end
Creates an attachment on a specific account @param xero_tenant_id [String] Xero identifier for Tenant @param account_id [String] Unique identifier for Account object @param file_name [String] Name of the attachment @param body [String] Byte array of file in body of request @param [Hash] opts the optional parameters @return [Array<(Attachments, Integer, Hash)>] Attachments data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 115 def create_account_attachment_by_file_name_with_http_info(xero_tenant_id, account_id, file_name, body, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.create_account_attachment_by_file_name ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.create_account_attachment_by_file_name" end # verify the required parameter 'account_id' is set if @api_client.config.client_side_validation && account_id.nil? fail ArgumentError, "Missing the required parameter 'account_id' when calling AccountingApi.create_account_attachment_by_file_name" end # verify the required parameter 'file_name' is set if @api_client.config.client_side_validation && file_name.nil? fail ArgumentError, "Missing the required parameter 'file_name' when calling AccountingApi.create_account_attachment_by_file_name" end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? fail ArgumentError, "Missing the required parameter 'body' when calling AccountingApi.create_account_attachment_by_file_name" end # resource path 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'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/octet-stream']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(body) # return_type return_type = opts[:return_type] || 'Attachments' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PUT, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#create_account_attachment_by_file_name\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Creates a new chart of accounts @param xero_tenant_id [String] Xero identifier for Tenant @param account [Account] Account object in body of request @param [Hash] opts the optional parameters @return [Array<(Accounts, Integer, Hash)>] Accounts data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 34 def create_account_with_http_info(xero_tenant_id, account, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.create_account ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.create_account" end # verify the required parameter 'account' is set if @api_client.config.client_side_validation && account.nil? fail ArgumentError, "Missing the required parameter 'account' when calling AccountingApi.create_account" end # resource path local_var_path = '/Accounts' # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(account) # return_type return_type = opts[:return_type] || 'Accounts' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PUT, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#create_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Creates an attachment for a specific bank transaction by filename @param xero_tenant_id [String] Xero identifier for Tenant @param bank_transaction_id [String] Xero generated unique identifier for a bank transaction @param file_name [String] Name of the attachment @param body [String] Byte array of file in body of request @param [Hash] opts the optional parameters @return [Attachments]
# File lib/xero-ruby/api/accounting_api.rb, line 192 def create_bank_transaction_attachment_by_file_name(xero_tenant_id, bank_transaction_id, file_name, body, opts = {}) data, _status_code, _headers = create_bank_transaction_attachment_by_file_name_with_http_info(xero_tenant_id, bank_transaction_id, file_name, body, opts) data end
Creates an attachment for a specific bank transaction by filename @param xero_tenant_id [String] Xero identifier for Tenant @param bank_transaction_id [String] Xero generated unique identifier for a bank transaction @param file_name [String] Name of the attachment @param body [String] Byte array of file in body of request @param [Hash] opts the optional parameters @return [Array<(Attachments, Integer, Hash)>] Attachments data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 204 def create_bank_transaction_attachment_by_file_name_with_http_info(xero_tenant_id, bank_transaction_id, file_name, body, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.create_bank_transaction_attachment_by_file_name ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.create_bank_transaction_attachment_by_file_name" end # verify the required parameter 'bank_transaction_id' is set if @api_client.config.client_side_validation && bank_transaction_id.nil? fail ArgumentError, "Missing the required parameter 'bank_transaction_id' when calling AccountingApi.create_bank_transaction_attachment_by_file_name" end # verify the required parameter 'file_name' is set if @api_client.config.client_side_validation && file_name.nil? fail ArgumentError, "Missing the required parameter 'file_name' when calling AccountingApi.create_bank_transaction_attachment_by_file_name" end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? fail ArgumentError, "Missing the required parameter 'body' when calling AccountingApi.create_bank_transaction_attachment_by_file_name" end # resource path 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'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/octet-stream']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(body) # return_type return_type = opts[:return_type] || 'Attachments' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PUT, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#create_bank_transaction_attachment_by_file_name\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Creates a history record for a specific bank transactions @param xero_tenant_id [String] Xero identifier for Tenant @param bank_transaction_id [String] Xero generated unique identifier for a bank transaction @param history_records [HistoryRecords] HistoryRecords containing an array of HistoryRecord objects in body of request @param [Hash] opts the optional parameters @return [HistoryRecords]
# File lib/xero-ruby/api/accounting_api.rb, line 280 def create_bank_transaction_history_record(xero_tenant_id, bank_transaction_id, history_records, opts = {}) data, _status_code, _headers = create_bank_transaction_history_record_with_http_info(xero_tenant_id, bank_transaction_id, history_records, opts) data end
Creates a history record for a specific bank transactions @param xero_tenant_id [String] Xero identifier for Tenant @param bank_transaction_id [String] Xero generated unique identifier for a bank transaction @param history_records [HistoryRecords] HistoryRecords containing an array of HistoryRecord objects in body of request @param [Hash] opts the optional parameters @return [Array<(HistoryRecords, Integer, Hash)>] HistoryRecords data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 291 def create_bank_transaction_history_record_with_http_info(xero_tenant_id, bank_transaction_id, history_records, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.create_bank_transaction_history_record ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.create_bank_transaction_history_record" end # verify the required parameter 'bank_transaction_id' is set if @api_client.config.client_side_validation && bank_transaction_id.nil? fail ArgumentError, "Missing the required parameter 'bank_transaction_id' when calling AccountingApi.create_bank_transaction_history_record" end # verify the required parameter 'history_records' is set if @api_client.config.client_side_validation && history_records.nil? fail ArgumentError, "Missing the required parameter 'history_records' when calling AccountingApi.create_bank_transaction_history_record" end # resource path local_var_path = '/BankTransactions/{BankTransactionID}/History'.sub('{' + 'BankTransactionID' + '}', bank_transaction_id.to_s) # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(history_records) # return_type return_type = opts[:return_type] || 'HistoryRecords' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PUT, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#create_bank_transaction_history_record\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Creates one or more spent or received money transaction @param xero_tenant_id [String] Xero identifier for Tenant @param bank_transactions [BankTransactions] BankTransactions with an array of BankTransaction objects in body of request @param [Hash] opts the optional parameters @option opts [Boolean] :summarize_errors If false return 200 OK and mix of successfully created objects and any with validation errors (default to false) @option opts [Integer] :unitdp e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts @return [BankTransactions]
# File lib/xero-ruby/api/accounting_api.rb, line 364 def create_bank_transactions(xero_tenant_id, bank_transactions, opts = {}) data, _status_code, _headers = create_bank_transactions_with_http_info(xero_tenant_id, bank_transactions, opts) data end
Creates one or more spent or received money transaction @param xero_tenant_id [String] Xero identifier for Tenant @param bank_transactions [BankTransactions] BankTransactions with an array of BankTransaction objects in body of request @param [Hash] opts the optional parameters @option opts [Boolean] :summarize_errors If false return 200 OK and mix of successfully created objects and any with validation errors @option opts [Integer] :unitdp e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts @return [Array<(BankTransactions, Integer, Hash)>] BankTransactions data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 376 def create_bank_transactions_with_http_info(xero_tenant_id, bank_transactions, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.create_bank_transactions ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.create_bank_transactions" end # verify the required parameter 'bank_transactions' is set if @api_client.config.client_side_validation && bank_transactions.nil? fail ArgumentError, "Missing the required parameter 'bank_transactions' when calling AccountingApi.create_bank_transactions" end # resource path local_var_path = '/BankTransactions' # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} query_params[:'summarizeErrors'] = opts[:'summarize_errors'] if !opts[:'summarize_errors'].nil? query_params[:'unitdp'] = opts[:'unitdp'] if !opts[:'unitdp'].nil? # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(bank_transactions) # return_type return_type = opts[:return_type] || 'BankTransactions' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PUT, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#create_bank_transactions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Creates a bank transfer @param xero_tenant_id [String] Xero identifier for Tenant @param bank_transfers [BankTransfers] BankTransfers with array of BankTransfer objects in request body @param [Hash] opts the optional parameters @return [BankTransfers]
# File lib/xero-ruby/api/accounting_api.rb, line 445 def create_bank_transfer(xero_tenant_id, bank_transfers, opts = {}) data, _status_code, _headers = create_bank_transfer_with_http_info(xero_tenant_id, bank_transfers, opts) data end
@param xero_tenant_id [String] Xero identifier for Tenant @param bank_transfer_id [String] Xero generated unique identifier for a bank transfer @param file_name [String] Name of the attachment @param body [String] Byte array of file in body of request @param [Hash] opts the optional parameters @return [Attachments]
# File lib/xero-ruby/api/accounting_api.rb, line 523 def create_bank_transfer_attachment_by_file_name(xero_tenant_id, bank_transfer_id, file_name, body, opts = {}) data, _status_code, _headers = create_bank_transfer_attachment_by_file_name_with_http_info(xero_tenant_id, bank_transfer_id, file_name, body, opts) data end
@param xero_tenant_id [String] Xero identifier for Tenant @param bank_transfer_id [String] Xero generated unique identifier for a bank transfer @param file_name [String] Name of the attachment @param body [String] Byte array of file in body of request @param [Hash] opts the optional parameters @return [Array<(Attachments, Integer, Hash)>] Attachments data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 534 def create_bank_transfer_attachment_by_file_name_with_http_info(xero_tenant_id, bank_transfer_id, file_name, body, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.create_bank_transfer_attachment_by_file_name ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.create_bank_transfer_attachment_by_file_name" end # verify the required parameter 'bank_transfer_id' is set if @api_client.config.client_side_validation && bank_transfer_id.nil? fail ArgumentError, "Missing the required parameter 'bank_transfer_id' when calling AccountingApi.create_bank_transfer_attachment_by_file_name" end # verify the required parameter 'file_name' is set if @api_client.config.client_side_validation && file_name.nil? fail ArgumentError, "Missing the required parameter 'file_name' when calling AccountingApi.create_bank_transfer_attachment_by_file_name" end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? fail ArgumentError, "Missing the required parameter 'body' when calling AccountingApi.create_bank_transfer_attachment_by_file_name" end # resource path 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'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/octet-stream']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(body) # return_type return_type = opts[:return_type] || 'Attachments' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PUT, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#create_bank_transfer_attachment_by_file_name\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Creates a history record for a specific bank transfer @param xero_tenant_id [String] Xero identifier for Tenant @param bank_transfer_id [String] Xero generated unique identifier for a bank transfer @param history_records [HistoryRecords] HistoryRecords containing an array of HistoryRecord objects in body of request @param [Hash] opts the optional parameters @return [HistoryRecords]
# File lib/xero-ruby/api/accounting_api.rb, line 610 def create_bank_transfer_history_record(xero_tenant_id, bank_transfer_id, history_records, opts = {}) data, _status_code, _headers = create_bank_transfer_history_record_with_http_info(xero_tenant_id, bank_transfer_id, history_records, opts) data end
Creates a history record for a specific bank transfer @param xero_tenant_id [String] Xero identifier for Tenant @param bank_transfer_id [String] Xero generated unique identifier for a bank transfer @param history_records [HistoryRecords] HistoryRecords containing an array of HistoryRecord objects in body of request @param [Hash] opts the optional parameters @return [Array<(HistoryRecords, Integer, Hash)>] HistoryRecords data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 621 def create_bank_transfer_history_record_with_http_info(xero_tenant_id, bank_transfer_id, history_records, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.create_bank_transfer_history_record ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.create_bank_transfer_history_record" end # verify the required parameter 'bank_transfer_id' is set if @api_client.config.client_side_validation && bank_transfer_id.nil? fail ArgumentError, "Missing the required parameter 'bank_transfer_id' when calling AccountingApi.create_bank_transfer_history_record" end # verify the required parameter 'history_records' is set if @api_client.config.client_side_validation && history_records.nil? fail ArgumentError, "Missing the required parameter 'history_records' when calling AccountingApi.create_bank_transfer_history_record" end # resource path local_var_path = '/BankTransfers/{BankTransferID}/History'.sub('{' + 'BankTransferID' + '}', bank_transfer_id.to_s) # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(history_records) # return_type return_type = opts[:return_type] || 'HistoryRecords' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PUT, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#create_bank_transfer_history_record\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Creates a bank transfer @param xero_tenant_id [String] Xero identifier for Tenant @param bank_transfers [BankTransfers] BankTransfers with array of BankTransfer objects in request body @param [Hash] opts the optional parameters @return [Array<(BankTransfers, Integer, Hash)>] BankTransfers data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 455 def create_bank_transfer_with_http_info(xero_tenant_id, bank_transfers, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.create_bank_transfer ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.create_bank_transfer" end # verify the required parameter 'bank_transfers' is set if @api_client.config.client_side_validation && bank_transfers.nil? fail ArgumentError, "Missing the required parameter 'bank_transfers' when calling AccountingApi.create_bank_transfer" end # resource path local_var_path = '/BankTransfers' # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(bank_transfers) # return_type return_type = opts[:return_type] || 'BankTransfers' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PUT, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#create_bank_transfer\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Creates one or many batch payments for invoices @param xero_tenant_id [String] Xero identifier for Tenant @param batch_payments [BatchPayments] BatchPayments with an array of Payments in body of request @param [Hash] opts the optional parameters @option opts [Boolean] :summarize_errors If false return 200 OK and mix of successfully created objects and any with validation errors (default to false) @return [BatchPayments]
# File lib/xero-ruby/api/accounting_api.rb, line 693 def create_batch_payment(xero_tenant_id, batch_payments, opts = {}) data, _status_code, _headers = create_batch_payment_with_http_info(xero_tenant_id, batch_payments, opts) data end
Creates a history record for a specific batch payment @param xero_tenant_id [String] Xero identifier for Tenant @param batch_payment_id [String] Unique identifier for BatchPayment @param history_records [HistoryRecords] HistoryRecords containing an array of HistoryRecord objects in body of request @param [Hash] opts the optional parameters @return [HistoryRecords]
# File lib/xero-ruby/api/accounting_api.rb, line 773 def create_batch_payment_history_record(xero_tenant_id, batch_payment_id, history_records, opts = {}) data, _status_code, _headers = create_batch_payment_history_record_with_http_info(xero_tenant_id, batch_payment_id, history_records, opts) data end
Creates a history record for a specific batch payment @param xero_tenant_id [String] Xero identifier for Tenant @param batch_payment_id [String] Unique identifier for BatchPayment @param history_records [HistoryRecords] HistoryRecords containing an array of HistoryRecord objects in body of request @param [Hash] opts the optional parameters @return [Array<(HistoryRecords, Integer, Hash)>] HistoryRecords data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 784 def create_batch_payment_history_record_with_http_info(xero_tenant_id, batch_payment_id, history_records, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.create_batch_payment_history_record ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.create_batch_payment_history_record" end # verify the required parameter 'batch_payment_id' is set if @api_client.config.client_side_validation && batch_payment_id.nil? fail ArgumentError, "Missing the required parameter 'batch_payment_id' when calling AccountingApi.create_batch_payment_history_record" end # verify the required parameter 'history_records' is set if @api_client.config.client_side_validation && history_records.nil? fail ArgumentError, "Missing the required parameter 'history_records' when calling AccountingApi.create_batch_payment_history_record" end # resource path local_var_path = '/BatchPayments/{BatchPaymentID}/History'.sub('{' + 'BatchPaymentID' + '}', batch_payment_id.to_s) # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(history_records) # return_type return_type = opts[:return_type] || 'HistoryRecords' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PUT, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#create_batch_payment_history_record\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Creates one or many batch payments for invoices @param xero_tenant_id [String] Xero identifier for Tenant @param batch_payments [BatchPayments] BatchPayments with an array of Payments in body of request @param [Hash] opts the optional parameters @option opts [Boolean] :summarize_errors If false return 200 OK and mix of successfully created objects and any with validation errors @return [Array<(BatchPayments, Integer, Hash)>] BatchPayments data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 704 def create_batch_payment_with_http_info(xero_tenant_id, batch_payments, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.create_batch_payment ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.create_batch_payment" end # verify the required parameter 'batch_payments' is set if @api_client.config.client_side_validation && batch_payments.nil? fail ArgumentError, "Missing the required parameter 'batch_payments' when calling AccountingApi.create_batch_payment" end # resource path local_var_path = '/BatchPayments' # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} query_params[:'summarizeErrors'] = opts[:'summarize_errors'] if !opts[:'summarize_errors'].nil? # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(batch_payments) # return_type return_type = opts[:return_type] || 'BatchPayments' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PUT, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#create_batch_payment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Creates a new custom payment service for a specific branding theme @param xero_tenant_id [String] Xero identifier for Tenant @param branding_theme_id [String] Unique identifier for a Branding Theme @param payment_service [PaymentService] PaymentService object in body of request @param [Hash] opts the optional parameters @return [PaymentServices]
# File lib/xero-ruby/api/accounting_api.rb, line 856 def create_branding_theme_payment_services(xero_tenant_id, branding_theme_id, payment_service, opts = {}) data, _status_code, _headers = create_branding_theme_payment_services_with_http_info(xero_tenant_id, branding_theme_id, payment_service, opts) data end
Creates a new custom payment service for a specific branding theme @param xero_tenant_id [String] Xero identifier for Tenant @param branding_theme_id [String] Unique identifier for a Branding Theme @param payment_service [PaymentService] PaymentService object in body of request @param [Hash] opts the optional parameters @return [Array<(PaymentServices, Integer, Hash)>] PaymentServices data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 867 def create_branding_theme_payment_services_with_http_info(xero_tenant_id, branding_theme_id, payment_service, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.create_branding_theme_payment_services ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.create_branding_theme_payment_services" end # verify the required parameter 'branding_theme_id' is set if @api_client.config.client_side_validation && branding_theme_id.nil? fail ArgumentError, "Missing the required parameter 'branding_theme_id' when calling AccountingApi.create_branding_theme_payment_services" end # verify the required parameter 'payment_service' is set if @api_client.config.client_side_validation && payment_service.nil? fail ArgumentError, "Missing the required parameter 'payment_service' when calling AccountingApi.create_branding_theme_payment_services" end # resource path local_var_path = '/BrandingThemes/{BrandingThemeID}/PaymentServices'.sub('{' + 'BrandingThemeID' + '}', branding_theme_id.to_s) # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(payment_service) # return_type return_type = opts[:return_type] || 'PaymentServices' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#create_branding_theme_payment_services\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
@param xero_tenant_id [String] Xero identifier for Tenant @param contact_id [String] Unique identifier for a Contact @param file_name [String] Name of the attachment @param body [String] Byte array of file in body of request @param [Hash] opts the optional parameters @return [Attachments]
# File lib/xero-ruby/api/accounting_api.rb, line 939 def create_contact_attachment_by_file_name(xero_tenant_id, contact_id, file_name, body, opts = {}) data, _status_code, _headers = create_contact_attachment_by_file_name_with_http_info(xero_tenant_id, contact_id, file_name, body, opts) data end
@param xero_tenant_id [String] Xero identifier for Tenant @param contact_id [String] Unique identifier for a Contact @param file_name [String] Name of the attachment @param body [String] Byte array of file in body of request @param [Hash] opts the optional parameters @return [Array<(Attachments, Integer, Hash)>] Attachments data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 950 def create_contact_attachment_by_file_name_with_http_info(xero_tenant_id, contact_id, file_name, body, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.create_contact_attachment_by_file_name ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.create_contact_attachment_by_file_name" end # verify the required parameter 'contact_id' is set if @api_client.config.client_side_validation && contact_id.nil? fail ArgumentError, "Missing the required parameter 'contact_id' when calling AccountingApi.create_contact_attachment_by_file_name" end # verify the required parameter 'file_name' is set if @api_client.config.client_side_validation && file_name.nil? fail ArgumentError, "Missing the required parameter 'file_name' when calling AccountingApi.create_contact_attachment_by_file_name" end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? fail ArgumentError, "Missing the required parameter 'body' when calling AccountingApi.create_contact_attachment_by_file_name" end # resource path 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'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/octet-stream']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(body) # return_type return_type = opts[:return_type] || 'Attachments' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PUT, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#create_contact_attachment_by_file_name\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Creates a contact group @param xero_tenant_id [String] Xero identifier for Tenant @param contact_groups [ContactGroups] ContactGroups with an array of names in request body @param [Hash] opts the optional parameters @return [ContactGroups]
# File lib/xero-ruby/api/accounting_api.rb, line 1025 def create_contact_group(xero_tenant_id, contact_groups, opts = {}) data, _status_code, _headers = create_contact_group_with_http_info(xero_tenant_id, contact_groups, opts) data end
Creates contacts to a specific contact group @param xero_tenant_id [String] Xero identifier for Tenant @param contact_group_id [String] Unique identifier for a Contact Group @param contacts [Contacts] Contacts with array of contacts specifying the ContactID to be added to ContactGroup in body of request @param [Hash] opts the optional parameters @return [Contacts]
# File lib/xero-ruby/api/accounting_api.rb, line 1103 def create_contact_group_contacts(xero_tenant_id, contact_group_id, contacts, opts = {}) data, _status_code, _headers = create_contact_group_contacts_with_http_info(xero_tenant_id, contact_group_id, contacts, opts) data end
Creates contacts to a specific contact group @param xero_tenant_id [String] Xero identifier for Tenant @param contact_group_id [String] Unique identifier for a Contact Group @param contacts [Contacts] Contacts with array of contacts specifying the ContactID to be added to ContactGroup in body of request @param [Hash] opts the optional parameters @return [Array<(Contacts, Integer, Hash)>] Contacts data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 1114 def create_contact_group_contacts_with_http_info(xero_tenant_id, contact_group_id, contacts, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.create_contact_group_contacts ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.create_contact_group_contacts" end # verify the required parameter 'contact_group_id' is set if @api_client.config.client_side_validation && contact_group_id.nil? fail ArgumentError, "Missing the required parameter 'contact_group_id' when calling AccountingApi.create_contact_group_contacts" end # verify the required parameter 'contacts' is set if @api_client.config.client_side_validation && contacts.nil? fail ArgumentError, "Missing the required parameter 'contacts' when calling AccountingApi.create_contact_group_contacts" end # resource path local_var_path = '/ContactGroups/{ContactGroupID}/Contacts'.sub('{' + 'ContactGroupID' + '}', contact_group_id.to_s) # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(contacts) # return_type return_type = opts[:return_type] || 'Contacts' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PUT, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#create_contact_group_contacts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Creates a contact group @param xero_tenant_id [String] Xero identifier for Tenant @param contact_groups [ContactGroups] ContactGroups with an array of names in request body @param [Hash] opts the optional parameters @return [Array<(ContactGroups, Integer, Hash)>] ContactGroups data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 1035 def create_contact_group_with_http_info(xero_tenant_id, contact_groups, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.create_contact_group ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.create_contact_group" end # verify the required parameter 'contact_groups' is set if @api_client.config.client_side_validation && contact_groups.nil? fail ArgumentError, "Missing the required parameter 'contact_groups' when calling AccountingApi.create_contact_group" end # resource path local_var_path = '/ContactGroups' # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(contact_groups) # return_type return_type = opts[:return_type] || 'ContactGroups' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PUT, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#create_contact_group\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Creates a new history record for a specific contact @param xero_tenant_id [String] Xero identifier for Tenant @param contact_id [String] Unique identifier for a Contact @param history_records [HistoryRecords] HistoryRecords containing an array of HistoryRecord objects in body of request @param [Hash] opts the optional parameters @return [HistoryRecords]
# File lib/xero-ruby/api/accounting_api.rb, line 1186 def create_contact_history(xero_tenant_id, contact_id, history_records, opts = {}) data, _status_code, _headers = create_contact_history_with_http_info(xero_tenant_id, contact_id, history_records, opts) data end
Creates a new history record for a specific contact @param xero_tenant_id [String] Xero identifier for Tenant @param contact_id [String] Unique identifier for a Contact @param history_records [HistoryRecords] HistoryRecords containing an array of HistoryRecord objects in body of request @param [Hash] opts the optional parameters @return [Array<(HistoryRecords, Integer, Hash)>] HistoryRecords data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 1197 def create_contact_history_with_http_info(xero_tenant_id, contact_id, history_records, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.create_contact_history ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.create_contact_history" end # verify the required parameter 'contact_id' is set if @api_client.config.client_side_validation && contact_id.nil? fail ArgumentError, "Missing the required parameter 'contact_id' when calling AccountingApi.create_contact_history" end # verify the required parameter 'history_records' is set if @api_client.config.client_side_validation && history_records.nil? fail ArgumentError, "Missing the required parameter 'history_records' when calling AccountingApi.create_contact_history" end # resource path local_var_path = '/Contacts/{ContactID}/History'.sub('{' + 'ContactID' + '}', contact_id.to_s) # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(history_records) # return_type return_type = opts[:return_type] || 'HistoryRecords' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PUT, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#create_contact_history\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Creates multiple contacts (bulk) in a Xero organisation @param xero_tenant_id [String] Xero identifier for Tenant @param contacts [Contacts] Contacts with an array of Contact objects to create in body of request @param [Hash] opts the optional parameters @option opts [Boolean] :summarize_errors If false return 200 OK and mix of successfully created objects and any with validation errors (default to false) @return [Contacts]
# File lib/xero-ruby/api/accounting_api.rb, line 1269 def create_contacts(xero_tenant_id, contacts, opts = {}) data, _status_code, _headers = create_contacts_with_http_info(xero_tenant_id, contacts, opts) data end
Creates multiple contacts (bulk) in a Xero organisation @param xero_tenant_id [String] Xero identifier for Tenant @param contacts [Contacts] Contacts with an array of Contact objects to create in body of request @param [Hash] opts the optional parameters @option opts [Boolean] :summarize_errors If false return 200 OK and mix of successfully created objects and any with validation errors @return [Array<(Contacts, Integer, Hash)>] Contacts data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 1280 def create_contacts_with_http_info(xero_tenant_id, contacts, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.create_contacts ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.create_contacts" end # verify the required parameter 'contacts' is set if @api_client.config.client_side_validation && contacts.nil? fail ArgumentError, "Missing the required parameter 'contacts' when calling AccountingApi.create_contacts" end # resource path local_var_path = '/Contacts' # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} query_params[:'summarizeErrors'] = opts[:'summarize_errors'] if !opts[:'summarize_errors'].nil? # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(contacts) # return_type return_type = opts[:return_type] || 'Contacts' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PUT, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#create_contacts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Creates allocation for a specific credit note @param xero_tenant_id [String] Xero identifier for Tenant @param credit_note_id [String] Unique identifier for a Credit Note @param allocations [Allocations] Allocations with array of Allocation object in body of request. @param [Hash] opts the optional parameters @option opts [Boolean] :summarize_errors If false return 200 OK and mix of successfully created objects and any with validation errors (default to false) @return [Allocations]
# File lib/xero-ruby/api/accounting_api.rb, line 1350 def create_credit_note_allocation(xero_tenant_id, credit_note_id, allocations, opts = {}) data, _status_code, _headers = create_credit_note_allocation_with_http_info(xero_tenant_id, credit_note_id, allocations, opts) data end
Creates allocation for a specific credit note @param xero_tenant_id [String] Xero identifier for Tenant @param credit_note_id [String] Unique identifier for a Credit Note @param allocations [Allocations] Allocations with array of Allocation object in body of request. @param [Hash] opts the optional parameters @option opts [Boolean] :summarize_errors If false return 200 OK and mix of successfully created objects and any with validation errors @return [Array<(Allocations, Integer, Hash)>] Allocations data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 1362 def create_credit_note_allocation_with_http_info(xero_tenant_id, credit_note_id, allocations, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.create_credit_note_allocation ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.create_credit_note_allocation" end # verify the required parameter 'credit_note_id' is set if @api_client.config.client_side_validation && credit_note_id.nil? fail ArgumentError, "Missing the required parameter 'credit_note_id' when calling AccountingApi.create_credit_note_allocation" end # verify the required parameter 'allocations' is set if @api_client.config.client_side_validation && allocations.nil? fail ArgumentError, "Missing the required parameter 'allocations' when calling AccountingApi.create_credit_note_allocation" end # resource path local_var_path = '/CreditNotes/{CreditNoteID}/Allocations'.sub('{' + 'CreditNoteID' + '}', credit_note_id.to_s) # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} query_params[:'summarizeErrors'] = opts[:'summarize_errors'] if !opts[:'summarize_errors'].nil? # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(allocations) # return_type return_type = opts[:return_type] || 'Allocations' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PUT, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#create_credit_note_allocation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Creates an attachment for a specific credit note @param xero_tenant_id [String] Xero identifier for Tenant @param credit_note_id [String] Unique identifier for a Credit Note @param file_name [String] Name of the attachment @param body [String] Byte array of file in body of request @param [Hash] opts the optional parameters @option opts [Boolean] :include_online Allows an attachment to be seen by the end customer within their online invoice (default to false) @return [Attachments]
# File lib/xero-ruby/api/accounting_api.rb, line 1437 def create_credit_note_attachment_by_file_name(xero_tenant_id, credit_note_id, file_name, body, opts = {}) data, _status_code, _headers = create_credit_note_attachment_by_file_name_with_http_info(xero_tenant_id, credit_note_id, file_name, body, opts) data end
Creates an attachment for a specific credit note @param xero_tenant_id [String] Xero identifier for Tenant @param credit_note_id [String] Unique identifier for a Credit Note @param file_name [String] Name of the attachment @param body [String] Byte array of file in body of request @param [Hash] opts the optional parameters @option opts [Boolean] :include_online Allows an attachment to be seen by the end customer within their online invoice @return [Array<(Attachments, Integer, Hash)>] Attachments data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 1450 def create_credit_note_attachment_by_file_name_with_http_info(xero_tenant_id, credit_note_id, file_name, body, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.create_credit_note_attachment_by_file_name ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.create_credit_note_attachment_by_file_name" end # verify the required parameter 'credit_note_id' is set if @api_client.config.client_side_validation && credit_note_id.nil? fail ArgumentError, "Missing the required parameter 'credit_note_id' when calling AccountingApi.create_credit_note_attachment_by_file_name" end # verify the required parameter 'file_name' is set if @api_client.config.client_side_validation && file_name.nil? fail ArgumentError, "Missing the required parameter 'file_name' when calling AccountingApi.create_credit_note_attachment_by_file_name" end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? fail ArgumentError, "Missing the required parameter 'body' when calling AccountingApi.create_credit_note_attachment_by_file_name" end # resource path 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'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} query_params[:'IncludeOnline'] = opts[:'include_online'] if !opts[:'include_online'].nil? # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/octet-stream']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(body) # return_type return_type = opts[:return_type] || 'Attachments' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PUT, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#create_credit_note_attachment_by_file_name\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves history records of a specific credit note @param xero_tenant_id [String] Xero identifier for Tenant @param credit_note_id [String] Unique identifier for a Credit Note @param history_records [HistoryRecords] HistoryRecords containing an array of HistoryRecord objects in body of request @param [Hash] opts the optional parameters @return [HistoryRecords]
# File lib/xero-ruby/api/accounting_api.rb, line 1527 def create_credit_note_history(xero_tenant_id, credit_note_id, history_records, opts = {}) data, _status_code, _headers = create_credit_note_history_with_http_info(xero_tenant_id, credit_note_id, history_records, opts) data end
Retrieves history records of a specific credit note @param xero_tenant_id [String] Xero identifier for Tenant @param credit_note_id [String] Unique identifier for a Credit Note @param history_records [HistoryRecords] HistoryRecords containing an array of HistoryRecord objects in body of request @param [Hash] opts the optional parameters @return [Array<(HistoryRecords, Integer, Hash)>] HistoryRecords data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 1538 def create_credit_note_history_with_http_info(xero_tenant_id, credit_note_id, history_records, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.create_credit_note_history ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.create_credit_note_history" end # verify the required parameter 'credit_note_id' is set if @api_client.config.client_side_validation && credit_note_id.nil? fail ArgumentError, "Missing the required parameter 'credit_note_id' when calling AccountingApi.create_credit_note_history" end # verify the required parameter 'history_records' is set if @api_client.config.client_side_validation && history_records.nil? fail ArgumentError, "Missing the required parameter 'history_records' when calling AccountingApi.create_credit_note_history" end # resource path local_var_path = '/CreditNotes/{CreditNoteID}/History'.sub('{' + 'CreditNoteID' + '}', credit_note_id.to_s) # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(history_records) # return_type return_type = opts[:return_type] || 'HistoryRecords' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PUT, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#create_credit_note_history\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Creates a new credit note @param xero_tenant_id [String] Xero identifier for Tenant @param credit_notes [CreditNotes] Credit Notes with array of CreditNote object in body of request @param [Hash] opts the optional parameters @option opts [Boolean] :summarize_errors If false return 200 OK and mix of successfully created objects and any with validation errors (default to false) @option opts [Integer] :unitdp e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts @return [CreditNotes]
# File lib/xero-ruby/api/accounting_api.rb, line 1611 def create_credit_notes(xero_tenant_id, credit_notes, opts = {}) data, _status_code, _headers = create_credit_notes_with_http_info(xero_tenant_id, credit_notes, opts) data end
Creates a new credit note @param xero_tenant_id [String] Xero identifier for Tenant @param credit_notes [CreditNotes] Credit Notes with array of CreditNote object in body of request @param [Hash] opts the optional parameters @option opts [Boolean] :summarize_errors If false return 200 OK and mix of successfully created objects and any with validation errors @option opts [Integer] :unitdp e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts @return [Array<(CreditNotes, Integer, Hash)>] CreditNotes data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 1623 def create_credit_notes_with_http_info(xero_tenant_id, credit_notes, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.create_credit_notes ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.create_credit_notes" end # verify the required parameter 'credit_notes' is set if @api_client.config.client_side_validation && credit_notes.nil? fail ArgumentError, "Missing the required parameter 'credit_notes' when calling AccountingApi.create_credit_notes" end # resource path local_var_path = '/CreditNotes' # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} query_params[:'summarizeErrors'] = opts[:'summarize_errors'] if !opts[:'summarize_errors'].nil? query_params[:'unitdp'] = opts[:'unitdp'] if !opts[:'unitdp'].nil? # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(credit_notes) # return_type return_type = opts[:return_type] || 'CreditNotes' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PUT, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#create_credit_notes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Create a new currency for a Xero organisation @param xero_tenant_id [String] Xero identifier for Tenant @param currency [Currency] Currency object in the body of request @param [Hash] opts the optional parameters @return [Currencies]
# File lib/xero-ruby/api/accounting_api.rb, line 1692 def create_currency(xero_tenant_id, currency, opts = {}) data, _status_code, _headers = create_currency_with_http_info(xero_tenant_id, currency, opts) data end
Create a new currency for a Xero organisation @param xero_tenant_id [String] Xero identifier for Tenant @param currency [Currency] Currency object in the body of request @param [Hash] opts the optional parameters @return [Array<(Currencies, Integer, Hash)>] Currencies data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 1702 def create_currency_with_http_info(xero_tenant_id, currency, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.create_currency ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.create_currency" end # verify the required parameter 'currency' is set if @api_client.config.client_side_validation && currency.nil? fail ArgumentError, "Missing the required parameter 'currency' when calling AccountingApi.create_currency" end # resource path local_var_path = '/Currencies' # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(currency) # return_type return_type = opts[:return_type] || 'Currencies' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PUT, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#create_currency\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Creates new employees used in Xero payrun @param xero_tenant_id [String] Xero identifier for Tenant @param employees [Employees] Employees with array of Employee object in body of request @param [Hash] opts the optional parameters @option opts [Boolean] :summarize_errors If false return 200 OK and mix of successfully created objects and any with validation errors (default to false) @return [Employees]
# File lib/xero-ruby/api/accounting_api.rb, line 1770 def create_employees(xero_tenant_id, employees, opts = {}) data, _status_code, _headers = create_employees_with_http_info(xero_tenant_id, employees, opts) data end
Creates new employees used in Xero payrun @param xero_tenant_id [String] Xero identifier for Tenant @param employees [Employees] Employees with array of Employee object in body of request @param [Hash] opts the optional parameters @option opts [Boolean] :summarize_errors If false return 200 OK and mix of successfully created objects and any with validation errors @return [Array<(Employees, Integer, Hash)>] Employees data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 1781 def create_employees_with_http_info(xero_tenant_id, employees, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.create_employees ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.create_employees" end # verify the required parameter 'employees' is set if @api_client.config.client_side_validation && employees.nil? fail ArgumentError, "Missing the required parameter 'employees' when calling AccountingApi.create_employees" end # resource path local_var_path = '/Employees' # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} query_params[:'summarizeErrors'] = opts[:'summarize_errors'] if !opts[:'summarize_errors'].nil? # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(employees) # return_type return_type = opts[:return_type] || 'Employees' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PUT, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#create_employees\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Creates a history record for a specific expense claim @param xero_tenant_id [String] Xero identifier for Tenant @param expense_claim_id [String] Unique identifier for a ExpenseClaim @param history_records [HistoryRecords] HistoryRecords containing an array of HistoryRecord objects in body of request @param [Hash] opts the optional parameters @return [HistoryRecords]
# File lib/xero-ruby/api/accounting_api.rb, line 1850 def create_expense_claim_history(xero_tenant_id, expense_claim_id, history_records, opts = {}) data, _status_code, _headers = create_expense_claim_history_with_http_info(xero_tenant_id, expense_claim_id, history_records, opts) data end
Creates a history record for a specific expense claim @param xero_tenant_id [String] Xero identifier for Tenant @param expense_claim_id [String] Unique identifier for a ExpenseClaim @param history_records [HistoryRecords] HistoryRecords containing an array of HistoryRecord objects in body of request @param [Hash] opts the optional parameters @return [Array<(HistoryRecords, Integer, Hash)>] HistoryRecords data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 1861 def create_expense_claim_history_with_http_info(xero_tenant_id, expense_claim_id, history_records, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.create_expense_claim_history ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.create_expense_claim_history" end # verify the required parameter 'expense_claim_id' is set if @api_client.config.client_side_validation && expense_claim_id.nil? fail ArgumentError, "Missing the required parameter 'expense_claim_id' when calling AccountingApi.create_expense_claim_history" end # verify the required parameter 'history_records' is set if @api_client.config.client_side_validation && history_records.nil? fail ArgumentError, "Missing the required parameter 'history_records' when calling AccountingApi.create_expense_claim_history" end # resource path local_var_path = '/ExpenseClaims/{ExpenseClaimID}/History'.sub('{' + 'ExpenseClaimID' + '}', expense_claim_id.to_s) # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(history_records) # return_type return_type = opts[:return_type] || 'HistoryRecords' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PUT, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#create_expense_claim_history\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Creates expense claims @param xero_tenant_id [String] Xero identifier for Tenant @param expense_claims [ExpenseClaims] ExpenseClaims with array of ExpenseClaim object in body of request @param [Hash] opts the optional parameters @return [ExpenseClaims]
# File lib/xero-ruby/api/accounting_api.rb, line 1932 def create_expense_claims(xero_tenant_id, expense_claims, opts = {}) data, _status_code, _headers = create_expense_claims_with_http_info(xero_tenant_id, expense_claims, opts) data end
Creates expense claims @param xero_tenant_id [String] Xero identifier for Tenant @param expense_claims [ExpenseClaims] ExpenseClaims with array of ExpenseClaim object in body of request @param [Hash] opts the optional parameters @return [Array<(ExpenseClaims, Integer, Hash)>] ExpenseClaims data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 1942 def create_expense_claims_with_http_info(xero_tenant_id, expense_claims, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.create_expense_claims ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.create_expense_claims" end # verify the required parameter 'expense_claims' is set if @api_client.config.client_side_validation && expense_claims.nil? fail ArgumentError, "Missing the required parameter 'expense_claims' when calling AccountingApi.create_expense_claims" end # resource path local_var_path = '/ExpenseClaims' # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(expense_claims) # return_type return_type = opts[:return_type] || 'ExpenseClaims' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PUT, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#create_expense_claims\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Creates an attachment for a specific invoice or purchase bill by filename @param xero_tenant_id [String] Xero identifier for Tenant @param invoice_id [String] Unique identifier for an Invoice @param file_name [String] Name of the attachment @param body [String] Byte array of file in body of request @param [Hash] opts the optional parameters @option opts [Boolean] :include_online Allows an attachment to be seen by the end customer within their online invoice (default to false) @return [Attachments]
# File lib/xero-ruby/api/accounting_api.rb, line 2012 def create_invoice_attachment_by_file_name(xero_tenant_id, invoice_id, file_name, body, opts = {}) data, _status_code, _headers = create_invoice_attachment_by_file_name_with_http_info(xero_tenant_id, invoice_id, file_name, body, opts) data end
Creates an attachment for a specific invoice or purchase bill by filename @param xero_tenant_id [String] Xero identifier for Tenant @param invoice_id [String] Unique identifier for an Invoice @param file_name [String] Name of the attachment @param body [String] Byte array of file in body of request @param [Hash] opts the optional parameters @option opts [Boolean] :include_online Allows an attachment to be seen by the end customer within their online invoice @return [Array<(Attachments, Integer, Hash)>] Attachments data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 2025 def create_invoice_attachment_by_file_name_with_http_info(xero_tenant_id, invoice_id, file_name, body, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.create_invoice_attachment_by_file_name ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.create_invoice_attachment_by_file_name" end # verify the required parameter 'invoice_id' is set if @api_client.config.client_side_validation && invoice_id.nil? fail ArgumentError, "Missing the required parameter 'invoice_id' when calling AccountingApi.create_invoice_attachment_by_file_name" end # verify the required parameter 'file_name' is set if @api_client.config.client_side_validation && file_name.nil? fail ArgumentError, "Missing the required parameter 'file_name' when calling AccountingApi.create_invoice_attachment_by_file_name" end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? fail ArgumentError, "Missing the required parameter 'body' when calling AccountingApi.create_invoice_attachment_by_file_name" end # resource path 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'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} query_params[:'IncludeOnline'] = opts[:'include_online'] if !opts[:'include_online'].nil? # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/octet-stream']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(body) # return_type return_type = opts[:return_type] || 'Attachments' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PUT, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#create_invoice_attachment_by_file_name\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Creates a history record for a specific invoice @param xero_tenant_id [String] Xero identifier for Tenant @param invoice_id [String] Unique identifier for an Invoice @param history_records [HistoryRecords] HistoryRecords containing an array of HistoryRecord objects in body of request @param [Hash] opts the optional parameters @return [HistoryRecords]
# File lib/xero-ruby/api/accounting_api.rb, line 2102 def create_invoice_history(xero_tenant_id, invoice_id, history_records, opts = {}) data, _status_code, _headers = create_invoice_history_with_http_info(xero_tenant_id, invoice_id, history_records, opts) data end
Creates a history record for a specific invoice @param xero_tenant_id [String] Xero identifier for Tenant @param invoice_id [String] Unique identifier for an Invoice @param history_records [HistoryRecords] HistoryRecords containing an array of HistoryRecord objects in body of request @param [Hash] opts the optional parameters @return [Array<(HistoryRecords, Integer, Hash)>] HistoryRecords data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 2113 def create_invoice_history_with_http_info(xero_tenant_id, invoice_id, history_records, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.create_invoice_history ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.create_invoice_history" end # verify the required parameter 'invoice_id' is set if @api_client.config.client_side_validation && invoice_id.nil? fail ArgumentError, "Missing the required parameter 'invoice_id' when calling AccountingApi.create_invoice_history" end # verify the required parameter 'history_records' is set if @api_client.config.client_side_validation && history_records.nil? fail ArgumentError, "Missing the required parameter 'history_records' when calling AccountingApi.create_invoice_history" end # resource path local_var_path = '/Invoices/{InvoiceID}/History'.sub('{' + 'InvoiceID' + '}', invoice_id.to_s) # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(history_records) # return_type return_type = opts[:return_type] || 'HistoryRecords' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PUT, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#create_invoice_history\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Creates one or more sales invoices or purchase bills @param xero_tenant_id [String] Xero identifier for Tenant @param invoices [Invoices] Invoices with an array of invoice objects in body of request @param [Hash] opts the optional parameters @option opts [Boolean] :summarize_errors If false return 200 OK and mix of successfully created objects and any with validation errors (default to false) @option opts [Integer] :unitdp e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts @return [Invoices]
# File lib/xero-ruby/api/accounting_api.rb, line 2186 def create_invoices(xero_tenant_id, invoices, opts = {}) data, _status_code, _headers = create_invoices_with_http_info(xero_tenant_id, invoices, opts) data end
Creates one or more sales invoices or purchase bills @param xero_tenant_id [String] Xero identifier for Tenant @param invoices [Invoices] Invoices with an array of invoice objects in body of request @param [Hash] opts the optional parameters @option opts [Boolean] :summarize_errors If false return 200 OK and mix of successfully created objects and any with validation errors @option opts [Integer] :unitdp e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts @return [Array<(Invoices, Integer, Hash)>] Invoices data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 2198 def create_invoices_with_http_info(xero_tenant_id, invoices, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.create_invoices ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.create_invoices" end # verify the required parameter 'invoices' is set if @api_client.config.client_side_validation && invoices.nil? fail ArgumentError, "Missing the required parameter 'invoices' when calling AccountingApi.create_invoices" end # resource path local_var_path = '/Invoices' # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} query_params[:'summarizeErrors'] = opts[:'summarize_errors'] if !opts[:'summarize_errors'].nil? query_params[:'unitdp'] = opts[:'unitdp'] if !opts[:'unitdp'].nil? # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(invoices) # return_type return_type = opts[:return_type] || 'Invoices' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PUT, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#create_invoices\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Creates a history record for a specific item @param xero_tenant_id [String] Xero identifier for Tenant @param item_id [String] Unique identifier for an Item @param history_records [HistoryRecords] HistoryRecords containing an array of HistoryRecord objects in body of request @param [Hash] opts the optional parameters @return [HistoryRecords]
# File lib/xero-ruby/api/accounting_api.rb, line 2268 def create_item_history(xero_tenant_id, item_id, history_records, opts = {}) data, _status_code, _headers = create_item_history_with_http_info(xero_tenant_id, item_id, history_records, opts) data end
Creates a history record for a specific item @param xero_tenant_id [String] Xero identifier for Tenant @param item_id [String] Unique identifier for an Item @param history_records [HistoryRecords] HistoryRecords containing an array of HistoryRecord objects in body of request @param [Hash] opts the optional parameters @return [Array<(HistoryRecords, Integer, Hash)>] HistoryRecords data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 2279 def create_item_history_with_http_info(xero_tenant_id, item_id, history_records, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.create_item_history ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.create_item_history" end # verify the required parameter 'item_id' is set if @api_client.config.client_side_validation && item_id.nil? fail ArgumentError, "Missing the required parameter 'item_id' when calling AccountingApi.create_item_history" end # verify the required parameter 'history_records' is set if @api_client.config.client_side_validation && history_records.nil? fail ArgumentError, "Missing the required parameter 'history_records' when calling AccountingApi.create_item_history" end # resource path local_var_path = '/Items/{ItemID}/History'.sub('{' + 'ItemID' + '}', item_id.to_s) # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(history_records) # return_type return_type = opts[:return_type] || 'HistoryRecords' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PUT, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#create_item_history\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Creates one or more items @param xero_tenant_id [String] Xero identifier for Tenant @param items [Items] Items with an array of Item objects in body of request @param [Hash] opts the optional parameters @option opts [Boolean] :summarize_errors If false return 200 OK and mix of successfully created objects and any with validation errors (default to false) @option opts [Integer] :unitdp e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts @return [Items]
# File lib/xero-ruby/api/accounting_api.rb, line 2352 def create_items(xero_tenant_id, items, opts = {}) data, _status_code, _headers = create_items_with_http_info(xero_tenant_id, items, opts) data end
Creates one or more items @param xero_tenant_id [String] Xero identifier for Tenant @param items [Items] Items with an array of Item objects in body of request @param [Hash] opts the optional parameters @option opts [Boolean] :summarize_errors If false return 200 OK and mix of successfully created objects and any with validation errors @option opts [Integer] :unitdp e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts @return [Array<(Items, Integer, Hash)>] Items data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 2364 def create_items_with_http_info(xero_tenant_id, items, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.create_items ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.create_items" end # verify the required parameter 'items' is set if @api_client.config.client_side_validation && items.nil? fail ArgumentError, "Missing the required parameter 'items' when calling AccountingApi.create_items" end # resource path local_var_path = '/Items' # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} query_params[:'summarizeErrors'] = opts[:'summarize_errors'] if !opts[:'summarize_errors'].nil? query_params[:'unitdp'] = opts[:'unitdp'] if !opts[:'unitdp'].nil? # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(items) # return_type return_type = opts[:return_type] || 'Items' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PUT, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#create_items\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Creates linked transactions (billable expenses) @param xero_tenant_id [String] Xero identifier for Tenant @param linked_transaction [LinkedTransaction] LinkedTransaction object in body of request @param [Hash] opts the optional parameters @return [LinkedTransactions]
# File lib/xero-ruby/api/accounting_api.rb, line 2433 def create_linked_transaction(xero_tenant_id, linked_transaction, opts = {}) data, _status_code, _headers = create_linked_transaction_with_http_info(xero_tenant_id, linked_transaction, opts) data end
Creates linked transactions (billable expenses) @param xero_tenant_id [String] Xero identifier for Tenant @param linked_transaction [LinkedTransaction] LinkedTransaction object in body of request @param [Hash] opts the optional parameters @return [Array<(LinkedTransactions, Integer, Hash)>] LinkedTransactions data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 2443 def create_linked_transaction_with_http_info(xero_tenant_id, linked_transaction, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.create_linked_transaction ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.create_linked_transaction" end # verify the required parameter 'linked_transaction' is set if @api_client.config.client_side_validation && linked_transaction.nil? fail ArgumentError, "Missing the required parameter 'linked_transaction' when calling AccountingApi.create_linked_transaction" end # resource path local_var_path = '/LinkedTransactions' # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(linked_transaction) # return_type return_type = opts[:return_type] || 'LinkedTransactions' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PUT, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#create_linked_transaction\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Creates a specific attachment for a specific manual journal by file name @param xero_tenant_id [String] Xero identifier for Tenant @param manual_journal_id [String] Unique identifier for a ManualJournal @param file_name [String] Name of the attachment @param body [String] Byte array of file in body of request @param [Hash] opts the optional parameters @return [Attachments]
# File lib/xero-ruby/api/accounting_api.rb, line 2512 def create_manual_journal_attachment_by_file_name(xero_tenant_id, manual_journal_id, file_name, body, opts = {}) data, _status_code, _headers = create_manual_journal_attachment_by_file_name_with_http_info(xero_tenant_id, manual_journal_id, file_name, body, opts) data end
Creates a specific attachment for a specific manual journal by file name @param xero_tenant_id [String] Xero identifier for Tenant @param manual_journal_id [String] Unique identifier for a ManualJournal @param file_name [String] Name of the attachment @param body [String] Byte array of file in body of request @param [Hash] opts the optional parameters @return [Array<(Attachments, Integer, Hash)>] Attachments data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 2524 def create_manual_journal_attachment_by_file_name_with_http_info(xero_tenant_id, manual_journal_id, file_name, body, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.create_manual_journal_attachment_by_file_name ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.create_manual_journal_attachment_by_file_name" end # verify the required parameter 'manual_journal_id' is set if @api_client.config.client_side_validation && manual_journal_id.nil? fail ArgumentError, "Missing the required parameter 'manual_journal_id' when calling AccountingApi.create_manual_journal_attachment_by_file_name" end # verify the required parameter 'file_name' is set if @api_client.config.client_side_validation && file_name.nil? fail ArgumentError, "Missing the required parameter 'file_name' when calling AccountingApi.create_manual_journal_attachment_by_file_name" end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? fail ArgumentError, "Missing the required parameter 'body' when calling AccountingApi.create_manual_journal_attachment_by_file_name" end # resource path 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'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/octet-stream']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(body) # return_type return_type = opts[:return_type] || 'Attachments' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PUT, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#create_manual_journal_attachment_by_file_name\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Creates a history record for a specific manual journal @param xero_tenant_id [String] Xero identifier for Tenant @param manual_journal_id [String] Unique identifier for a ManualJournal @param history_records [HistoryRecords] HistoryRecords containing an array of HistoryRecord objects in body of request @param [Hash] opts the optional parameters @return [HistoryRecords]
# File lib/xero-ruby/api/accounting_api.rb, line 2600 def create_manual_journal_history_record(xero_tenant_id, manual_journal_id, history_records, opts = {}) data, _status_code, _headers = create_manual_journal_history_record_with_http_info(xero_tenant_id, manual_journal_id, history_records, opts) data end
Creates a history record for a specific manual journal @param xero_tenant_id [String] Xero identifier for Tenant @param manual_journal_id [String] Unique identifier for a ManualJournal @param history_records [HistoryRecords] HistoryRecords containing an array of HistoryRecord objects in body of request @param [Hash] opts the optional parameters @return [Array<(HistoryRecords, Integer, Hash)>] HistoryRecords data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 2611 def create_manual_journal_history_record_with_http_info(xero_tenant_id, manual_journal_id, history_records, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.create_manual_journal_history_record ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.create_manual_journal_history_record" end # verify the required parameter 'manual_journal_id' is set if @api_client.config.client_side_validation && manual_journal_id.nil? fail ArgumentError, "Missing the required parameter 'manual_journal_id' when calling AccountingApi.create_manual_journal_history_record" end # verify the required parameter 'history_records' is set if @api_client.config.client_side_validation && history_records.nil? fail ArgumentError, "Missing the required parameter 'history_records' when calling AccountingApi.create_manual_journal_history_record" end # resource path local_var_path = '/ManualJournals/{ManualJournalID}/History'.sub('{' + 'ManualJournalID' + '}', manual_journal_id.to_s) # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(history_records) # return_type return_type = opts[:return_type] || 'HistoryRecords' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PUT, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#create_manual_journal_history_record\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Creates one or more manual journals @param xero_tenant_id [String] Xero identifier for Tenant @param manual_journals [ManualJournals] ManualJournals array with ManualJournal object in body of request @param [Hash] opts the optional parameters @option opts [Boolean] :summarize_errors If false return 200 OK and mix of successfully created objects and any with validation errors (default to false) @return [ManualJournals]
# File lib/xero-ruby/api/accounting_api.rb, line 2683 def create_manual_journals(xero_tenant_id, manual_journals, opts = {}) data, _status_code, _headers = create_manual_journals_with_http_info(xero_tenant_id, manual_journals, opts) data end
Creates one or more manual journals @param xero_tenant_id [String] Xero identifier for Tenant @param manual_journals [ManualJournals] ManualJournals array with ManualJournal object in body of request @param [Hash] opts the optional parameters @option opts [Boolean] :summarize_errors If false return 200 OK and mix of successfully created objects and any with validation errors @return [Array<(ManualJournals, Integer, Hash)>] ManualJournals data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 2694 def create_manual_journals_with_http_info(xero_tenant_id, manual_journals, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.create_manual_journals ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.create_manual_journals" end # verify the required parameter 'manual_journals' is set if @api_client.config.client_side_validation && manual_journals.nil? fail ArgumentError, "Missing the required parameter 'manual_journals' when calling AccountingApi.create_manual_journals" end # resource path local_var_path = '/ManualJournals' # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} query_params[:'summarizeErrors'] = opts[:'summarize_errors'] if !opts[:'summarize_errors'].nil? # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(manual_journals) # return_type return_type = opts[:return_type] || 'ManualJournals' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PUT, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#create_manual_journals\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Creates a single allocation for a specific overpayment @param xero_tenant_id [String] Xero identifier for Tenant @param overpayment_id [String] Unique identifier for a Overpayment @param allocations [Allocations] Allocations array with Allocation object in body of request @param [Hash] opts the optional parameters @option opts [Boolean] :summarize_errors If false return 200 OK and mix of successfully created objects and any with validation errors (default to false) @return [Allocations]
# File lib/xero-ruby/api/accounting_api.rb, line 2764 def create_overpayment_allocations(xero_tenant_id, overpayment_id, allocations, opts = {}) data, _status_code, _headers = create_overpayment_allocations_with_http_info(xero_tenant_id, overpayment_id, allocations, opts) data end
Creates a single allocation for a specific overpayment @param xero_tenant_id [String] Xero identifier for Tenant @param overpayment_id [String] Unique identifier for a Overpayment @param allocations [Allocations] Allocations array with Allocation object in body of request @param [Hash] opts the optional parameters @option opts [Boolean] :summarize_errors If false return 200 OK and mix of successfully created objects and any with validation errors @return [Array<(Allocations, Integer, Hash)>] Allocations data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 2776 def create_overpayment_allocations_with_http_info(xero_tenant_id, overpayment_id, allocations, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.create_overpayment_allocations ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.create_overpayment_allocations" end # verify the required parameter 'overpayment_id' is set if @api_client.config.client_side_validation && overpayment_id.nil? fail ArgumentError, "Missing the required parameter 'overpayment_id' when calling AccountingApi.create_overpayment_allocations" end # verify the required parameter 'allocations' is set if @api_client.config.client_side_validation && allocations.nil? fail ArgumentError, "Missing the required parameter 'allocations' when calling AccountingApi.create_overpayment_allocations" end # resource path local_var_path = '/Overpayments/{OverpaymentID}/Allocations'.sub('{' + 'OverpaymentID' + '}', overpayment_id.to_s) # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} query_params[:'summarizeErrors'] = opts[:'summarize_errors'] if !opts[:'summarize_errors'].nil? # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(allocations) # return_type return_type = opts[:return_type] || 'Allocations' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PUT, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#create_overpayment_allocations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Creates a history record for a specific overpayment @param xero_tenant_id [String] Xero identifier for Tenant @param overpayment_id [String] Unique identifier for a Overpayment @param history_records [HistoryRecords] HistoryRecords containing an array of HistoryRecord objects in body of request @param [Hash] opts the optional parameters @return [HistoryRecords]
# File lib/xero-ruby/api/accounting_api.rb, line 2849 def create_overpayment_history(xero_tenant_id, overpayment_id, history_records, opts = {}) data, _status_code, _headers = create_overpayment_history_with_http_info(xero_tenant_id, overpayment_id, history_records, opts) data end
Creates a history record for a specific overpayment @param xero_tenant_id [String] Xero identifier for Tenant @param overpayment_id [String] Unique identifier for a Overpayment @param history_records [HistoryRecords] HistoryRecords containing an array of HistoryRecord objects in body of request @param [Hash] opts the optional parameters @return [Array<(HistoryRecords, Integer, Hash)>] HistoryRecords data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 2860 def create_overpayment_history_with_http_info(xero_tenant_id, overpayment_id, history_records, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.create_overpayment_history ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.create_overpayment_history" end # verify the required parameter 'overpayment_id' is set if @api_client.config.client_side_validation && overpayment_id.nil? fail ArgumentError, "Missing the required parameter 'overpayment_id' when calling AccountingApi.create_overpayment_history" end # verify the required parameter 'history_records' is set if @api_client.config.client_side_validation && history_records.nil? fail ArgumentError, "Missing the required parameter 'history_records' when calling AccountingApi.create_overpayment_history" end # resource path local_var_path = '/Overpayments/{OverpaymentID}/History'.sub('{' + 'OverpaymentID' + '}', overpayment_id.to_s) # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(history_records) # return_type return_type = opts[:return_type] || 'HistoryRecords' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PUT, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#create_overpayment_history\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Creates a single payment for invoice or credit notes @param xero_tenant_id [String] Xero identifier for Tenant @param payment [Payment] Request body with a single Payment object @param [Hash] opts the optional parameters @return [Payments]
# File lib/xero-ruby/api/accounting_api.rb, line 2931 def create_payment(xero_tenant_id, payment, opts = {}) data, _status_code, _headers = create_payment_with_http_info(xero_tenant_id, payment, opts) data end
Creates a history record for a specific payment @param xero_tenant_id [String] Xero identifier for Tenant @param payment_id [String] Unique identifier for a Payment @param history_records [HistoryRecords] HistoryRecords containing an array of HistoryRecord objects in body of request @param [Hash] opts the optional parameters @return [HistoryRecords]
# File lib/xero-ruby/api/accounting_api.rb, line 3009 def create_payment_history(xero_tenant_id, payment_id, history_records, opts = {}) data, _status_code, _headers = create_payment_history_with_http_info(xero_tenant_id, payment_id, history_records, opts) data end
Creates a history record for a specific payment @param xero_tenant_id [String] Xero identifier for Tenant @param payment_id [String] Unique identifier for a Payment @param history_records [HistoryRecords] HistoryRecords containing an array of HistoryRecord objects in body of request @param [Hash] opts the optional parameters @return [Array<(HistoryRecords, Integer, Hash)>] HistoryRecords data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 3020 def create_payment_history_with_http_info(xero_tenant_id, payment_id, history_records, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.create_payment_history ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.create_payment_history" end # verify the required parameter 'payment_id' is set if @api_client.config.client_side_validation && payment_id.nil? fail ArgumentError, "Missing the required parameter 'payment_id' when calling AccountingApi.create_payment_history" end # verify the required parameter 'history_records' is set if @api_client.config.client_side_validation && history_records.nil? fail ArgumentError, "Missing the required parameter 'history_records' when calling AccountingApi.create_payment_history" end # resource path local_var_path = '/Payments/{PaymentID}/History'.sub('{' + 'PaymentID' + '}', payment_id.to_s) # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(history_records) # return_type return_type = opts[:return_type] || 'HistoryRecords' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PUT, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#create_payment_history\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Creates a payment service @param xero_tenant_id [String] Xero identifier for Tenant @param payment_services [PaymentServices] PaymentServices array with PaymentService object in body of request @param [Hash] opts the optional parameters @return [PaymentServices]
# File lib/xero-ruby/api/accounting_api.rb, line 3091 def create_payment_service(xero_tenant_id, payment_services, opts = {}) data, _status_code, _headers = create_payment_service_with_http_info(xero_tenant_id, payment_services, opts) data end
Creates a payment service @param xero_tenant_id [String] Xero identifier for Tenant @param payment_services [PaymentServices] PaymentServices array with PaymentService object in body of request @param [Hash] opts the optional parameters @return [Array<(PaymentServices, Integer, Hash)>] PaymentServices data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 3101 def create_payment_service_with_http_info(xero_tenant_id, payment_services, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.create_payment_service ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.create_payment_service" end # verify the required parameter 'payment_services' is set if @api_client.config.client_side_validation && payment_services.nil? fail ArgumentError, "Missing the required parameter 'payment_services' when calling AccountingApi.create_payment_service" end # resource path local_var_path = '/PaymentServices' # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(payment_services) # return_type return_type = opts[:return_type] || 'PaymentServices' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PUT, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#create_payment_service\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Creates a single payment for invoice or credit notes @param xero_tenant_id [String] Xero identifier for Tenant @param payment [Payment] Request body with a single Payment object @param [Hash] opts the optional parameters @return [Array<(Payments, Integer, Hash)>] Payments data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 2941 def create_payment_with_http_info(xero_tenant_id, payment, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.create_payment ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.create_payment" end # verify the required parameter 'payment' is set if @api_client.config.client_side_validation && payment.nil? fail ArgumentError, "Missing the required parameter 'payment' when calling AccountingApi.create_payment" end # resource path local_var_path = '/Payments' # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(payment) # return_type return_type = opts[:return_type] || 'Payments' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#create_payment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Creates multiple payments for invoices or credit notes @param xero_tenant_id [String] Xero identifier for Tenant @param payments [Payments] Payments array with Payment object in body of request @param [Hash] opts the optional parameters @option opts [Boolean] :summarize_errors If false return 200 OK and mix of successfully created objects and any with validation errors (default to false) @return [Payments]
# File lib/xero-ruby/api/accounting_api.rb, line 3169 def create_payments(xero_tenant_id, payments, opts = {}) data, _status_code, _headers = create_payments_with_http_info(xero_tenant_id, payments, opts) data end
Creates multiple payments for invoices or credit notes @param xero_tenant_id [String] Xero identifier for Tenant @param payments [Payments] Payments array with Payment object in body of request @param [Hash] opts the optional parameters @option opts [Boolean] :summarize_errors If false return 200 OK and mix of successfully created objects and any with validation errors @return [Array<(Payments, Integer, Hash)>] Payments data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 3180 def create_payments_with_http_info(xero_tenant_id, payments, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.create_payments ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.create_payments" end # verify the required parameter 'payments' is set if @api_client.config.client_side_validation && payments.nil? fail ArgumentError, "Missing the required parameter 'payments' when calling AccountingApi.create_payments" end # resource path local_var_path = '/Payments' # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} query_params[:'summarizeErrors'] = opts[:'summarize_errors'] if !opts[:'summarize_errors'].nil? # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(payments) # return_type return_type = opts[:return_type] || 'Payments' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PUT, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#create_payments\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Allows you to create an Allocation for prepayments @param xero_tenant_id [String] Xero identifier for Tenant @param prepayment_id [String] Unique identifier for a PrePayment @param allocations [Allocations] Allocations with an array of Allocation object in body of request @param [Hash] opts the optional parameters @option opts [Boolean] :summarize_errors If false return 200 OK and mix of successfully created objects and any with validation errors (default to false) @return [Allocations]
# File lib/xero-ruby/api/accounting_api.rb, line 3250 def create_prepayment_allocations(xero_tenant_id, prepayment_id, allocations, opts = {}) data, _status_code, _headers = create_prepayment_allocations_with_http_info(xero_tenant_id, prepayment_id, allocations, opts) data end
Allows you to create an Allocation for prepayments @param xero_tenant_id [String] Xero identifier for Tenant @param prepayment_id [String] Unique identifier for a PrePayment @param allocations [Allocations] Allocations with an array of Allocation object in body of request @param [Hash] opts the optional parameters @option opts [Boolean] :summarize_errors If false return 200 OK and mix of successfully created objects and any with validation errors @return [Array<(Allocations, Integer, Hash)>] Allocations data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 3262 def create_prepayment_allocations_with_http_info(xero_tenant_id, prepayment_id, allocations, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.create_prepayment_allocations ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.create_prepayment_allocations" end # verify the required parameter 'prepayment_id' is set if @api_client.config.client_side_validation && prepayment_id.nil? fail ArgumentError, "Missing the required parameter 'prepayment_id' when calling AccountingApi.create_prepayment_allocations" end # verify the required parameter 'allocations' is set if @api_client.config.client_side_validation && allocations.nil? fail ArgumentError, "Missing the required parameter 'allocations' when calling AccountingApi.create_prepayment_allocations" end # resource path local_var_path = '/Prepayments/{PrepaymentID}/Allocations'.sub('{' + 'PrepaymentID' + '}', prepayment_id.to_s) # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} query_params[:'summarizeErrors'] = opts[:'summarize_errors'] if !opts[:'summarize_errors'].nil? # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(allocations) # return_type return_type = opts[:return_type] || 'Allocations' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PUT, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#create_prepayment_allocations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Creates a history record for a specific prepayment @param xero_tenant_id [String] Xero identifier for Tenant @param prepayment_id [String] Unique identifier for a PrePayment @param history_records [HistoryRecords] HistoryRecords containing an array of HistoryRecord objects in body of request @param [Hash] opts the optional parameters @return [HistoryRecords]
# File lib/xero-ruby/api/accounting_api.rb, line 3335 def create_prepayment_history(xero_tenant_id, prepayment_id, history_records, opts = {}) data, _status_code, _headers = create_prepayment_history_with_http_info(xero_tenant_id, prepayment_id, history_records, opts) data end
Creates a history record for a specific prepayment @param xero_tenant_id [String] Xero identifier for Tenant @param prepayment_id [String] Unique identifier for a PrePayment @param history_records [HistoryRecords] HistoryRecords containing an array of HistoryRecord objects in body of request @param [Hash] opts the optional parameters @return [Array<(HistoryRecords, Integer, Hash)>] HistoryRecords data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 3346 def create_prepayment_history_with_http_info(xero_tenant_id, prepayment_id, history_records, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.create_prepayment_history ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.create_prepayment_history" end # verify the required parameter 'prepayment_id' is set if @api_client.config.client_side_validation && prepayment_id.nil? fail ArgumentError, "Missing the required parameter 'prepayment_id' when calling AccountingApi.create_prepayment_history" end # verify the required parameter 'history_records' is set if @api_client.config.client_side_validation && history_records.nil? fail ArgumentError, "Missing the required parameter 'history_records' when calling AccountingApi.create_prepayment_history" end # resource path local_var_path = '/Prepayments/{PrepaymentID}/History'.sub('{' + 'PrepaymentID' + '}', prepayment_id.to_s) # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(history_records) # return_type return_type = opts[:return_type] || 'HistoryRecords' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PUT, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#create_prepayment_history\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Creates attachment for a specific purchase order @param xero_tenant_id [String] Xero identifier for Tenant @param purchase_order_id [String] Unique identifier for an Purchase Order @param file_name [String] Name of the attachment @param body [String] Byte array of file in body of request @param [Hash] opts the optional parameters @return [Attachments]
# File lib/xero-ruby/api/accounting_api.rb, line 3419 def create_purchase_order_attachment_by_file_name(xero_tenant_id, purchase_order_id, file_name, body, opts = {}) data, _status_code, _headers = create_purchase_order_attachment_by_file_name_with_http_info(xero_tenant_id, purchase_order_id, file_name, body, opts) data end
Creates attachment for a specific purchase order @param xero_tenant_id [String] Xero identifier for Tenant @param purchase_order_id [String] Unique identifier for an Purchase Order @param file_name [String] Name of the attachment @param body [String] Byte array of file in body of request @param [Hash] opts the optional parameters @return [Array<(Attachments, Integer, Hash)>] Attachments data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 3431 def create_purchase_order_attachment_by_file_name_with_http_info(xero_tenant_id, purchase_order_id, file_name, body, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.create_purchase_order_attachment_by_file_name ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.create_purchase_order_attachment_by_file_name" end # verify the required parameter 'purchase_order_id' is set if @api_client.config.client_side_validation && purchase_order_id.nil? fail ArgumentError, "Missing the required parameter 'purchase_order_id' when calling AccountingApi.create_purchase_order_attachment_by_file_name" end # verify the required parameter 'file_name' is set if @api_client.config.client_side_validation && file_name.nil? fail ArgumentError, "Missing the required parameter 'file_name' when calling AccountingApi.create_purchase_order_attachment_by_file_name" end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? fail ArgumentError, "Missing the required parameter 'body' when calling AccountingApi.create_purchase_order_attachment_by_file_name" end # resource path local_var_path = '/PurchaseOrders/{PurchaseOrderID}/Attachments/{FileName}'.sub('{' + 'PurchaseOrderID' + '}', purchase_order_id.to_s).sub('{' + 'FileName' + '}', file_name.to_s) # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/octet-stream']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(body) # return_type return_type = opts[:return_type] || 'Attachments' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PUT, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#create_purchase_order_attachment_by_file_name\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Creates a history record for a specific purchase orders @param xero_tenant_id [String] Xero identifier for Tenant @param purchase_order_id [String] Unique identifier for an Purchase Order @param history_records [HistoryRecords] HistoryRecords containing an array of HistoryRecord objects in body of request @param [Hash] opts the optional parameters @return [HistoryRecords]
# File lib/xero-ruby/api/accounting_api.rb, line 3507 def create_purchase_order_history(xero_tenant_id, purchase_order_id, history_records, opts = {}) data, _status_code, _headers = create_purchase_order_history_with_http_info(xero_tenant_id, purchase_order_id, history_records, opts) data end
Creates a history record for a specific purchase orders @param xero_tenant_id [String] Xero identifier for Tenant @param purchase_order_id [String] Unique identifier for an Purchase Order @param history_records [HistoryRecords] HistoryRecords containing an array of HistoryRecord objects in body of request @param [Hash] opts the optional parameters @return [Array<(HistoryRecords, Integer, Hash)>] HistoryRecords data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 3518 def create_purchase_order_history_with_http_info(xero_tenant_id, purchase_order_id, history_records, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.create_purchase_order_history ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.create_purchase_order_history" end # verify the required parameter 'purchase_order_id' is set if @api_client.config.client_side_validation && purchase_order_id.nil? fail ArgumentError, "Missing the required parameter 'purchase_order_id' when calling AccountingApi.create_purchase_order_history" end # verify the required parameter 'history_records' is set if @api_client.config.client_side_validation && history_records.nil? fail ArgumentError, "Missing the required parameter 'history_records' when calling AccountingApi.create_purchase_order_history" end # resource path local_var_path = '/PurchaseOrders/{PurchaseOrderID}/History'.sub('{' + 'PurchaseOrderID' + '}', purchase_order_id.to_s) # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(history_records) # return_type return_type = opts[:return_type] || 'HistoryRecords' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PUT, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#create_purchase_order_history\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Creates one or more purchase orders @param xero_tenant_id [String] Xero identifier for Tenant @param purchase_orders [PurchaseOrders] PurchaseOrders with an array of PurchaseOrder object in body of request @param [Hash] opts the optional parameters @option opts [Boolean] :summarize_errors If false return 200 OK and mix of successfully created objects and any with validation errors (default to false) @return [PurchaseOrders]
# File lib/xero-ruby/api/accounting_api.rb, line 3590 def create_purchase_orders(xero_tenant_id, purchase_orders, opts = {}) data, _status_code, _headers = create_purchase_orders_with_http_info(xero_tenant_id, purchase_orders, opts) data end
Creates one or more purchase orders @param xero_tenant_id [String] Xero identifier for Tenant @param purchase_orders [PurchaseOrders] PurchaseOrders with an array of PurchaseOrder object in body of request @param [Hash] opts the optional parameters @option opts [Boolean] :summarize_errors If false return 200 OK and mix of successfully created objects and any with validation errors @return [Array<(PurchaseOrders, Integer, Hash)>] PurchaseOrders data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 3601 def create_purchase_orders_with_http_info(xero_tenant_id, purchase_orders, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.create_purchase_orders ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.create_purchase_orders" end # verify the required parameter 'purchase_orders' is set if @api_client.config.client_side_validation && purchase_orders.nil? fail ArgumentError, "Missing the required parameter 'purchase_orders' when calling AccountingApi.create_purchase_orders" end # resource path local_var_path = '/PurchaseOrders' # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} query_params[:'summarizeErrors'] = opts[:'summarize_errors'] if !opts[:'summarize_errors'].nil? # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(purchase_orders) # return_type return_type = opts[:return_type] || 'PurchaseOrders' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PUT, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#create_purchase_orders\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Creates attachment for a specific quote @param xero_tenant_id [String] Xero identifier for Tenant @param quote_id [String] Unique identifier for an Quote @param file_name [String] Name of the attachment @param body [String] Byte array of file in body of request @param [Hash] opts the optional parameters @return [Attachments]
# File lib/xero-ruby/api/accounting_api.rb, line 3671 def create_quote_attachment_by_file_name(xero_tenant_id, quote_id, file_name, body, opts = {}) data, _status_code, _headers = create_quote_attachment_by_file_name_with_http_info(xero_tenant_id, quote_id, file_name, body, opts) data end
Creates attachment for a specific quote @param xero_tenant_id [String] Xero identifier for Tenant @param quote_id [String] Unique identifier for an Quote @param file_name [String] Name of the attachment @param body [String] Byte array of file in body of request @param [Hash] opts the optional parameters @return [Array<(Attachments, Integer, Hash)>] Attachments data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 3683 def create_quote_attachment_by_file_name_with_http_info(xero_tenant_id, quote_id, file_name, body, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.create_quote_attachment_by_file_name ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.create_quote_attachment_by_file_name" end # verify the required parameter 'quote_id' is set if @api_client.config.client_side_validation && quote_id.nil? fail ArgumentError, "Missing the required parameter 'quote_id' when calling AccountingApi.create_quote_attachment_by_file_name" end # verify the required parameter 'file_name' is set if @api_client.config.client_side_validation && file_name.nil? fail ArgumentError, "Missing the required parameter 'file_name' when calling AccountingApi.create_quote_attachment_by_file_name" end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? fail ArgumentError, "Missing the required parameter 'body' when calling AccountingApi.create_quote_attachment_by_file_name" end # resource path 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'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/octet-stream']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(body) # return_type return_type = opts[:return_type] || 'Attachments' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PUT, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#create_quote_attachment_by_file_name\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Creates a history record for a specific quote @param xero_tenant_id [String] Xero identifier for Tenant @param quote_id [String] Unique identifier for an Quote @param history_records [HistoryRecords] HistoryRecords containing an array of HistoryRecord objects in body of request @param [Hash] opts the optional parameters @return [HistoryRecords]
# File lib/xero-ruby/api/accounting_api.rb, line 3759 def create_quote_history(xero_tenant_id, quote_id, history_records, opts = {}) data, _status_code, _headers = create_quote_history_with_http_info(xero_tenant_id, quote_id, history_records, opts) data end
Creates a history record for a specific quote @param xero_tenant_id [String] Xero identifier for Tenant @param quote_id [String] Unique identifier for an Quote @param history_records [HistoryRecords] HistoryRecords containing an array of HistoryRecord objects in body of request @param [Hash] opts the optional parameters @return [Array<(HistoryRecords, Integer, Hash)>] HistoryRecords data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 3770 def create_quote_history_with_http_info(xero_tenant_id, quote_id, history_records, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.create_quote_history ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.create_quote_history" end # verify the required parameter 'quote_id' is set if @api_client.config.client_side_validation && quote_id.nil? fail ArgumentError, "Missing the required parameter 'quote_id' when calling AccountingApi.create_quote_history" end # verify the required parameter 'history_records' is set if @api_client.config.client_side_validation && history_records.nil? fail ArgumentError, "Missing the required parameter 'history_records' when calling AccountingApi.create_quote_history" end # resource path local_var_path = '/Quotes/{QuoteID}/History'.sub('{' + 'QuoteID' + '}', quote_id.to_s) # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(history_records) # return_type return_type = opts[:return_type] || 'HistoryRecords' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PUT, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#create_quote_history\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Create one or more quotes @param xero_tenant_id [String] Xero identifier for Tenant @param quotes [Quotes] Quotes with an array of Quote object in body of request @param [Hash] opts the optional parameters @option opts [Boolean] :summarize_errors If false return 200 OK and mix of successfully created objects and any with validation errors (default to false) @return [Quotes]
# File lib/xero-ruby/api/accounting_api.rb, line 3842 def create_quotes(xero_tenant_id, quotes, opts = {}) data, _status_code, _headers = create_quotes_with_http_info(xero_tenant_id, quotes, opts) data end
Create one or more quotes @param xero_tenant_id [String] Xero identifier for Tenant @param quotes [Quotes] Quotes with an array of Quote object in body of request @param [Hash] opts the optional parameters @option opts [Boolean] :summarize_errors If false return 200 OK and mix of successfully created objects and any with validation errors @return [Array<(Quotes, Integer, Hash)>] Quotes data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 3853 def create_quotes_with_http_info(xero_tenant_id, quotes, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.create_quotes ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.create_quotes" end # verify the required parameter 'quotes' is set if @api_client.config.client_side_validation && quotes.nil? fail ArgumentError, "Missing the required parameter 'quotes' when calling AccountingApi.create_quotes" end # resource path local_var_path = '/Quotes' # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} query_params[:'summarizeErrors'] = opts[:'summarize_errors'] if !opts[:'summarize_errors'].nil? # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(quotes) # return_type return_type = opts[:return_type] || 'Quotes' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PUT, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#create_quotes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Creates draft expense claim receipts for any user @param xero_tenant_id [String] Xero identifier for Tenant @param receipts [Receipts] Receipts with an array of Receipt object in body of request @param [Hash] opts the optional parameters @option opts [Integer] :unitdp e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts @return [Receipts]
# File lib/xero-ruby/api/accounting_api.rb, line 3922 def create_receipt(xero_tenant_id, receipts, opts = {}) data, _status_code, _headers = create_receipt_with_http_info(xero_tenant_id, receipts, opts) data end
Creates an attachment on a specific expense claim receipts by file name @param xero_tenant_id [String] Xero identifier for Tenant @param receipt_id [String] Unique identifier for a Receipt @param file_name [String] Name of the attachment @param body [String] Byte array of file in body of request @param [Hash] opts the optional parameters @return [Attachments]
# File lib/xero-ruby/api/accounting_api.rb, line 4003 def create_receipt_attachment_by_file_name(xero_tenant_id, receipt_id, file_name, body, opts = {}) data, _status_code, _headers = create_receipt_attachment_by_file_name_with_http_info(xero_tenant_id, receipt_id, file_name, body, opts) data end
Creates an attachment on a specific expense claim receipts by file name @param xero_tenant_id [String] Xero identifier for Tenant @param receipt_id [String] Unique identifier for a Receipt @param file_name [String] Name of the attachment @param body [String] Byte array of file in body of request @param [Hash] opts the optional parameters @return [Array<(Attachments, Integer, Hash)>] Attachments data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 4015 def create_receipt_attachment_by_file_name_with_http_info(xero_tenant_id, receipt_id, file_name, body, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.create_receipt_attachment_by_file_name ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.create_receipt_attachment_by_file_name" end # verify the required parameter 'receipt_id' is set if @api_client.config.client_side_validation && receipt_id.nil? fail ArgumentError, "Missing the required parameter 'receipt_id' when calling AccountingApi.create_receipt_attachment_by_file_name" end # verify the required parameter 'file_name' is set if @api_client.config.client_side_validation && file_name.nil? fail ArgumentError, "Missing the required parameter 'file_name' when calling AccountingApi.create_receipt_attachment_by_file_name" end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? fail ArgumentError, "Missing the required parameter 'body' when calling AccountingApi.create_receipt_attachment_by_file_name" end # resource path 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'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/octet-stream']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(body) # return_type return_type = opts[:return_type] || 'Attachments' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PUT, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#create_receipt_attachment_by_file_name\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Creates a history record for a specific receipt @param xero_tenant_id [String] Xero identifier for Tenant @param receipt_id [String] Unique identifier for a Receipt @param history_records [HistoryRecords] HistoryRecords containing an array of HistoryRecord objects in body of request @param [Hash] opts the optional parameters @return [HistoryRecords]
# File lib/xero-ruby/api/accounting_api.rb, line 4091 def create_receipt_history(xero_tenant_id, receipt_id, history_records, opts = {}) data, _status_code, _headers = create_receipt_history_with_http_info(xero_tenant_id, receipt_id, history_records, opts) data end
Creates a history record for a specific receipt @param xero_tenant_id [String] Xero identifier for Tenant @param receipt_id [String] Unique identifier for a Receipt @param history_records [HistoryRecords] HistoryRecords containing an array of HistoryRecord objects in body of request @param [Hash] opts the optional parameters @return [Array<(HistoryRecords, Integer, Hash)>] HistoryRecords data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 4102 def create_receipt_history_with_http_info(xero_tenant_id, receipt_id, history_records, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.create_receipt_history ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.create_receipt_history" end # verify the required parameter 'receipt_id' is set if @api_client.config.client_side_validation && receipt_id.nil? fail ArgumentError, "Missing the required parameter 'receipt_id' when calling AccountingApi.create_receipt_history" end # verify the required parameter 'history_records' is set if @api_client.config.client_side_validation && history_records.nil? fail ArgumentError, "Missing the required parameter 'history_records' when calling AccountingApi.create_receipt_history" end # resource path local_var_path = '/Receipts/{ReceiptID}/History'.sub('{' + 'ReceiptID' + '}', receipt_id.to_s) # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(history_records) # return_type return_type = opts[:return_type] || 'HistoryRecords' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PUT, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#create_receipt_history\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Creates draft expense claim receipts for any user @param xero_tenant_id [String] Xero identifier for Tenant @param receipts [Receipts] Receipts with an array of Receipt object in body of request @param [Hash] opts the optional parameters @option opts [Integer] :unitdp e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts @return [Array<(Receipts, Integer, Hash)>] Receipts data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 3933 def create_receipt_with_http_info(xero_tenant_id, receipts, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.create_receipt ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.create_receipt" end # verify the required parameter 'receipts' is set if @api_client.config.client_side_validation && receipts.nil? fail ArgumentError, "Missing the required parameter 'receipts' when calling AccountingApi.create_receipt" end # resource path local_var_path = '/Receipts' # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} query_params[:'unitdp'] = opts[:'unitdp'] if !opts[:'unitdp'].nil? # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(receipts) # return_type return_type = opts[:return_type] || 'Receipts' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PUT, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#create_receipt\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Creates an attachment from a specific repeating invoices by file name @param xero_tenant_id [String] Xero identifier for Tenant @param repeating_invoice_id [String] Unique identifier for a Repeating Invoice @param file_name [String] Name of the attachment @param body [String] Byte array of file in body of request @param [Hash] opts the optional parameters @return [Attachments]
# File lib/xero-ruby/api/accounting_api.rb, line 4175 def create_repeating_invoice_attachment_by_file_name(xero_tenant_id, repeating_invoice_id, file_name, body, opts = {}) data, _status_code, _headers = create_repeating_invoice_attachment_by_file_name_with_http_info(xero_tenant_id, repeating_invoice_id, file_name, body, opts) data end
Creates an attachment from a specific repeating invoices by file name @param xero_tenant_id [String] Xero identifier for Tenant @param repeating_invoice_id [String] Unique identifier for a Repeating Invoice @param file_name [String] Name of the attachment @param body [String] Byte array of file in body of request @param [Hash] opts the optional parameters @return [Array<(Attachments, Integer, Hash)>] Attachments data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 4187 def create_repeating_invoice_attachment_by_file_name_with_http_info(xero_tenant_id, repeating_invoice_id, file_name, body, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.create_repeating_invoice_attachment_by_file_name ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.create_repeating_invoice_attachment_by_file_name" end # verify the required parameter 'repeating_invoice_id' is set if @api_client.config.client_side_validation && repeating_invoice_id.nil? fail ArgumentError, "Missing the required parameter 'repeating_invoice_id' when calling AccountingApi.create_repeating_invoice_attachment_by_file_name" end # verify the required parameter 'file_name' is set if @api_client.config.client_side_validation && file_name.nil? fail ArgumentError, "Missing the required parameter 'file_name' when calling AccountingApi.create_repeating_invoice_attachment_by_file_name" end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? fail ArgumentError, "Missing the required parameter 'body' when calling AccountingApi.create_repeating_invoice_attachment_by_file_name" end # resource path 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'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/octet-stream']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(body) # return_type return_type = opts[:return_type] || 'Attachments' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PUT, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#create_repeating_invoice_attachment_by_file_name\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Creates a history record for a specific repeating invoice @param xero_tenant_id [String] Xero identifier for Tenant @param repeating_invoice_id [String] Unique identifier for a Repeating Invoice @param history_records [HistoryRecords] HistoryRecords containing an array of HistoryRecord objects in body of request @param [Hash] opts the optional parameters @return [HistoryRecords]
# File lib/xero-ruby/api/accounting_api.rb, line 4263 def create_repeating_invoice_history(xero_tenant_id, repeating_invoice_id, history_records, opts = {}) data, _status_code, _headers = create_repeating_invoice_history_with_http_info(xero_tenant_id, repeating_invoice_id, history_records, opts) data end
Creates a history record for a specific repeating invoice @param xero_tenant_id [String] Xero identifier for Tenant @param repeating_invoice_id [String] Unique identifier for a Repeating Invoice @param history_records [HistoryRecords] HistoryRecords containing an array of HistoryRecord objects in body of request @param [Hash] opts the optional parameters @return [Array<(HistoryRecords, Integer, Hash)>] HistoryRecords data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 4274 def create_repeating_invoice_history_with_http_info(xero_tenant_id, repeating_invoice_id, history_records, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.create_repeating_invoice_history ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.create_repeating_invoice_history" end # verify the required parameter 'repeating_invoice_id' is set if @api_client.config.client_side_validation && repeating_invoice_id.nil? fail ArgumentError, "Missing the required parameter 'repeating_invoice_id' when calling AccountingApi.create_repeating_invoice_history" end # verify the required parameter 'history_records' is set if @api_client.config.client_side_validation && history_records.nil? fail ArgumentError, "Missing the required parameter 'history_records' when calling AccountingApi.create_repeating_invoice_history" end # resource path local_var_path = '/RepeatingInvoices/{RepeatingInvoiceID}/History'.sub('{' + 'RepeatingInvoiceID' + '}', repeating_invoice_id.to_s) # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(history_records) # return_type return_type = opts[:return_type] || 'HistoryRecords' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PUT, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#create_repeating_invoice_history\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Creates one or more tax rates @param xero_tenant_id [String] Xero identifier for Tenant @param tax_rates [TaxRates] TaxRates array with TaxRate object in body of request @param [Hash] opts the optional parameters @return [TaxRates]
# File lib/xero-ruby/api/accounting_api.rb, line 4345 def create_tax_rates(xero_tenant_id, tax_rates, opts = {}) data, _status_code, _headers = create_tax_rates_with_http_info(xero_tenant_id, tax_rates, opts) data end
Creates one or more tax rates @param xero_tenant_id [String] Xero identifier for Tenant @param tax_rates [TaxRates] TaxRates array with TaxRate object in body of request @param [Hash] opts the optional parameters @return [Array<(TaxRates, Integer, Hash)>] TaxRates data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 4355 def create_tax_rates_with_http_info(xero_tenant_id, tax_rates, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.create_tax_rates ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.create_tax_rates" end # verify the required parameter 'tax_rates' is set if @api_client.config.client_side_validation && tax_rates.nil? fail ArgumentError, "Missing the required parameter 'tax_rates' when calling AccountingApi.create_tax_rates" end # resource path local_var_path = '/TaxRates' # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(tax_rates) # return_type return_type = opts[:return_type] || 'TaxRates' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PUT, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#create_tax_rates\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Create tracking categories @param xero_tenant_id [String] Xero identifier for Tenant @param tracking_category [TrackingCategory] TrackingCategory object in body of request @param [Hash] opts the optional parameters @return [TrackingCategories]
# File lib/xero-ruby/api/accounting_api.rb, line 4422 def create_tracking_category(xero_tenant_id, tracking_category, opts = {}) data, _status_code, _headers = create_tracking_category_with_http_info(xero_tenant_id, tracking_category, opts) data end
Create tracking categories @param xero_tenant_id [String] Xero identifier for Tenant @param tracking_category [TrackingCategory] TrackingCategory object in body of request @param [Hash] opts the optional parameters @return [Array<(TrackingCategories, Integer, Hash)>] TrackingCategories data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 4432 def create_tracking_category_with_http_info(xero_tenant_id, tracking_category, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.create_tracking_category ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.create_tracking_category" end # verify the required parameter 'tracking_category' is set if @api_client.config.client_side_validation && tracking_category.nil? fail ArgumentError, "Missing the required parameter 'tracking_category' when calling AccountingApi.create_tracking_category" end # resource path local_var_path = '/TrackingCategories' # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(tracking_category) # return_type return_type = opts[:return_type] || 'TrackingCategories' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PUT, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#create_tracking_category\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Creates options for a specific tracking category @param xero_tenant_id [String] Xero identifier for Tenant @param tracking_category_id [String] Unique identifier for a TrackingCategory @param tracking_option [TrackingOption] TrackingOption object in body of request @param [Hash] opts the optional parameters @return [TrackingOptions]
# File lib/xero-ruby/api/accounting_api.rb, line 4500 def create_tracking_options(xero_tenant_id, tracking_category_id, tracking_option, opts = {}) data, _status_code, _headers = create_tracking_options_with_http_info(xero_tenant_id, tracking_category_id, tracking_option, opts) data end
Creates options for a specific tracking category @param xero_tenant_id [String] Xero identifier for Tenant @param tracking_category_id [String] Unique identifier for a TrackingCategory @param tracking_option [TrackingOption] TrackingOption object in body of request @param [Hash] opts the optional parameters @return [Array<(TrackingOptions, Integer, Hash)>] TrackingOptions data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 4511 def create_tracking_options_with_http_info(xero_tenant_id, tracking_category_id, tracking_option, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.create_tracking_options ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.create_tracking_options" end # verify the required parameter 'tracking_category_id' is set if @api_client.config.client_side_validation && tracking_category_id.nil? fail ArgumentError, "Missing the required parameter 'tracking_category_id' when calling AccountingApi.create_tracking_options" end # verify the required parameter 'tracking_option' is set if @api_client.config.client_side_validation && tracking_option.nil? fail ArgumentError, "Missing the required parameter 'tracking_option' when calling AccountingApi.create_tracking_options" end # resource path local_var_path = '/TrackingCategories/{TrackingCategoryID}/Options'.sub('{' + 'TrackingCategoryID' + '}', tracking_category_id.to_s) # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(tracking_option) # return_type return_type = opts[:return_type] || 'TrackingOptions' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PUT, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#create_tracking_options\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Deletes a chart of accounts @param xero_tenant_id [String] Xero identifier for Tenant @param account_id [String] Unique identifier for Account object @param [Hash] opts the optional parameters @return [Accounts]
# File lib/xero-ruby/api/accounting_api.rb, line 4582 def delete_account(xero_tenant_id, account_id, opts = {}) data, _status_code, _headers = delete_account_with_http_info(xero_tenant_id, account_id, opts) data end
Deletes a chart of accounts @param xero_tenant_id [String] Xero identifier for Tenant @param account_id [String] Unique identifier for Account object @param [Hash] opts the optional parameters @return [Array<(Accounts, Integer, Hash)>] Accounts data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 4592 def delete_account_with_http_info(xero_tenant_id, account_id, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.delete_account ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.delete_account" end # verify the required parameter 'account_id' is set if @api_client.config.client_side_validation && account_id.nil? fail ArgumentError, "Missing the required parameter 'account_id' when calling AccountingApi.delete_account" end # resource path local_var_path = '/Accounts/{AccountID}'.sub('{' + 'AccountID' + '}', account_id.to_s) # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'Accounts' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#delete_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Deletes a specific contact from a contact group using a unique contact Id @param xero_tenant_id [String] Xero identifier for Tenant @param contact_group_id [String] Unique identifier for a Contact Group @param contact_id [String] Unique identifier for a Contact @param [Hash] opts the optional parameters @return [nil]
# File lib/xero-ruby/api/accounting_api.rb, line 4658 def delete_contact_group_contact(xero_tenant_id, contact_group_id, contact_id, opts = {}) delete_contact_group_contact_with_http_info(xero_tenant_id, contact_group_id, contact_id, opts) nil end
Deletes a specific contact from a contact group using a unique contact Id @param xero_tenant_id [String] Xero identifier for Tenant @param contact_group_id [String] Unique identifier for a Contact Group @param contact_id [String] Unique identifier for a Contact @param [Hash] opts the optional parameters @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 4669 def delete_contact_group_contact_with_http_info(xero_tenant_id, contact_group_id, contact_id, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.delete_contact_group_contact ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.delete_contact_group_contact" end # verify the required parameter 'contact_group_id' is set if @api_client.config.client_side_validation && contact_group_id.nil? fail ArgumentError, "Missing the required parameter 'contact_group_id' when calling AccountingApi.delete_contact_group_contact" end # verify the required parameter 'contact_id' is set if @api_client.config.client_side_validation && contact_id.nil? fail ArgumentError, "Missing the required parameter 'contact_id' when calling AccountingApi.delete_contact_group_contact" end # resource path 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'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#delete_contact_group_contact\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Deletes all contacts from a specific contact group @param xero_tenant_id [String] Xero identifier for Tenant @param contact_group_id [String] Unique identifier for a Contact Group @param [Hash] opts the optional parameters @return [nil]
# File lib/xero-ruby/api/accounting_api.rb, line 4738 def delete_contact_group_contacts(xero_tenant_id, contact_group_id, opts = {}) delete_contact_group_contacts_with_http_info(xero_tenant_id, contact_group_id, opts) nil end
Deletes all contacts from a specific contact group @param xero_tenant_id [String] Xero identifier for Tenant @param contact_group_id [String] Unique identifier for a Contact Group @param [Hash] opts the optional parameters @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 4748 def delete_contact_group_contacts_with_http_info(xero_tenant_id, contact_group_id, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.delete_contact_group_contacts ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.delete_contact_group_contacts" end # verify the required parameter 'contact_group_id' is set if @api_client.config.client_side_validation && contact_group_id.nil? fail ArgumentError, "Missing the required parameter 'contact_group_id' when calling AccountingApi.delete_contact_group_contacts" end # resource path local_var_path = '/ContactGroups/{ContactGroupID}/Contacts'.sub('{' + 'ContactGroupID' + '}', contact_group_id.to_s) # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#delete_contact_group_contacts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Deletes a specific item @param xero_tenant_id [String] Xero identifier for Tenant @param item_id [String] Unique identifier for an Item @param [Hash] opts the optional parameters @return [nil]
# File lib/xero-ruby/api/accounting_api.rb, line 4811 def delete_item(xero_tenant_id, item_id, opts = {}) delete_item_with_http_info(xero_tenant_id, item_id, opts) nil end
Deletes a specific item @param xero_tenant_id [String] Xero identifier for Tenant @param item_id [String] Unique identifier for an Item @param [Hash] opts the optional parameters @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 4821 def delete_item_with_http_info(xero_tenant_id, item_id, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.delete_item ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.delete_item" end # verify the required parameter 'item_id' is set if @api_client.config.client_side_validation && item_id.nil? fail ArgumentError, "Missing the required parameter 'item_id' when calling AccountingApi.delete_item" end # resource path local_var_path = '/Items/{ItemID}'.sub('{' + 'ItemID' + '}', item_id.to_s) # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#delete_item\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Deletes a specific linked transactions (billable expenses) @param xero_tenant_id [String] Xero identifier for Tenant @param linked_transaction_id [String] Unique identifier for a LinkedTransaction @param [Hash] opts the optional parameters @return [nil]
# File lib/xero-ruby/api/accounting_api.rb, line 4886 def delete_linked_transaction(xero_tenant_id, linked_transaction_id, opts = {}) delete_linked_transaction_with_http_info(xero_tenant_id, linked_transaction_id, opts) nil end
Deletes a specific linked transactions (billable expenses) @param xero_tenant_id [String] Xero identifier for Tenant @param linked_transaction_id [String] Unique identifier for a LinkedTransaction @param [Hash] opts the optional parameters @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 4896 def delete_linked_transaction_with_http_info(xero_tenant_id, linked_transaction_id, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.delete_linked_transaction ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.delete_linked_transaction" end # verify the required parameter 'linked_transaction_id' is set if @api_client.config.client_side_validation && linked_transaction_id.nil? fail ArgumentError, "Missing the required parameter 'linked_transaction_id' when calling AccountingApi.delete_linked_transaction" end # resource path local_var_path = '/LinkedTransactions/{LinkedTransactionID}'.sub('{' + 'LinkedTransactionID' + '}', linked_transaction_id.to_s) # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#delete_linked_transaction\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Updates a specific payment for invoices and credit notes @param xero_tenant_id [String] Xero identifier for Tenant @param payment_id [String] Unique identifier for a Payment @param payment_delete [PaymentDelete] @param [Hash] opts the optional parameters @return [Payments]
# File lib/xero-ruby/api/accounting_api.rb, line 4962 def delete_payment(xero_tenant_id, payment_id, payment_delete, opts = {}) data, _status_code, _headers = delete_payment_with_http_info(xero_tenant_id, payment_id, payment_delete, opts) data end
Updates a specific payment for invoices and credit notes @param xero_tenant_id [String] Xero identifier for Tenant @param payment_id [String] Unique identifier for a Payment @param payment_delete [PaymentDelete] @param [Hash] opts the optional parameters @return [Array<(Payments, Integer, Hash)>] Payments data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 4973 def delete_payment_with_http_info(xero_tenant_id, payment_id, payment_delete, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.delete_payment ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.delete_payment" end # verify the required parameter 'payment_id' is set if @api_client.config.client_side_validation && payment_id.nil? fail ArgumentError, "Missing the required parameter 'payment_id' when calling AccountingApi.delete_payment" end # verify the required parameter 'payment_delete' is set if @api_client.config.client_side_validation && payment_delete.nil? fail ArgumentError, "Missing the required parameter 'payment_delete' when calling AccountingApi.delete_payment" end # resource path local_var_path = '/Payments/{PaymentID}'.sub('{' + 'PaymentID' + '}', payment_id.to_s) # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(payment_delete) # return_type return_type = opts[:return_type] || 'Payments' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#delete_payment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Deletes a specific tracking category @param xero_tenant_id [String] Xero identifier for Tenant @param tracking_category_id [String] Unique identifier for a TrackingCategory @param [Hash] opts the optional parameters @return [TrackingCategories]
# File lib/xero-ruby/api/accounting_api.rb, line 5044 def delete_tracking_category(xero_tenant_id, tracking_category_id, opts = {}) data, _status_code, _headers = delete_tracking_category_with_http_info(xero_tenant_id, tracking_category_id, opts) data end
Deletes a specific tracking category @param xero_tenant_id [String] Xero identifier for Tenant @param tracking_category_id [String] Unique identifier for a TrackingCategory @param [Hash] opts the optional parameters @return [Array<(TrackingCategories, Integer, Hash)>] TrackingCategories data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 5054 def delete_tracking_category_with_http_info(xero_tenant_id, tracking_category_id, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.delete_tracking_category ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.delete_tracking_category" end # verify the required parameter 'tracking_category_id' is set if @api_client.config.client_side_validation && tracking_category_id.nil? fail ArgumentError, "Missing the required parameter 'tracking_category_id' when calling AccountingApi.delete_tracking_category" end # resource path local_var_path = '/TrackingCategories/{TrackingCategoryID}'.sub('{' + 'TrackingCategoryID' + '}', tracking_category_id.to_s) # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'TrackingCategories' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#delete_tracking_category\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Deletes a specific option for a specific tracking category @param xero_tenant_id [String] Xero identifier for Tenant @param tracking_category_id [String] Unique identifier for a TrackingCategory @param tracking_option_id [String] Unique identifier for a Tracking Option @param [Hash] opts the optional parameters @return [TrackingOptions]
# File lib/xero-ruby/api/accounting_api.rb, line 5120 def delete_tracking_options(xero_tenant_id, tracking_category_id, tracking_option_id, opts = {}) data, _status_code, _headers = delete_tracking_options_with_http_info(xero_tenant_id, tracking_category_id, tracking_option_id, opts) data end
Deletes a specific option for a specific tracking category @param xero_tenant_id [String] Xero identifier for Tenant @param tracking_category_id [String] Unique identifier for a TrackingCategory @param tracking_option_id [String] Unique identifier for a Tracking Option @param [Hash] opts the optional parameters @return [Array<(TrackingOptions, Integer, Hash)>] TrackingOptions data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 5131 def delete_tracking_options_with_http_info(xero_tenant_id, tracking_category_id, tracking_option_id, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.delete_tracking_options ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.delete_tracking_options" end # verify the required parameter 'tracking_category_id' is set if @api_client.config.client_side_validation && tracking_category_id.nil? fail ArgumentError, "Missing the required parameter 'tracking_category_id' when calling AccountingApi.delete_tracking_options" end # verify the required parameter 'tracking_option_id' is set if @api_client.config.client_side_validation && tracking_option_id.nil? fail ArgumentError, "Missing the required parameter 'tracking_option_id' when calling AccountingApi.delete_tracking_options" end # resource path 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'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'TrackingOptions' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#delete_tracking_options\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Sends a copy of a specific invoice to related contact via email @param xero_tenant_id [String] Xero identifier for Tenant @param invoice_id [String] Unique identifier for an Invoice @param request_empty [RequestEmpty] @param [Hash] opts the optional parameters @return [nil]
# File lib/xero-ruby/api/accounting_api.rb, line 5201 def email_invoice(xero_tenant_id, invoice_id, request_empty, opts = {}) email_invoice_with_http_info(xero_tenant_id, invoice_id, request_empty, opts) nil end
Sends a copy of a specific invoice to related contact via email @param xero_tenant_id [String] Xero identifier for Tenant @param invoice_id [String] Unique identifier for an Invoice @param request_empty [RequestEmpty] @param [Hash] opts the optional parameters @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 5212 def email_invoice_with_http_info(xero_tenant_id, invoice_id, request_empty, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.email_invoice ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.email_invoice" end # verify the required parameter 'invoice_id' is set if @api_client.config.client_side_validation && invoice_id.nil? fail ArgumentError, "Missing the required parameter 'invoice_id' when calling AccountingApi.email_invoice" end # verify the required parameter 'request_empty' is set if @api_client.config.client_side_validation && request_empty.nil? fail ArgumentError, "Missing the required parameter 'request_empty' when calling AccountingApi.email_invoice" end # resource path local_var_path = '/Invoices/{InvoiceID}/Email'.sub('{' + 'InvoiceID' + '}', invoice_id.to_s) # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(request_empty) # return_type return_type = opts[:return_type] # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#email_invoice\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves a single chart of accounts by using a unique account Id @param xero_tenant_id [String] Xero identifier for Tenant @param account_id [String] Unique identifier for Account object @param [Hash] opts the optional parameters @return [Accounts]
# File lib/xero-ruby/api/accounting_api.rb, line 5283 def get_account(xero_tenant_id, account_id, opts = {}) data, _status_code, _headers = get_account_with_http_info(xero_tenant_id, account_id, opts) data end
Retrieves an attachment for a specific account by filename @param xero_tenant_id [String] Xero identifier for Tenant @param account_id [String] Unique identifier for Account object @param file_name [String] Name of the attachment @param content_type [String] The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf @param [Hash] opts the optional parameters @return [File]
# File lib/xero-ruby/api/accounting_api.rb, line 5360 def get_account_attachment_by_file_name(xero_tenant_id, account_id, file_name, content_type, opts = {}) data, _status_code, _headers = get_account_attachment_by_file_name_with_http_info(xero_tenant_id, account_id, file_name, content_type, opts) data end
Retrieves an attachment for a specific account by filename @param xero_tenant_id [String] Xero identifier for Tenant @param account_id [String] Unique identifier for Account object @param file_name [String] Name of the attachment @param content_type [String] The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf @param [Hash] opts the optional parameters @return [Array<(File, Integer, Hash)>] File data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 5372 def get_account_attachment_by_file_name_with_http_info(xero_tenant_id, account_id, file_name, content_type, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.get_account_attachment_by_file_name ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.get_account_attachment_by_file_name" end # verify the required parameter 'account_id' is set if @api_client.config.client_side_validation && account_id.nil? fail ArgumentError, "Missing the required parameter 'account_id' when calling AccountingApi.get_account_attachment_by_file_name" end # verify the required parameter 'file_name' is set if @api_client.config.client_side_validation && file_name.nil? fail ArgumentError, "Missing the required parameter 'file_name' when calling AccountingApi.get_account_attachment_by_file_name" end # verify the required parameter 'content_type' is set if @api_client.config.client_side_validation && content_type.nil? fail ArgumentError, "Missing the required parameter 'content_type' when calling AccountingApi.get_account_attachment_by_file_name" end # resource path 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'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream']) header_params[:'xero-tenant-id'] = xero_tenant_id header_params[:'contentType'] = content_type # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'File' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#get_account_attachment_by_file_name\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves a specific attachment from a specific account using a unique attachment Id @param xero_tenant_id [String] Xero identifier for Tenant @param account_id [String] Unique identifier for Account object @param attachment_id [String] Unique identifier for Attachment object @param content_type [String] The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf @param [Hash] opts the optional parameters @return [File]
# File lib/xero-ruby/api/accounting_api.rb, line 5448 def get_account_attachment_by_id(xero_tenant_id, account_id, attachment_id, content_type, opts = {}) data, _status_code, _headers = get_account_attachment_by_id_with_http_info(xero_tenant_id, account_id, attachment_id, content_type, opts) data end
Retrieves a specific attachment from a specific account using a unique attachment Id @param xero_tenant_id [String] Xero identifier for Tenant @param account_id [String] Unique identifier for Account object @param attachment_id [String] Unique identifier for Attachment object @param content_type [String] The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf @param [Hash] opts the optional parameters @return [Array<(File, Integer, Hash)>] File data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 5460 def get_account_attachment_by_id_with_http_info(xero_tenant_id, account_id, attachment_id, content_type, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.get_account_attachment_by_id ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.get_account_attachment_by_id" end # verify the required parameter 'account_id' is set if @api_client.config.client_side_validation && account_id.nil? fail ArgumentError, "Missing the required parameter 'account_id' when calling AccountingApi.get_account_attachment_by_id" end # verify the required parameter 'attachment_id' is set if @api_client.config.client_side_validation && attachment_id.nil? fail ArgumentError, "Missing the required parameter 'attachment_id' when calling AccountingApi.get_account_attachment_by_id" end # verify the required parameter 'content_type' is set if @api_client.config.client_side_validation && content_type.nil? fail ArgumentError, "Missing the required parameter 'content_type' when calling AccountingApi.get_account_attachment_by_id" end # resource path 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'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream']) header_params[:'xero-tenant-id'] = xero_tenant_id header_params[:'contentType'] = content_type # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'File' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#get_account_attachment_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves attachments for a specific accounts by using a unique account Id @param xero_tenant_id [String] Xero identifier for Tenant @param account_id [String] Unique identifier for Account object @param [Hash] opts the optional parameters @return [Attachments]
# File lib/xero-ruby/api/accounting_api.rb, line 5534 def get_account_attachments(xero_tenant_id, account_id, opts = {}) data, _status_code, _headers = get_account_attachments_with_http_info(xero_tenant_id, account_id, opts) data end
Retrieves attachments for a specific accounts by using a unique account Id @param xero_tenant_id [String] Xero identifier for Tenant @param account_id [String] Unique identifier for Account object @param [Hash] opts the optional parameters @return [Array<(Attachments, Integer, Hash)>] Attachments data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 5544 def get_account_attachments_with_http_info(xero_tenant_id, account_id, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.get_account_attachments ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.get_account_attachments" end # verify the required parameter 'account_id' is set if @api_client.config.client_side_validation && account_id.nil? fail ArgumentError, "Missing the required parameter 'account_id' when calling AccountingApi.get_account_attachments" end # resource path local_var_path = '/Accounts/{AccountID}/Attachments'.sub('{' + 'AccountID' + '}', account_id.to_s) # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'Attachments' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#get_account_attachments\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves a single chart of accounts by using a unique account Id @param xero_tenant_id [String] Xero identifier for Tenant @param account_id [String] Unique identifier for Account object @param [Hash] opts the optional parameters @return [Array<(Accounts, Integer, Hash)>] Accounts data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 5293 def get_account_with_http_info(xero_tenant_id, account_id, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.get_account ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.get_account" end # verify the required parameter 'account_id' is set if @api_client.config.client_side_validation && account_id.nil? fail ArgumentError, "Missing the required parameter 'account_id' when calling AccountingApi.get_account" end # resource path local_var_path = '/Accounts/{AccountID}'.sub('{' + 'AccountID' + '}', account_id.to_s) # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'Accounts' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#get_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves the full chart of accounts @param xero_tenant_id [String] Xero identifier for Tenant @param [Hash] opts the optional parameters @option opts [DateTime] :if_modified_since Only records created or modified since this timestamp will be returned @option opts [String] :where Filter by an any element @option opts [String] :order Order by an any element @return [Accounts]
# File lib/xero-ruby/api/accounting_api.rb, line 5611 def get_accounts(xero_tenant_id, opts = {}) data, _status_code, _headers = get_accounts_with_http_info(xero_tenant_id, opts) data end
Retrieves the full chart of accounts @param xero_tenant_id [String] Xero identifier for Tenant @param [Hash] opts the optional parameters @option opts [DateTime] :if_modified_since Only records created or modified since this timestamp will be returned @option opts [String] :where Filter by an any element @option opts [String] :order Order by an any element @return [Array<(Accounts, Integer, Hash)>] Accounts data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 5623 def get_accounts_with_http_info(xero_tenant_id, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.get_accounts ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.get_accounts" end # resource path local_var_path = '/Accounts' # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} query_params[:'where'] = opts[:'where'] if !opts[:'where'].nil? query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil? # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id header_params[:'If-Modified-Since'] = opts[:'if_modified_since'] if !opts[:'if_modified_since'].nil? # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'Accounts' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#get_accounts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves a single spent or received money transaction by using a unique bank transaction Id @param xero_tenant_id [String] Xero identifier for Tenant @param bank_transaction_id [String] Xero generated unique identifier for a bank transaction @param [Hash] opts the optional parameters @option opts [Integer] :unitdp e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts @return [BankTransactions]
# File lib/xero-ruby/api/accounting_api.rb, line 5688 def get_bank_transaction(xero_tenant_id, bank_transaction_id, opts = {}) data, _status_code, _headers = get_bank_transaction_with_http_info(xero_tenant_id, bank_transaction_id, opts) data end
Retrieves a specific attachment from a specific bank transaction by filename @param xero_tenant_id [String] Xero identifier for Tenant @param bank_transaction_id [String] Xero generated unique identifier for a bank transaction @param file_name [String] Name of the attachment @param content_type [String] The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf @param [Hash] opts the optional parameters @return [File]
# File lib/xero-ruby/api/accounting_api.rb, line 5767 def get_bank_transaction_attachment_by_file_name(xero_tenant_id, bank_transaction_id, file_name, content_type, opts = {}) data, _status_code, _headers = get_bank_transaction_attachment_by_file_name_with_http_info(xero_tenant_id, bank_transaction_id, file_name, content_type, opts) data end
Retrieves a specific attachment from a specific bank transaction by filename @param xero_tenant_id [String] Xero identifier for Tenant @param bank_transaction_id [String] Xero generated unique identifier for a bank transaction @param file_name [String] Name of the attachment @param content_type [String] The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf @param [Hash] opts the optional parameters @return [Array<(File, Integer, Hash)>] File data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 5779 def get_bank_transaction_attachment_by_file_name_with_http_info(xero_tenant_id, bank_transaction_id, file_name, content_type, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.get_bank_transaction_attachment_by_file_name ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.get_bank_transaction_attachment_by_file_name" end # verify the required parameter 'bank_transaction_id' is set if @api_client.config.client_side_validation && bank_transaction_id.nil? fail ArgumentError, "Missing the required parameter 'bank_transaction_id' when calling AccountingApi.get_bank_transaction_attachment_by_file_name" end # verify the required parameter 'file_name' is set if @api_client.config.client_side_validation && file_name.nil? fail ArgumentError, "Missing the required parameter 'file_name' when calling AccountingApi.get_bank_transaction_attachment_by_file_name" end # verify the required parameter 'content_type' is set if @api_client.config.client_side_validation && content_type.nil? fail ArgumentError, "Missing the required parameter 'content_type' when calling AccountingApi.get_bank_transaction_attachment_by_file_name" end # resource path 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'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream']) header_params[:'xero-tenant-id'] = xero_tenant_id header_params[:'contentType'] = content_type # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'File' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#get_bank_transaction_attachment_by_file_name\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves specific attachments from a specific BankTransaction using a unique attachment Id @param xero_tenant_id [String] Xero identifier for Tenant @param bank_transaction_id [String] Xero generated unique identifier for a bank transaction @param attachment_id [String] Unique identifier for Attachment object @param content_type [String] The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf @param [Hash] opts the optional parameters @return [File]
# File lib/xero-ruby/api/accounting_api.rb, line 5855 def get_bank_transaction_attachment_by_id(xero_tenant_id, bank_transaction_id, attachment_id, content_type, opts = {}) data, _status_code, _headers = get_bank_transaction_attachment_by_id_with_http_info(xero_tenant_id, bank_transaction_id, attachment_id, content_type, opts) data end
Retrieves specific attachments from a specific BankTransaction using a unique attachment Id @param xero_tenant_id [String] Xero identifier for Tenant @param bank_transaction_id [String] Xero generated unique identifier for a bank transaction @param attachment_id [String] Unique identifier for Attachment object @param content_type [String] The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf @param [Hash] opts the optional parameters @return [Array<(File, Integer, Hash)>] File data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 5867 def get_bank_transaction_attachment_by_id_with_http_info(xero_tenant_id, bank_transaction_id, attachment_id, content_type, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.get_bank_transaction_attachment_by_id ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.get_bank_transaction_attachment_by_id" end # verify the required parameter 'bank_transaction_id' is set if @api_client.config.client_side_validation && bank_transaction_id.nil? fail ArgumentError, "Missing the required parameter 'bank_transaction_id' when calling AccountingApi.get_bank_transaction_attachment_by_id" end # verify the required parameter 'attachment_id' is set if @api_client.config.client_side_validation && attachment_id.nil? fail ArgumentError, "Missing the required parameter 'attachment_id' when calling AccountingApi.get_bank_transaction_attachment_by_id" end # verify the required parameter 'content_type' is set if @api_client.config.client_side_validation && content_type.nil? fail ArgumentError, "Missing the required parameter 'content_type' when calling AccountingApi.get_bank_transaction_attachment_by_id" end # resource path 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'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream']) header_params[:'xero-tenant-id'] = xero_tenant_id header_params[:'contentType'] = content_type # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'File' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#get_bank_transaction_attachment_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves any attachments from a specific bank transactions @param xero_tenant_id [String] Xero identifier for Tenant @param bank_transaction_id [String] Xero generated unique identifier for a bank transaction @param [Hash] opts the optional parameters @return [Attachments]
# File lib/xero-ruby/api/accounting_api.rb, line 5941 def get_bank_transaction_attachments(xero_tenant_id, bank_transaction_id, opts = {}) data, _status_code, _headers = get_bank_transaction_attachments_with_http_info(xero_tenant_id, bank_transaction_id, opts) data end
Retrieves any attachments from a specific bank transactions @param xero_tenant_id [String] Xero identifier for Tenant @param bank_transaction_id [String] Xero generated unique identifier for a bank transaction @param [Hash] opts the optional parameters @return [Array<(Attachments, Integer, Hash)>] Attachments data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 5951 def get_bank_transaction_attachments_with_http_info(xero_tenant_id, bank_transaction_id, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.get_bank_transaction_attachments ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.get_bank_transaction_attachments" end # verify the required parameter 'bank_transaction_id' is set if @api_client.config.client_side_validation && bank_transaction_id.nil? fail ArgumentError, "Missing the required parameter 'bank_transaction_id' when calling AccountingApi.get_bank_transaction_attachments" end # resource path local_var_path = '/BankTransactions/{BankTransactionID}/Attachments'.sub('{' + 'BankTransactionID' + '}', bank_transaction_id.to_s) # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'Attachments' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#get_bank_transaction_attachments\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves a single spent or received money transaction by using a unique bank transaction Id @param xero_tenant_id [String] Xero identifier for Tenant @param bank_transaction_id [String] Xero generated unique identifier for a bank transaction @param [Hash] opts the optional parameters @option opts [Integer] :unitdp e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts @return [Array<(BankTransactions, Integer, Hash)>] BankTransactions data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 5699 def get_bank_transaction_with_http_info(xero_tenant_id, bank_transaction_id, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.get_bank_transaction ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.get_bank_transaction" end # verify the required parameter 'bank_transaction_id' is set if @api_client.config.client_side_validation && bank_transaction_id.nil? fail ArgumentError, "Missing the required parameter 'bank_transaction_id' when calling AccountingApi.get_bank_transaction" end # resource path local_var_path = '/BankTransactions/{BankTransactionID}'.sub('{' + 'BankTransactionID' + '}', bank_transaction_id.to_s) # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} query_params[:'unitdp'] = opts[:'unitdp'] if !opts[:'unitdp'].nil? # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'BankTransactions' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#get_bank_transaction\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves any spent or received money transactions @param xero_tenant_id [String] Xero identifier for Tenant @param [Hash] opts the optional parameters @option opts [DateTime] :if_modified_since Only records created or modified since this timestamp will be returned @option opts [String] :where Filter by an any element @option opts [String] :order Order by an any element @option opts [Integer] :page Up to 100 bank transactions will be returned in a single API call with line items details @option opts [Integer] :unitdp e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts @return [BankTransactions]
# File lib/xero-ruby/api/accounting_api.rb, line 6020 def get_bank_transactions(xero_tenant_id, opts = {}) data, _status_code, _headers = get_bank_transactions_with_http_info(xero_tenant_id, opts) data end
Retrieves history from a specific bank transaction using a unique bank transaction Id @param xero_tenant_id [String] Xero identifier for Tenant @param bank_transaction_id [String] Xero generated unique identifier for a bank transaction @param [Hash] opts the optional parameters @return [HistoryRecords]
# File lib/xero-ruby/api/accounting_api.rb, line 6100 def get_bank_transactions_history(xero_tenant_id, bank_transaction_id, opts = {}) data, _status_code, _headers = get_bank_transactions_history_with_http_info(xero_tenant_id, bank_transaction_id, opts) data end
Retrieves history from a specific bank transaction using a unique bank transaction Id @param xero_tenant_id [String] Xero identifier for Tenant @param bank_transaction_id [String] Xero generated unique identifier for a bank transaction @param [Hash] opts the optional parameters @return [Array<(HistoryRecords, Integer, Hash)>] HistoryRecords data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 6110 def get_bank_transactions_history_with_http_info(xero_tenant_id, bank_transaction_id, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.get_bank_transactions_history ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.get_bank_transactions_history" end # verify the required parameter 'bank_transaction_id' is set if @api_client.config.client_side_validation && bank_transaction_id.nil? fail ArgumentError, "Missing the required parameter 'bank_transaction_id' when calling AccountingApi.get_bank_transactions_history" end # resource path local_var_path = '/BankTransactions/{BankTransactionID}/History'.sub('{' + 'BankTransactionID' + '}', bank_transaction_id.to_s) # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'HistoryRecords' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#get_bank_transactions_history\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves any spent or received money transactions @param xero_tenant_id [String] Xero identifier for Tenant @param [Hash] opts the optional parameters @option opts [DateTime] :if_modified_since Only records created or modified since this timestamp will be returned @option opts [String] :where Filter by an any element @option opts [String] :order Order by an any element @option opts [Integer] :page Up to 100 bank transactions will be returned in a single API call with line items details @option opts [Integer] :unitdp e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts @return [Array<(BankTransactions, Integer, Hash)>] BankTransactions data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 6034 def get_bank_transactions_with_http_info(xero_tenant_id, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.get_bank_transactions ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.get_bank_transactions" end # resource path local_var_path = '/BankTransactions' # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} query_params[:'where'] = opts[:'where'] if !opts[:'where'].nil? query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil? query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil? query_params[:'unitdp'] = opts[:'unitdp'] if !opts[:'unitdp'].nil? # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id header_params[:'If-Modified-Since'] = opts[:'if_modified_since'] if !opts[:'if_modified_since'].nil? # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'BankTransactions' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#get_bank_transactions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves specific bank transfers by using a unique bank transfer Id @param xero_tenant_id [String] Xero identifier for Tenant @param bank_transfer_id [String] Xero generated unique identifier for a bank transfer @param [Hash] opts the optional parameters @return [BankTransfers]
# File lib/xero-ruby/api/accounting_api.rb, line 6175 def get_bank_transfer(xero_tenant_id, bank_transfer_id, opts = {}) data, _status_code, _headers = get_bank_transfer_with_http_info(xero_tenant_id, bank_transfer_id, opts) data end
Retrieves a specific attachment on a specific bank transfer by file name @param xero_tenant_id [String] Xero identifier for Tenant @param bank_transfer_id [String] Xero generated unique identifier for a bank transfer @param file_name [String] Name of the attachment @param content_type [String] The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf @param [Hash] opts the optional parameters @return [File]
# File lib/xero-ruby/api/accounting_api.rb, line 6252 def get_bank_transfer_attachment_by_file_name(xero_tenant_id, bank_transfer_id, file_name, content_type, opts = {}) data, _status_code, _headers = get_bank_transfer_attachment_by_file_name_with_http_info(xero_tenant_id, bank_transfer_id, file_name, content_type, opts) data end
Retrieves a specific attachment on a specific bank transfer by file name @param xero_tenant_id [String] Xero identifier for Tenant @param bank_transfer_id [String] Xero generated unique identifier for a bank transfer @param file_name [String] Name of the attachment @param content_type [String] The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf @param [Hash] opts the optional parameters @return [Array<(File, Integer, Hash)>] File data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 6264 def get_bank_transfer_attachment_by_file_name_with_http_info(xero_tenant_id, bank_transfer_id, file_name, content_type, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.get_bank_transfer_attachment_by_file_name ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.get_bank_transfer_attachment_by_file_name" end # verify the required parameter 'bank_transfer_id' is set if @api_client.config.client_side_validation && bank_transfer_id.nil? fail ArgumentError, "Missing the required parameter 'bank_transfer_id' when calling AccountingApi.get_bank_transfer_attachment_by_file_name" end # verify the required parameter 'file_name' is set if @api_client.config.client_side_validation && file_name.nil? fail ArgumentError, "Missing the required parameter 'file_name' when calling AccountingApi.get_bank_transfer_attachment_by_file_name" end # verify the required parameter 'content_type' is set if @api_client.config.client_side_validation && content_type.nil? fail ArgumentError, "Missing the required parameter 'content_type' when calling AccountingApi.get_bank_transfer_attachment_by_file_name" end # resource path 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'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream']) header_params[:'xero-tenant-id'] = xero_tenant_id header_params[:'contentType'] = content_type # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'File' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#get_bank_transfer_attachment_by_file_name\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves a specific attachment from a specific bank transfer using a unique attachment ID @param xero_tenant_id [String] Xero identifier for Tenant @param bank_transfer_id [String] Xero generated unique identifier for a bank transfer @param attachment_id [String] Unique identifier for Attachment object @param content_type [String] The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf @param [Hash] opts the optional parameters @return [File]
# File lib/xero-ruby/api/accounting_api.rb, line 6340 def get_bank_transfer_attachment_by_id(xero_tenant_id, bank_transfer_id, attachment_id, content_type, opts = {}) data, _status_code, _headers = get_bank_transfer_attachment_by_id_with_http_info(xero_tenant_id, bank_transfer_id, attachment_id, content_type, opts) data end
Retrieves a specific attachment from a specific bank transfer using a unique attachment ID @param xero_tenant_id [String] Xero identifier for Tenant @param bank_transfer_id [String] Xero generated unique identifier for a bank transfer @param attachment_id [String] Unique identifier for Attachment object @param content_type [String] The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf @param [Hash] opts the optional parameters @return [Array<(File, Integer, Hash)>] File data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 6352 def get_bank_transfer_attachment_by_id_with_http_info(xero_tenant_id, bank_transfer_id, attachment_id, content_type, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.get_bank_transfer_attachment_by_id ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.get_bank_transfer_attachment_by_id" end # verify the required parameter 'bank_transfer_id' is set if @api_client.config.client_side_validation && bank_transfer_id.nil? fail ArgumentError, "Missing the required parameter 'bank_transfer_id' when calling AccountingApi.get_bank_transfer_attachment_by_id" end # verify the required parameter 'attachment_id' is set if @api_client.config.client_side_validation && attachment_id.nil? fail ArgumentError, "Missing the required parameter 'attachment_id' when calling AccountingApi.get_bank_transfer_attachment_by_id" end # verify the required parameter 'content_type' is set if @api_client.config.client_side_validation && content_type.nil? fail ArgumentError, "Missing the required parameter 'content_type' when calling AccountingApi.get_bank_transfer_attachment_by_id" end # resource path 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'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream']) header_params[:'xero-tenant-id'] = xero_tenant_id header_params[:'contentType'] = content_type # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'File' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#get_bank_transfer_attachment_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves attachments from a specific bank transfer @param xero_tenant_id [String] Xero identifier for Tenant @param bank_transfer_id [String] Xero generated unique identifier for a bank transfer @param [Hash] opts the optional parameters @return [Attachments]
# File lib/xero-ruby/api/accounting_api.rb, line 6426 def get_bank_transfer_attachments(xero_tenant_id, bank_transfer_id, opts = {}) data, _status_code, _headers = get_bank_transfer_attachments_with_http_info(xero_tenant_id, bank_transfer_id, opts) data end
Retrieves attachments from a specific bank transfer @param xero_tenant_id [String] Xero identifier for Tenant @param bank_transfer_id [String] Xero generated unique identifier for a bank transfer @param [Hash] opts the optional parameters @return [Array<(Attachments, Integer, Hash)>] Attachments data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 6436 def get_bank_transfer_attachments_with_http_info(xero_tenant_id, bank_transfer_id, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.get_bank_transfer_attachments ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.get_bank_transfer_attachments" end # verify the required parameter 'bank_transfer_id' is set if @api_client.config.client_side_validation && bank_transfer_id.nil? fail ArgumentError, "Missing the required parameter 'bank_transfer_id' when calling AccountingApi.get_bank_transfer_attachments" end # resource path local_var_path = '/BankTransfers/{BankTransferID}/Attachments'.sub('{' + 'BankTransferID' + '}', bank_transfer_id.to_s) # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'Attachments' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#get_bank_transfer_attachments\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves history from a specific bank transfer using a unique bank transfer Id @param xero_tenant_id [String] Xero identifier for Tenant @param bank_transfer_id [String] Xero generated unique identifier for a bank transfer @param [Hash] opts the optional parameters @return [HistoryRecords]
# File lib/xero-ruby/api/accounting_api.rb, line 6501 def get_bank_transfer_history(xero_tenant_id, bank_transfer_id, opts = {}) data, _status_code, _headers = get_bank_transfer_history_with_http_info(xero_tenant_id, bank_transfer_id, opts) data end
Retrieves history from a specific bank transfer using a unique bank transfer Id @param xero_tenant_id [String] Xero identifier for Tenant @param bank_transfer_id [String] Xero generated unique identifier for a bank transfer @param [Hash] opts the optional parameters @return [Array<(HistoryRecords, Integer, Hash)>] HistoryRecords data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 6511 def get_bank_transfer_history_with_http_info(xero_tenant_id, bank_transfer_id, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.get_bank_transfer_history ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.get_bank_transfer_history" end # verify the required parameter 'bank_transfer_id' is set if @api_client.config.client_side_validation && bank_transfer_id.nil? fail ArgumentError, "Missing the required parameter 'bank_transfer_id' when calling AccountingApi.get_bank_transfer_history" end # resource path local_var_path = '/BankTransfers/{BankTransferID}/History'.sub('{' + 'BankTransferID' + '}', bank_transfer_id.to_s) # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'HistoryRecords' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#get_bank_transfer_history\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves specific bank transfers by using a unique bank transfer Id @param xero_tenant_id [String] Xero identifier for Tenant @param bank_transfer_id [String] Xero generated unique identifier for a bank transfer @param [Hash] opts the optional parameters @return [Array<(BankTransfers, Integer, Hash)>] BankTransfers data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 6185 def get_bank_transfer_with_http_info(xero_tenant_id, bank_transfer_id, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.get_bank_transfer ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.get_bank_transfer" end # verify the required parameter 'bank_transfer_id' is set if @api_client.config.client_side_validation && bank_transfer_id.nil? fail ArgumentError, "Missing the required parameter 'bank_transfer_id' when calling AccountingApi.get_bank_transfer" end # resource path local_var_path = '/BankTransfers/{BankTransferID}'.sub('{' + 'BankTransferID' + '}', bank_transfer_id.to_s) # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'BankTransfers' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#get_bank_transfer\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves all bank transfers @param xero_tenant_id [String] Xero identifier for Tenant @param [Hash] opts the optional parameters @option opts [DateTime] :if_modified_since Only records created or modified since this timestamp will be returned @option opts [String] :where Filter by an any element @option opts [String] :order Order by an any element @return [BankTransfers]
# File lib/xero-ruby/api/accounting_api.rb, line 6578 def get_bank_transfers(xero_tenant_id, opts = {}) data, _status_code, _headers = get_bank_transfers_with_http_info(xero_tenant_id, opts) data end
Retrieves all bank transfers @param xero_tenant_id [String] Xero identifier for Tenant @param [Hash] opts the optional parameters @option opts [DateTime] :if_modified_since Only records created or modified since this timestamp will be returned @option opts [String] :where Filter by an any element @option opts [String] :order Order by an any element @return [Array<(BankTransfers, Integer, Hash)>] BankTransfers data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 6590 def get_bank_transfers_with_http_info(xero_tenant_id, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.get_bank_transfers ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.get_bank_transfers" end # resource path local_var_path = '/BankTransfers' # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} query_params[:'where'] = opts[:'where'] if !opts[:'where'].nil? query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil? # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id header_params[:'If-Modified-Since'] = opts[:'if_modified_since'] if !opts[:'if_modified_since'].nil? # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'BankTransfers' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#get_bank_transfers\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves history from a specific batch payment @param xero_tenant_id [String] Xero identifier for Tenant @param batch_payment_id [String] Unique identifier for BatchPayment @param [Hash] opts the optional parameters @return [HistoryRecords]
# File lib/xero-ruby/api/accounting_api.rb, line 6654 def get_batch_payment_history(xero_tenant_id, batch_payment_id, opts = {}) data, _status_code, _headers = get_batch_payment_history_with_http_info(xero_tenant_id, batch_payment_id, opts) data end
Retrieves history from a specific batch payment @param xero_tenant_id [String] Xero identifier for Tenant @param batch_payment_id [String] Unique identifier for BatchPayment @param [Hash] opts the optional parameters @return [Array<(HistoryRecords, Integer, Hash)>] HistoryRecords data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 6664 def get_batch_payment_history_with_http_info(xero_tenant_id, batch_payment_id, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.get_batch_payment_history ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.get_batch_payment_history" end # verify the required parameter 'batch_payment_id' is set if @api_client.config.client_side_validation && batch_payment_id.nil? fail ArgumentError, "Missing the required parameter 'batch_payment_id' when calling AccountingApi.get_batch_payment_history" end # resource path local_var_path = '/BatchPayments/{BatchPaymentID}/History'.sub('{' + 'BatchPaymentID' + '}', batch_payment_id.to_s) # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'HistoryRecords' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#get_batch_payment_history\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves either one or many batch payments for invoices @param xero_tenant_id [String] Xero identifier for Tenant @param [Hash] opts the optional parameters @option opts [DateTime] :if_modified_since Only records created or modified since this timestamp will be returned @option opts [String] :where Filter by an any element @option opts [String] :order Order by an any element @return [BatchPayments]
# File lib/xero-ruby/api/accounting_api.rb, line 6731 def get_batch_payments(xero_tenant_id, opts = {}) data, _status_code, _headers = get_batch_payments_with_http_info(xero_tenant_id, opts) data end
Retrieves either one or many batch payments for invoices @param xero_tenant_id [String] Xero identifier for Tenant @param [Hash] opts the optional parameters @option opts [DateTime] :if_modified_since Only records created or modified since this timestamp will be returned @option opts [String] :where Filter by an any element @option opts [String] :order Order by an any element @return [Array<(BatchPayments, Integer, Hash)>] BatchPayments data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 6743 def get_batch_payments_with_http_info(xero_tenant_id, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.get_batch_payments ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.get_batch_payments" end # resource path local_var_path = '/BatchPayments' # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} query_params[:'where'] = opts[:'where'] if !opts[:'where'].nil? query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil? # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id header_params[:'If-Modified-Since'] = opts[:'if_modified_since'] if !opts[:'if_modified_since'].nil? # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'BatchPayments' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#get_batch_payments\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves a specific branding theme using a unique branding theme Id @param xero_tenant_id [String] Xero identifier for Tenant @param branding_theme_id [String] Unique identifier for a Branding Theme @param [Hash] opts the optional parameters @return [BrandingThemes]
# File lib/xero-ruby/api/accounting_api.rb, line 6807 def get_branding_theme(xero_tenant_id, branding_theme_id, opts = {}) data, _status_code, _headers = get_branding_theme_with_http_info(xero_tenant_id, branding_theme_id, opts) data end
Retrieves the payment services for a specific branding theme @param xero_tenant_id [String] Xero identifier for Tenant @param branding_theme_id [String] Unique identifier for a Branding Theme @param [Hash] opts the optional parameters @return [PaymentServices]
# File lib/xero-ruby/api/accounting_api.rb, line 6882 def get_branding_theme_payment_services(xero_tenant_id, branding_theme_id, opts = {}) data, _status_code, _headers = get_branding_theme_payment_services_with_http_info(xero_tenant_id, branding_theme_id, opts) data end
Retrieves the payment services for a specific branding theme @param xero_tenant_id [String] Xero identifier for Tenant @param branding_theme_id [String] Unique identifier for a Branding Theme @param [Hash] opts the optional parameters @return [Array<(PaymentServices, Integer, Hash)>] PaymentServices data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 6892 def get_branding_theme_payment_services_with_http_info(xero_tenant_id, branding_theme_id, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.get_branding_theme_payment_services ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.get_branding_theme_payment_services" end # verify the required parameter 'branding_theme_id' is set if @api_client.config.client_side_validation && branding_theme_id.nil? fail ArgumentError, "Missing the required parameter 'branding_theme_id' when calling AccountingApi.get_branding_theme_payment_services" end # resource path local_var_path = '/BrandingThemes/{BrandingThemeID}/PaymentServices'.sub('{' + 'BrandingThemeID' + '}', branding_theme_id.to_s) # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'PaymentServices' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#get_branding_theme_payment_services\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves a specific branding theme using a unique branding theme Id @param xero_tenant_id [String] Xero identifier for Tenant @param branding_theme_id [String] Unique identifier for a Branding Theme @param [Hash] opts the optional parameters @return [Array<(BrandingThemes, Integer, Hash)>] BrandingThemes data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 6817 def get_branding_theme_with_http_info(xero_tenant_id, branding_theme_id, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.get_branding_theme ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.get_branding_theme" end # verify the required parameter 'branding_theme_id' is set if @api_client.config.client_side_validation && branding_theme_id.nil? fail ArgumentError, "Missing the required parameter 'branding_theme_id' when calling AccountingApi.get_branding_theme" end # resource path local_var_path = '/BrandingThemes/{BrandingThemeID}'.sub('{' + 'BrandingThemeID' + '}', branding_theme_id.to_s) # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'BrandingThemes' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#get_branding_theme\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves all the branding themes @param xero_tenant_id [String] Xero identifier for Tenant @param [Hash] opts the optional parameters @return [BrandingThemes]
# File lib/xero-ruby/api/accounting_api.rb, line 6956 def get_branding_themes(xero_tenant_id, opts = {}) data, _status_code, _headers = get_branding_themes_with_http_info(xero_tenant_id, opts) data end
Retrieves all the branding themes @param xero_tenant_id [String] Xero identifier for Tenant @param [Hash] opts the optional parameters @return [Array<(BrandingThemes, Integer, Hash)>] BrandingThemes data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 6965 def get_branding_themes_with_http_info(xero_tenant_id, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.get_branding_themes ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.get_branding_themes" end # resource path local_var_path = '/BrandingThemes' # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'BrandingThemes' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#get_branding_themes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves a specific budgets, which includes budget lines @param xero_tenant_id [String] Xero identifier for Tenant @param budget_id [String] Unique identifier for Budgets @param [Hash] opts the optional parameters @return [Budgets]
# File lib/xero-ruby/api/accounting_api.rb, line 7026 def get_budget(xero_tenant_id, budget_id, opts = {}) data, _status_code, _headers = get_budget_with_http_info(xero_tenant_id, budget_id, opts) data end
Retrieves a specific budgets, which includes budget lines @param xero_tenant_id [String] Xero identifier for Tenant @param budget_id [String] Unique identifier for Budgets @param [Hash] opts the optional parameters @return [Array<(Budgets, Integer, Hash)>] Budgets data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 7036 def get_budget_with_http_info(xero_tenant_id, budget_id, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.get_budget ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.get_budget" end # verify the required parameter 'budget_id' is set if @api_client.config.client_side_validation && budget_id.nil? fail ArgumentError, "Missing the required parameter 'budget_id' when calling AccountingApi.get_budget" end # resource path local_var_path = '/Budgets/{BudgetID}'.sub('{' + 'BudgetID' + '}', budget_id.to_s) # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'Budgets' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#get_budget\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieve a list of budgets @param xero_tenant_id [String] Xero identifier for Tenant @param [Hash] opts the optional parameters @option opts [Array<String>] :i_ds Filter by BudgetID. Allows you to retrieve a specific individual budget. @option opts [Date] :date_to Filter by start date @option opts [Date] :date_from Filter by end date @return [Budgets]
# File lib/xero-ruby/api/accounting_api.rb, line 7103 def get_budgets(xero_tenant_id, opts = {}) data, _status_code, _headers = get_budgets_with_http_info(xero_tenant_id, opts) data end
Retrieve a list of budgets @param xero_tenant_id [String] Xero identifier for Tenant @param [Hash] opts the optional parameters @option opts [Array<String>] :i_ds Filter by BudgetID. Allows you to retrieve a specific individual budget. @option opts [Date] :date_to Filter by start date @option opts [Date] :date_from Filter by end date @return [Array<(Budgets, Integer, Hash)>] Budgets data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 7115 def get_budgets_with_http_info(xero_tenant_id, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.get_budgets ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.get_budgets" end # resource path local_var_path = '/Budgets' # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} query_params[:'IDs'] = @api_client.build_collection_param(opts[:'i_ds'], :csv) if !opts[:'i_ds'].nil? query_params[:'DateTo'] = opts[:'date_to'] if !opts[:'date_to'].nil? query_params[:'DateFrom'] = opts[:'date_from'] if !opts[:'date_from'].nil? # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'Budgets' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#get_budgets\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves a specific contacts in a Xero organisation using a unique contact Id @param xero_tenant_id [String] Xero identifier for Tenant @param contact_id [String] Unique identifier for a Contact @param [Hash] opts the optional parameters @return [Contacts]
# File lib/xero-ruby/api/accounting_api.rb, line 7179 def get_contact(xero_tenant_id, contact_id, opts = {}) data, _status_code, _headers = get_contact_with_http_info(xero_tenant_id, contact_id, opts) data end
Retrieves a specific attachment from a specific contact by file name @param xero_tenant_id [String] Xero identifier for Tenant @param contact_id [String] Unique identifier for a Contact @param file_name [String] Name of the attachment @param content_type [String] The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf @param [Hash] opts the optional parameters @return [File]
# File lib/xero-ruby/api/accounting_api.rb, line 7256 def get_contact_attachment_by_file_name(xero_tenant_id, contact_id, file_name, content_type, opts = {}) data, _status_code, _headers = get_contact_attachment_by_file_name_with_http_info(xero_tenant_id, contact_id, file_name, content_type, opts) data end
Retrieves a specific attachment from a specific contact by file name @param xero_tenant_id [String] Xero identifier for Tenant @param contact_id [String] Unique identifier for a Contact @param file_name [String] Name of the attachment @param content_type [String] The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf @param [Hash] opts the optional parameters @return [Array<(File, Integer, Hash)>] File data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 7268 def get_contact_attachment_by_file_name_with_http_info(xero_tenant_id, contact_id, file_name, content_type, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.get_contact_attachment_by_file_name ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.get_contact_attachment_by_file_name" end # verify the required parameter 'contact_id' is set if @api_client.config.client_side_validation && contact_id.nil? fail ArgumentError, "Missing the required parameter 'contact_id' when calling AccountingApi.get_contact_attachment_by_file_name" end # verify the required parameter 'file_name' is set if @api_client.config.client_side_validation && file_name.nil? fail ArgumentError, "Missing the required parameter 'file_name' when calling AccountingApi.get_contact_attachment_by_file_name" end # verify the required parameter 'content_type' is set if @api_client.config.client_side_validation && content_type.nil? fail ArgumentError, "Missing the required parameter 'content_type' when calling AccountingApi.get_contact_attachment_by_file_name" end # resource path 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'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream']) header_params[:'xero-tenant-id'] = xero_tenant_id header_params[:'contentType'] = content_type # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'File' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#get_contact_attachment_by_file_name\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves a specific attachment from a specific contact using a unique attachment Id @param xero_tenant_id [String] Xero identifier for Tenant @param contact_id [String] Unique identifier for a Contact @param attachment_id [String] Unique identifier for Attachment object @param content_type [String] The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf @param [Hash] opts the optional parameters @return [File]
# File lib/xero-ruby/api/accounting_api.rb, line 7344 def get_contact_attachment_by_id(xero_tenant_id, contact_id, attachment_id, content_type, opts = {}) data, _status_code, _headers = get_contact_attachment_by_id_with_http_info(xero_tenant_id, contact_id, attachment_id, content_type, opts) data end
Retrieves a specific attachment from a specific contact using a unique attachment Id @param xero_tenant_id [String] Xero identifier for Tenant @param contact_id [String] Unique identifier for a Contact @param attachment_id [String] Unique identifier for Attachment object @param content_type [String] The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf @param [Hash] opts the optional parameters @return [Array<(File, Integer, Hash)>] File data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 7356 def get_contact_attachment_by_id_with_http_info(xero_tenant_id, contact_id, attachment_id, content_type, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.get_contact_attachment_by_id ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.get_contact_attachment_by_id" end # verify the required parameter 'contact_id' is set if @api_client.config.client_side_validation && contact_id.nil? fail ArgumentError, "Missing the required parameter 'contact_id' when calling AccountingApi.get_contact_attachment_by_id" end # verify the required parameter 'attachment_id' is set if @api_client.config.client_side_validation && attachment_id.nil? fail ArgumentError, "Missing the required parameter 'attachment_id' when calling AccountingApi.get_contact_attachment_by_id" end # verify the required parameter 'content_type' is set if @api_client.config.client_side_validation && content_type.nil? fail ArgumentError, "Missing the required parameter 'content_type' when calling AccountingApi.get_contact_attachment_by_id" end # resource path 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'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream']) header_params[:'xero-tenant-id'] = xero_tenant_id header_params[:'contentType'] = content_type # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'File' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#get_contact_attachment_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves attachments for a specific contact in a Xero organisation @param xero_tenant_id [String] Xero identifier for Tenant @param contact_id [String] Unique identifier for a Contact @param [Hash] opts the optional parameters @return [Attachments]
# File lib/xero-ruby/api/accounting_api.rb, line 7430 def get_contact_attachments(xero_tenant_id, contact_id, opts = {}) data, _status_code, _headers = get_contact_attachments_with_http_info(xero_tenant_id, contact_id, opts) data end
Retrieves attachments for a specific contact in a Xero organisation @param xero_tenant_id [String] Xero identifier for Tenant @param contact_id [String] Unique identifier for a Contact @param [Hash] opts the optional parameters @return [Array<(Attachments, Integer, Hash)>] Attachments data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 7440 def get_contact_attachments_with_http_info(xero_tenant_id, contact_id, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.get_contact_attachments ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.get_contact_attachments" end # verify the required parameter 'contact_id' is set if @api_client.config.client_side_validation && contact_id.nil? fail ArgumentError, "Missing the required parameter 'contact_id' when calling AccountingApi.get_contact_attachments" end # resource path local_var_path = '/Contacts/{ContactID}/Attachments'.sub('{' + 'ContactID' + '}', contact_id.to_s) # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'Attachments' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#get_contact_attachments\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves a specific contact by contact number in a Xero organisation @param xero_tenant_id [String] Xero identifier for Tenant @param contact_number [String] This field is read only on the Xero contact screen, used to identify contacts in external systems (max length = 50). @param [Hash] opts the optional parameters @return [Contacts]
# File lib/xero-ruby/api/accounting_api.rb, line 7505 def get_contact_by_contact_number(xero_tenant_id, contact_number, opts = {}) data, _status_code, _headers = get_contact_by_contact_number_with_http_info(xero_tenant_id, contact_number, opts) data end
Retrieves a specific contact by contact number in a Xero organisation @param xero_tenant_id [String] Xero identifier for Tenant @param contact_number [String] This field is read only on the Xero contact screen, used to identify contacts in external systems (max length = 50). @param [Hash] opts the optional parameters @return [Array<(Contacts, Integer, Hash)>] Contacts data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 7515 def get_contact_by_contact_number_with_http_info(xero_tenant_id, contact_number, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.get_contact_by_contact_number ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.get_contact_by_contact_number" end # verify the required parameter 'contact_number' is set if @api_client.config.client_side_validation && contact_number.nil? fail ArgumentError, "Missing the required parameter 'contact_number' when calling AccountingApi.get_contact_by_contact_number" end # resource path local_var_path = '/Contacts/{ContactNumber}'.sub('{' + 'ContactNumber' + '}', contact_number.to_s) # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'Contacts' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#get_contact_by_contact_number\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves CIS settings for a specific contact in a Xero organisation @param xero_tenant_id [String] Xero identifier for Tenant @param contact_id [String] Unique identifier for a Contact @param [Hash] opts the optional parameters @return [CISSettings]
# File lib/xero-ruby/api/accounting_api.rb, line 7580 def get_contact_cis_settings(xero_tenant_id, contact_id, opts = {}) data, _status_code, _headers = get_contact_cis_settings_with_http_info(xero_tenant_id, contact_id, opts) data end
Retrieves CIS settings for a specific contact in a Xero organisation @param xero_tenant_id [String] Xero identifier for Tenant @param contact_id [String] Unique identifier for a Contact @param [Hash] opts the optional parameters @return [Array<(CISSettings, Integer, Hash)>] CISSettings data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 7590 def get_contact_cis_settings_with_http_info(xero_tenant_id, contact_id, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.get_contact_cis_settings ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.get_contact_cis_settings" end # verify the required parameter 'contact_id' is set if @api_client.config.client_side_validation && contact_id.nil? fail ArgumentError, "Missing the required parameter 'contact_id' when calling AccountingApi.get_contact_cis_settings" end # resource path local_var_path = '/Contacts/{ContactID}/CISSettings'.sub('{' + 'ContactID' + '}', contact_id.to_s) # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'CISSettings' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#get_contact_cis_settings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves a specific contact group by using a unique contact group Id @param xero_tenant_id [String] Xero identifier for Tenant @param contact_group_id [String] Unique identifier for a Contact Group @param [Hash] opts the optional parameters @return [ContactGroups]
# File lib/xero-ruby/api/accounting_api.rb, line 7655 def get_contact_group(xero_tenant_id, contact_group_id, opts = {}) data, _status_code, _headers = get_contact_group_with_http_info(xero_tenant_id, contact_group_id, opts) data end
Retrieves a specific contact group by using a unique contact group Id @param xero_tenant_id [String] Xero identifier for Tenant @param contact_group_id [String] Unique identifier for a Contact Group @param [Hash] opts the optional parameters @return [Array<(ContactGroups, Integer, Hash)>] ContactGroups data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 7665 def get_contact_group_with_http_info(xero_tenant_id, contact_group_id, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.get_contact_group ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.get_contact_group" end # verify the required parameter 'contact_group_id' is set if @api_client.config.client_side_validation && contact_group_id.nil? fail ArgumentError, "Missing the required parameter 'contact_group_id' when calling AccountingApi.get_contact_group" end # resource path local_var_path = '/ContactGroups/{ContactGroupID}'.sub('{' + 'ContactGroupID' + '}', contact_group_id.to_s) # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'ContactGroups' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#get_contact_group\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves the contact Id and name of each contact group @param xero_tenant_id [String] Xero identifier for Tenant @param [Hash] opts the optional parameters @option opts [String] :where Filter by an any element @option opts [String] :order Order by an any element @return [ContactGroups]
# File lib/xero-ruby/api/accounting_api.rb, line 7731 def get_contact_groups(xero_tenant_id, opts = {}) data, _status_code, _headers = get_contact_groups_with_http_info(xero_tenant_id, opts) data end
Retrieves the contact Id and name of each contact group @param xero_tenant_id [String] Xero identifier for Tenant @param [Hash] opts the optional parameters @option opts [String] :where Filter by an any element @option opts [String] :order Order by an any element @return [Array<(ContactGroups, Integer, Hash)>] ContactGroups data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 7742 def get_contact_groups_with_http_info(xero_tenant_id, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.get_contact_groups ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.get_contact_groups" end # resource path local_var_path = '/ContactGroups' # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} query_params[:'where'] = opts[:'where'] if !opts[:'where'].nil? query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil? # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'ContactGroups' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#get_contact_groups\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves history records for a specific contact @param xero_tenant_id [String] Xero identifier for Tenant @param contact_id [String] Unique identifier for a Contact @param [Hash] opts the optional parameters @return [HistoryRecords]
# File lib/xero-ruby/api/accounting_api.rb, line 7805 def get_contact_history(xero_tenant_id, contact_id, opts = {}) data, _status_code, _headers = get_contact_history_with_http_info(xero_tenant_id, contact_id, opts) data end
Retrieves history records for a specific contact @param xero_tenant_id [String] Xero identifier for Tenant @param contact_id [String] Unique identifier for a Contact @param [Hash] opts the optional parameters @return [Array<(HistoryRecords, Integer, Hash)>] HistoryRecords data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 7815 def get_contact_history_with_http_info(xero_tenant_id, contact_id, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.get_contact_history ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.get_contact_history" end # verify the required parameter 'contact_id' is set if @api_client.config.client_side_validation && contact_id.nil? fail ArgumentError, "Missing the required parameter 'contact_id' when calling AccountingApi.get_contact_history" end # resource path local_var_path = '/Contacts/{ContactID}/History'.sub('{' + 'ContactID' + '}', contact_id.to_s) # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'HistoryRecords' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#get_contact_history\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves a specific contacts in a Xero organisation using a unique contact Id @param xero_tenant_id [String] Xero identifier for Tenant @param contact_id [String] Unique identifier for a Contact @param [Hash] opts the optional parameters @return [Array<(Contacts, Integer, Hash)>] Contacts data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 7189 def get_contact_with_http_info(xero_tenant_id, contact_id, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.get_contact ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.get_contact" end # verify the required parameter 'contact_id' is set if @api_client.config.client_side_validation && contact_id.nil? fail ArgumentError, "Missing the required parameter 'contact_id' when calling AccountingApi.get_contact" end # resource path local_var_path = '/Contacts/{ContactID}'.sub('{' + 'ContactID' + '}', contact_id.to_s) # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'Contacts' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#get_contact\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves all contacts in a Xero organisation @param xero_tenant_id [String] Xero identifier for Tenant @param [Hash] opts the optional parameters @option opts [DateTime] :if_modified_since Only records created or modified since this timestamp will be returned @option opts [String] :where Filter by an any element @option opts [String] :order Order by an any element @option opts [Array<String>] :i_ds Filter by a comma separated list of ContactIDs. Allows you to retrieve a specific set of contacts in a single call. @option opts [Integer] :page e.g. page=1 - Up to 100 contacts will be returned in a single API call. @option opts [Boolean] :include_archived e.g. includeArchived=true - Contacts with a status of ARCHIVED will be included in the response @option opts [Boolean] :summary_only Use summaryOnly=true in GET Contacts and Invoices endpoint to retrieve a smaller version of the response object. This returns only lightweight fields, excluding computation-heavy fields from the response, making the API calls quick and efficient. (default to false) @return [Contacts]
# File lib/xero-ruby/api/accounting_api.rb, line 7886 def get_contacts(xero_tenant_id, opts = {}) data, _status_code, _headers = get_contacts_with_http_info(xero_tenant_id, opts) data end
Retrieves all contacts in a Xero organisation @param xero_tenant_id [String] Xero identifier for Tenant @param [Hash] opts the optional parameters @option opts [DateTime] :if_modified_since Only records created or modified since this timestamp will be returned @option opts [String] :where Filter by an any element @option opts [String] :order Order by an any element @option opts [Array<String>] :i_ds Filter by a comma separated list of ContactIDs. Allows you to retrieve a specific set of contacts in a single call. @option opts [Integer] :page e.g. page=1 - Up to 100 contacts will be returned in a single API call. @option opts [Boolean] :include_archived e.g. includeArchived=true - Contacts with a status of ARCHIVED will be included in the response @option opts [Boolean] :summary_only Use summaryOnly=true in GET Contacts and Invoices endpoint to retrieve a smaller version of the response object. This returns only lightweight fields, excluding computation-heavy fields from the response, making the API calls quick and efficient. @return [Array<(Contacts, Integer, Hash)>] Contacts data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 7902 def get_contacts_with_http_info(xero_tenant_id, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.get_contacts ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.get_contacts" end # resource path local_var_path = '/Contacts' # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} query_params[:'where'] = opts[:'where'] if !opts[:'where'].nil? query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil? query_params[:'IDs'] = @api_client.build_collection_param(opts[:'i_ds'], :csv) if !opts[:'i_ds'].nil? query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil? query_params[:'includeArchived'] = opts[:'include_archived'] if !opts[:'include_archived'].nil? query_params[:'summaryOnly'] = opts[:'summary_only'] if !opts[:'summary_only'].nil? # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id header_params[:'If-Modified-Since'] = opts[:'if_modified_since'] if !opts[:'if_modified_since'].nil? # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'Contacts' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#get_contacts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves a specific credit note using a unique credit note Id @param xero_tenant_id [String] Xero identifier for Tenant @param credit_note_id [String] Unique identifier for a Credit Note @param [Hash] opts the optional parameters @option opts [Integer] :unitdp e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts @return [CreditNotes]
# File lib/xero-ruby/api/accounting_api.rb, line 7971 def get_credit_note(xero_tenant_id, credit_note_id, opts = {}) data, _status_code, _headers = get_credit_note_with_http_info(xero_tenant_id, credit_note_id, opts) data end
Retrieves credit notes as PDF files @param xero_tenant_id [String] Xero identifier for Tenant @param credit_note_id [String] Unique identifier for a Credit Note @param [Hash] opts the optional parameters @return [File]
# File lib/xero-ruby/api/accounting_api.rb, line 8048 def get_credit_note_as_pdf(xero_tenant_id, credit_note_id, opts = {}) data, _status_code, _headers = get_credit_note_as_pdf_with_http_info(xero_tenant_id, credit_note_id, opts) data end
Retrieves credit notes as PDF files @param xero_tenant_id [String] Xero identifier for Tenant @param credit_note_id [String] Unique identifier for a Credit Note @param [Hash] opts the optional parameters @return [Array<(File, Integer, Hash)>] File data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 8058 def get_credit_note_as_pdf_with_http_info(xero_tenant_id, credit_note_id, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.get_credit_note_as_pdf ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.get_credit_note_as_pdf" end # verify the required parameter 'credit_note_id' is set if @api_client.config.client_side_validation && credit_note_id.nil? fail ArgumentError, "Missing the required parameter 'credit_note_id' when calling AccountingApi.get_credit_note_as_pdf" end # resource path local_var_path = '/CreditNotes/{CreditNoteID}'.sub('{' + 'CreditNoteID' + '}', credit_note_id.to_s) # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/pdf']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'File' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#get_credit_note_as_pdf\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves a specific attachment on a specific credit note by file name @param xero_tenant_id [String] Xero identifier for Tenant @param credit_note_id [String] Unique identifier for a Credit Note @param file_name [String] Name of the attachment @param content_type [String] The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf @param [Hash] opts the optional parameters @return [File]
# File lib/xero-ruby/api/accounting_api.rb, line 8125 def get_credit_note_attachment_by_file_name(xero_tenant_id, credit_note_id, file_name, content_type, opts = {}) data, _status_code, _headers = get_credit_note_attachment_by_file_name_with_http_info(xero_tenant_id, credit_note_id, file_name, content_type, opts) data end
Retrieves a specific attachment on a specific credit note by file name @param xero_tenant_id [String] Xero identifier for Tenant @param credit_note_id [String] Unique identifier for a Credit Note @param file_name [String] Name of the attachment @param content_type [String] The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf @param [Hash] opts the optional parameters @return [Array<(File, Integer, Hash)>] File data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 8137 def get_credit_note_attachment_by_file_name_with_http_info(xero_tenant_id, credit_note_id, file_name, content_type, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.get_credit_note_attachment_by_file_name ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.get_credit_note_attachment_by_file_name" end # verify the required parameter 'credit_note_id' is set if @api_client.config.client_side_validation && credit_note_id.nil? fail ArgumentError, "Missing the required parameter 'credit_note_id' when calling AccountingApi.get_credit_note_attachment_by_file_name" end # verify the required parameter 'file_name' is set if @api_client.config.client_side_validation && file_name.nil? fail ArgumentError, "Missing the required parameter 'file_name' when calling AccountingApi.get_credit_note_attachment_by_file_name" end # verify the required parameter 'content_type' is set if @api_client.config.client_side_validation && content_type.nil? fail ArgumentError, "Missing the required parameter 'content_type' when calling AccountingApi.get_credit_note_attachment_by_file_name" end # resource path 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'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream']) header_params[:'xero-tenant-id'] = xero_tenant_id header_params[:'contentType'] = content_type # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'File' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#get_credit_note_attachment_by_file_name\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves a specific attachment from a specific credit note using a unique attachment Id @param xero_tenant_id [String] Xero identifier for Tenant @param credit_note_id [String] Unique identifier for a Credit Note @param attachment_id [String] Unique identifier for Attachment object @param content_type [String] The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf @param [Hash] opts the optional parameters @return [File]
# File lib/xero-ruby/api/accounting_api.rb, line 8213 def get_credit_note_attachment_by_id(xero_tenant_id, credit_note_id, attachment_id, content_type, opts = {}) data, _status_code, _headers = get_credit_note_attachment_by_id_with_http_info(xero_tenant_id, credit_note_id, attachment_id, content_type, opts) data end
Retrieves a specific attachment from a specific credit note using a unique attachment Id @param xero_tenant_id [String] Xero identifier for Tenant @param credit_note_id [String] Unique identifier for a Credit Note @param attachment_id [String] Unique identifier for Attachment object @param content_type [String] The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf @param [Hash] opts the optional parameters @return [Array<(File, Integer, Hash)>] File data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 8225 def get_credit_note_attachment_by_id_with_http_info(xero_tenant_id, credit_note_id, attachment_id, content_type, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.get_credit_note_attachment_by_id ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.get_credit_note_attachment_by_id" end # verify the required parameter 'credit_note_id' is set if @api_client.config.client_side_validation && credit_note_id.nil? fail ArgumentError, "Missing the required parameter 'credit_note_id' when calling AccountingApi.get_credit_note_attachment_by_id" end # verify the required parameter 'attachment_id' is set if @api_client.config.client_side_validation && attachment_id.nil? fail ArgumentError, "Missing the required parameter 'attachment_id' when calling AccountingApi.get_credit_note_attachment_by_id" end # verify the required parameter 'content_type' is set if @api_client.config.client_side_validation && content_type.nil? fail ArgumentError, "Missing the required parameter 'content_type' when calling AccountingApi.get_credit_note_attachment_by_id" end # resource path 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'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream']) header_params[:'xero-tenant-id'] = xero_tenant_id header_params[:'contentType'] = content_type # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'File' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#get_credit_note_attachment_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves attachments for a specific credit notes @param xero_tenant_id [String] Xero identifier for Tenant @param credit_note_id [String] Unique identifier for a Credit Note @param [Hash] opts the optional parameters @return [Attachments]
# File lib/xero-ruby/api/accounting_api.rb, line 8299 def get_credit_note_attachments(xero_tenant_id, credit_note_id, opts = {}) data, _status_code, _headers = get_credit_note_attachments_with_http_info(xero_tenant_id, credit_note_id, opts) data end
Retrieves attachments for a specific credit notes @param xero_tenant_id [String] Xero identifier for Tenant @param credit_note_id [String] Unique identifier for a Credit Note @param [Hash] opts the optional parameters @return [Array<(Attachments, Integer, Hash)>] Attachments data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 8309 def get_credit_note_attachments_with_http_info(xero_tenant_id, credit_note_id, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.get_credit_note_attachments ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.get_credit_note_attachments" end # verify the required parameter 'credit_note_id' is set if @api_client.config.client_side_validation && credit_note_id.nil? fail ArgumentError, "Missing the required parameter 'credit_note_id' when calling AccountingApi.get_credit_note_attachments" end # resource path local_var_path = '/CreditNotes/{CreditNoteID}/Attachments'.sub('{' + 'CreditNoteID' + '}', credit_note_id.to_s) # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'Attachments' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#get_credit_note_attachments\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves history records of a specific credit note @param xero_tenant_id [String] Xero identifier for Tenant @param credit_note_id [String] Unique identifier for a Credit Note @param [Hash] opts the optional parameters @return [HistoryRecords]
# File lib/xero-ruby/api/accounting_api.rb, line 8374 def get_credit_note_history(xero_tenant_id, credit_note_id, opts = {}) data, _status_code, _headers = get_credit_note_history_with_http_info(xero_tenant_id, credit_note_id, opts) data end
Retrieves history records of a specific credit note @param xero_tenant_id [String] Xero identifier for Tenant @param credit_note_id [String] Unique identifier for a Credit Note @param [Hash] opts the optional parameters @return [Array<(HistoryRecords, Integer, Hash)>] HistoryRecords data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 8384 def get_credit_note_history_with_http_info(xero_tenant_id, credit_note_id, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.get_credit_note_history ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.get_credit_note_history" end # verify the required parameter 'credit_note_id' is set if @api_client.config.client_side_validation && credit_note_id.nil? fail ArgumentError, "Missing the required parameter 'credit_note_id' when calling AccountingApi.get_credit_note_history" end # resource path local_var_path = '/CreditNotes/{CreditNoteID}/History'.sub('{' + 'CreditNoteID' + '}', credit_note_id.to_s) # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'HistoryRecords' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#get_credit_note_history\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves a specific credit note using a unique credit note Id @param xero_tenant_id [String] Xero identifier for Tenant @param credit_note_id [String] Unique identifier for a Credit Note @param [Hash] opts the optional parameters @option opts [Integer] :unitdp e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts @return [Array<(CreditNotes, Integer, Hash)>] CreditNotes data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 7982 def get_credit_note_with_http_info(xero_tenant_id, credit_note_id, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.get_credit_note ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.get_credit_note" end # verify the required parameter 'credit_note_id' is set if @api_client.config.client_side_validation && credit_note_id.nil? fail ArgumentError, "Missing the required parameter 'credit_note_id' when calling AccountingApi.get_credit_note" end # resource path local_var_path = '/CreditNotes/{CreditNoteID}'.sub('{' + 'CreditNoteID' + '}', credit_note_id.to_s) # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} query_params[:'unitdp'] = opts[:'unitdp'] if !opts[:'unitdp'].nil? # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'CreditNotes' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#get_credit_note\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves any credit notes @param xero_tenant_id [String] Xero identifier for Tenant @param [Hash] opts the optional parameters @option opts [DateTime] :if_modified_since Only records created or modified since this timestamp will be returned @option opts [String] :where Filter by an any element @option opts [String] :order Order by an any element @option opts [Integer] :page e.g. page=1 – Up to 100 credit notes will be returned in a single API call with line items shown for each credit note @option opts [Integer] :unitdp e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts @return [CreditNotes]
# File lib/xero-ruby/api/accounting_api.rb, line 8453 def get_credit_notes(xero_tenant_id, opts = {}) data, _status_code, _headers = get_credit_notes_with_http_info(xero_tenant_id, opts) data end
Retrieves any credit notes @param xero_tenant_id [String] Xero identifier for Tenant @param [Hash] opts the optional parameters @option opts [DateTime] :if_modified_since Only records created or modified since this timestamp will be returned @option opts [String] :where Filter by an any element @option opts [String] :order Order by an any element @option opts [Integer] :page e.g. page=1 – Up to 100 credit notes will be returned in a single API call with line items shown for each credit note @option opts [Integer] :unitdp e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts @return [Array<(CreditNotes, Integer, Hash)>] CreditNotes data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 8467 def get_credit_notes_with_http_info(xero_tenant_id, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.get_credit_notes ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.get_credit_notes" end # resource path local_var_path = '/CreditNotes' # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} query_params[:'where'] = opts[:'where'] if !opts[:'where'].nil? query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil? query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil? query_params[:'unitdp'] = opts[:'unitdp'] if !opts[:'unitdp'].nil? # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id header_params[:'If-Modified-Since'] = opts[:'if_modified_since'] if !opts[:'if_modified_since'].nil? # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'CreditNotes' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#get_credit_notes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves currencies for your Xero organisation @param xero_tenant_id [String] Xero identifier for Tenant @param [Hash] opts the optional parameters @option opts [String] :where Filter by an any element @option opts [String] :order Order by an any element @return [Currencies]
# File lib/xero-ruby/api/accounting_api.rb, line 8534 def get_currencies(xero_tenant_id, opts = {}) data, _status_code, _headers = get_currencies_with_http_info(xero_tenant_id, opts) data end
Retrieves currencies for your Xero organisation @param xero_tenant_id [String] Xero identifier for Tenant @param [Hash] opts the optional parameters @option opts [String] :where Filter by an any element @option opts [String] :order Order by an any element @return [Array<(Currencies, Integer, Hash)>] Currencies data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 8545 def get_currencies_with_http_info(xero_tenant_id, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.get_currencies ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.get_currencies" end # resource path local_var_path = '/Currencies' # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} query_params[:'where'] = opts[:'where'] if !opts[:'where'].nil? query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil? # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'Currencies' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#get_currencies\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves a specific employee used in Xero payrun using a unique employee Id @param xero_tenant_id [String] Xero identifier for Tenant @param employee_id [String] Unique identifier for a Employee @param [Hash] opts the optional parameters @return [Employees]
# File lib/xero-ruby/api/accounting_api.rb, line 8608 def get_employee(xero_tenant_id, employee_id, opts = {}) data, _status_code, _headers = get_employee_with_http_info(xero_tenant_id, employee_id, opts) data end
Retrieves a specific employee used in Xero payrun using a unique employee Id @param xero_tenant_id [String] Xero identifier for Tenant @param employee_id [String] Unique identifier for a Employee @param [Hash] opts the optional parameters @return [Array<(Employees, Integer, Hash)>] Employees data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 8618 def get_employee_with_http_info(xero_tenant_id, employee_id, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.get_employee ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.get_employee" end # verify the required parameter 'employee_id' is set if @api_client.config.client_side_validation && employee_id.nil? fail ArgumentError, "Missing the required parameter 'employee_id' when calling AccountingApi.get_employee" end # resource path local_var_path = '/Employees/{EmployeeID}'.sub('{' + 'EmployeeID' + '}', employee_id.to_s) # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'Employees' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#get_employee\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves employees used in Xero payrun @param xero_tenant_id [String] Xero identifier for Tenant @param [Hash] opts the optional parameters @option opts [DateTime] :if_modified_since Only records created or modified since this timestamp will be returned @option opts [String] :where Filter by an any element @option opts [String] :order Order by an any element @return [Employees]
# File lib/xero-ruby/api/accounting_api.rb, line 8685 def get_employees(xero_tenant_id, opts = {}) data, _status_code, _headers = get_employees_with_http_info(xero_tenant_id, opts) data end
Retrieves employees used in Xero payrun @param xero_tenant_id [String] Xero identifier for Tenant @param [Hash] opts the optional parameters @option opts [DateTime] :if_modified_since Only records created or modified since this timestamp will be returned @option opts [String] :where Filter by an any element @option opts [String] :order Order by an any element @return [Array<(Employees, Integer, Hash)>] Employees data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 8697 def get_employees_with_http_info(xero_tenant_id, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.get_employees ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.get_employees" end # resource path local_var_path = '/Employees' # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} query_params[:'where'] = opts[:'where'] if !opts[:'where'].nil? query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil? # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id header_params[:'If-Modified-Since'] = opts[:'if_modified_since'] if !opts[:'if_modified_since'].nil? # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'Employees' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#get_employees\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves a specific expense claim using a unique expense claim Id @param xero_tenant_id [String] Xero identifier for Tenant @param expense_claim_id [String] Unique identifier for a ExpenseClaim @param [Hash] opts the optional parameters @return [ExpenseClaims]
# File lib/xero-ruby/api/accounting_api.rb, line 8761 def get_expense_claim(xero_tenant_id, expense_claim_id, opts = {}) data, _status_code, _headers = get_expense_claim_with_http_info(xero_tenant_id, expense_claim_id, opts) data end
Retrieves history records of a specific expense claim @param xero_tenant_id [String] Xero identifier for Tenant @param expense_claim_id [String] Unique identifier for a ExpenseClaim @param [Hash] opts the optional parameters @return [HistoryRecords]
# File lib/xero-ruby/api/accounting_api.rb, line 8836 def get_expense_claim_history(xero_tenant_id, expense_claim_id, opts = {}) data, _status_code, _headers = get_expense_claim_history_with_http_info(xero_tenant_id, expense_claim_id, opts) data end
Retrieves history records of a specific expense claim @param xero_tenant_id [String] Xero identifier for Tenant @param expense_claim_id [String] Unique identifier for a ExpenseClaim @param [Hash] opts the optional parameters @return [Array<(HistoryRecords, Integer, Hash)>] HistoryRecords data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 8846 def get_expense_claim_history_with_http_info(xero_tenant_id, expense_claim_id, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.get_expense_claim_history ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.get_expense_claim_history" end # verify the required parameter 'expense_claim_id' is set if @api_client.config.client_side_validation && expense_claim_id.nil? fail ArgumentError, "Missing the required parameter 'expense_claim_id' when calling AccountingApi.get_expense_claim_history" end # resource path local_var_path = '/ExpenseClaims/{ExpenseClaimID}/History'.sub('{' + 'ExpenseClaimID' + '}', expense_claim_id.to_s) # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'HistoryRecords' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#get_expense_claim_history\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves a specific expense claim using a unique expense claim Id @param xero_tenant_id [String] Xero identifier for Tenant @param expense_claim_id [String] Unique identifier for a ExpenseClaim @param [Hash] opts the optional parameters @return [Array<(ExpenseClaims, Integer, Hash)>] ExpenseClaims data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 8771 def get_expense_claim_with_http_info(xero_tenant_id, expense_claim_id, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.get_expense_claim ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.get_expense_claim" end # verify the required parameter 'expense_claim_id' is set if @api_client.config.client_side_validation && expense_claim_id.nil? fail ArgumentError, "Missing the required parameter 'expense_claim_id' when calling AccountingApi.get_expense_claim" end # resource path local_var_path = '/ExpenseClaims/{ExpenseClaimID}'.sub('{' + 'ExpenseClaimID' + '}', expense_claim_id.to_s) # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'ExpenseClaims' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#get_expense_claim\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves expense claims @param xero_tenant_id [String] Xero identifier for Tenant @param [Hash] opts the optional parameters @option opts [DateTime] :if_modified_since Only records created or modified since this timestamp will be returned @option opts [String] :where Filter by an any element @option opts [String] :order Order by an any element @return [ExpenseClaims]
# File lib/xero-ruby/api/accounting_api.rb, line 8913 def get_expense_claims(xero_tenant_id, opts = {}) data, _status_code, _headers = get_expense_claims_with_http_info(xero_tenant_id, opts) data end
Retrieves expense claims @param xero_tenant_id [String] Xero identifier for Tenant @param [Hash] opts the optional parameters @option opts [DateTime] :if_modified_since Only records created or modified since this timestamp will be returned @option opts [String] :where Filter by an any element @option opts [String] :order Order by an any element @return [Array<(ExpenseClaims, Integer, Hash)>] ExpenseClaims data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 8925 def get_expense_claims_with_http_info(xero_tenant_id, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.get_expense_claims ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.get_expense_claims" end # resource path local_var_path = '/ExpenseClaims' # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} query_params[:'where'] = opts[:'where'] if !opts[:'where'].nil? query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil? # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id header_params[:'If-Modified-Since'] = opts[:'if_modified_since'] if !opts[:'if_modified_since'].nil? # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'ExpenseClaims' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#get_expense_claims\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves a specific sales invoice or purchase bill using a unique invoice Id @param xero_tenant_id [String] Xero identifier for Tenant @param invoice_id [String] Unique identifier for an Invoice @param [Hash] opts the optional parameters @option opts [Integer] :unitdp e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts @return [Invoices]
# File lib/xero-ruby/api/accounting_api.rb, line 8990 def get_invoice(xero_tenant_id, invoice_id, opts = {}) data, _status_code, _headers = get_invoice_with_http_info(xero_tenant_id, invoice_id, opts) data end
Retrieves invoices or purchase bills as PDF files @param xero_tenant_id [String] Xero identifier for Tenant @param invoice_id [String] Unique identifier for an Invoice @param [Hash] opts the optional parameters @return [File]
# File lib/xero-ruby/api/accounting_api.rb, line 9067 def get_invoice_as_pdf(xero_tenant_id, invoice_id, opts = {}) data, _status_code, _headers = get_invoice_as_pdf_with_http_info(xero_tenant_id, invoice_id, opts) data end
Retrieves invoices or purchase bills as PDF files @param xero_tenant_id [String] Xero identifier for Tenant @param invoice_id [String] Unique identifier for an Invoice @param [Hash] opts the optional parameters @return [Array<(File, Integer, Hash)>] File data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 9077 def get_invoice_as_pdf_with_http_info(xero_tenant_id, invoice_id, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.get_invoice_as_pdf ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.get_invoice_as_pdf" end # verify the required parameter 'invoice_id' is set if @api_client.config.client_side_validation && invoice_id.nil? fail ArgumentError, "Missing the required parameter 'invoice_id' when calling AccountingApi.get_invoice_as_pdf" end # resource path local_var_path = '/Invoices/{InvoiceID}'.sub('{' + 'InvoiceID' + '}', invoice_id.to_s) # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/pdf']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'File' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#get_invoice_as_pdf\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves an attachment from a specific invoice or purchase bill by filename @param xero_tenant_id [String] Xero identifier for Tenant @param invoice_id [String] Unique identifier for an Invoice @param file_name [String] Name of the attachment @param content_type [String] The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf @param [Hash] opts the optional parameters @return [File]
# File lib/xero-ruby/api/accounting_api.rb, line 9144 def get_invoice_attachment_by_file_name(xero_tenant_id, invoice_id, file_name, content_type, opts = {}) data, _status_code, _headers = get_invoice_attachment_by_file_name_with_http_info(xero_tenant_id, invoice_id, file_name, content_type, opts) data end
Retrieves an attachment from a specific invoice or purchase bill by filename @param xero_tenant_id [String] Xero identifier for Tenant @param invoice_id [String] Unique identifier for an Invoice @param file_name [String] Name of the attachment @param content_type [String] The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf @param [Hash] opts the optional parameters @return [Array<(File, Integer, Hash)>] File data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 9156 def get_invoice_attachment_by_file_name_with_http_info(xero_tenant_id, invoice_id, file_name, content_type, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.get_invoice_attachment_by_file_name ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.get_invoice_attachment_by_file_name" end # verify the required parameter 'invoice_id' is set if @api_client.config.client_side_validation && invoice_id.nil? fail ArgumentError, "Missing the required parameter 'invoice_id' when calling AccountingApi.get_invoice_attachment_by_file_name" end # verify the required parameter 'file_name' is set if @api_client.config.client_side_validation && file_name.nil? fail ArgumentError, "Missing the required parameter 'file_name' when calling AccountingApi.get_invoice_attachment_by_file_name" end # verify the required parameter 'content_type' is set if @api_client.config.client_side_validation && content_type.nil? fail ArgumentError, "Missing the required parameter 'content_type' when calling AccountingApi.get_invoice_attachment_by_file_name" end # resource path 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'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream']) header_params[:'xero-tenant-id'] = xero_tenant_id header_params[:'contentType'] = content_type # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'File' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#get_invoice_attachment_by_file_name\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves a specific attachment from a specific invoices or purchase bills by using a unique attachment Id @param xero_tenant_id [String] Xero identifier for Tenant @param invoice_id [String] Unique identifier for an Invoice @param attachment_id [String] Unique identifier for Attachment object @param content_type [String] The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf @param [Hash] opts the optional parameters @return [File]
# File lib/xero-ruby/api/accounting_api.rb, line 9232 def get_invoice_attachment_by_id(xero_tenant_id, invoice_id, attachment_id, content_type, opts = {}) data, _status_code, _headers = get_invoice_attachment_by_id_with_http_info(xero_tenant_id, invoice_id, attachment_id, content_type, opts) data end
Retrieves a specific attachment from a specific invoices or purchase bills by using a unique attachment Id @param xero_tenant_id [String] Xero identifier for Tenant @param invoice_id [String] Unique identifier for an Invoice @param attachment_id [String] Unique identifier for Attachment object @param content_type [String] The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf @param [Hash] opts the optional parameters @return [Array<(File, Integer, Hash)>] File data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 9244 def get_invoice_attachment_by_id_with_http_info(xero_tenant_id, invoice_id, attachment_id, content_type, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.get_invoice_attachment_by_id ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.get_invoice_attachment_by_id" end # verify the required parameter 'invoice_id' is set if @api_client.config.client_side_validation && invoice_id.nil? fail ArgumentError, "Missing the required parameter 'invoice_id' when calling AccountingApi.get_invoice_attachment_by_id" end # verify the required parameter 'attachment_id' is set if @api_client.config.client_side_validation && attachment_id.nil? fail ArgumentError, "Missing the required parameter 'attachment_id' when calling AccountingApi.get_invoice_attachment_by_id" end # verify the required parameter 'content_type' is set if @api_client.config.client_side_validation && content_type.nil? fail ArgumentError, "Missing the required parameter 'content_type' when calling AccountingApi.get_invoice_attachment_by_id" end # resource path 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'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream']) header_params[:'xero-tenant-id'] = xero_tenant_id header_params[:'contentType'] = content_type # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'File' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#get_invoice_attachment_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves attachments for a specific invoice or purchase bill @param xero_tenant_id [String] Xero identifier for Tenant @param invoice_id [String] Unique identifier for an Invoice @param [Hash] opts the optional parameters @return [Attachments]
# File lib/xero-ruby/api/accounting_api.rb, line 9318 def get_invoice_attachments(xero_tenant_id, invoice_id, opts = {}) data, _status_code, _headers = get_invoice_attachments_with_http_info(xero_tenant_id, invoice_id, opts) data end
Retrieves attachments for a specific invoice or purchase bill @param xero_tenant_id [String] Xero identifier for Tenant @param invoice_id [String] Unique identifier for an Invoice @param [Hash] opts the optional parameters @return [Array<(Attachments, Integer, Hash)>] Attachments data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 9328 def get_invoice_attachments_with_http_info(xero_tenant_id, invoice_id, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.get_invoice_attachments ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.get_invoice_attachments" end # verify the required parameter 'invoice_id' is set if @api_client.config.client_side_validation && invoice_id.nil? fail ArgumentError, "Missing the required parameter 'invoice_id' when calling AccountingApi.get_invoice_attachments" end # resource path local_var_path = '/Invoices/{InvoiceID}/Attachments'.sub('{' + 'InvoiceID' + '}', invoice_id.to_s) # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'Attachments' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#get_invoice_attachments\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves history records for a specific invoice @param xero_tenant_id [String] Xero identifier for Tenant @param invoice_id [String] Unique identifier for an Invoice @param [Hash] opts the optional parameters @return [HistoryRecords]
# File lib/xero-ruby/api/accounting_api.rb, line 9393 def get_invoice_history(xero_tenant_id, invoice_id, opts = {}) data, _status_code, _headers = get_invoice_history_with_http_info(xero_tenant_id, invoice_id, opts) data end
Retrieves history records for a specific invoice @param xero_tenant_id [String] Xero identifier for Tenant @param invoice_id [String] Unique identifier for an Invoice @param [Hash] opts the optional parameters @return [Array<(HistoryRecords, Integer, Hash)>] HistoryRecords data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 9403 def get_invoice_history_with_http_info(xero_tenant_id, invoice_id, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.get_invoice_history ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.get_invoice_history" end # verify the required parameter 'invoice_id' is set if @api_client.config.client_side_validation && invoice_id.nil? fail ArgumentError, "Missing the required parameter 'invoice_id' when calling AccountingApi.get_invoice_history" end # resource path local_var_path = '/Invoices/{InvoiceID}/History'.sub('{' + 'InvoiceID' + '}', invoice_id.to_s) # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'HistoryRecords' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#get_invoice_history\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves invoice reminder settings @param xero_tenant_id [String] Xero identifier for Tenant @param [Hash] opts the optional parameters @return [InvoiceReminders]
# File lib/xero-ruby/api/accounting_api.rb, line 9467 def get_invoice_reminders(xero_tenant_id, opts = {}) data, _status_code, _headers = get_invoice_reminders_with_http_info(xero_tenant_id, opts) data end
Retrieves invoice reminder settings @param xero_tenant_id [String] Xero identifier for Tenant @param [Hash] opts the optional parameters @return [Array<(InvoiceReminders, Integer, Hash)>] InvoiceReminders data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 9476 def get_invoice_reminders_with_http_info(xero_tenant_id, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.get_invoice_reminders ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.get_invoice_reminders" end # resource path local_var_path = '/InvoiceReminders/Settings' # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'InvoiceReminders' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#get_invoice_reminders\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves a specific sales invoice or purchase bill using a unique invoice Id @param xero_tenant_id [String] Xero identifier for Tenant @param invoice_id [String] Unique identifier for an Invoice @param [Hash] opts the optional parameters @option opts [Integer] :unitdp e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts @return [Array<(Invoices, Integer, Hash)>] Invoices data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 9001 def get_invoice_with_http_info(xero_tenant_id, invoice_id, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.get_invoice ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.get_invoice" end # verify the required parameter 'invoice_id' is set if @api_client.config.client_side_validation && invoice_id.nil? fail ArgumentError, "Missing the required parameter 'invoice_id' when calling AccountingApi.get_invoice" end # resource path local_var_path = '/Invoices/{InvoiceID}'.sub('{' + 'InvoiceID' + '}', invoice_id.to_s) # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} query_params[:'unitdp'] = opts[:'unitdp'] if !opts[:'unitdp'].nil? # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'Invoices' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#get_invoice\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves sales invoices or purchase bills @param xero_tenant_id [String] Xero identifier for Tenant @param [Hash] opts the optional parameters @option opts [DateTime] :if_modified_since Only records created or modified since this timestamp will be returned @option opts [String] :where Filter by an any element @option opts [String] :order Order by an any element @option opts [Array<String>] :i_ds Filter by a comma-separated list of InvoicesIDs. @option opts [Array<String>] :invoice_numbers Filter by a comma-separated list of InvoiceNumbers. @option opts [Array<String>] :contact_i_ds Filter by a comma-separated list of ContactIDs. @option opts [Array<String>] :statuses Filter by a comma-separated list Statuses. For faster response times we recommend using these explicit parameters instead of passing OR conditions into the Where
filter. @option opts [Integer] :page e.g. page=1 – Up to 100 invoices will be returned in a single API call with line items shown for each invoice @option opts [Boolean] :include_archived e.g. includeArchived=true - Invoices with a status of ARCHIVED will be included in the response @option opts [Boolean] :created_by_my_app When set to true you'll only retrieve Invoices created by your app @option opts [Integer] :unitdp e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts @option opts [Boolean] :summary_only Use summaryOnly=true in GET Contacts and Invoices endpoint to retrieve a smaller version of the response object. This returns only lightweight fields, excluding computation-heavy fields from the response, making the API calls quick and efficient. (default to false) @return [Invoices]
# File lib/xero-ruby/api/accounting_api.rb, line 9548 def get_invoices(xero_tenant_id, opts = {}) data, _status_code, _headers = get_invoices_with_http_info(xero_tenant_id, opts) data end
Retrieves sales invoices or purchase bills @param xero_tenant_id [String] Xero identifier for Tenant @param [Hash] opts the optional parameters @option opts [DateTime] :if_modified_since Only records created or modified since this timestamp will be returned @option opts [String] :where Filter by an any element @option opts [String] :order Order by an any element @option opts [Array<String>] :i_ds Filter by a comma-separated list of InvoicesIDs. @option opts [Array<String>] :invoice_numbers Filter by a comma-separated list of InvoiceNumbers. @option opts [Array<String>] :contact_i_ds Filter by a comma-separated list of ContactIDs. @option opts [Array<String>] :statuses Filter by a comma-separated list Statuses. For faster response times we recommend using these explicit parameters instead of passing OR conditions into the Where
filter. @option opts [Integer] :page e.g. page=1 – Up to 100 invoices will be returned in a single API call with line items shown for each invoice @option opts [Boolean] :include_archived e.g. includeArchived=true - Invoices with a status of ARCHIVED will be included in the response @option opts [Boolean] :created_by_my_app When set to true you'll only retrieve Invoices created by your app @option opts [Integer] :unitdp e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts @option opts [Boolean] :summary_only Use summaryOnly=true in GET Contacts and Invoices endpoint to retrieve a smaller version of the response object. This returns only lightweight fields, excluding computation-heavy fields from the response, making the API calls quick and efficient. @return [Array<(Invoices, Integer, Hash)>] Invoices data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 9569 def get_invoices_with_http_info(xero_tenant_id, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.get_invoices ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.get_invoices" end # resource path local_var_path = '/Invoices' # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} query_params[:'where'] = opts[:'where'] if !opts[:'where'].nil? query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil? query_params[:'IDs'] = @api_client.build_collection_param(opts[:'i_ds'], :csv) if !opts[:'i_ds'].nil? query_params[:'InvoiceNumbers'] = @api_client.build_collection_param(opts[:'invoice_numbers'], :csv) if !opts[:'invoice_numbers'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_i_ds'], :csv) if !opts[:'contact_i_ds'].nil? query_params[:'Statuses'] = @api_client.build_collection_param(opts[:'statuses'], :csv) if !opts[:'statuses'].nil? query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil? query_params[:'includeArchived'] = opts[:'include_archived'] if !opts[:'include_archived'].nil? query_params[:'createdByMyApp'] = opts[:'created_by_my_app'] if !opts[:'created_by_my_app'].nil? query_params[:'unitdp'] = opts[:'unitdp'] if !opts[:'unitdp'].nil? query_params[:'summaryOnly'] = opts[:'summary_only'] if !opts[:'summary_only'].nil? # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id header_params[:'If-Modified-Since'] = opts[:'if_modified_since'] if !opts[:'if_modified_since'].nil? # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'Invoices' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#get_invoices\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves a specific item using a unique item Id @param xero_tenant_id [String] Xero identifier for Tenant @param item_id [String] Unique identifier for an Item @param [Hash] opts the optional parameters @option opts [Integer] :unitdp e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts @return [Items]
# File lib/xero-ruby/api/accounting_api.rb, line 9643 def get_item(xero_tenant_id, item_id, opts = {}) data, _status_code, _headers = get_item_with_http_info(xero_tenant_id, item_id, opts) data end
Retrieves history for a specific item @param xero_tenant_id [String] Xero identifier for Tenant @param item_id [String] Unique identifier for an Item @param [Hash] opts the optional parameters @return [HistoryRecords]
# File lib/xero-ruby/api/accounting_api.rb, line 9720 def get_item_history(xero_tenant_id, item_id, opts = {}) data, _status_code, _headers = get_item_history_with_http_info(xero_tenant_id, item_id, opts) data end
Retrieves history for a specific item @param xero_tenant_id [String] Xero identifier for Tenant @param item_id [String] Unique identifier for an Item @param [Hash] opts the optional parameters @return [Array<(HistoryRecords, Integer, Hash)>] HistoryRecords data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 9730 def get_item_history_with_http_info(xero_tenant_id, item_id, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.get_item_history ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.get_item_history" end # verify the required parameter 'item_id' is set if @api_client.config.client_side_validation && item_id.nil? fail ArgumentError, "Missing the required parameter 'item_id' when calling AccountingApi.get_item_history" end # resource path local_var_path = '/Items/{ItemID}/History'.sub('{' + 'ItemID' + '}', item_id.to_s) # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'HistoryRecords' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#get_item_history\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves a specific item using a unique item Id @param xero_tenant_id [String] Xero identifier for Tenant @param item_id [String] Unique identifier for an Item @param [Hash] opts the optional parameters @option opts [Integer] :unitdp e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts @return [Array<(Items, Integer, Hash)>] Items data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 9654 def get_item_with_http_info(xero_tenant_id, item_id, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.get_item ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.get_item" end # verify the required parameter 'item_id' is set if @api_client.config.client_side_validation && item_id.nil? fail ArgumentError, "Missing the required parameter 'item_id' when calling AccountingApi.get_item" end # resource path local_var_path = '/Items/{ItemID}'.sub('{' + 'ItemID' + '}', item_id.to_s) # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} query_params[:'unitdp'] = opts[:'unitdp'] if !opts[:'unitdp'].nil? # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'Items' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#get_item\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves items @param xero_tenant_id [String] Xero identifier for Tenant @param [Hash] opts the optional parameters @option opts [DateTime] :if_modified_since Only records created or modified since this timestamp will be returned @option opts [String] :where Filter by an any element @option opts [String] :order Order by an any element @option opts [Integer] :unitdp e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts @return [Items]
# File lib/xero-ruby/api/accounting_api.rb, line 9798 def get_items(xero_tenant_id, opts = {}) data, _status_code, _headers = get_items_with_http_info(xero_tenant_id, opts) data end
Retrieves items @param xero_tenant_id [String] Xero identifier for Tenant @param [Hash] opts the optional parameters @option opts [DateTime] :if_modified_since Only records created or modified since this timestamp will be returned @option opts [String] :where Filter by an any element @option opts [String] :order Order by an any element @option opts [Integer] :unitdp e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts @return [Array<(Items, Integer, Hash)>] Items data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 9811 def get_items_with_http_info(xero_tenant_id, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.get_items ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.get_items" end # resource path local_var_path = '/Items' # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} query_params[:'where'] = opts[:'where'] if !opts[:'where'].nil? query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil? query_params[:'unitdp'] = opts[:'unitdp'] if !opts[:'unitdp'].nil? # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id header_params[:'If-Modified-Since'] = opts[:'if_modified_since'] if !opts[:'if_modified_since'].nil? # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'Items' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#get_items\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves a specific journal using a unique journal Id. @param xero_tenant_id [String] Xero identifier for Tenant @param journal_id [String] Unique identifier for a Journal @param [Hash] opts the optional parameters @return [Journals]
# File lib/xero-ruby/api/accounting_api.rb, line 9876 def get_journal(xero_tenant_id, journal_id, opts = {}) data, _status_code, _headers = get_journal_with_http_info(xero_tenant_id, journal_id, opts) data end
Retrieves a specific journal using a unique journal Id. @param xero_tenant_id [String] Xero identifier for Tenant @param journal_id [String] Unique identifier for a Journal @param [Hash] opts the optional parameters @return [Array<(Journals, Integer, Hash)>] Journals data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 9886 def get_journal_with_http_info(xero_tenant_id, journal_id, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.get_journal ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.get_journal" end # verify the required parameter 'journal_id' is set if @api_client.config.client_side_validation && journal_id.nil? fail ArgumentError, "Missing the required parameter 'journal_id' when calling AccountingApi.get_journal" end # resource path local_var_path = '/Journals/{JournalID}'.sub('{' + 'JournalID' + '}', journal_id.to_s) # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'Journals' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#get_journal\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves journals @param xero_tenant_id [String] Xero identifier for Tenant @param [Hash] opts the optional parameters @option opts [DateTime] :if_modified_since Only records created or modified since this timestamp will be returned @option opts [Integer] :offset Offset by a specified journal number. e.g. journals with a JournalNumber greater than the offset will be returned @option opts [Boolean] :payments_only Filter to retrieve journals on a cash basis. Journals are returned on an accrual basis by default. @return [Journals]
# File lib/xero-ruby/api/accounting_api.rb, line 9953 def get_journals(xero_tenant_id, opts = {}) data, _status_code, _headers = get_journals_with_http_info(xero_tenant_id, opts) data end
Retrieves journals @param xero_tenant_id [String] Xero identifier for Tenant @param [Hash] opts the optional parameters @option opts [DateTime] :if_modified_since Only records created or modified since this timestamp will be returned @option opts [Integer] :offset Offset by a specified journal number. e.g. journals with a JournalNumber greater than the offset will be returned @option opts [Boolean] :payments_only Filter to retrieve journals on a cash basis. Journals are returned on an accrual basis by default. @return [Array<(Journals, Integer, Hash)>] Journals data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 9965 def get_journals_with_http_info(xero_tenant_id, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.get_journals ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.get_journals" end # resource path local_var_path = '/Journals' # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? query_params[:'paymentsOnly'] = opts[:'payments_only'] if !opts[:'payments_only'].nil? # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id header_params[:'If-Modified-Since'] = opts[:'if_modified_since'] if !opts[:'if_modified_since'].nil? # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'Journals' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#get_journals\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves a specific linked transaction (billable expenses) using a unique linked transaction Id @param xero_tenant_id [String] Xero identifier for Tenant @param linked_transaction_id [String] Unique identifier for a LinkedTransaction @param [Hash] opts the optional parameters @return [LinkedTransactions]
# File lib/xero-ruby/api/accounting_api.rb, line 10029 def get_linked_transaction(xero_tenant_id, linked_transaction_id, opts = {}) data, _status_code, _headers = get_linked_transaction_with_http_info(xero_tenant_id, linked_transaction_id, opts) data end
Retrieves a specific linked transaction (billable expenses) using a unique linked transaction Id @param xero_tenant_id [String] Xero identifier for Tenant @param linked_transaction_id [String] Unique identifier for a LinkedTransaction @param [Hash] opts the optional parameters @return [Array<(LinkedTransactions, Integer, Hash)>] LinkedTransactions data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 10039 def get_linked_transaction_with_http_info(xero_tenant_id, linked_transaction_id, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.get_linked_transaction ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.get_linked_transaction" end # verify the required parameter 'linked_transaction_id' is set if @api_client.config.client_side_validation && linked_transaction_id.nil? fail ArgumentError, "Missing the required parameter 'linked_transaction_id' when calling AccountingApi.get_linked_transaction" end # resource path local_var_path = '/LinkedTransactions/{LinkedTransactionID}'.sub('{' + 'LinkedTransactionID' + '}', linked_transaction_id.to_s) # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'LinkedTransactions' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#get_linked_transaction\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves linked transactions (billable expenses) @param xero_tenant_id [String] Xero identifier for Tenant @param [Hash] opts the optional parameters @option opts [Integer] :page Up to 100 linked transactions will be returned in a single API call. Use the page parameter to specify the page to be returned e.g. page=1. @option opts [String] :linked_transaction_id The Xero identifier for an Linked Transaction @option opts [String] :source_transaction_id Filter by the SourceTransactionID. Get the linked transactions created from a particular ACCPAY invoice @option opts [String] :contact_id Filter by the ContactID. Get all the linked transactions that have been assigned to a particular customer. @option opts [String] :status Filter by the combination of ContactID and Status. Get the linked transactions associated to a customer and with a status @option opts [String] :target_transaction_id Filter by the TargetTransactionID. Get all the linked transactions allocated to a particular ACCREC invoice @return [LinkedTransactions]
# File lib/xero-ruby/api/accounting_api.rb, line 10109 def get_linked_transactions(xero_tenant_id, opts = {}) data, _status_code, _headers = get_linked_transactions_with_http_info(xero_tenant_id, opts) data end
Retrieves linked transactions (billable expenses) @param xero_tenant_id [String] Xero identifier for Tenant @param [Hash] opts the optional parameters @option opts [Integer] :page Up to 100 linked transactions will be returned in a single API call. Use the page parameter to specify the page to be returned e.g. page=1. @option opts [String] :linked_transaction_id The Xero identifier for an Linked Transaction @option opts [String] :source_transaction_id Filter by the SourceTransactionID. Get the linked transactions created from a particular ACCPAY invoice @option opts [String] :contact_id Filter by the ContactID. Get all the linked transactions that have been assigned to a particular customer. @option opts [String] :status Filter by the combination of ContactID and Status. Get the linked transactions associated to a customer and with a status @option opts [String] :target_transaction_id Filter by the TargetTransactionID. Get all the linked transactions allocated to a particular ACCREC invoice @return [Array<(LinkedTransactions, Integer, Hash)>] LinkedTransactions data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 10124 def get_linked_transactions_with_http_info(xero_tenant_id, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.get_linked_transactions ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.get_linked_transactions" end # resource path local_var_path = '/LinkedTransactions' # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil? query_params[:'LinkedTransactionID'] = opts[:'linked_transaction_id'] if !opts[:'linked_transaction_id'].nil? query_params[:'SourceTransactionID'] = opts[:'source_transaction_id'] if !opts[:'source_transaction_id'].nil? query_params[:'ContactID'] = opts[:'contact_id'] if !opts[:'contact_id'].nil? query_params[:'Status'] = opts[:'status'] if !opts[:'status'].nil? query_params[:'TargetTransactionID'] = opts[:'target_transaction_id'] if !opts[:'target_transaction_id'].nil? # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'LinkedTransactions' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#get_linked_transactions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves a specific manual journal @param xero_tenant_id [String] Xero identifier for Tenant @param manual_journal_id [String] Unique identifier for a ManualJournal @param [Hash] opts the optional parameters @return [ManualJournals]
# File lib/xero-ruby/api/accounting_api.rb, line 10191 def get_manual_journal(xero_tenant_id, manual_journal_id, opts = {}) data, _status_code, _headers = get_manual_journal_with_http_info(xero_tenant_id, manual_journal_id, opts) data end
Retrieves a specific attachment from a specific manual journal by file name @param xero_tenant_id [String] Xero identifier for Tenant @param manual_journal_id [String] Unique identifier for a ManualJournal @param file_name [String] Name of the attachment @param content_type [String] The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf @param [Hash] opts the optional parameters @return [File]
# File lib/xero-ruby/api/accounting_api.rb, line 10268 def get_manual_journal_attachment_by_file_name(xero_tenant_id, manual_journal_id, file_name, content_type, opts = {}) data, _status_code, _headers = get_manual_journal_attachment_by_file_name_with_http_info(xero_tenant_id, manual_journal_id, file_name, content_type, opts) data end
Retrieves a specific attachment from a specific manual journal by file name @param xero_tenant_id [String] Xero identifier for Tenant @param manual_journal_id [String] Unique identifier for a ManualJournal @param file_name [String] Name of the attachment @param content_type [String] The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf @param [Hash] opts the optional parameters @return [Array<(File, Integer, Hash)>] File data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 10280 def get_manual_journal_attachment_by_file_name_with_http_info(xero_tenant_id, manual_journal_id, file_name, content_type, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.get_manual_journal_attachment_by_file_name ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.get_manual_journal_attachment_by_file_name" end # verify the required parameter 'manual_journal_id' is set if @api_client.config.client_side_validation && manual_journal_id.nil? fail ArgumentError, "Missing the required parameter 'manual_journal_id' when calling AccountingApi.get_manual_journal_attachment_by_file_name" end # verify the required parameter 'file_name' is set if @api_client.config.client_side_validation && file_name.nil? fail ArgumentError, "Missing the required parameter 'file_name' when calling AccountingApi.get_manual_journal_attachment_by_file_name" end # verify the required parameter 'content_type' is set if @api_client.config.client_side_validation && content_type.nil? fail ArgumentError, "Missing the required parameter 'content_type' when calling AccountingApi.get_manual_journal_attachment_by_file_name" end # resource path 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'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream']) header_params[:'xero-tenant-id'] = xero_tenant_id header_params[:'contentType'] = content_type # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'File' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#get_manual_journal_attachment_by_file_name\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Allows you to retrieve a specific attachment from a specific manual journal using a unique attachment Id @param xero_tenant_id [String] Xero identifier for Tenant @param manual_journal_id [String] Unique identifier for a ManualJournal @param attachment_id [String] Unique identifier for Attachment object @param content_type [String] The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf @param [Hash] opts the optional parameters @return [File]
# File lib/xero-ruby/api/accounting_api.rb, line 10356 def get_manual_journal_attachment_by_id(xero_tenant_id, manual_journal_id, attachment_id, content_type, opts = {}) data, _status_code, _headers = get_manual_journal_attachment_by_id_with_http_info(xero_tenant_id, manual_journal_id, attachment_id, content_type, opts) data end
Allows you to retrieve a specific attachment from a specific manual journal using a unique attachment Id @param xero_tenant_id [String] Xero identifier for Tenant @param manual_journal_id [String] Unique identifier for a ManualJournal @param attachment_id [String] Unique identifier for Attachment object @param content_type [String] The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf @param [Hash] opts the optional parameters @return [Array<(File, Integer, Hash)>] File data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 10368 def get_manual_journal_attachment_by_id_with_http_info(xero_tenant_id, manual_journal_id, attachment_id, content_type, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.get_manual_journal_attachment_by_id ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.get_manual_journal_attachment_by_id" end # verify the required parameter 'manual_journal_id' is set if @api_client.config.client_side_validation && manual_journal_id.nil? fail ArgumentError, "Missing the required parameter 'manual_journal_id' when calling AccountingApi.get_manual_journal_attachment_by_id" end # verify the required parameter 'attachment_id' is set if @api_client.config.client_side_validation && attachment_id.nil? fail ArgumentError, "Missing the required parameter 'attachment_id' when calling AccountingApi.get_manual_journal_attachment_by_id" end # verify the required parameter 'content_type' is set if @api_client.config.client_side_validation && content_type.nil? fail ArgumentError, "Missing the required parameter 'content_type' when calling AccountingApi.get_manual_journal_attachment_by_id" end # resource path 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'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream']) header_params[:'xero-tenant-id'] = xero_tenant_id header_params[:'contentType'] = content_type # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'File' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#get_manual_journal_attachment_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves attachment for a specific manual journal @param xero_tenant_id [String] Xero identifier for Tenant @param manual_journal_id [String] Unique identifier for a ManualJournal @param [Hash] opts the optional parameters @return [Attachments]
# File lib/xero-ruby/api/accounting_api.rb, line 10442 def get_manual_journal_attachments(xero_tenant_id, manual_journal_id, opts = {}) data, _status_code, _headers = get_manual_journal_attachments_with_http_info(xero_tenant_id, manual_journal_id, opts) data end
Retrieves attachment for a specific manual journal @param xero_tenant_id [String] Xero identifier for Tenant @param manual_journal_id [String] Unique identifier for a ManualJournal @param [Hash] opts the optional parameters @return [Array<(Attachments, Integer, Hash)>] Attachments data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 10452 def get_manual_journal_attachments_with_http_info(xero_tenant_id, manual_journal_id, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.get_manual_journal_attachments ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.get_manual_journal_attachments" end # verify the required parameter 'manual_journal_id' is set if @api_client.config.client_side_validation && manual_journal_id.nil? fail ArgumentError, "Missing the required parameter 'manual_journal_id' when calling AccountingApi.get_manual_journal_attachments" end # resource path local_var_path = '/ManualJournals/{ManualJournalID}/Attachments'.sub('{' + 'ManualJournalID' + '}', manual_journal_id.to_s) # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'Attachments' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#get_manual_journal_attachments\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves a specific manual journal @param xero_tenant_id [String] Xero identifier for Tenant @param manual_journal_id [String] Unique identifier for a ManualJournal @param [Hash] opts the optional parameters @return [Array<(ManualJournals, Integer, Hash)>] ManualJournals data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 10201 def get_manual_journal_with_http_info(xero_tenant_id, manual_journal_id, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.get_manual_journal ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.get_manual_journal" end # verify the required parameter 'manual_journal_id' is set if @api_client.config.client_side_validation && manual_journal_id.nil? fail ArgumentError, "Missing the required parameter 'manual_journal_id' when calling AccountingApi.get_manual_journal" end # resource path local_var_path = '/ManualJournals/{ManualJournalID}'.sub('{' + 'ManualJournalID' + '}', manual_journal_id.to_s) # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'ManualJournals' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#get_manual_journal\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves manual journals @param xero_tenant_id [String] Xero identifier for Tenant @param [Hash] opts the optional parameters @option opts [DateTime] :if_modified_since Only records created or modified since this timestamp will be returned @option opts [String] :where Filter by an any element @option opts [String] :order Order by an any element @option opts [Integer] :page e.g. page=1 – Up to 100 manual journals will be returned in a single API call with line items shown for each overpayment @return [ManualJournals]
# File lib/xero-ruby/api/accounting_api.rb, line 10520 def get_manual_journals(xero_tenant_id, opts = {}) data, _status_code, _headers = get_manual_journals_with_http_info(xero_tenant_id, opts) data end
Retrieves history for a specific manual journal @param xero_tenant_id [String] Xero identifier for Tenant @param manual_journal_id [String] Unique identifier for a ManualJournal @param [Hash] opts the optional parameters @return [HistoryRecords]
# File lib/xero-ruby/api/accounting_api.rb, line 10598 def get_manual_journals_history(xero_tenant_id, manual_journal_id, opts = {}) data, _status_code, _headers = get_manual_journals_history_with_http_info(xero_tenant_id, manual_journal_id, opts) data end
Retrieves history for a specific manual journal @param xero_tenant_id [String] Xero identifier for Tenant @param manual_journal_id [String] Unique identifier for a ManualJournal @param [Hash] opts the optional parameters @return [Array<(HistoryRecords, Integer, Hash)>] HistoryRecords data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 10608 def get_manual_journals_history_with_http_info(xero_tenant_id, manual_journal_id, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.get_manual_journals_history ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.get_manual_journals_history" end # verify the required parameter 'manual_journal_id' is set if @api_client.config.client_side_validation && manual_journal_id.nil? fail ArgumentError, "Missing the required parameter 'manual_journal_id' when calling AccountingApi.get_manual_journals_history" end # resource path local_var_path = '/ManualJournals/{ManualJournalID}/History'.sub('{' + 'ManualJournalID' + '}', manual_journal_id.to_s) # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'HistoryRecords' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#get_manual_journals_history\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves manual journals @param xero_tenant_id [String] Xero identifier for Tenant @param [Hash] opts the optional parameters @option opts [DateTime] :if_modified_since Only records created or modified since this timestamp will be returned @option opts [String] :where Filter by an any element @option opts [String] :order Order by an any element @option opts [Integer] :page e.g. page=1 – Up to 100 manual journals will be returned in a single API call with line items shown for each overpayment @return [Array<(ManualJournals, Integer, Hash)>] ManualJournals data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 10533 def get_manual_journals_with_http_info(xero_tenant_id, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.get_manual_journals ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.get_manual_journals" end # resource path local_var_path = '/ManualJournals' # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} query_params[:'where'] = opts[:'where'] if !opts[:'where'].nil? query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil? query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil? # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id header_params[:'If-Modified-Since'] = opts[:'if_modified_since'] if !opts[:'if_modified_since'].nil? # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'ManualJournals' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#get_manual_journals\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves a URL to an online invoice @param xero_tenant_id [String] Xero identifier for Tenant @param invoice_id [String] Unique identifier for an Invoice @param [Hash] opts the optional parameters @return [OnlineInvoices]
# File lib/xero-ruby/api/accounting_api.rb, line 10673 def get_online_invoice(xero_tenant_id, invoice_id, opts = {}) data, _status_code, _headers = get_online_invoice_with_http_info(xero_tenant_id, invoice_id, opts) data end
Retrieves a URL to an online invoice @param xero_tenant_id [String] Xero identifier for Tenant @param invoice_id [String] Unique identifier for an Invoice @param [Hash] opts the optional parameters @return [Array<(OnlineInvoices, Integer, Hash)>] OnlineInvoices data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 10683 def get_online_invoice_with_http_info(xero_tenant_id, invoice_id, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.get_online_invoice ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.get_online_invoice" end # verify the required parameter 'invoice_id' is set if @api_client.config.client_side_validation && invoice_id.nil? fail ArgumentError, "Missing the required parameter 'invoice_id' when calling AccountingApi.get_online_invoice" end # resource path local_var_path = '/Invoices/{InvoiceID}/OnlineInvoice'.sub('{' + 'InvoiceID' + '}', invoice_id.to_s) # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'OnlineInvoices' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#get_online_invoice\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves a list of the key actions your app has permission to perform in the connected Xero organisation. @param xero_tenant_id [String] Xero identifier for Tenant @param [Hash] opts the optional parameters @return [Actions]
# File lib/xero-ruby/api/accounting_api.rb, line 10747 def get_organisation_actions(xero_tenant_id, opts = {}) data, _status_code, _headers = get_organisation_actions_with_http_info(xero_tenant_id, opts) data end
Retrieves a list of the key actions your app has permission to perform in the connected Xero organisation. @param xero_tenant_id [String] Xero identifier for Tenant @param [Hash] opts the optional parameters @return [Array<(Actions, Integer, Hash)>] Actions data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 10756 def get_organisation_actions_with_http_info(xero_tenant_id, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.get_organisation_actions ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.get_organisation_actions" end # resource path local_var_path = '/Organisation/Actions' # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'Actions' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#get_organisation_actions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves the CIS settings for the Xero organistaion. @param xero_tenant_id [String] Xero identifier for Tenant @param organisation_id [String] The unique Xero identifier for an organisation @param [Hash] opts the optional parameters @return [CISOrgSettings]
# File lib/xero-ruby/api/accounting_api.rb, line 10817 def get_organisation_cis_settings(xero_tenant_id, organisation_id, opts = {}) data, _status_code, _headers = get_organisation_cis_settings_with_http_info(xero_tenant_id, organisation_id, opts) data end
Retrieves the CIS settings for the Xero organistaion. @param xero_tenant_id [String] Xero identifier for Tenant @param organisation_id [String] The unique Xero identifier for an organisation @param [Hash] opts the optional parameters @return [Array<(CISOrgSettings, Integer, Hash)>] CISOrgSettings data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 10827 def get_organisation_cis_settings_with_http_info(xero_tenant_id, organisation_id, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.get_organisation_cis_settings ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.get_organisation_cis_settings" end # verify the required parameter 'organisation_id' is set if @api_client.config.client_side_validation && organisation_id.nil? fail ArgumentError, "Missing the required parameter 'organisation_id' when calling AccountingApi.get_organisation_cis_settings" end # resource path local_var_path = '/Organisation/{OrganisationID}/CISSettings'.sub('{' + 'OrganisationID' + '}', organisation_id.to_s) # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'CISOrgSettings' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#get_organisation_cis_settings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves Xero organisation details @param xero_tenant_id [String] Xero identifier for Tenant @param [Hash] opts the optional parameters @return [Organisations]
# File lib/xero-ruby/api/accounting_api.rb, line 10891 def get_organisations(xero_tenant_id, opts = {}) data, _status_code, _headers = get_organisations_with_http_info(xero_tenant_id, opts) data end
Retrieves Xero organisation details @param xero_tenant_id [String] Xero identifier for Tenant @param [Hash] opts the optional parameters @return [Array<(Organisations, Integer, Hash)>] Organisations data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 10900 def get_organisations_with_http_info(xero_tenant_id, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.get_organisations ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.get_organisations" end # resource path local_var_path = '/Organisation' # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'Organisations' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#get_organisations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves a specific overpayment using a unique overpayment Id @param xero_tenant_id [String] Xero identifier for Tenant @param overpayment_id [String] Unique identifier for a Overpayment @param [Hash] opts the optional parameters @return [Overpayments]
# File lib/xero-ruby/api/accounting_api.rb, line 10961 def get_overpayment(xero_tenant_id, overpayment_id, opts = {}) data, _status_code, _headers = get_overpayment_with_http_info(xero_tenant_id, overpayment_id, opts) data end
Retrieves history records of a specific overpayment @param xero_tenant_id [String] Xero identifier for Tenant @param overpayment_id [String] Unique identifier for a Overpayment @param [Hash] opts the optional parameters @return [HistoryRecords]
# File lib/xero-ruby/api/accounting_api.rb, line 11036 def get_overpayment_history(xero_tenant_id, overpayment_id, opts = {}) data, _status_code, _headers = get_overpayment_history_with_http_info(xero_tenant_id, overpayment_id, opts) data end
Retrieves history records of a specific overpayment @param xero_tenant_id [String] Xero identifier for Tenant @param overpayment_id [String] Unique identifier for a Overpayment @param [Hash] opts the optional parameters @return [Array<(HistoryRecords, Integer, Hash)>] HistoryRecords data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 11046 def get_overpayment_history_with_http_info(xero_tenant_id, overpayment_id, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.get_overpayment_history ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.get_overpayment_history" end # verify the required parameter 'overpayment_id' is set if @api_client.config.client_side_validation && overpayment_id.nil? fail ArgumentError, "Missing the required parameter 'overpayment_id' when calling AccountingApi.get_overpayment_history" end # resource path local_var_path = '/Overpayments/{OverpaymentID}/History'.sub('{' + 'OverpaymentID' + '}', overpayment_id.to_s) # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'HistoryRecords' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#get_overpayment_history\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves a specific overpayment using a unique overpayment Id @param xero_tenant_id [String] Xero identifier for Tenant @param overpayment_id [String] Unique identifier for a Overpayment @param [Hash] opts the optional parameters @return [Array<(Overpayments, Integer, Hash)>] Overpayments data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 10971 def get_overpayment_with_http_info(xero_tenant_id, overpayment_id, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.get_overpayment ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.get_overpayment" end # verify the required parameter 'overpayment_id' is set if @api_client.config.client_side_validation && overpayment_id.nil? fail ArgumentError, "Missing the required parameter 'overpayment_id' when calling AccountingApi.get_overpayment" end # resource path local_var_path = '/Overpayments/{OverpaymentID}'.sub('{' + 'OverpaymentID' + '}', overpayment_id.to_s) # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'Overpayments' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#get_overpayment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves overpayments @param xero_tenant_id [String] Xero identifier for Tenant @param [Hash] opts the optional parameters @option opts [DateTime] :if_modified_since Only records created or modified since this timestamp will be returned @option opts [String] :where Filter by an any element @option opts [String] :order Order by an any element @option opts [Integer] :page e.g. page=1 – Up to 100 overpayments will be returned in a single API call with line items shown for each overpayment @option opts [Integer] :unitdp e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts @return [Overpayments]
# File lib/xero-ruby/api/accounting_api.rb, line 11115 def get_overpayments(xero_tenant_id, opts = {}) data, _status_code, _headers = get_overpayments_with_http_info(xero_tenant_id, opts) data end
Retrieves overpayments @param xero_tenant_id [String] Xero identifier for Tenant @param [Hash] opts the optional parameters @option opts [DateTime] :if_modified_since Only records created or modified since this timestamp will be returned @option opts [String] :where Filter by an any element @option opts [String] :order Order by an any element @option opts [Integer] :page e.g. page=1 – Up to 100 overpayments will be returned in a single API call with line items shown for each overpayment @option opts [Integer] :unitdp e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts @return [Array<(Overpayments, Integer, Hash)>] Overpayments data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 11129 def get_overpayments_with_http_info(xero_tenant_id, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.get_overpayments ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.get_overpayments" end # resource path local_var_path = '/Overpayments' # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} query_params[:'where'] = opts[:'where'] if !opts[:'where'].nil? query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil? query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil? query_params[:'unitdp'] = opts[:'unitdp'] if !opts[:'unitdp'].nil? # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id header_params[:'If-Modified-Since'] = opts[:'if_modified_since'] if !opts[:'if_modified_since'].nil? # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'Overpayments' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#get_overpayments\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves a specific payment for invoices and credit notes using a unique payment Id @param xero_tenant_id [String] Xero identifier for Tenant @param payment_id [String] Unique identifier for a Payment @param [Hash] opts the optional parameters @return [Payments]
# File lib/xero-ruby/api/accounting_api.rb, line 11195 def get_payment(xero_tenant_id, payment_id, opts = {}) data, _status_code, _headers = get_payment_with_http_info(xero_tenant_id, payment_id, opts) data end
Retrieves history records of a specific payment @param xero_tenant_id [String] Xero identifier for Tenant @param payment_id [String] Unique identifier for a Payment @param [Hash] opts the optional parameters @return [HistoryRecords]
# File lib/xero-ruby/api/accounting_api.rb, line 11270 def get_payment_history(xero_tenant_id, payment_id, opts = {}) data, _status_code, _headers = get_payment_history_with_http_info(xero_tenant_id, payment_id, opts) data end
Retrieves history records of a specific payment @param xero_tenant_id [String] Xero identifier for Tenant @param payment_id [String] Unique identifier for a Payment @param [Hash] opts the optional parameters @return [Array<(HistoryRecords, Integer, Hash)>] HistoryRecords data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 11280 def get_payment_history_with_http_info(xero_tenant_id, payment_id, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.get_payment_history ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.get_payment_history" end # verify the required parameter 'payment_id' is set if @api_client.config.client_side_validation && payment_id.nil? fail ArgumentError, "Missing the required parameter 'payment_id' when calling AccountingApi.get_payment_history" end # resource path local_var_path = '/Payments/{PaymentID}/History'.sub('{' + 'PaymentID' + '}', payment_id.to_s) # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'HistoryRecords' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#get_payment_history\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves payment services @param xero_tenant_id [String] Xero identifier for Tenant @param [Hash] opts the optional parameters @return [PaymentServices]
# File lib/xero-ruby/api/accounting_api.rb, line 11344 def get_payment_services(xero_tenant_id, opts = {}) data, _status_code, _headers = get_payment_services_with_http_info(xero_tenant_id, opts) data end
Retrieves payment services @param xero_tenant_id [String] Xero identifier for Tenant @param [Hash] opts the optional parameters @return [Array<(PaymentServices, Integer, Hash)>] PaymentServices data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 11353 def get_payment_services_with_http_info(xero_tenant_id, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.get_payment_services ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.get_payment_services" end # resource path local_var_path = '/PaymentServices' # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'PaymentServices' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#get_payment_services\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves a specific payment for invoices and credit notes using a unique payment Id @param xero_tenant_id [String] Xero identifier for Tenant @param payment_id [String] Unique identifier for a Payment @param [Hash] opts the optional parameters @return [Array<(Payments, Integer, Hash)>] Payments data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 11205 def get_payment_with_http_info(xero_tenant_id, payment_id, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.get_payment ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.get_payment" end # verify the required parameter 'payment_id' is set if @api_client.config.client_side_validation && payment_id.nil? fail ArgumentError, "Missing the required parameter 'payment_id' when calling AccountingApi.get_payment" end # resource path local_var_path = '/Payments/{PaymentID}'.sub('{' + 'PaymentID' + '}', payment_id.to_s) # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'Payments' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#get_payment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves payments for invoices and credit notes @param xero_tenant_id [String] Xero identifier for Tenant @param [Hash] opts the optional parameters @option opts [DateTime] :if_modified_since Only records created or modified since this timestamp will be returned @option opts [String] :where Filter by an any element @option opts [String] :order Order by an any element @option opts [Integer] :page Up to 100 payments will be returned in a single API call @return [Payments]
# File lib/xero-ruby/api/accounting_api.rb, line 11417 def get_payments(xero_tenant_id, opts = {}) data, _status_code, _headers = get_payments_with_http_info(xero_tenant_id, opts) data end
Retrieves payments for invoices and credit notes @param xero_tenant_id [String] Xero identifier for Tenant @param [Hash] opts the optional parameters @option opts [DateTime] :if_modified_since Only records created or modified since this timestamp will be returned @option opts [String] :where Filter by an any element @option opts [String] :order Order by an any element @option opts [Integer] :page Up to 100 payments will be returned in a single API call @return [Array<(Payments, Integer, Hash)>] Payments data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 11430 def get_payments_with_http_info(xero_tenant_id, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.get_payments ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.get_payments" end # resource path local_var_path = '/Payments' # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} query_params[:'where'] = opts[:'where'] if !opts[:'where'].nil? query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil? query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil? # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id header_params[:'If-Modified-Since'] = opts[:'if_modified_since'] if !opts[:'if_modified_since'].nil? # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'Payments' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#get_payments\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Allows you to retrieve a specified prepayments @param xero_tenant_id [String] Xero identifier for Tenant @param prepayment_id [String] Unique identifier for a PrePayment @param [Hash] opts the optional parameters @return [Prepayments]
# File lib/xero-ruby/api/accounting_api.rb, line 11495 def get_prepayment(xero_tenant_id, prepayment_id, opts = {}) data, _status_code, _headers = get_prepayment_with_http_info(xero_tenant_id, prepayment_id, opts) data end
Retrieves history record for a specific prepayment @param xero_tenant_id [String] Xero identifier for Tenant @param prepayment_id [String] Unique identifier for a PrePayment @param [Hash] opts the optional parameters @return [HistoryRecords]
# File lib/xero-ruby/api/accounting_api.rb, line 11570 def get_prepayment_history(xero_tenant_id, prepayment_id, opts = {}) data, _status_code, _headers = get_prepayment_history_with_http_info(xero_tenant_id, prepayment_id, opts) data end
Retrieves history record for a specific prepayment @param xero_tenant_id [String] Xero identifier for Tenant @param prepayment_id [String] Unique identifier for a PrePayment @param [Hash] opts the optional parameters @return [Array<(HistoryRecords, Integer, Hash)>] HistoryRecords data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 11580 def get_prepayment_history_with_http_info(xero_tenant_id, prepayment_id, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.get_prepayment_history ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.get_prepayment_history" end # verify the required parameter 'prepayment_id' is set if @api_client.config.client_side_validation && prepayment_id.nil? fail ArgumentError, "Missing the required parameter 'prepayment_id' when calling AccountingApi.get_prepayment_history" end # resource path local_var_path = '/Prepayments/{PrepaymentID}/History'.sub('{' + 'PrepaymentID' + '}', prepayment_id.to_s) # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'HistoryRecords' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#get_prepayment_history\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Allows you to retrieve a specified prepayments @param xero_tenant_id [String] Xero identifier for Tenant @param prepayment_id [String] Unique identifier for a PrePayment @param [Hash] opts the optional parameters @return [Array<(Prepayments, Integer, Hash)>] Prepayments data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 11505 def get_prepayment_with_http_info(xero_tenant_id, prepayment_id, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.get_prepayment ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.get_prepayment" end # verify the required parameter 'prepayment_id' is set if @api_client.config.client_side_validation && prepayment_id.nil? fail ArgumentError, "Missing the required parameter 'prepayment_id' when calling AccountingApi.get_prepayment" end # resource path local_var_path = '/Prepayments/{PrepaymentID}'.sub('{' + 'PrepaymentID' + '}', prepayment_id.to_s) # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'Prepayments' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#get_prepayment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves prepayments @param xero_tenant_id [String] Xero identifier for Tenant @param [Hash] opts the optional parameters @option opts [DateTime] :if_modified_since Only records created or modified since this timestamp will be returned @option opts [String] :where Filter by an any element @option opts [String] :order Order by an any element @option opts [Integer] :page e.g. page=1 – Up to 100 prepayments will be returned in a single API call with line items shown for each overpayment @option opts [Integer] :unitdp e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts @return [Prepayments]
# File lib/xero-ruby/api/accounting_api.rb, line 11649 def get_prepayments(xero_tenant_id, opts = {}) data, _status_code, _headers = get_prepayments_with_http_info(xero_tenant_id, opts) data end
Retrieves prepayments @param xero_tenant_id [String] Xero identifier for Tenant @param [Hash] opts the optional parameters @option opts [DateTime] :if_modified_since Only records created or modified since this timestamp will be returned @option opts [String] :where Filter by an any element @option opts [String] :order Order by an any element @option opts [Integer] :page e.g. page=1 – Up to 100 prepayments will be returned in a single API call with line items shown for each overpayment @option opts [Integer] :unitdp e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts @return [Array<(Prepayments, Integer, Hash)>] Prepayments data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 11663 def get_prepayments_with_http_info(xero_tenant_id, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.get_prepayments ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.get_prepayments" end # resource path local_var_path = '/Prepayments' # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} query_params[:'where'] = opts[:'where'] if !opts[:'where'].nil? query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil? query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil? query_params[:'unitdp'] = opts[:'unitdp'] if !opts[:'unitdp'].nil? # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id header_params[:'If-Modified-Since'] = opts[:'if_modified_since'] if !opts[:'if_modified_since'].nil? # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'Prepayments' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#get_prepayments\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves a specific purchase order using a unique purchase order Id @param xero_tenant_id [String] Xero identifier for Tenant @param purchase_order_id [String] Unique identifier for an Purchase Order @param [Hash] opts the optional parameters @return [PurchaseOrders]
# File lib/xero-ruby/api/accounting_api.rb, line 11729 def get_purchase_order(xero_tenant_id, purchase_order_id, opts = {}) data, _status_code, _headers = get_purchase_order_with_http_info(xero_tenant_id, purchase_order_id, opts) data end
Retrieves specific purchase order as PDF files using a unique purchase order Id @param xero_tenant_id [String] Xero identifier for Tenant @param purchase_order_id [String] Unique identifier for an Purchase Order @param [Hash] opts the optional parameters @return [File]
# File lib/xero-ruby/api/accounting_api.rb, line 11804 def get_purchase_order_as_pdf(xero_tenant_id, purchase_order_id, opts = {}) data, _status_code, _headers = get_purchase_order_as_pdf_with_http_info(xero_tenant_id, purchase_order_id, opts) data end
Retrieves specific purchase order as PDF files using a unique purchase order Id @param xero_tenant_id [String] Xero identifier for Tenant @param purchase_order_id [String] Unique identifier for an Purchase Order @param [Hash] opts the optional parameters @return [Array<(File, Integer, Hash)>] File data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 11814 def get_purchase_order_as_pdf_with_http_info(xero_tenant_id, purchase_order_id, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.get_purchase_order_as_pdf ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.get_purchase_order_as_pdf" end # verify the required parameter 'purchase_order_id' is set if @api_client.config.client_side_validation && purchase_order_id.nil? fail ArgumentError, "Missing the required parameter 'purchase_order_id' when calling AccountingApi.get_purchase_order_as_pdf" end # resource path local_var_path = '/PurchaseOrders/{PurchaseOrderID}'.sub('{' + 'PurchaseOrderID' + '}', purchase_order_id.to_s) # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/pdf']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'File' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#get_purchase_order_as_pdf\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves a specific attachment for a specific purchase order by filename @param xero_tenant_id [String] Xero identifier for Tenant @param purchase_order_id [String] Unique identifier for an Purchase Order @param file_name [String] Name of the attachment @param content_type [String] The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf @param [Hash] opts the optional parameters @return [File]
# File lib/xero-ruby/api/accounting_api.rb, line 11881 def get_purchase_order_attachment_by_file_name(xero_tenant_id, purchase_order_id, file_name, content_type, opts = {}) data, _status_code, _headers = get_purchase_order_attachment_by_file_name_with_http_info(xero_tenant_id, purchase_order_id, file_name, content_type, opts) data end
Retrieves a specific attachment for a specific purchase order by filename @param xero_tenant_id [String] Xero identifier for Tenant @param purchase_order_id [String] Unique identifier for an Purchase Order @param file_name [String] Name of the attachment @param content_type [String] The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf @param [Hash] opts the optional parameters @return [Array<(File, Integer, Hash)>] File data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 11893 def get_purchase_order_attachment_by_file_name_with_http_info(xero_tenant_id, purchase_order_id, file_name, content_type, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.get_purchase_order_attachment_by_file_name ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.get_purchase_order_attachment_by_file_name" end # verify the required parameter 'purchase_order_id' is set if @api_client.config.client_side_validation && purchase_order_id.nil? fail ArgumentError, "Missing the required parameter 'purchase_order_id' when calling AccountingApi.get_purchase_order_attachment_by_file_name" end # verify the required parameter 'file_name' is set if @api_client.config.client_side_validation && file_name.nil? fail ArgumentError, "Missing the required parameter 'file_name' when calling AccountingApi.get_purchase_order_attachment_by_file_name" end # verify the required parameter 'content_type' is set if @api_client.config.client_side_validation && content_type.nil? fail ArgumentError, "Missing the required parameter 'content_type' when calling AccountingApi.get_purchase_order_attachment_by_file_name" end # resource path local_var_path = '/PurchaseOrders/{PurchaseOrderID}/Attachments/{FileName}'.sub('{' + 'PurchaseOrderID' + '}', purchase_order_id.to_s).sub('{' + 'FileName' + '}', file_name.to_s) # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream']) header_params[:'xero-tenant-id'] = xero_tenant_id header_params[:'contentType'] = content_type # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'File' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#get_purchase_order_attachment_by_file_name\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves specific attachment for a specific purchase order using a unique attachment Id @param xero_tenant_id [String] Xero identifier for Tenant @param purchase_order_id [String] Unique identifier for an Purchase Order @param attachment_id [String] Unique identifier for Attachment object @param content_type [String] The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf @param [Hash] opts the optional parameters @return [File]
# File lib/xero-ruby/api/accounting_api.rb, line 11969 def get_purchase_order_attachment_by_id(xero_tenant_id, purchase_order_id, attachment_id, content_type, opts = {}) data, _status_code, _headers = get_purchase_order_attachment_by_id_with_http_info(xero_tenant_id, purchase_order_id, attachment_id, content_type, opts) data end
Retrieves specific attachment for a specific purchase order using a unique attachment Id @param xero_tenant_id [String] Xero identifier for Tenant @param purchase_order_id [String] Unique identifier for an Purchase Order @param attachment_id [String] Unique identifier for Attachment object @param content_type [String] The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf @param [Hash] opts the optional parameters @return [Array<(File, Integer, Hash)>] File data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 11981 def get_purchase_order_attachment_by_id_with_http_info(xero_tenant_id, purchase_order_id, attachment_id, content_type, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.get_purchase_order_attachment_by_id ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.get_purchase_order_attachment_by_id" end # verify the required parameter 'purchase_order_id' is set if @api_client.config.client_side_validation && purchase_order_id.nil? fail ArgumentError, "Missing the required parameter 'purchase_order_id' when calling AccountingApi.get_purchase_order_attachment_by_id" end # verify the required parameter 'attachment_id' is set if @api_client.config.client_side_validation && attachment_id.nil? fail ArgumentError, "Missing the required parameter 'attachment_id' when calling AccountingApi.get_purchase_order_attachment_by_id" end # verify the required parameter 'content_type' is set if @api_client.config.client_side_validation && content_type.nil? fail ArgumentError, "Missing the required parameter 'content_type' when calling AccountingApi.get_purchase_order_attachment_by_id" end # resource path local_var_path = '/PurchaseOrders/{PurchaseOrderID}/Attachments/{AttachmentID}'.sub('{' + 'PurchaseOrderID' + '}', purchase_order_id.to_s).sub('{' + 'AttachmentID' + '}', attachment_id.to_s) # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream']) header_params[:'xero-tenant-id'] = xero_tenant_id header_params[:'contentType'] = content_type # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'File' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#get_purchase_order_attachment_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves attachments for a specific purchase order @param xero_tenant_id [String] Xero identifier for Tenant @param purchase_order_id [String] Unique identifier for an Purchase Order @param [Hash] opts the optional parameters @return [Attachments]
# File lib/xero-ruby/api/accounting_api.rb, line 12055 def get_purchase_order_attachments(xero_tenant_id, purchase_order_id, opts = {}) data, _status_code, _headers = get_purchase_order_attachments_with_http_info(xero_tenant_id, purchase_order_id, opts) data end
Retrieves attachments for a specific purchase order @param xero_tenant_id [String] Xero identifier for Tenant @param purchase_order_id [String] Unique identifier for an Purchase Order @param [Hash] opts the optional parameters @return [Array<(Attachments, Integer, Hash)>] Attachments data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 12065 def get_purchase_order_attachments_with_http_info(xero_tenant_id, purchase_order_id, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.get_purchase_order_attachments ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.get_purchase_order_attachments" end # verify the required parameter 'purchase_order_id' is set if @api_client.config.client_side_validation && purchase_order_id.nil? fail ArgumentError, "Missing the required parameter 'purchase_order_id' when calling AccountingApi.get_purchase_order_attachments" end # resource path local_var_path = '/PurchaseOrders/{PurchaseOrderID}/Attachments'.sub('{' + 'PurchaseOrderID' + '}', purchase_order_id.to_s) # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'Attachments' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#get_purchase_order_attachments\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves a specific purchase order using purchase order number @param xero_tenant_id [String] Xero identifier for Tenant @param purchase_order_number [String] Unique identifier for a PurchaseOrder @param [Hash] opts the optional parameters @return [PurchaseOrders]
# File lib/xero-ruby/api/accounting_api.rb, line 12130 def get_purchase_order_by_number(xero_tenant_id, purchase_order_number, opts = {}) data, _status_code, _headers = get_purchase_order_by_number_with_http_info(xero_tenant_id, purchase_order_number, opts) data end
Retrieves a specific purchase order using purchase order number @param xero_tenant_id [String] Xero identifier for Tenant @param purchase_order_number [String] Unique identifier for a PurchaseOrder @param [Hash] opts the optional parameters @return [Array<(PurchaseOrders, Integer, Hash)>] PurchaseOrders data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 12140 def get_purchase_order_by_number_with_http_info(xero_tenant_id, purchase_order_number, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.get_purchase_order_by_number ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.get_purchase_order_by_number" end # verify the required parameter 'purchase_order_number' is set if @api_client.config.client_side_validation && purchase_order_number.nil? fail ArgumentError, "Missing the required parameter 'purchase_order_number' when calling AccountingApi.get_purchase_order_by_number" end # resource path local_var_path = '/PurchaseOrders/{PurchaseOrderNumber}'.sub('{' + 'PurchaseOrderNumber' + '}', purchase_order_number.to_s) # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'PurchaseOrders' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#get_purchase_order_by_number\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves history for a specific purchase order @param xero_tenant_id [String] Xero identifier for Tenant @param purchase_order_id [String] Unique identifier for an Purchase Order @param [Hash] opts the optional parameters @return [HistoryRecords]
# File lib/xero-ruby/api/accounting_api.rb, line 12205 def get_purchase_order_history(xero_tenant_id, purchase_order_id, opts = {}) data, _status_code, _headers = get_purchase_order_history_with_http_info(xero_tenant_id, purchase_order_id, opts) data end
Retrieves history for a specific purchase order @param xero_tenant_id [String] Xero identifier for Tenant @param purchase_order_id [String] Unique identifier for an Purchase Order @param [Hash] opts the optional parameters @return [Array<(HistoryRecords, Integer, Hash)>] HistoryRecords data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 12215 def get_purchase_order_history_with_http_info(xero_tenant_id, purchase_order_id, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.get_purchase_order_history ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.get_purchase_order_history" end # verify the required parameter 'purchase_order_id' is set if @api_client.config.client_side_validation && purchase_order_id.nil? fail ArgumentError, "Missing the required parameter 'purchase_order_id' when calling AccountingApi.get_purchase_order_history" end # resource path local_var_path = '/PurchaseOrders/{PurchaseOrderID}/History'.sub('{' + 'PurchaseOrderID' + '}', purchase_order_id.to_s) # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'HistoryRecords' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#get_purchase_order_history\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves a specific purchase order using a unique purchase order Id @param xero_tenant_id [String] Xero identifier for Tenant @param purchase_order_id [String] Unique identifier for an Purchase Order @param [Hash] opts the optional parameters @return [Array<(PurchaseOrders, Integer, Hash)>] PurchaseOrders data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 11739 def get_purchase_order_with_http_info(xero_tenant_id, purchase_order_id, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.get_purchase_order ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.get_purchase_order" end # verify the required parameter 'purchase_order_id' is set if @api_client.config.client_side_validation && purchase_order_id.nil? fail ArgumentError, "Missing the required parameter 'purchase_order_id' when calling AccountingApi.get_purchase_order" end # resource path local_var_path = '/PurchaseOrders/{PurchaseOrderID}'.sub('{' + 'PurchaseOrderID' + '}', purchase_order_id.to_s) # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'PurchaseOrders' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#get_purchase_order\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves purchase orders @param xero_tenant_id [String] Xero identifier for Tenant @param [Hash] opts the optional parameters @option opts [DateTime] :if_modified_since Only records created or modified since this timestamp will be returned @option opts [String] :status Filter by purchase order status @option opts [String] :date_from Filter by purchase order date (e.g. GET …/PurchaseOrders?DateFrom=2015-12-01&DateTo=2015-12-31 @option opts [String] :date_to Filter by purchase order date (e.g. GET …/PurchaseOrders?DateFrom=2015-12-01&DateTo=2015-12-31 @option opts [String] :order Order by an any element @option opts [Integer] :page To specify a page, append the page parameter to the URL e.g. ?page=1. If there are 100 records in the response you will need to check if there is any more data by fetching the next page e.g ?page=2 and continuing this process until no more results are returned. @return [PurchaseOrders]
# File lib/xero-ruby/api/accounting_api.rb, line 12285 def get_purchase_orders(xero_tenant_id, opts = {}) data, _status_code, _headers = get_purchase_orders_with_http_info(xero_tenant_id, opts) data end
Retrieves purchase orders @param xero_tenant_id [String] Xero identifier for Tenant @param [Hash] opts the optional parameters @option opts [DateTime] :if_modified_since Only records created or modified since this timestamp will be returned @option opts [String] :status Filter by purchase order status @option opts [String] :date_from Filter by purchase order date (e.g. GET …/PurchaseOrders?DateFrom=2015-12-01&DateTo=2015-12-31 @option opts [String] :date_to Filter by purchase order date (e.g. GET …/PurchaseOrders?DateFrom=2015-12-01&DateTo=2015-12-31 @option opts [String] :order Order by an any element @option opts [Integer] :page To specify a page, append the page parameter to the URL e.g. ?page=1. If there are 100 records in the response you will need to check if there is any more data by fetching the next page e.g ?page=2 and continuing this process until no more results are returned. @return [Array<(PurchaseOrders, Integer, Hash)>] PurchaseOrders data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 12300 def get_purchase_orders_with_http_info(xero_tenant_id, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.get_purchase_orders ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.get_purchase_orders" end allowable_values = ["DRAFT", "SUBMITTED", "AUTHORISED", "BILLED", "DELETED"] if @api_client.config.client_side_validation && opts[:'status'] && !allowable_values.include?(opts[:'status']) fail ArgumentError, "invalid value for \"status\", must be one of #{allowable_values}" end # resource path local_var_path = '/PurchaseOrders' # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} query_params[:'Status'] = opts[:'status'] if !opts[:'status'].nil? query_params[:'DateFrom'] = opts[:'date_from'] if !opts[:'date_from'].nil? query_params[:'DateTo'] = opts[:'date_to'] if !opts[:'date_to'].nil? query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil? query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil? # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id header_params[:'If-Modified-Since'] = opts[:'if_modified_since'] if !opts[:'if_modified_since'].nil? # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'PurchaseOrders' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#get_purchase_orders\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves a specific quote using a unique quote Id @param xero_tenant_id [String] Xero identifier for Tenant @param quote_id [String] Unique identifier for an Quote @param [Hash] opts the optional parameters @return [Quotes]
# File lib/xero-ruby/api/accounting_api.rb, line 12371 def get_quote(xero_tenant_id, quote_id, opts = {}) data, _status_code, _headers = get_quote_with_http_info(xero_tenant_id, quote_id, opts) data end
Retrieves a specific quote as a PDF file using a unique quote Id @param xero_tenant_id [String] Xero identifier for Tenant @param quote_id [String] Unique identifier for an Quote @param [Hash] opts the optional parameters @return [File]
# File lib/xero-ruby/api/accounting_api.rb, line 12446 def get_quote_as_pdf(xero_tenant_id, quote_id, opts = {}) data, _status_code, _headers = get_quote_as_pdf_with_http_info(xero_tenant_id, quote_id, opts) data end
Retrieves a specific quote as a PDF file using a unique quote Id @param xero_tenant_id [String] Xero identifier for Tenant @param quote_id [String] Unique identifier for an Quote @param [Hash] opts the optional parameters @return [Array<(File, Integer, Hash)>] File data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 12456 def get_quote_as_pdf_with_http_info(xero_tenant_id, quote_id, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.get_quote_as_pdf ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.get_quote_as_pdf" end # verify the required parameter 'quote_id' is set if @api_client.config.client_side_validation && quote_id.nil? fail ArgumentError, "Missing the required parameter 'quote_id' when calling AccountingApi.get_quote_as_pdf" end # resource path local_var_path = '/Quotes/{QuoteID}'.sub('{' + 'QuoteID' + '}', quote_id.to_s) # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/pdf']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'File' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#get_quote_as_pdf\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves a specific attachment from a specific quote by filename @param xero_tenant_id [String] Xero identifier for Tenant @param quote_id [String] Unique identifier for an Quote @param file_name [String] Name of the attachment @param content_type [String] The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf @param [Hash] opts the optional parameters @return [File]
# File lib/xero-ruby/api/accounting_api.rb, line 12523 def get_quote_attachment_by_file_name(xero_tenant_id, quote_id, file_name, content_type, opts = {}) data, _status_code, _headers = get_quote_attachment_by_file_name_with_http_info(xero_tenant_id, quote_id, file_name, content_type, opts) data end
Retrieves a specific attachment from a specific quote by filename @param xero_tenant_id [String] Xero identifier for Tenant @param quote_id [String] Unique identifier for an Quote @param file_name [String] Name of the attachment @param content_type [String] The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf @param [Hash] opts the optional parameters @return [Array<(File, Integer, Hash)>] File data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 12535 def get_quote_attachment_by_file_name_with_http_info(xero_tenant_id, quote_id, file_name, content_type, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.get_quote_attachment_by_file_name ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.get_quote_attachment_by_file_name" end # verify the required parameter 'quote_id' is set if @api_client.config.client_side_validation && quote_id.nil? fail ArgumentError, "Missing the required parameter 'quote_id' when calling AccountingApi.get_quote_attachment_by_file_name" end # verify the required parameter 'file_name' is set if @api_client.config.client_side_validation && file_name.nil? fail ArgumentError, "Missing the required parameter 'file_name' when calling AccountingApi.get_quote_attachment_by_file_name" end # verify the required parameter 'content_type' is set if @api_client.config.client_side_validation && content_type.nil? fail ArgumentError, "Missing the required parameter 'content_type' when calling AccountingApi.get_quote_attachment_by_file_name" end # resource path 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'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream']) header_params[:'xero-tenant-id'] = xero_tenant_id header_params[:'contentType'] = content_type # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'File' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#get_quote_attachment_by_file_name\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves a specific attachment from a specific quote using a unique attachment Id @param xero_tenant_id [String] Xero identifier for Tenant @param quote_id [String] Unique identifier for an Quote @param attachment_id [String] Unique identifier for Attachment object @param content_type [String] The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf @param [Hash] opts the optional parameters @return [File]
# File lib/xero-ruby/api/accounting_api.rb, line 12611 def get_quote_attachment_by_id(xero_tenant_id, quote_id, attachment_id, content_type, opts = {}) data, _status_code, _headers = get_quote_attachment_by_id_with_http_info(xero_tenant_id, quote_id, attachment_id, content_type, opts) data end
Retrieves a specific attachment from a specific quote using a unique attachment Id @param xero_tenant_id [String] Xero identifier for Tenant @param quote_id [String] Unique identifier for an Quote @param attachment_id [String] Unique identifier for Attachment object @param content_type [String] The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf @param [Hash] opts the optional parameters @return [Array<(File, Integer, Hash)>] File data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 12623 def get_quote_attachment_by_id_with_http_info(xero_tenant_id, quote_id, attachment_id, content_type, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.get_quote_attachment_by_id ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.get_quote_attachment_by_id" end # verify the required parameter 'quote_id' is set if @api_client.config.client_side_validation && quote_id.nil? fail ArgumentError, "Missing the required parameter 'quote_id' when calling AccountingApi.get_quote_attachment_by_id" end # verify the required parameter 'attachment_id' is set if @api_client.config.client_side_validation && attachment_id.nil? fail ArgumentError, "Missing the required parameter 'attachment_id' when calling AccountingApi.get_quote_attachment_by_id" end # verify the required parameter 'content_type' is set if @api_client.config.client_side_validation && content_type.nil? fail ArgumentError, "Missing the required parameter 'content_type' when calling AccountingApi.get_quote_attachment_by_id" end # resource path 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'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream']) header_params[:'xero-tenant-id'] = xero_tenant_id header_params[:'contentType'] = content_type # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'File' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#get_quote_attachment_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves attachments for a specific quote @param xero_tenant_id [String] Xero identifier for Tenant @param quote_id [String] Unique identifier for an Quote @param [Hash] opts the optional parameters @return [Attachments]
# File lib/xero-ruby/api/accounting_api.rb, line 12697 def get_quote_attachments(xero_tenant_id, quote_id, opts = {}) data, _status_code, _headers = get_quote_attachments_with_http_info(xero_tenant_id, quote_id, opts) data end
Retrieves attachments for a specific quote @param xero_tenant_id [String] Xero identifier for Tenant @param quote_id [String] Unique identifier for an Quote @param [Hash] opts the optional parameters @return [Array<(Attachments, Integer, Hash)>] Attachments data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 12707 def get_quote_attachments_with_http_info(xero_tenant_id, quote_id, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.get_quote_attachments ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.get_quote_attachments" end # verify the required parameter 'quote_id' is set if @api_client.config.client_side_validation && quote_id.nil? fail ArgumentError, "Missing the required parameter 'quote_id' when calling AccountingApi.get_quote_attachments" end # resource path local_var_path = '/Quotes/{QuoteID}/Attachments'.sub('{' + 'QuoteID' + '}', quote_id.to_s) # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'Attachments' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#get_quote_attachments\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves history records of a specific quote @param xero_tenant_id [String] Xero identifier for Tenant @param quote_id [String] Unique identifier for an Quote @param [Hash] opts the optional parameters @return [HistoryRecords]
# File lib/xero-ruby/api/accounting_api.rb, line 12772 def get_quote_history(xero_tenant_id, quote_id, opts = {}) data, _status_code, _headers = get_quote_history_with_http_info(xero_tenant_id, quote_id, opts) data end
Retrieves history records of a specific quote @param xero_tenant_id [String] Xero identifier for Tenant @param quote_id [String] Unique identifier for an Quote @param [Hash] opts the optional parameters @return [Array<(HistoryRecords, Integer, Hash)>] HistoryRecords data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 12782 def get_quote_history_with_http_info(xero_tenant_id, quote_id, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.get_quote_history ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.get_quote_history" end # verify the required parameter 'quote_id' is set if @api_client.config.client_side_validation && quote_id.nil? fail ArgumentError, "Missing the required parameter 'quote_id' when calling AccountingApi.get_quote_history" end # resource path local_var_path = '/Quotes/{QuoteID}/History'.sub('{' + 'QuoteID' + '}', quote_id.to_s) # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'HistoryRecords' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#get_quote_history\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves a specific quote using a unique quote Id @param xero_tenant_id [String] Xero identifier for Tenant @param quote_id [String] Unique identifier for an Quote @param [Hash] opts the optional parameters @return [Array<(Quotes, Integer, Hash)>] Quotes data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 12381 def get_quote_with_http_info(xero_tenant_id, quote_id, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.get_quote ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.get_quote" end # verify the required parameter 'quote_id' is set if @api_client.config.client_side_validation && quote_id.nil? fail ArgumentError, "Missing the required parameter 'quote_id' when calling AccountingApi.get_quote" end # resource path local_var_path = '/Quotes/{QuoteID}'.sub('{' + 'QuoteID' + '}', quote_id.to_s) # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'Quotes' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#get_quote\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves sales quotes @param xero_tenant_id [String] Xero identifier for Tenant @param [Hash] opts the optional parameters @option opts [DateTime] :if_modified_since Only records created or modified since this timestamp will be returned @option opts [Date] :date_from Filter for quotes after a particular date @option opts [Date] :date_to Filter for quotes before a particular date @option opts [Date] :expiry_date_from Filter for quotes expiring after a particular date @option opts [Date] :expiry_date_to Filter for quotes before a particular date @option opts [String] :contact_id Filter for quotes belonging to a particular contact @option opts [String] :status Filter for quotes of a particular Status @option opts [Integer] :page e.g. page=1 – Up to 100 Quotes will be returned in a single API call with line items shown for each quote @option opts [String] :order Order by an any element @option opts [String] :quote_number Filter by quote number (e.g. GET …/Quotes?QuoteNumber=QU-0001) @return [Quotes]
# File lib/xero-ruby/api/accounting_api.rb, line 12856 def get_quotes(xero_tenant_id, opts = {}) data, _status_code, _headers = get_quotes_with_http_info(xero_tenant_id, opts) data end
Retrieves sales quotes @param xero_tenant_id [String] Xero identifier for Tenant @param [Hash] opts the optional parameters @option opts [DateTime] :if_modified_since Only records created or modified since this timestamp will be returned @option opts [Date] :date_from Filter for quotes after a particular date @option opts [Date] :date_to Filter for quotes before a particular date @option opts [Date] :expiry_date_from Filter for quotes expiring after a particular date @option opts [Date] :expiry_date_to Filter for quotes before a particular date @option opts [String] :contact_id Filter for quotes belonging to a particular contact @option opts [String] :status Filter for quotes of a particular Status @option opts [Integer] :page e.g. page=1 – Up to 100 Quotes will be returned in a single API call with line items shown for each quote @option opts [String] :order Order by an any element @option opts [String] :quote_number Filter by quote number (e.g. GET …/Quotes?QuoteNumber=QU-0001) @return [Array<(Quotes, Integer, Hash)>] Quotes data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 12875 def get_quotes_with_http_info(xero_tenant_id, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.get_quotes ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.get_quotes" end # resource path local_var_path = '/Quotes' # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} query_params[:'DateFrom'] = opts[:'date_from'] if !opts[:'date_from'].nil? query_params[:'DateTo'] = opts[:'date_to'] if !opts[:'date_to'].nil? query_params[:'ExpiryDateFrom'] = opts[:'expiry_date_from'] if !opts[:'expiry_date_from'].nil? query_params[:'ExpiryDateTo'] = opts[:'expiry_date_to'] if !opts[:'expiry_date_to'].nil? query_params[:'ContactID'] = opts[:'contact_id'] if !opts[:'contact_id'].nil? query_params[:'Status'] = opts[:'status'] if !opts[:'status'].nil? query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil? query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil? query_params[:'QuoteNumber'] = opts[:'quote_number'] if !opts[:'quote_number'].nil? # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id header_params[:'If-Modified-Since'] = opts[:'if_modified_since'] if !opts[:'if_modified_since'].nil? # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'Quotes' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#get_quotes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves a specific draft expense claim receipt by using a unique receipt Id @param xero_tenant_id [String] Xero identifier for Tenant @param receipt_id [String] Unique identifier for a Receipt @param [Hash] opts the optional parameters @option opts [Integer] :unitdp e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts @return [Receipts]
# File lib/xero-ruby/api/accounting_api.rb, line 12947 def get_receipt(xero_tenant_id, receipt_id, opts = {}) data, _status_code, _headers = get_receipt_with_http_info(xero_tenant_id, receipt_id, opts) data end
Retrieves a specific attachment from a specific expense claim receipts by file name @param xero_tenant_id [String] Xero identifier for Tenant @param receipt_id [String] Unique identifier for a Receipt @param file_name [String] Name of the attachment @param content_type [String] The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf @param [Hash] opts the optional parameters @return [File]
# File lib/xero-ruby/api/accounting_api.rb, line 13026 def get_receipt_attachment_by_file_name(xero_tenant_id, receipt_id, file_name, content_type, opts = {}) data, _status_code, _headers = get_receipt_attachment_by_file_name_with_http_info(xero_tenant_id, receipt_id, file_name, content_type, opts) data end
Retrieves a specific attachment from a specific expense claim receipts by file name @param xero_tenant_id [String] Xero identifier for Tenant @param receipt_id [String] Unique identifier for a Receipt @param file_name [String] Name of the attachment @param content_type [String] The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf @param [Hash] opts the optional parameters @return [Array<(File, Integer, Hash)>] File data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 13038 def get_receipt_attachment_by_file_name_with_http_info(xero_tenant_id, receipt_id, file_name, content_type, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.get_receipt_attachment_by_file_name ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.get_receipt_attachment_by_file_name" end # verify the required parameter 'receipt_id' is set if @api_client.config.client_side_validation && receipt_id.nil? fail ArgumentError, "Missing the required parameter 'receipt_id' when calling AccountingApi.get_receipt_attachment_by_file_name" end # verify the required parameter 'file_name' is set if @api_client.config.client_side_validation && file_name.nil? fail ArgumentError, "Missing the required parameter 'file_name' when calling AccountingApi.get_receipt_attachment_by_file_name" end # verify the required parameter 'content_type' is set if @api_client.config.client_side_validation && content_type.nil? fail ArgumentError, "Missing the required parameter 'content_type' when calling AccountingApi.get_receipt_attachment_by_file_name" end # resource path 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'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream']) header_params[:'xero-tenant-id'] = xero_tenant_id header_params[:'contentType'] = content_type # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'File' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#get_receipt_attachment_by_file_name\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves a specific attachments from a specific expense claim receipts by using a unique attachment Id @param xero_tenant_id [String] Xero identifier for Tenant @param receipt_id [String] Unique identifier for a Receipt @param attachment_id [String] Unique identifier for Attachment object @param content_type [String] The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf @param [Hash] opts the optional parameters @return [File]
# File lib/xero-ruby/api/accounting_api.rb, line 13114 def get_receipt_attachment_by_id(xero_tenant_id, receipt_id, attachment_id, content_type, opts = {}) data, _status_code, _headers = get_receipt_attachment_by_id_with_http_info(xero_tenant_id, receipt_id, attachment_id, content_type, opts) data end
Retrieves a specific attachments from a specific expense claim receipts by using a unique attachment Id @param xero_tenant_id [String] Xero identifier for Tenant @param receipt_id [String] Unique identifier for a Receipt @param attachment_id [String] Unique identifier for Attachment object @param content_type [String] The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf @param [Hash] opts the optional parameters @return [Array<(File, Integer, Hash)>] File data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 13126 def get_receipt_attachment_by_id_with_http_info(xero_tenant_id, receipt_id, attachment_id, content_type, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.get_receipt_attachment_by_id ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.get_receipt_attachment_by_id" end # verify the required parameter 'receipt_id' is set if @api_client.config.client_side_validation && receipt_id.nil? fail ArgumentError, "Missing the required parameter 'receipt_id' when calling AccountingApi.get_receipt_attachment_by_id" end # verify the required parameter 'attachment_id' is set if @api_client.config.client_side_validation && attachment_id.nil? fail ArgumentError, "Missing the required parameter 'attachment_id' when calling AccountingApi.get_receipt_attachment_by_id" end # verify the required parameter 'content_type' is set if @api_client.config.client_side_validation && content_type.nil? fail ArgumentError, "Missing the required parameter 'content_type' when calling AccountingApi.get_receipt_attachment_by_id" end # resource path 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'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream']) header_params[:'xero-tenant-id'] = xero_tenant_id header_params[:'contentType'] = content_type # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'File' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#get_receipt_attachment_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves attachments for a specific expense claim receipt @param xero_tenant_id [String] Xero identifier for Tenant @param receipt_id [String] Unique identifier for a Receipt @param [Hash] opts the optional parameters @return [Attachments]
# File lib/xero-ruby/api/accounting_api.rb, line 13200 def get_receipt_attachments(xero_tenant_id, receipt_id, opts = {}) data, _status_code, _headers = get_receipt_attachments_with_http_info(xero_tenant_id, receipt_id, opts) data end
Retrieves attachments for a specific expense claim receipt @param xero_tenant_id [String] Xero identifier for Tenant @param receipt_id [String] Unique identifier for a Receipt @param [Hash] opts the optional parameters @return [Array<(Attachments, Integer, Hash)>] Attachments data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 13210 def get_receipt_attachments_with_http_info(xero_tenant_id, receipt_id, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.get_receipt_attachments ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.get_receipt_attachments" end # verify the required parameter 'receipt_id' is set if @api_client.config.client_side_validation && receipt_id.nil? fail ArgumentError, "Missing the required parameter 'receipt_id' when calling AccountingApi.get_receipt_attachments" end # resource path local_var_path = '/Receipts/{ReceiptID}/Attachments'.sub('{' + 'ReceiptID' + '}', receipt_id.to_s) # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'Attachments' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#get_receipt_attachments\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves a history record for a specific receipt @param xero_tenant_id [String] Xero identifier for Tenant @param receipt_id [String] Unique identifier for a Receipt @param [Hash] opts the optional parameters @return [HistoryRecords]
# File lib/xero-ruby/api/accounting_api.rb, line 13275 def get_receipt_history(xero_tenant_id, receipt_id, opts = {}) data, _status_code, _headers = get_receipt_history_with_http_info(xero_tenant_id, receipt_id, opts) data end
Retrieves a history record for a specific receipt @param xero_tenant_id [String] Xero identifier for Tenant @param receipt_id [String] Unique identifier for a Receipt @param [Hash] opts the optional parameters @return [Array<(HistoryRecords, Integer, Hash)>] HistoryRecords data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 13285 def get_receipt_history_with_http_info(xero_tenant_id, receipt_id, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.get_receipt_history ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.get_receipt_history" end # verify the required parameter 'receipt_id' is set if @api_client.config.client_side_validation && receipt_id.nil? fail ArgumentError, "Missing the required parameter 'receipt_id' when calling AccountingApi.get_receipt_history" end # resource path local_var_path = '/Receipts/{ReceiptID}/History'.sub('{' + 'ReceiptID' + '}', receipt_id.to_s) # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'HistoryRecords' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#get_receipt_history\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves a specific draft expense claim receipt by using a unique receipt Id @param xero_tenant_id [String] Xero identifier for Tenant @param receipt_id [String] Unique identifier for a Receipt @param [Hash] opts the optional parameters @option opts [Integer] :unitdp e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts @return [Array<(Receipts, Integer, Hash)>] Receipts data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 12958 def get_receipt_with_http_info(xero_tenant_id, receipt_id, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.get_receipt ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.get_receipt" end # verify the required parameter 'receipt_id' is set if @api_client.config.client_side_validation && receipt_id.nil? fail ArgumentError, "Missing the required parameter 'receipt_id' when calling AccountingApi.get_receipt" end # resource path local_var_path = '/Receipts/{ReceiptID}'.sub('{' + 'ReceiptID' + '}', receipt_id.to_s) # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} query_params[:'unitdp'] = opts[:'unitdp'] if !opts[:'unitdp'].nil? # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'Receipts' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#get_receipt\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves draft expense claim receipts for any user @param xero_tenant_id [String] Xero identifier for Tenant @param [Hash] opts the optional parameters @option opts [DateTime] :if_modified_since Only records created or modified since this timestamp will be returned @option opts [String] :where Filter by an any element @option opts [String] :order Order by an any element @option opts [Integer] :unitdp e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts @return [Receipts]
# File lib/xero-ruby/api/accounting_api.rb, line 13353 def get_receipts(xero_tenant_id, opts = {}) data, _status_code, _headers = get_receipts_with_http_info(xero_tenant_id, opts) data end
Retrieves draft expense claim receipts for any user @param xero_tenant_id [String] Xero identifier for Tenant @param [Hash] opts the optional parameters @option opts [DateTime] :if_modified_since Only records created or modified since this timestamp will be returned @option opts [String] :where Filter by an any element @option opts [String] :order Order by an any element @option opts [Integer] :unitdp e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts @return [Array<(Receipts, Integer, Hash)>] Receipts data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 13366 def get_receipts_with_http_info(xero_tenant_id, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.get_receipts ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.get_receipts" end # resource path local_var_path = '/Receipts' # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} query_params[:'where'] = opts[:'where'] if !opts[:'where'].nil? query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil? query_params[:'unitdp'] = opts[:'unitdp'] if !opts[:'unitdp'].nil? # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id header_params[:'If-Modified-Since'] = opts[:'if_modified_since'] if !opts[:'if_modified_since'].nil? # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'Receipts' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#get_receipts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves a specific repeating invoice by using a unique repeating invoice Id @param xero_tenant_id [String] Xero identifier for Tenant @param repeating_invoice_id [String] Unique identifier for a Repeating Invoice @param [Hash] opts the optional parameters @return [RepeatingInvoices]
# File lib/xero-ruby/api/accounting_api.rb, line 13431 def get_repeating_invoice(xero_tenant_id, repeating_invoice_id, opts = {}) data, _status_code, _headers = get_repeating_invoice_with_http_info(xero_tenant_id, repeating_invoice_id, opts) data end
Retrieves a specific attachment from a specific repeating invoices by file name @param xero_tenant_id [String] Xero identifier for Tenant @param repeating_invoice_id [String] Unique identifier for a Repeating Invoice @param file_name [String] Name of the attachment @param content_type [String] The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf @param [Hash] opts the optional parameters @return [File]
# File lib/xero-ruby/api/accounting_api.rb, line 13508 def get_repeating_invoice_attachment_by_file_name(xero_tenant_id, repeating_invoice_id, file_name, content_type, opts = {}) data, _status_code, _headers = get_repeating_invoice_attachment_by_file_name_with_http_info(xero_tenant_id, repeating_invoice_id, file_name, content_type, opts) data end
Retrieves a specific attachment from a specific repeating invoices by file name @param xero_tenant_id [String] Xero identifier for Tenant @param repeating_invoice_id [String] Unique identifier for a Repeating Invoice @param file_name [String] Name of the attachment @param content_type [String] The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf @param [Hash] opts the optional parameters @return [Array<(File, Integer, Hash)>] File data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 13520 def get_repeating_invoice_attachment_by_file_name_with_http_info(xero_tenant_id, repeating_invoice_id, file_name, content_type, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.get_repeating_invoice_attachment_by_file_name ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.get_repeating_invoice_attachment_by_file_name" end # verify the required parameter 'repeating_invoice_id' is set if @api_client.config.client_side_validation && repeating_invoice_id.nil? fail ArgumentError, "Missing the required parameter 'repeating_invoice_id' when calling AccountingApi.get_repeating_invoice_attachment_by_file_name" end # verify the required parameter 'file_name' is set if @api_client.config.client_side_validation && file_name.nil? fail ArgumentError, "Missing the required parameter 'file_name' when calling AccountingApi.get_repeating_invoice_attachment_by_file_name" end # verify the required parameter 'content_type' is set if @api_client.config.client_side_validation && content_type.nil? fail ArgumentError, "Missing the required parameter 'content_type' when calling AccountingApi.get_repeating_invoice_attachment_by_file_name" end # resource path 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'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream']) header_params[:'xero-tenant-id'] = xero_tenant_id header_params[:'contentType'] = content_type # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'File' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#get_repeating_invoice_attachment_by_file_name\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves a specific attachment from a specific repeating invoice @param xero_tenant_id [String] Xero identifier for Tenant @param repeating_invoice_id [String] Unique identifier for a Repeating Invoice @param attachment_id [String] Unique identifier for Attachment object @param content_type [String] The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf @param [Hash] opts the optional parameters @return [File]
# File lib/xero-ruby/api/accounting_api.rb, line 13596 def get_repeating_invoice_attachment_by_id(xero_tenant_id, repeating_invoice_id, attachment_id, content_type, opts = {}) data, _status_code, _headers = get_repeating_invoice_attachment_by_id_with_http_info(xero_tenant_id, repeating_invoice_id, attachment_id, content_type, opts) data end
Retrieves a specific attachment from a specific repeating invoice @param xero_tenant_id [String] Xero identifier for Tenant @param repeating_invoice_id [String] Unique identifier for a Repeating Invoice @param attachment_id [String] Unique identifier for Attachment object @param content_type [String] The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf @param [Hash] opts the optional parameters @return [Array<(File, Integer, Hash)>] File data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 13608 def get_repeating_invoice_attachment_by_id_with_http_info(xero_tenant_id, repeating_invoice_id, attachment_id, content_type, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.get_repeating_invoice_attachment_by_id ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.get_repeating_invoice_attachment_by_id" end # verify the required parameter 'repeating_invoice_id' is set if @api_client.config.client_side_validation && repeating_invoice_id.nil? fail ArgumentError, "Missing the required parameter 'repeating_invoice_id' when calling AccountingApi.get_repeating_invoice_attachment_by_id" end # verify the required parameter 'attachment_id' is set if @api_client.config.client_side_validation && attachment_id.nil? fail ArgumentError, "Missing the required parameter 'attachment_id' when calling AccountingApi.get_repeating_invoice_attachment_by_id" end # verify the required parameter 'content_type' is set if @api_client.config.client_side_validation && content_type.nil? fail ArgumentError, "Missing the required parameter 'content_type' when calling AccountingApi.get_repeating_invoice_attachment_by_id" end # resource path 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'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream']) header_params[:'xero-tenant-id'] = xero_tenant_id header_params[:'contentType'] = content_type # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'File' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#get_repeating_invoice_attachment_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves attachments from a specific repeating invoice @param xero_tenant_id [String] Xero identifier for Tenant @param repeating_invoice_id [String] Unique identifier for a Repeating Invoice @param [Hash] opts the optional parameters @return [Attachments]
# File lib/xero-ruby/api/accounting_api.rb, line 13682 def get_repeating_invoice_attachments(xero_tenant_id, repeating_invoice_id, opts = {}) data, _status_code, _headers = get_repeating_invoice_attachments_with_http_info(xero_tenant_id, repeating_invoice_id, opts) data end
Retrieves attachments from a specific repeating invoice @param xero_tenant_id [String] Xero identifier for Tenant @param repeating_invoice_id [String] Unique identifier for a Repeating Invoice @param [Hash] opts the optional parameters @return [Array<(Attachments, Integer, Hash)>] Attachments data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 13692 def get_repeating_invoice_attachments_with_http_info(xero_tenant_id, repeating_invoice_id, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.get_repeating_invoice_attachments ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.get_repeating_invoice_attachments" end # verify the required parameter 'repeating_invoice_id' is set if @api_client.config.client_side_validation && repeating_invoice_id.nil? fail ArgumentError, "Missing the required parameter 'repeating_invoice_id' when calling AccountingApi.get_repeating_invoice_attachments" end # resource path local_var_path = '/RepeatingInvoices/{RepeatingInvoiceID}/Attachments'.sub('{' + 'RepeatingInvoiceID' + '}', repeating_invoice_id.to_s) # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'Attachments' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#get_repeating_invoice_attachments\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves history record for a specific repeating invoice @param xero_tenant_id [String] Xero identifier for Tenant @param repeating_invoice_id [String] Unique identifier for a Repeating Invoice @param [Hash] opts the optional parameters @return [HistoryRecords]
# File lib/xero-ruby/api/accounting_api.rb, line 13757 def get_repeating_invoice_history(xero_tenant_id, repeating_invoice_id, opts = {}) data, _status_code, _headers = get_repeating_invoice_history_with_http_info(xero_tenant_id, repeating_invoice_id, opts) data end
Retrieves history record for a specific repeating invoice @param xero_tenant_id [String] Xero identifier for Tenant @param repeating_invoice_id [String] Unique identifier for a Repeating Invoice @param [Hash] opts the optional parameters @return [Array<(HistoryRecords, Integer, Hash)>] HistoryRecords data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 13767 def get_repeating_invoice_history_with_http_info(xero_tenant_id, repeating_invoice_id, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.get_repeating_invoice_history ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.get_repeating_invoice_history" end # verify the required parameter 'repeating_invoice_id' is set if @api_client.config.client_side_validation && repeating_invoice_id.nil? fail ArgumentError, "Missing the required parameter 'repeating_invoice_id' when calling AccountingApi.get_repeating_invoice_history" end # resource path local_var_path = '/RepeatingInvoices/{RepeatingInvoiceID}/History'.sub('{' + 'RepeatingInvoiceID' + '}', repeating_invoice_id.to_s) # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'HistoryRecords' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#get_repeating_invoice_history\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves a specific repeating invoice by using a unique repeating invoice Id @param xero_tenant_id [String] Xero identifier for Tenant @param repeating_invoice_id [String] Unique identifier for a Repeating Invoice @param [Hash] opts the optional parameters @return [Array<(RepeatingInvoices, Integer, Hash)>] RepeatingInvoices data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 13441 def get_repeating_invoice_with_http_info(xero_tenant_id, repeating_invoice_id, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.get_repeating_invoice ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.get_repeating_invoice" end # verify the required parameter 'repeating_invoice_id' is set if @api_client.config.client_side_validation && repeating_invoice_id.nil? fail ArgumentError, "Missing the required parameter 'repeating_invoice_id' when calling AccountingApi.get_repeating_invoice" end # resource path local_var_path = '/RepeatingInvoices/{RepeatingInvoiceID}'.sub('{' + 'RepeatingInvoiceID' + '}', repeating_invoice_id.to_s) # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'RepeatingInvoices' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#get_repeating_invoice\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves repeating invoices @param xero_tenant_id [String] Xero identifier for Tenant @param [Hash] opts the optional parameters @option opts [String] :where Filter by an any element @option opts [String] :order Order by an any element @return [RepeatingInvoices]
# File lib/xero-ruby/api/accounting_api.rb, line 13833 def get_repeating_invoices(xero_tenant_id, opts = {}) data, _status_code, _headers = get_repeating_invoices_with_http_info(xero_tenant_id, opts) data end
Retrieves repeating invoices @param xero_tenant_id [String] Xero identifier for Tenant @param [Hash] opts the optional parameters @option opts [String] :where Filter by an any element @option opts [String] :order Order by an any element @return [Array<(RepeatingInvoices, Integer, Hash)>] RepeatingInvoices data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 13844 def get_repeating_invoices_with_http_info(xero_tenant_id, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.get_repeating_invoices ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.get_repeating_invoices" end # resource path local_var_path = '/RepeatingInvoices' # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} query_params[:'where'] = opts[:'where'] if !opts[:'where'].nil? query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil? # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'RepeatingInvoices' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#get_repeating_invoices\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves report for aged payables by contact @param xero_tenant_id [String] Xero identifier for Tenant @param contact_id [String] Unique identifier for a Contact @param [Hash] opts the optional parameters @option opts [Date] :date The date of the Aged Payables By Contact report @option opts [Date] :from_date filter by the from date of the report e.g. 2021-02-01 @option opts [Date] :to_date filter by the to date of the report e.g. 2021-02-28 @return [ReportWithRows]
# File lib/xero-ruby/api/accounting_api.rb, line 13910 def get_report_aged_payables_by_contact(xero_tenant_id, contact_id, opts = {}) data, _status_code, _headers = get_report_aged_payables_by_contact_with_http_info(xero_tenant_id, contact_id, opts) data end
Retrieves report for aged payables by contact @param xero_tenant_id [String] Xero identifier for Tenant @param contact_id [String] Unique identifier for a Contact @param [Hash] opts the optional parameters @option opts [Date] :date The date of the Aged Payables By Contact report @option opts [Date] :from_date filter by the from date of the report e.g. 2021-02-01 @option opts [Date] :to_date filter by the to date of the report e.g. 2021-02-28 @return [Array<(ReportWithRows, Integer, Hash)>] ReportWithRows data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 13923 def get_report_aged_payables_by_contact_with_http_info(xero_tenant_id, contact_id, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.get_report_aged_payables_by_contact ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.get_report_aged_payables_by_contact" end # verify the required parameter 'contact_id' is set if @api_client.config.client_side_validation && contact_id.nil? fail ArgumentError, "Missing the required parameter 'contact_id' when calling AccountingApi.get_report_aged_payables_by_contact" end # resource path local_var_path = '/Reports/AgedPayablesByContact' # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} query_params[:'contactId'] = contact_id query_params[:'date'] = opts[:'date'] if !opts[:'date'].nil? query_params[:'fromDate'] = opts[:'from_date'] if !opts[:'from_date'].nil? query_params[:'toDate'] = opts[:'to_date'] if !opts[:'to_date'].nil? # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'ReportWithRows' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#get_report_aged_payables_by_contact\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves report for aged receivables by contact @param xero_tenant_id [String] Xero identifier for Tenant @param contact_id [String] Unique identifier for a Contact @param [Hash] opts the optional parameters @option opts [Date] :date The date of the Aged Receivables By Contact report @option opts [Date] :from_date filter by the from date of the report e.g. 2021-02-01 @option opts [Date] :to_date filter by the to date of the report e.g. 2021-02-28 @return [ReportWithRows]
# File lib/xero-ruby/api/accounting_api.rb, line 13995 def get_report_aged_receivables_by_contact(xero_tenant_id, contact_id, opts = {}) data, _status_code, _headers = get_report_aged_receivables_by_contact_with_http_info(xero_tenant_id, contact_id, opts) data end
Retrieves report for aged receivables by contact @param xero_tenant_id [String] Xero identifier for Tenant @param contact_id [String] Unique identifier for a Contact @param [Hash] opts the optional parameters @option opts [Date] :date The date of the Aged Receivables By Contact report @option opts [Date] :from_date filter by the from date of the report e.g. 2021-02-01 @option opts [Date] :to_date filter by the to date of the report e.g. 2021-02-28 @return [Array<(ReportWithRows, Integer, Hash)>] ReportWithRows data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 14008 def get_report_aged_receivables_by_contact_with_http_info(xero_tenant_id, contact_id, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.get_report_aged_receivables_by_contact ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.get_report_aged_receivables_by_contact" end # verify the required parameter 'contact_id' is set if @api_client.config.client_side_validation && contact_id.nil? fail ArgumentError, "Missing the required parameter 'contact_id' when calling AccountingApi.get_report_aged_receivables_by_contact" end # resource path local_var_path = '/Reports/AgedReceivablesByContact' # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} query_params[:'contactId'] = contact_id query_params[:'date'] = opts[:'date'] if !opts[:'date'].nil? query_params[:'fromDate'] = opts[:'from_date'] if !opts[:'from_date'].nil? query_params[:'toDate'] = opts[:'to_date'] if !opts[:'to_date'].nil? # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'ReportWithRows' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#get_report_aged_receivables_by_contact\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves report for balancesheet @param xero_tenant_id [String] Xero identifier for Tenant @param [Hash] opts the optional parameters @option opts [Date] :date The date of the Balance Sheet report @option opts [Integer] :periods The number of periods for the Balance Sheet report @option opts [String] :timeframe The period size to compare to (MONTH, QUARTER, YEAR) @option opts [String] :tracking_option_id1 The tracking option 1 for the Balance Sheet report @option opts [String] :tracking_option_id2 The tracking option 2 for the Balance Sheet report @option opts [Boolean] :standard_layout The standard layout boolean for the Balance Sheet report @option opts [Boolean] :payments_only return a cash basis for the Balance Sheet report @return [ReportWithRows]
# File lib/xero-ruby/api/accounting_api.rb, line 14083 def get_report_balance_sheet(xero_tenant_id, opts = {}) data, _status_code, _headers = get_report_balance_sheet_with_http_info(xero_tenant_id, opts) data end
Retrieves report for balancesheet @param xero_tenant_id [String] Xero identifier for Tenant @param [Hash] opts the optional parameters @option opts [Date] :date The date of the Balance Sheet report @option opts [Integer] :periods The number of periods for the Balance Sheet report @option opts [String] :timeframe The period size to compare to (MONTH, QUARTER, YEAR) @option opts [String] :tracking_option_id1 The tracking option 1 for the Balance Sheet report @option opts [String] :tracking_option_id2 The tracking option 2 for the Balance Sheet report @option opts [Boolean] :standard_layout The standard layout boolean for the Balance Sheet report @option opts [Boolean] :payments_only return a cash basis for the Balance Sheet report @return [Array<(ReportWithRows, Integer, Hash)>] ReportWithRows data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 14099 def get_report_balance_sheet_with_http_info(xero_tenant_id, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.get_report_balance_sheet ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.get_report_balance_sheet" end allowable_values = ["MONTH", "QUARTER", "YEAR"] if @api_client.config.client_side_validation && opts[:'timeframe'] && !allowable_values.include?(opts[:'timeframe']) fail ArgumentError, "invalid value for \"timeframe\", must be one of #{allowable_values}" end # resource path local_var_path = '/Reports/BalanceSheet' # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} query_params[:'date'] = opts[:'date'] if !opts[:'date'].nil? query_params[:'periods'] = opts[:'periods'] if !opts[:'periods'].nil? query_params[:'timeframe'] = opts[:'timeframe'] if !opts[:'timeframe'].nil? query_params[:'trackingOptionID1'] = opts[:'tracking_option_id1'] if !opts[:'tracking_option_id1'].nil? query_params[:'trackingOptionID2'] = opts[:'tracking_option_id2'] if !opts[:'tracking_option_id2'].nil? query_params[:'standardLayout'] = opts[:'standard_layout'] if !opts[:'standard_layout'].nil? query_params[:'paymentsOnly'] = opts[:'payments_only'] if !opts[:'payments_only'].nil? # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'ReportWithRows' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#get_report_balance_sheet\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves report for bank summary @param xero_tenant_id [String] Xero identifier for Tenant @param [Hash] opts the optional parameters @option opts [Date] :from_date filter by the from date of the report e.g. 2021-02-01 @option opts [Date] :to_date filter by the to date of the report e.g. 2021-02-28 @return [ReportWithRows]
# File lib/xero-ruby/api/accounting_api.rb, line 14172 def get_report_bank_summary(xero_tenant_id, opts = {}) data, _status_code, _headers = get_report_bank_summary_with_http_info(xero_tenant_id, opts) data end
Retrieves report for bank summary @param xero_tenant_id [String] Xero identifier for Tenant @param [Hash] opts the optional parameters @option opts [Date] :from_date filter by the from date of the report e.g. 2021-02-01 @option opts [Date] :to_date filter by the to date of the report e.g. 2021-02-28 @return [Array<(ReportWithRows, Integer, Hash)>] ReportWithRows data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 14183 def get_report_bank_summary_with_http_info(xero_tenant_id, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.get_report_bank_summary ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.get_report_bank_summary" end # resource path local_var_path = '/Reports/BankSummary' # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} query_params[:'fromDate'] = opts[:'from_date'] if !opts[:'from_date'].nil? query_params[:'toDate'] = opts[:'to_date'] if !opts[:'to_date'].nil? # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'ReportWithRows' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#get_report_bank_summary\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves report for budget summary @param xero_tenant_id [String] Xero identifier for Tenant @param [Hash] opts the optional parameters @option opts [Date] :date The date for the Bank Summary report e.g. 2018-03-31 @option opts [Integer] :periods The number of periods to compare (integer between 1 and 12) @option opts [Integer] :timeframe The period size to compare to (1=month, 3=quarter, 12=year) @return [ReportWithRows]
# File lib/xero-ruby/api/accounting_api.rb, line 14248 def get_report_budget_summary(xero_tenant_id, opts = {}) data, _status_code, _headers = get_report_budget_summary_with_http_info(xero_tenant_id, opts) data end
Retrieves report for budget summary @param xero_tenant_id [String] Xero identifier for Tenant @param [Hash] opts the optional parameters @option opts [Date] :date The date for the Bank Summary report e.g. 2018-03-31 @option opts [Integer] :periods The number of periods to compare (integer between 1 and 12) @option opts [Integer] :timeframe The period size to compare to (1=month, 3=quarter, 12=year) @return [Array<(ReportWithRows, Integer, Hash)>] ReportWithRows data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 14260 def get_report_budget_summary_with_http_info(xero_tenant_id, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.get_report_budget_summary ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.get_report_budget_summary" end # resource path local_var_path = '/Reports/BudgetSummary' # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} query_params[:'date'] = opts[:'date'] if !opts[:'date'].nil? query_params[:'periods'] = opts[:'periods'] if !opts[:'periods'].nil? query_params[:'timeframe'] = opts[:'timeframe'] if !opts[:'timeframe'].nil? # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'ReportWithRows' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#get_report_budget_summary\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves report for executive summary @param xero_tenant_id [String] Xero identifier for Tenant @param [Hash] opts the optional parameters @option opts [Date] :date The date for the Bank Summary report e.g. 2018-03-31 @return [ReportWithRows]
# File lib/xero-ruby/api/accounting_api.rb, line 14324 def get_report_executive_summary(xero_tenant_id, opts = {}) data, _status_code, _headers = get_report_executive_summary_with_http_info(xero_tenant_id, opts) data end
Retrieves report for executive summary @param xero_tenant_id [String] Xero identifier for Tenant @param [Hash] opts the optional parameters @option opts [Date] :date The date for the Bank Summary report e.g. 2018-03-31 @return [Array<(ReportWithRows, Integer, Hash)>] ReportWithRows data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 14334 def get_report_executive_summary_with_http_info(xero_tenant_id, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.get_report_executive_summary ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.get_report_executive_summary" end # resource path local_var_path = '/Reports/ExecutiveSummary' # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} query_params[:'date'] = opts[:'date'] if !opts[:'date'].nil? # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'ReportWithRows' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#get_report_executive_summary\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves a specific report using a unique ReportID @param xero_tenant_id [String] Xero identifier for Tenant @param report_id [String] Unique identifier for a Report @param [Hash] opts the optional parameters @return [ReportWithRows]
# File lib/xero-ruby/api/accounting_api.rb, line 14396 def get_report_from_id(xero_tenant_id, report_id, opts = {}) data, _status_code, _headers = get_report_from_id_with_http_info(xero_tenant_id, report_id, opts) data end
Retrieves a specific report using a unique ReportID @param xero_tenant_id [String] Xero identifier for Tenant @param report_id [String] Unique identifier for a Report @param [Hash] opts the optional parameters @return [Array<(ReportWithRows, Integer, Hash)>] ReportWithRows data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 14406 def get_report_from_id_with_http_info(xero_tenant_id, report_id, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.get_report_from_id ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.get_report_from_id" end # verify the required parameter 'report_id' is set if @api_client.config.client_side_validation && report_id.nil? fail ArgumentError, "Missing the required parameter 'report_id' when calling AccountingApi.get_report_from_id" end # resource path local_var_path = '/Reports/{ReportID}'.sub('{' + 'ReportID' + '}', report_id.to_s) # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'ReportWithRows' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#get_report_from_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves report for profit and loss @param xero_tenant_id [String] Xero identifier for Tenant @param [Hash] opts the optional parameters @option opts [Date] :from_date filter by the from date of the report e.g. 2021-02-01 @option opts [Date] :to_date filter by the to date of the report e.g. 2021-02-28 @option opts [Integer] :periods The number of periods to compare (integer between 1 and 12) @option opts [String] :timeframe The period size to compare to (MONTH, QUARTER, YEAR) @option opts [String] :tracking_category_id The trackingCategory 1 for the ProfitAndLoss report @option opts [String] :tracking_category_id2 The trackingCategory 2 for the ProfitAndLoss report @option opts [String] :tracking_option_id The tracking option 1 for the ProfitAndLoss report @option opts [String] :tracking_option_id2 The tracking option 2 for the ProfitAndLoss report @option opts [Boolean] :standard_layout Return the standard layout for the ProfitAndLoss report @option opts [Boolean] :payments_only Return cash only basis for the ProfitAndLoss report @return [ReportWithRows]
# File lib/xero-ruby/api/accounting_api.rb, line 14480 def get_report_profit_and_loss(xero_tenant_id, opts = {}) data, _status_code, _headers = get_report_profit_and_loss_with_http_info(xero_tenant_id, opts) data end
Retrieves report for profit and loss @param xero_tenant_id [String] Xero identifier for Tenant @param [Hash] opts the optional parameters @option opts [Date] :from_date filter by the from date of the report e.g. 2021-02-01 @option opts [Date] :to_date filter by the to date of the report e.g. 2021-02-28 @option opts [Integer] :periods The number of periods to compare (integer between 1 and 12) @option opts [String] :timeframe The period size to compare to (MONTH, QUARTER, YEAR) @option opts [String] :tracking_category_id The trackingCategory 1 for the ProfitAndLoss report @option opts [String] :tracking_category_id2 The trackingCategory 2 for the ProfitAndLoss report @option opts [String] :tracking_option_id The tracking option 1 for the ProfitAndLoss report @option opts [String] :tracking_option_id2 The tracking option 2 for the ProfitAndLoss report @option opts [Boolean] :standard_layout Return the standard layout for the ProfitAndLoss report @option opts [Boolean] :payments_only Return cash only basis for the ProfitAndLoss report @return [Array<(ReportWithRows, Integer, Hash)>] ReportWithRows data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 14499 def get_report_profit_and_loss_with_http_info(xero_tenant_id, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.get_report_profit_and_loss ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.get_report_profit_and_loss" end allowable_values = ["MONTH", "QUARTER", "YEAR"] if @api_client.config.client_side_validation && opts[:'timeframe'] && !allowable_values.include?(opts[:'timeframe']) fail ArgumentError, "invalid value for \"timeframe\", must be one of #{allowable_values}" end # resource path local_var_path = '/Reports/ProfitAndLoss' # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} query_params[:'fromDate'] = opts[:'from_date'] if !opts[:'from_date'].nil? query_params[:'toDate'] = opts[:'to_date'] if !opts[:'to_date'].nil? query_params[:'periods'] = opts[:'periods'] if !opts[:'periods'].nil? query_params[:'timeframe'] = opts[:'timeframe'] if !opts[:'timeframe'].nil? query_params[:'trackingCategoryID'] = opts[:'tracking_category_id'] if !opts[:'tracking_category_id'].nil? query_params[:'trackingCategoryID2'] = opts[:'tracking_category_id2'] if !opts[:'tracking_category_id2'].nil? query_params[:'trackingOptionID'] = opts[:'tracking_option_id'] if !opts[:'tracking_option_id'].nil? query_params[:'trackingOptionID2'] = opts[:'tracking_option_id2'] if !opts[:'tracking_option_id2'].nil? query_params[:'standardLayout'] = opts[:'standard_layout'] if !opts[:'standard_layout'].nil? query_params[:'paymentsOnly'] = opts[:'payments_only'] if !opts[:'payments_only'].nil? # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'ReportWithRows' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#get_report_profit_and_loss\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieve reports for 1099 @param xero_tenant_id [String] Xero identifier for Tenant @param [Hash] opts the optional parameters @option opts [String] :report_year The year of the 1099 report @return [Reports]
# File lib/xero-ruby/api/accounting_api.rb, line 14574 def get_report_ten_ninety_nine(xero_tenant_id, opts = {}) data, _status_code, _headers = get_report_ten_ninety_nine_with_http_info(xero_tenant_id, opts) data end
Retrieve reports for 1099 @param xero_tenant_id [String] Xero identifier for Tenant @param [Hash] opts the optional parameters @option opts [String] :report_year The year of the 1099 report @return [Array<(Reports, Integer, Hash)>] Reports data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 14584 def get_report_ten_ninety_nine_with_http_info(xero_tenant_id, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.get_report_ten_ninety_nine ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.get_report_ten_ninety_nine" end # resource path local_var_path = '/Reports/TenNinetyNine' # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} query_params[:'reportYear'] = opts[:'report_year'] if !opts[:'report_year'].nil? # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'Reports' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#get_report_ten_ninety_nine\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves report for trial balance @param xero_tenant_id [String] Xero identifier for Tenant @param [Hash] opts the optional parameters @option opts [Date] :date The date for the Trial Balance report e.g. 2018-03-31 @option opts [Boolean] :payments_only Return cash only basis for the Trial Balance report @return [ReportWithRows]
# File lib/xero-ruby/api/accounting_api.rb, line 14647 def get_report_trial_balance(xero_tenant_id, opts = {}) data, _status_code, _headers = get_report_trial_balance_with_http_info(xero_tenant_id, opts) data end
Retrieves report for trial balance @param xero_tenant_id [String] Xero identifier for Tenant @param [Hash] opts the optional parameters @option opts [Date] :date The date for the Trial Balance report e.g. 2018-03-31 @option opts [Boolean] :payments_only Return cash only basis for the Trial Balance report @return [Array<(ReportWithRows, Integer, Hash)>] ReportWithRows data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 14658 def get_report_trial_balance_with_http_info(xero_tenant_id, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.get_report_trial_balance ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.get_report_trial_balance" end # resource path local_var_path = '/Reports/TrialBalance' # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} query_params[:'date'] = opts[:'date'] if !opts[:'date'].nil? query_params[:'paymentsOnly'] = opts[:'payments_only'] if !opts[:'payments_only'].nil? # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'ReportWithRows' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#get_report_trial_balance\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves a list of the organistaions unique reports that require a uuid to fetch @param xero_tenant_id [String] Xero identifier for Tenant @param [Hash] opts the optional parameters @return [ReportWithRows]
# File lib/xero-ruby/api/accounting_api.rb, line 14720 def get_reports_list(xero_tenant_id, opts = {}) data, _status_code, _headers = get_reports_list_with_http_info(xero_tenant_id, opts) data end
Retrieves a list of the organistaions unique reports that require a uuid to fetch @param xero_tenant_id [String] Xero identifier for Tenant @param [Hash] opts the optional parameters @return [Array<(ReportWithRows, Integer, Hash)>] ReportWithRows data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 14729 def get_reports_list_with_http_info(xero_tenant_id, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.get_reports_list ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.get_reports_list" end # resource path local_var_path = '/Reports' # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'ReportWithRows' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#get_reports_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves tax rates @param xero_tenant_id [String] Xero identifier for Tenant @param [Hash] opts the optional parameters @option opts [String] :where Filter by an any element @option opts [String] :order Order by an any element @option opts [String] :tax_type Filter by tax type @return [TaxRates]
# File lib/xero-ruby/api/accounting_api.rb, line 14792 def get_tax_rates(xero_tenant_id, opts = {}) data, _status_code, _headers = get_tax_rates_with_http_info(xero_tenant_id, opts) data end
Retrieves tax rates @param xero_tenant_id [String] Xero identifier for Tenant @param [Hash] opts the optional parameters @option opts [String] :where Filter by an any element @option opts [String] :order Order by an any element @option opts [String] :tax_type Filter by tax type @return [Array<(TaxRates, Integer, Hash)>] TaxRates data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 14804 def get_tax_rates_with_http_info(xero_tenant_id, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.get_tax_rates ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.get_tax_rates" end # resource path local_var_path = '/TaxRates' # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} query_params[:'where'] = opts[:'where'] if !opts[:'where'].nil? query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil? query_params[:'TaxType'] = opts[:'tax_type'] if !opts[:'tax_type'].nil? # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'TaxRates' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#get_tax_rates\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves tracking categories and options @param xero_tenant_id [String] Xero identifier for Tenant @param [Hash] opts the optional parameters @option opts [String] :where Filter by an any element @option opts [String] :order Order by an any element @option opts [Boolean] :include_archived e.g. includeArchived=true - Categories and options with a status of ARCHIVED will be included in the response @return [TrackingCategories]
# File lib/xero-ruby/api/accounting_api.rb, line 14870 def get_tracking_categories(xero_tenant_id, opts = {}) data, _status_code, _headers = get_tracking_categories_with_http_info(xero_tenant_id, opts) data end
Retrieves tracking categories and options @param xero_tenant_id [String] Xero identifier for Tenant @param [Hash] opts the optional parameters @option opts [String] :where Filter by an any element @option opts [String] :order Order by an any element @option opts [Boolean] :include_archived e.g. includeArchived=true - Categories and options with a status of ARCHIVED will be included in the response @return [Array<(TrackingCategories, Integer, Hash)>] TrackingCategories data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 14882 def get_tracking_categories_with_http_info(xero_tenant_id, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.get_tracking_categories ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.get_tracking_categories" end # resource path local_var_path = '/TrackingCategories' # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} query_params[:'where'] = opts[:'where'] if !opts[:'where'].nil? query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil? query_params[:'includeArchived'] = opts[:'include_archived'] if !opts[:'include_archived'].nil? # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'TrackingCategories' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#get_tracking_categories\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves specific tracking categories and options using a unique tracking category Id @param xero_tenant_id [String] Xero identifier for Tenant @param tracking_category_id [String] Unique identifier for a TrackingCategory @param [Hash] opts the optional parameters @return [TrackingCategories]
# File lib/xero-ruby/api/accounting_api.rb, line 14946 def get_tracking_category(xero_tenant_id, tracking_category_id, opts = {}) data, _status_code, _headers = get_tracking_category_with_http_info(xero_tenant_id, tracking_category_id, opts) data end
Retrieves specific tracking categories and options using a unique tracking category Id @param xero_tenant_id [String] Xero identifier for Tenant @param tracking_category_id [String] Unique identifier for a TrackingCategory @param [Hash] opts the optional parameters @return [Array<(TrackingCategories, Integer, Hash)>] TrackingCategories data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 14956 def get_tracking_category_with_http_info(xero_tenant_id, tracking_category_id, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.get_tracking_category ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.get_tracking_category" end # verify the required parameter 'tracking_category_id' is set if @api_client.config.client_side_validation && tracking_category_id.nil? fail ArgumentError, "Missing the required parameter 'tracking_category_id' when calling AccountingApi.get_tracking_category" end # resource path local_var_path = '/TrackingCategories/{TrackingCategoryID}'.sub('{' + 'TrackingCategoryID' + '}', tracking_category_id.to_s) # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'TrackingCategories' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#get_tracking_category\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves a specific user @param xero_tenant_id [String] Xero identifier for Tenant @param user_id [String] Unique identifier for a User @param [Hash] opts the optional parameters @return [Users]
# File lib/xero-ruby/api/accounting_api.rb, line 15021 def get_user(xero_tenant_id, user_id, opts = {}) data, _status_code, _headers = get_user_with_http_info(xero_tenant_id, user_id, opts) data end
Retrieves a specific user @param xero_tenant_id [String] Xero identifier for Tenant @param user_id [String] Unique identifier for a User @param [Hash] opts the optional parameters @return [Array<(Users, Integer, Hash)>] Users data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 15031 def get_user_with_http_info(xero_tenant_id, user_id, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.get_user ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.get_user" end # verify the required parameter 'user_id' is set if @api_client.config.client_side_validation && user_id.nil? fail ArgumentError, "Missing the required parameter 'user_id' when calling AccountingApi.get_user" end # resource path local_var_path = '/Users/{UserID}'.sub('{' + 'UserID' + '}', user_id.to_s) # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'Users' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#get_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves users @param xero_tenant_id [String] Xero identifier for Tenant @param [Hash] opts the optional parameters @option opts [DateTime] :if_modified_since Only records created or modified since this timestamp will be returned @option opts [String] :where Filter by an any element @option opts [String] :order Order by an any element @return [Users]
# File lib/xero-ruby/api/accounting_api.rb, line 15098 def get_users(xero_tenant_id, opts = {}) data, _status_code, _headers = get_users_with_http_info(xero_tenant_id, opts) data end
Retrieves users @param xero_tenant_id [String] Xero identifier for Tenant @param [Hash] opts the optional parameters @option opts [DateTime] :if_modified_since Only records created or modified since this timestamp will be returned @option opts [String] :where Filter by an any element @option opts [String] :order Order by an any element @return [Array<(Users, Integer, Hash)>] Users data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 15110 def get_users_with_http_info(xero_tenant_id, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.get_users ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.get_users" end # resource path local_var_path = '/Users' # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} query_params[:'where'] = opts[:'where'] if !opts[:'where'].nil? query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil? # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id header_params[:'If-Modified-Since'] = opts[:'if_modified_since'] if !opts[:'if_modified_since'].nil? # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'Users' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#get_users\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Sets the chart of accounts, the conversion date and conversion balances @param xero_tenant_id [String] Xero identifier for Tenant @param setup [Setup] Object including an accounts array, a conversion balances array and a conversion date object in body of request @param [Hash] opts the optional parameters @return [ImportSummaryObject]
# File lib/xero-ruby/api/accounting_api.rb, line 15174 def post_setup(xero_tenant_id, setup, opts = {}) data, _status_code, _headers = post_setup_with_http_info(xero_tenant_id, setup, opts) data end
Sets the chart of accounts, the conversion date and conversion balances @param xero_tenant_id [String] Xero identifier for Tenant @param setup [Setup] Object including an accounts array, a conversion balances array and a conversion date object in body of request @param [Hash] opts the optional parameters @return [Array<(ImportSummaryObject, Integer, Hash)>] ImportSummaryObject data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 15184 def post_setup_with_http_info(xero_tenant_id, setup, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.post_setup ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.post_setup" end # verify the required parameter 'setup' is set if @api_client.config.client_side_validation && setup.nil? fail ArgumentError, "Missing the required parameter 'setup' when calling AccountingApi.post_setup" end # resource path local_var_path = '/Setup' # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(setup) # return_type return_type = opts[:return_type] || 'ImportSummaryObject' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#post_setup\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Updates a chart of accounts @param xero_tenant_id [String] Xero identifier for Tenant @param account_id [String] Unique identifier for Account object @param accounts [Accounts] Request of type Accounts array with one Account @param [Hash] opts the optional parameters @return [Accounts]
# File lib/xero-ruby/api/accounting_api.rb, line 15252 def update_account(xero_tenant_id, account_id, accounts, opts = {}) data, _status_code, _headers = update_account_with_http_info(xero_tenant_id, account_id, accounts, opts) data end
Updates attachment on a specific account by filename @param xero_tenant_id [String] Xero identifier for Tenant @param account_id [String] Unique identifier for Account object @param file_name [String] Name of the attachment @param body [String] Byte array of file in body of request @param [Hash] opts the optional parameters @return [Attachments]
# File lib/xero-ruby/api/accounting_api.rb, line 15336 def update_account_attachment_by_file_name(xero_tenant_id, account_id, file_name, body, opts = {}) data, _status_code, _headers = update_account_attachment_by_file_name_with_http_info(xero_tenant_id, account_id, file_name, body, opts) data end
Updates attachment on a specific account by filename @param xero_tenant_id [String] Xero identifier for Tenant @param account_id [String] Unique identifier for Account object @param file_name [String] Name of the attachment @param body [String] Byte array of file in body of request @param [Hash] opts the optional parameters @return [Array<(Attachments, Integer, Hash)>] Attachments data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 15348 def update_account_attachment_by_file_name_with_http_info(xero_tenant_id, account_id, file_name, body, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.update_account_attachment_by_file_name ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.update_account_attachment_by_file_name" end # verify the required parameter 'account_id' is set if @api_client.config.client_side_validation && account_id.nil? fail ArgumentError, "Missing the required parameter 'account_id' when calling AccountingApi.update_account_attachment_by_file_name" end # verify the required parameter 'file_name' is set if @api_client.config.client_side_validation && file_name.nil? fail ArgumentError, "Missing the required parameter 'file_name' when calling AccountingApi.update_account_attachment_by_file_name" end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? fail ArgumentError, "Missing the required parameter 'body' when calling AccountingApi.update_account_attachment_by_file_name" end # resource path 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'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/octet-stream']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(body) # return_type return_type = opts[:return_type] || 'Attachments' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#update_account_attachment_by_file_name\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Updates a chart of accounts @param xero_tenant_id [String] Xero identifier for Tenant @param account_id [String] Unique identifier for Account object @param accounts [Accounts] Request of type Accounts array with one Account @param [Hash] opts the optional parameters @return [Array<(Accounts, Integer, Hash)>] Accounts data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 15263 def update_account_with_http_info(xero_tenant_id, account_id, accounts, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.update_account ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.update_account" end # verify the required parameter 'account_id' is set if @api_client.config.client_side_validation && account_id.nil? fail ArgumentError, "Missing the required parameter 'account_id' when calling AccountingApi.update_account" end # verify the required parameter 'accounts' is set if @api_client.config.client_side_validation && accounts.nil? fail ArgumentError, "Missing the required parameter 'accounts' when calling AccountingApi.update_account" end # resource path local_var_path = '/Accounts/{AccountID}'.sub('{' + 'AccountID' + '}', account_id.to_s) # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(accounts) # return_type return_type = opts[:return_type] || 'Accounts' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#update_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Updates a single spent or received money transaction @param xero_tenant_id [String] Xero identifier for Tenant @param bank_transaction_id [String] Xero generated unique identifier for a bank transaction @param bank_transactions [BankTransactions] @param [Hash] opts the optional parameters @option opts [Integer] :unitdp e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts @return [BankTransactions]
# File lib/xero-ruby/api/accounting_api.rb, line 15425 def update_bank_transaction(xero_tenant_id, bank_transaction_id, bank_transactions, opts = {}) data, _status_code, _headers = update_bank_transaction_with_http_info(xero_tenant_id, bank_transaction_id, bank_transactions, opts) data end
Updates a specific attachment from a specific bank transaction by filename @param xero_tenant_id [String] Xero identifier for Tenant @param bank_transaction_id [String] Xero generated unique identifier for a bank transaction @param file_name [String] Name of the attachment @param body [String] Byte array of file in body of request @param [Hash] opts the optional parameters @return [Attachments]
# File lib/xero-ruby/api/accounting_api.rb, line 15511 def update_bank_transaction_attachment_by_file_name(xero_tenant_id, bank_transaction_id, file_name, body, opts = {}) data, _status_code, _headers = update_bank_transaction_attachment_by_file_name_with_http_info(xero_tenant_id, bank_transaction_id, file_name, body, opts) data end
Updates a specific attachment from a specific bank transaction by filename @param xero_tenant_id [String] Xero identifier for Tenant @param bank_transaction_id [String] Xero generated unique identifier for a bank transaction @param file_name [String] Name of the attachment @param body [String] Byte array of file in body of request @param [Hash] opts the optional parameters @return [Array<(Attachments, Integer, Hash)>] Attachments data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 15523 def update_bank_transaction_attachment_by_file_name_with_http_info(xero_tenant_id, bank_transaction_id, file_name, body, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.update_bank_transaction_attachment_by_file_name ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.update_bank_transaction_attachment_by_file_name" end # verify the required parameter 'bank_transaction_id' is set if @api_client.config.client_side_validation && bank_transaction_id.nil? fail ArgumentError, "Missing the required parameter 'bank_transaction_id' when calling AccountingApi.update_bank_transaction_attachment_by_file_name" end # verify the required parameter 'file_name' is set if @api_client.config.client_side_validation && file_name.nil? fail ArgumentError, "Missing the required parameter 'file_name' when calling AccountingApi.update_bank_transaction_attachment_by_file_name" end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? fail ArgumentError, "Missing the required parameter 'body' when calling AccountingApi.update_bank_transaction_attachment_by_file_name" end # resource path 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'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/octet-stream']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(body) # return_type return_type = opts[:return_type] || 'Attachments' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#update_bank_transaction_attachment_by_file_name\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Updates a single spent or received money transaction @param xero_tenant_id [String] Xero identifier for Tenant @param bank_transaction_id [String] Xero generated unique identifier for a bank transaction @param bank_transactions [BankTransactions] @param [Hash] opts the optional parameters @option opts [Integer] :unitdp e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts @return [Array<(BankTransactions, Integer, Hash)>] BankTransactions data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 15437 def update_bank_transaction_with_http_info(xero_tenant_id, bank_transaction_id, bank_transactions, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.update_bank_transaction ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.update_bank_transaction" end # verify the required parameter 'bank_transaction_id' is set if @api_client.config.client_side_validation && bank_transaction_id.nil? fail ArgumentError, "Missing the required parameter 'bank_transaction_id' when calling AccountingApi.update_bank_transaction" end # verify the required parameter 'bank_transactions' is set if @api_client.config.client_side_validation && bank_transactions.nil? fail ArgumentError, "Missing the required parameter 'bank_transactions' when calling AccountingApi.update_bank_transaction" end # resource path local_var_path = '/BankTransactions/{BankTransactionID}'.sub('{' + 'BankTransactionID' + '}', bank_transaction_id.to_s) # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} query_params[:'unitdp'] = opts[:'unitdp'] if !opts[:'unitdp'].nil? # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(bank_transactions) # return_type return_type = opts[:return_type] || 'BankTransactions' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#update_bank_transaction\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
@param xero_tenant_id [String] Xero identifier for Tenant @param bank_transfer_id [String] Xero generated unique identifier for a bank transfer @param file_name [String] Name of the attachment @param body [String] Byte array of file in body of request @param [Hash] opts the optional parameters @return [Attachments]
# File lib/xero-ruby/api/accounting_api.rb, line 15599 def update_bank_transfer_attachment_by_file_name(xero_tenant_id, bank_transfer_id, file_name, body, opts = {}) data, _status_code, _headers = update_bank_transfer_attachment_by_file_name_with_http_info(xero_tenant_id, bank_transfer_id, file_name, body, opts) data end
@param xero_tenant_id [String] Xero identifier for Tenant @param bank_transfer_id [String] Xero generated unique identifier for a bank transfer @param file_name [String] Name of the attachment @param body [String] Byte array of file in body of request @param [Hash] opts the optional parameters @return [Array<(Attachments, Integer, Hash)>] Attachments data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 15610 def update_bank_transfer_attachment_by_file_name_with_http_info(xero_tenant_id, bank_transfer_id, file_name, body, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.update_bank_transfer_attachment_by_file_name ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.update_bank_transfer_attachment_by_file_name" end # verify the required parameter 'bank_transfer_id' is set if @api_client.config.client_side_validation && bank_transfer_id.nil? fail ArgumentError, "Missing the required parameter 'bank_transfer_id' when calling AccountingApi.update_bank_transfer_attachment_by_file_name" end # verify the required parameter 'file_name' is set if @api_client.config.client_side_validation && file_name.nil? fail ArgumentError, "Missing the required parameter 'file_name' when calling AccountingApi.update_bank_transfer_attachment_by_file_name" end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? fail ArgumentError, "Missing the required parameter 'body' when calling AccountingApi.update_bank_transfer_attachment_by_file_name" end # resource path 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'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/octet-stream']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(body) # return_type return_type = opts[:return_type] || 'Attachments' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#update_bank_transfer_attachment_by_file_name\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Updates a specific contact in a Xero organisation @param xero_tenant_id [String] Xero identifier for Tenant @param contact_id [String] Unique identifier for a Contact @param contacts [Contacts] an array of Contacts containing single Contact object with properties to update @param [Hash] opts the optional parameters @return [Contacts]
# File lib/xero-ruby/api/accounting_api.rb, line 15686 def update_contact(xero_tenant_id, contact_id, contacts, opts = {}) data, _status_code, _headers = update_contact_with_http_info(xero_tenant_id, contact_id, contacts, opts) data end
@param xero_tenant_id [String] Xero identifier for Tenant @param contact_id [String] Unique identifier for a Contact @param file_name [String] Name of the attachment @param body [String] Byte array of file in body of request @param [Hash] opts the optional parameters @return [Attachments]
# File lib/xero-ruby/api/accounting_api.rb, line 15769 def update_contact_attachment_by_file_name(xero_tenant_id, contact_id, file_name, body, opts = {}) data, _status_code, _headers = update_contact_attachment_by_file_name_with_http_info(xero_tenant_id, contact_id, file_name, body, opts) data end
@param xero_tenant_id [String] Xero identifier for Tenant @param contact_id [String] Unique identifier for a Contact @param file_name [String] Name of the attachment @param body [String] Byte array of file in body of request @param [Hash] opts the optional parameters @return [Array<(Attachments, Integer, Hash)>] Attachments data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 15780 def update_contact_attachment_by_file_name_with_http_info(xero_tenant_id, contact_id, file_name, body, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.update_contact_attachment_by_file_name ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.update_contact_attachment_by_file_name" end # verify the required parameter 'contact_id' is set if @api_client.config.client_side_validation && contact_id.nil? fail ArgumentError, "Missing the required parameter 'contact_id' when calling AccountingApi.update_contact_attachment_by_file_name" end # verify the required parameter 'file_name' is set if @api_client.config.client_side_validation && file_name.nil? fail ArgumentError, "Missing the required parameter 'file_name' when calling AccountingApi.update_contact_attachment_by_file_name" end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? fail ArgumentError, "Missing the required parameter 'body' when calling AccountingApi.update_contact_attachment_by_file_name" end # resource path 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'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/octet-stream']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(body) # return_type return_type = opts[:return_type] || 'Attachments' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#update_contact_attachment_by_file_name\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Updates a specific contact group @param xero_tenant_id [String] Xero identifier for Tenant @param contact_group_id [String] Unique identifier for a Contact Group @param contact_groups [ContactGroups] an array of Contact groups with Name of specific group to update @param [Hash] opts the optional parameters @return [ContactGroups]
# File lib/xero-ruby/api/accounting_api.rb, line 15856 def update_contact_group(xero_tenant_id, contact_group_id, contact_groups, opts = {}) data, _status_code, _headers = update_contact_group_with_http_info(xero_tenant_id, contact_group_id, contact_groups, opts) data end
Updates a specific contact group @param xero_tenant_id [String] Xero identifier for Tenant @param contact_group_id [String] Unique identifier for a Contact Group @param contact_groups [ContactGroups] an array of Contact groups with Name of specific group to update @param [Hash] opts the optional parameters @return [Array<(ContactGroups, Integer, Hash)>] ContactGroups data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 15867 def update_contact_group_with_http_info(xero_tenant_id, contact_group_id, contact_groups, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.update_contact_group ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.update_contact_group" end # verify the required parameter 'contact_group_id' is set if @api_client.config.client_side_validation && contact_group_id.nil? fail ArgumentError, "Missing the required parameter 'contact_group_id' when calling AccountingApi.update_contact_group" end # verify the required parameter 'contact_groups' is set if @api_client.config.client_side_validation && contact_groups.nil? fail ArgumentError, "Missing the required parameter 'contact_groups' when calling AccountingApi.update_contact_group" end # resource path local_var_path = '/ContactGroups/{ContactGroupID}'.sub('{' + 'ContactGroupID' + '}', contact_group_id.to_s) # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(contact_groups) # return_type return_type = opts[:return_type] || 'ContactGroups' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#update_contact_group\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Updates a specific contact in a Xero organisation @param xero_tenant_id [String] Xero identifier for Tenant @param contact_id [String] Unique identifier for a Contact @param contacts [Contacts] an array of Contacts containing single Contact object with properties to update @param [Hash] opts the optional parameters @return [Array<(Contacts, Integer, Hash)>] Contacts data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 15697 def update_contact_with_http_info(xero_tenant_id, contact_id, contacts, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.update_contact ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.update_contact" end # verify the required parameter 'contact_id' is set if @api_client.config.client_side_validation && contact_id.nil? fail ArgumentError, "Missing the required parameter 'contact_id' when calling AccountingApi.update_contact" end # verify the required parameter 'contacts' is set if @api_client.config.client_side_validation && contacts.nil? fail ArgumentError, "Missing the required parameter 'contacts' when calling AccountingApi.update_contact" end # resource path local_var_path = '/Contacts/{ContactID}'.sub('{' + 'ContactID' + '}', contact_id.to_s) # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(contacts) # return_type return_type = opts[:return_type] || 'Contacts' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#update_contact\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Updates a specific credit note @param xero_tenant_id [String] Xero identifier for Tenant @param credit_note_id [String] Unique identifier for a Credit Note @param credit_notes [CreditNotes] an array of Credit Notes containing credit note details to update @param [Hash] opts the optional parameters @option opts [Integer] :unitdp e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts @return [CreditNotes]
# File lib/xero-ruby/api/accounting_api.rb, line 15940 def update_credit_note(xero_tenant_id, credit_note_id, credit_notes, opts = {}) data, _status_code, _headers = update_credit_note_with_http_info(xero_tenant_id, credit_note_id, credit_notes, opts) data end
Updates attachments on a specific credit note by file name @param xero_tenant_id [String] Xero identifier for Tenant @param credit_note_id [String] Unique identifier for a Credit Note @param file_name [String] Name of the attachment @param body [String] Byte array of file in body of request @param [Hash] opts the optional parameters @return [Attachments]
# File lib/xero-ruby/api/accounting_api.rb, line 16026 def update_credit_note_attachment_by_file_name(xero_tenant_id, credit_note_id, file_name, body, opts = {}) data, _status_code, _headers = update_credit_note_attachment_by_file_name_with_http_info(xero_tenant_id, credit_note_id, file_name, body, opts) data end
Updates attachments on a specific credit note by file name @param xero_tenant_id [String] Xero identifier for Tenant @param credit_note_id [String] Unique identifier for a Credit Note @param file_name [String] Name of the attachment @param body [String] Byte array of file in body of request @param [Hash] opts the optional parameters @return [Array<(Attachments, Integer, Hash)>] Attachments data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 16038 def update_credit_note_attachment_by_file_name_with_http_info(xero_tenant_id, credit_note_id, file_name, body, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.update_credit_note_attachment_by_file_name ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.update_credit_note_attachment_by_file_name" end # verify the required parameter 'credit_note_id' is set if @api_client.config.client_side_validation && credit_note_id.nil? fail ArgumentError, "Missing the required parameter 'credit_note_id' when calling AccountingApi.update_credit_note_attachment_by_file_name" end # verify the required parameter 'file_name' is set if @api_client.config.client_side_validation && file_name.nil? fail ArgumentError, "Missing the required parameter 'file_name' when calling AccountingApi.update_credit_note_attachment_by_file_name" end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? fail ArgumentError, "Missing the required parameter 'body' when calling AccountingApi.update_credit_note_attachment_by_file_name" end # resource path 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'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/octet-stream']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(body) # return_type return_type = opts[:return_type] || 'Attachments' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#update_credit_note_attachment_by_file_name\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Updates a specific credit note @param xero_tenant_id [String] Xero identifier for Tenant @param credit_note_id [String] Unique identifier for a Credit Note @param credit_notes [CreditNotes] an array of Credit Notes containing credit note details to update @param [Hash] opts the optional parameters @option opts [Integer] :unitdp e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts @return [Array<(CreditNotes, Integer, Hash)>] CreditNotes data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 15952 def update_credit_note_with_http_info(xero_tenant_id, credit_note_id, credit_notes, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.update_credit_note ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.update_credit_note" end # verify the required parameter 'credit_note_id' is set if @api_client.config.client_side_validation && credit_note_id.nil? fail ArgumentError, "Missing the required parameter 'credit_note_id' when calling AccountingApi.update_credit_note" end # verify the required parameter 'credit_notes' is set if @api_client.config.client_side_validation && credit_notes.nil? fail ArgumentError, "Missing the required parameter 'credit_notes' when calling AccountingApi.update_credit_note" end # resource path local_var_path = '/CreditNotes/{CreditNoteID}'.sub('{' + 'CreditNoteID' + '}', credit_note_id.to_s) # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} query_params[:'unitdp'] = opts[:'unitdp'] if !opts[:'unitdp'].nil? # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(credit_notes) # return_type return_type = opts[:return_type] || 'CreditNotes' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#update_credit_note\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Updates a specific expense claims @param xero_tenant_id [String] Xero identifier for Tenant @param expense_claim_id [String] Unique identifier for a ExpenseClaim @param expense_claims [ExpenseClaims] @param [Hash] opts the optional parameters @return [ExpenseClaims]
# File lib/xero-ruby/api/accounting_api.rb, line 16114 def update_expense_claim(xero_tenant_id, expense_claim_id, expense_claims, opts = {}) data, _status_code, _headers = update_expense_claim_with_http_info(xero_tenant_id, expense_claim_id, expense_claims, opts) data end
Updates a specific expense claims @param xero_tenant_id [String] Xero identifier for Tenant @param expense_claim_id [String] Unique identifier for a ExpenseClaim @param expense_claims [ExpenseClaims] @param [Hash] opts the optional parameters @return [Array<(ExpenseClaims, Integer, Hash)>] ExpenseClaims data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 16125 def update_expense_claim_with_http_info(xero_tenant_id, expense_claim_id, expense_claims, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.update_expense_claim ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.update_expense_claim" end # verify the required parameter 'expense_claim_id' is set if @api_client.config.client_side_validation && expense_claim_id.nil? fail ArgumentError, "Missing the required parameter 'expense_claim_id' when calling AccountingApi.update_expense_claim" end # verify the required parameter 'expense_claims' is set if @api_client.config.client_side_validation && expense_claims.nil? fail ArgumentError, "Missing the required parameter 'expense_claims' when calling AccountingApi.update_expense_claim" end # resource path local_var_path = '/ExpenseClaims/{ExpenseClaimID}'.sub('{' + 'ExpenseClaimID' + '}', expense_claim_id.to_s) # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(expense_claims) # return_type return_type = opts[:return_type] || 'ExpenseClaims' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#update_expense_claim\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Updates a specific sales invoices or purchase bills @param xero_tenant_id [String] Xero identifier for Tenant @param invoice_id [String] Unique identifier for an Invoice @param invoices [Invoices] @param [Hash] opts the optional parameters @option opts [Integer] :unitdp e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts @return [Invoices]
# File lib/xero-ruby/api/accounting_api.rb, line 16198 def update_invoice(xero_tenant_id, invoice_id, invoices, opts = {}) data, _status_code, _headers = update_invoice_with_http_info(xero_tenant_id, invoice_id, invoices, opts) data end
Updates an attachment from a specific invoices or purchase bill by filename @param xero_tenant_id [String] Xero identifier for Tenant @param invoice_id [String] Unique identifier for an Invoice @param file_name [String] Name of the attachment @param body [String] Byte array of file in body of request @param [Hash] opts the optional parameters @return [Attachments]
# File lib/xero-ruby/api/accounting_api.rb, line 16284 def update_invoice_attachment_by_file_name(xero_tenant_id, invoice_id, file_name, body, opts = {}) data, _status_code, _headers = update_invoice_attachment_by_file_name_with_http_info(xero_tenant_id, invoice_id, file_name, body, opts) data end
Updates an attachment from a specific invoices or purchase bill by filename @param xero_tenant_id [String] Xero identifier for Tenant @param invoice_id [String] Unique identifier for an Invoice @param file_name [String] Name of the attachment @param body [String] Byte array of file in body of request @param [Hash] opts the optional parameters @return [Array<(Attachments, Integer, Hash)>] Attachments data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 16296 def update_invoice_attachment_by_file_name_with_http_info(xero_tenant_id, invoice_id, file_name, body, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.update_invoice_attachment_by_file_name ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.update_invoice_attachment_by_file_name" end # verify the required parameter 'invoice_id' is set if @api_client.config.client_side_validation && invoice_id.nil? fail ArgumentError, "Missing the required parameter 'invoice_id' when calling AccountingApi.update_invoice_attachment_by_file_name" end # verify the required parameter 'file_name' is set if @api_client.config.client_side_validation && file_name.nil? fail ArgumentError, "Missing the required parameter 'file_name' when calling AccountingApi.update_invoice_attachment_by_file_name" end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? fail ArgumentError, "Missing the required parameter 'body' when calling AccountingApi.update_invoice_attachment_by_file_name" end # resource path 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'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/octet-stream']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(body) # return_type return_type = opts[:return_type] || 'Attachments' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#update_invoice_attachment_by_file_name\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Updates a specific sales invoices or purchase bills @param xero_tenant_id [String] Xero identifier for Tenant @param invoice_id [String] Unique identifier for an Invoice @param invoices [Invoices] @param [Hash] opts the optional parameters @option opts [Integer] :unitdp e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts @return [Array<(Invoices, Integer, Hash)>] Invoices data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 16210 def update_invoice_with_http_info(xero_tenant_id, invoice_id, invoices, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.update_invoice ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.update_invoice" end # verify the required parameter 'invoice_id' is set if @api_client.config.client_side_validation && invoice_id.nil? fail ArgumentError, "Missing the required parameter 'invoice_id' when calling AccountingApi.update_invoice" end # verify the required parameter 'invoices' is set if @api_client.config.client_side_validation && invoices.nil? fail ArgumentError, "Missing the required parameter 'invoices' when calling AccountingApi.update_invoice" end # resource path local_var_path = '/Invoices/{InvoiceID}'.sub('{' + 'InvoiceID' + '}', invoice_id.to_s) # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} query_params[:'unitdp'] = opts[:'unitdp'] if !opts[:'unitdp'].nil? # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(invoices) # return_type return_type = opts[:return_type] || 'Invoices' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#update_invoice\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Updates a specific item @param xero_tenant_id [String] Xero identifier for Tenant @param item_id [String] Unique identifier for an Item @param items [Items] @param [Hash] opts the optional parameters @option opts [Integer] :unitdp e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts @return [Items]
# File lib/xero-ruby/api/accounting_api.rb, line 16373 def update_item(xero_tenant_id, item_id, items, opts = {}) data, _status_code, _headers = update_item_with_http_info(xero_tenant_id, item_id, items, opts) data end
Updates a specific item @param xero_tenant_id [String] Xero identifier for Tenant @param item_id [String] Unique identifier for an Item @param items [Items] @param [Hash] opts the optional parameters @option opts [Integer] :unitdp e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts @return [Array<(Items, Integer, Hash)>] Items data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 16385 def update_item_with_http_info(xero_tenant_id, item_id, items, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.update_item ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.update_item" end # verify the required parameter 'item_id' is set if @api_client.config.client_side_validation && item_id.nil? fail ArgumentError, "Missing the required parameter 'item_id' when calling AccountingApi.update_item" end # verify the required parameter 'items' is set if @api_client.config.client_side_validation && items.nil? fail ArgumentError, "Missing the required parameter 'items' when calling AccountingApi.update_item" end # resource path local_var_path = '/Items/{ItemID}'.sub('{' + 'ItemID' + '}', item_id.to_s) # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} query_params[:'unitdp'] = opts[:'unitdp'] if !opts[:'unitdp'].nil? # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(items) # return_type return_type = opts[:return_type] || 'Items' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#update_item\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Updates a specific linked transactions (billable expenses) @param xero_tenant_id [String] Xero identifier for Tenant @param linked_transaction_id [String] Unique identifier for a LinkedTransaction @param linked_transactions [LinkedTransactions] @param [Hash] opts the optional parameters @return [LinkedTransactions]
# File lib/xero-ruby/api/accounting_api.rb, line 16458 def update_linked_transaction(xero_tenant_id, linked_transaction_id, linked_transactions, opts = {}) data, _status_code, _headers = update_linked_transaction_with_http_info(xero_tenant_id, linked_transaction_id, linked_transactions, opts) data end
Updates a specific linked transactions (billable expenses) @param xero_tenant_id [String] Xero identifier for Tenant @param linked_transaction_id [String] Unique identifier for a LinkedTransaction @param linked_transactions [LinkedTransactions] @param [Hash] opts the optional parameters @return [Array<(LinkedTransactions, Integer, Hash)>] LinkedTransactions data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 16469 def update_linked_transaction_with_http_info(xero_tenant_id, linked_transaction_id, linked_transactions, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.update_linked_transaction ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.update_linked_transaction" end # verify the required parameter 'linked_transaction_id' is set if @api_client.config.client_side_validation && linked_transaction_id.nil? fail ArgumentError, "Missing the required parameter 'linked_transaction_id' when calling AccountingApi.update_linked_transaction" end # verify the required parameter 'linked_transactions' is set if @api_client.config.client_side_validation && linked_transactions.nil? fail ArgumentError, "Missing the required parameter 'linked_transactions' when calling AccountingApi.update_linked_transaction" end # resource path local_var_path = '/LinkedTransactions/{LinkedTransactionID}'.sub('{' + 'LinkedTransactionID' + '}', linked_transaction_id.to_s) # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(linked_transactions) # return_type return_type = opts[:return_type] || 'LinkedTransactions' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#update_linked_transaction\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Updates a specific manual journal @param xero_tenant_id [String] Xero identifier for Tenant @param manual_journal_id [String] Unique identifier for a ManualJournal @param manual_journals [ManualJournals] @param [Hash] opts the optional parameters @return [ManualJournals]
# File lib/xero-ruby/api/accounting_api.rb, line 16541 def update_manual_journal(xero_tenant_id, manual_journal_id, manual_journals, opts = {}) data, _status_code, _headers = update_manual_journal_with_http_info(xero_tenant_id, manual_journal_id, manual_journals, opts) data end
Updates a specific attachment from a specific manual journal by file name @param xero_tenant_id [String] Xero identifier for Tenant @param manual_journal_id [String] Unique identifier for a ManualJournal @param file_name [String] Name of the attachment @param body [String] Byte array of file in body of request @param [Hash] opts the optional parameters @return [Attachments]
# File lib/xero-ruby/api/accounting_api.rb, line 16625 def update_manual_journal_attachment_by_file_name(xero_tenant_id, manual_journal_id, file_name, body, opts = {}) data, _status_code, _headers = update_manual_journal_attachment_by_file_name_with_http_info(xero_tenant_id, manual_journal_id, file_name, body, opts) data end
Updates a specific attachment from a specific manual journal by file name @param xero_tenant_id [String] Xero identifier for Tenant @param manual_journal_id [String] Unique identifier for a ManualJournal @param file_name [String] Name of the attachment @param body [String] Byte array of file in body of request @param [Hash] opts the optional parameters @return [Array<(Attachments, Integer, Hash)>] Attachments data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 16637 def update_manual_journal_attachment_by_file_name_with_http_info(xero_tenant_id, manual_journal_id, file_name, body, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.update_manual_journal_attachment_by_file_name ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.update_manual_journal_attachment_by_file_name" end # verify the required parameter 'manual_journal_id' is set if @api_client.config.client_side_validation && manual_journal_id.nil? fail ArgumentError, "Missing the required parameter 'manual_journal_id' when calling AccountingApi.update_manual_journal_attachment_by_file_name" end # verify the required parameter 'file_name' is set if @api_client.config.client_side_validation && file_name.nil? fail ArgumentError, "Missing the required parameter 'file_name' when calling AccountingApi.update_manual_journal_attachment_by_file_name" end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? fail ArgumentError, "Missing the required parameter 'body' when calling AccountingApi.update_manual_journal_attachment_by_file_name" end # resource path 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'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/octet-stream']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(body) # return_type return_type = opts[:return_type] || 'Attachments' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#update_manual_journal_attachment_by_file_name\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Updates a specific manual journal @param xero_tenant_id [String] Xero identifier for Tenant @param manual_journal_id [String] Unique identifier for a ManualJournal @param manual_journals [ManualJournals] @param [Hash] opts the optional parameters @return [Array<(ManualJournals, Integer, Hash)>] ManualJournals data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 16552 def update_manual_journal_with_http_info(xero_tenant_id, manual_journal_id, manual_journals, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.update_manual_journal ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.update_manual_journal" end # verify the required parameter 'manual_journal_id' is set if @api_client.config.client_side_validation && manual_journal_id.nil? fail ArgumentError, "Missing the required parameter 'manual_journal_id' when calling AccountingApi.update_manual_journal" end # verify the required parameter 'manual_journals' is set if @api_client.config.client_side_validation && manual_journals.nil? fail ArgumentError, "Missing the required parameter 'manual_journals' when calling AccountingApi.update_manual_journal" end # resource path local_var_path = '/ManualJournals/{ManualJournalID}'.sub('{' + 'ManualJournalID' + '}', manual_journal_id.to_s) # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(manual_journals) # return_type return_type = opts[:return_type] || 'ManualJournals' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#update_manual_journal\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Updates or creates one or more spent or received money transaction @param xero_tenant_id [String] Xero identifier for Tenant @param bank_transactions [BankTransactions] @param [Hash] opts the optional parameters @option opts [Boolean] :summarize_errors If false return 200 OK and mix of successfully created objects and any with validation errors (default to false) @option opts [Integer] :unitdp e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts @return [BankTransactions]
# File lib/xero-ruby/api/accounting_api.rb, line 16714 def update_or_create_bank_transactions(xero_tenant_id, bank_transactions, opts = {}) data, _status_code, _headers = update_or_create_bank_transactions_with_http_info(xero_tenant_id, bank_transactions, opts) data end
Updates or creates one or more spent or received money transaction @param xero_tenant_id [String] Xero identifier for Tenant @param bank_transactions [BankTransactions] @param [Hash] opts the optional parameters @option opts [Boolean] :summarize_errors If false return 200 OK and mix of successfully created objects and any with validation errors @option opts [Integer] :unitdp e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts @return [Array<(BankTransactions, Integer, Hash)>] BankTransactions data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 16726 def update_or_create_bank_transactions_with_http_info(xero_tenant_id, bank_transactions, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.update_or_create_bank_transactions ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.update_or_create_bank_transactions" end # verify the required parameter 'bank_transactions' is set if @api_client.config.client_side_validation && bank_transactions.nil? fail ArgumentError, "Missing the required parameter 'bank_transactions' when calling AccountingApi.update_or_create_bank_transactions" end # resource path local_var_path = '/BankTransactions' # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} query_params[:'summarizeErrors'] = opts[:'summarize_errors'] if !opts[:'summarize_errors'].nil? query_params[:'unitdp'] = opts[:'unitdp'] if !opts[:'unitdp'].nil? # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(bank_transactions) # return_type return_type = opts[:return_type] || 'BankTransactions' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#update_or_create_bank_transactions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Updates or creates one or more contacts in a Xero organisation @param xero_tenant_id [String] Xero identifier for Tenant @param contacts [Contacts] @param [Hash] opts the optional parameters @option opts [Boolean] :summarize_errors If false return 200 OK and mix of successfully created objects and any with validation errors (default to false) @return [Contacts]
# File lib/xero-ruby/api/accounting_api.rb, line 16796 def update_or_create_contacts(xero_tenant_id, contacts, opts = {}) data, _status_code, _headers = update_or_create_contacts_with_http_info(xero_tenant_id, contacts, opts) data end
Updates or creates one or more contacts in a Xero organisation @param xero_tenant_id [String] Xero identifier for Tenant @param contacts [Contacts] @param [Hash] opts the optional parameters @option opts [Boolean] :summarize_errors If false return 200 OK and mix of successfully created objects and any with validation errors @return [Array<(Contacts, Integer, Hash)>] Contacts data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 16807 def update_or_create_contacts_with_http_info(xero_tenant_id, contacts, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.update_or_create_contacts ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.update_or_create_contacts" end # verify the required parameter 'contacts' is set if @api_client.config.client_side_validation && contacts.nil? fail ArgumentError, "Missing the required parameter 'contacts' when calling AccountingApi.update_or_create_contacts" end # resource path local_var_path = '/Contacts' # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} query_params[:'summarizeErrors'] = opts[:'summarize_errors'] if !opts[:'summarize_errors'].nil? # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(contacts) # return_type return_type = opts[:return_type] || 'Contacts' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#update_or_create_contacts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Updates or creates one or more credit notes @param xero_tenant_id [String] Xero identifier for Tenant @param credit_notes [CreditNotes] an array of Credit Notes with a single CreditNote object. @param [Hash] opts the optional parameters @option opts [Boolean] :summarize_errors If false return 200 OK and mix of successfully created objects and any with validation errors (default to false) @option opts [Integer] :unitdp e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts @return [CreditNotes]
# File lib/xero-ruby/api/accounting_api.rb, line 16877 def update_or_create_credit_notes(xero_tenant_id, credit_notes, opts = {}) data, _status_code, _headers = update_or_create_credit_notes_with_http_info(xero_tenant_id, credit_notes, opts) data end
Updates or creates one or more credit notes @param xero_tenant_id [String] Xero identifier for Tenant @param credit_notes [CreditNotes] an array of Credit Notes with a single CreditNote object. @param [Hash] opts the optional parameters @option opts [Boolean] :summarize_errors If false return 200 OK and mix of successfully created objects and any with validation errors @option opts [Integer] :unitdp e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts @return [Array<(CreditNotes, Integer, Hash)>] CreditNotes data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 16889 def update_or_create_credit_notes_with_http_info(xero_tenant_id, credit_notes, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.update_or_create_credit_notes ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.update_or_create_credit_notes" end # verify the required parameter 'credit_notes' is set if @api_client.config.client_side_validation && credit_notes.nil? fail ArgumentError, "Missing the required parameter 'credit_notes' when calling AccountingApi.update_or_create_credit_notes" end # resource path local_var_path = '/CreditNotes' # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} query_params[:'summarizeErrors'] = opts[:'summarize_errors'] if !opts[:'summarize_errors'].nil? query_params[:'unitdp'] = opts[:'unitdp'] if !opts[:'unitdp'].nil? # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(credit_notes) # return_type return_type = opts[:return_type] || 'CreditNotes' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#update_or_create_credit_notes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Creates a single new employees used in Xero payrun @param xero_tenant_id [String] Xero identifier for Tenant @param employees [Employees] Employees with array of Employee object in body of request @param [Hash] opts the optional parameters @option opts [Boolean] :summarize_errors If false return 200 OK and mix of successfully created objects and any with validation errors (default to false) @return [Employees]
# File lib/xero-ruby/api/accounting_api.rb, line 16959 def update_or_create_employees(xero_tenant_id, employees, opts = {}) data, _status_code, _headers = update_or_create_employees_with_http_info(xero_tenant_id, employees, opts) data end
Creates a single new employees used in Xero payrun @param xero_tenant_id [String] Xero identifier for Tenant @param employees [Employees] Employees with array of Employee object in body of request @param [Hash] opts the optional parameters @option opts [Boolean] :summarize_errors If false return 200 OK and mix of successfully created objects and any with validation errors @return [Array<(Employees, Integer, Hash)>] Employees data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 16970 def update_or_create_employees_with_http_info(xero_tenant_id, employees, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.update_or_create_employees ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.update_or_create_employees" end # verify the required parameter 'employees' is set if @api_client.config.client_side_validation && employees.nil? fail ArgumentError, "Missing the required parameter 'employees' when calling AccountingApi.update_or_create_employees" end # resource path local_var_path = '/Employees' # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} query_params[:'summarizeErrors'] = opts[:'summarize_errors'] if !opts[:'summarize_errors'].nil? # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(employees) # return_type return_type = opts[:return_type] || 'Employees' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#update_or_create_employees\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Updates or creates one or more sales invoices or purchase bills @param xero_tenant_id [String] Xero identifier for Tenant @param invoices [Invoices] @param [Hash] opts the optional parameters @option opts [Boolean] :summarize_errors If false return 200 OK and mix of successfully created objects and any with validation errors (default to false) @option opts [Integer] :unitdp e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts @return [Invoices]
# File lib/xero-ruby/api/accounting_api.rb, line 17040 def update_or_create_invoices(xero_tenant_id, invoices, opts = {}) data, _status_code, _headers = update_or_create_invoices_with_http_info(xero_tenant_id, invoices, opts) data end
Updates or creates one or more sales invoices or purchase bills @param xero_tenant_id [String] Xero identifier for Tenant @param invoices [Invoices] @param [Hash] opts the optional parameters @option opts [Boolean] :summarize_errors If false return 200 OK and mix of successfully created objects and any with validation errors @option opts [Integer] :unitdp e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts @return [Array<(Invoices, Integer, Hash)>] Invoices data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 17052 def update_or_create_invoices_with_http_info(xero_tenant_id, invoices, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.update_or_create_invoices ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.update_or_create_invoices" end # verify the required parameter 'invoices' is set if @api_client.config.client_side_validation && invoices.nil? fail ArgumentError, "Missing the required parameter 'invoices' when calling AccountingApi.update_or_create_invoices" end # resource path local_var_path = '/Invoices' # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} query_params[:'summarizeErrors'] = opts[:'summarize_errors'] if !opts[:'summarize_errors'].nil? query_params[:'unitdp'] = opts[:'unitdp'] if !opts[:'unitdp'].nil? # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(invoices) # return_type return_type = opts[:return_type] || 'Invoices' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#update_or_create_invoices\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Updates or creates one or more items @param xero_tenant_id [String] Xero identifier for Tenant @param items [Items] @param [Hash] opts the optional parameters @option opts [Boolean] :summarize_errors If false return 200 OK and mix of successfully created objects and any with validation errors (default to false) @option opts [Integer] :unitdp e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts @return [Items]
# File lib/xero-ruby/api/accounting_api.rb, line 17123 def update_or_create_items(xero_tenant_id, items, opts = {}) data, _status_code, _headers = update_or_create_items_with_http_info(xero_tenant_id, items, opts) data end
Updates or creates one or more items @param xero_tenant_id [String] Xero identifier for Tenant @param items [Items] @param [Hash] opts the optional parameters @option opts [Boolean] :summarize_errors If false return 200 OK and mix of successfully created objects and any with validation errors @option opts [Integer] :unitdp e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts @return [Array<(Items, Integer, Hash)>] Items data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 17135 def update_or_create_items_with_http_info(xero_tenant_id, items, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.update_or_create_items ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.update_or_create_items" end # verify the required parameter 'items' is set if @api_client.config.client_side_validation && items.nil? fail ArgumentError, "Missing the required parameter 'items' when calling AccountingApi.update_or_create_items" end # resource path local_var_path = '/Items' # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} query_params[:'summarizeErrors'] = opts[:'summarize_errors'] if !opts[:'summarize_errors'].nil? query_params[:'unitdp'] = opts[:'unitdp'] if !opts[:'unitdp'].nil? # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(items) # return_type return_type = opts[:return_type] || 'Items' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#update_or_create_items\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Updates or creates a single manual journal @param xero_tenant_id [String] Xero identifier for Tenant @param manual_journals [ManualJournals] ManualJournals array with ManualJournal object in body of request @param [Hash] opts the optional parameters @option opts [Boolean] :summarize_errors If false return 200 OK and mix of successfully created objects and any with validation errors (default to false) @return [ManualJournals]
# File lib/xero-ruby/api/accounting_api.rb, line 17205 def update_or_create_manual_journals(xero_tenant_id, manual_journals, opts = {}) data, _status_code, _headers = update_or_create_manual_journals_with_http_info(xero_tenant_id, manual_journals, opts) data end
Updates or creates a single manual journal @param xero_tenant_id [String] Xero identifier for Tenant @param manual_journals [ManualJournals] ManualJournals array with ManualJournal object in body of request @param [Hash] opts the optional parameters @option opts [Boolean] :summarize_errors If false return 200 OK and mix of successfully created objects and any with validation errors @return [Array<(ManualJournals, Integer, Hash)>] ManualJournals data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 17216 def update_or_create_manual_journals_with_http_info(xero_tenant_id, manual_journals, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.update_or_create_manual_journals ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.update_or_create_manual_journals" end # verify the required parameter 'manual_journals' is set if @api_client.config.client_side_validation && manual_journals.nil? fail ArgumentError, "Missing the required parameter 'manual_journals' when calling AccountingApi.update_or_create_manual_journals" end # resource path local_var_path = '/ManualJournals' # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} query_params[:'summarizeErrors'] = opts[:'summarize_errors'] if !opts[:'summarize_errors'].nil? # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(manual_journals) # return_type return_type = opts[:return_type] || 'ManualJournals' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#update_or_create_manual_journals\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Updates or creates one or more purchase orders @param xero_tenant_id [String] Xero identifier for Tenant @param purchase_orders [PurchaseOrders] @param [Hash] opts the optional parameters @option opts [Boolean] :summarize_errors If false return 200 OK and mix of successfully created objects and any with validation errors (default to false) @return [PurchaseOrders]
# File lib/xero-ruby/api/accounting_api.rb, line 17285 def update_or_create_purchase_orders(xero_tenant_id, purchase_orders, opts = {}) data, _status_code, _headers = update_or_create_purchase_orders_with_http_info(xero_tenant_id, purchase_orders, opts) data end
Updates or creates one or more purchase orders @param xero_tenant_id [String] Xero identifier for Tenant @param purchase_orders [PurchaseOrders] @param [Hash] opts the optional parameters @option opts [Boolean] :summarize_errors If false return 200 OK and mix of successfully created objects and any with validation errors @return [Array<(PurchaseOrders, Integer, Hash)>] PurchaseOrders data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 17296 def update_or_create_purchase_orders_with_http_info(xero_tenant_id, purchase_orders, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.update_or_create_purchase_orders ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.update_or_create_purchase_orders" end # verify the required parameter 'purchase_orders' is set if @api_client.config.client_side_validation && purchase_orders.nil? fail ArgumentError, "Missing the required parameter 'purchase_orders' when calling AccountingApi.update_or_create_purchase_orders" end # resource path local_var_path = '/PurchaseOrders' # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} query_params[:'summarizeErrors'] = opts[:'summarize_errors'] if !opts[:'summarize_errors'].nil? # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(purchase_orders) # return_type return_type = opts[:return_type] || 'PurchaseOrders' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#update_or_create_purchase_orders\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Updates or creates one or more quotes @param xero_tenant_id [String] Xero identifier for Tenant @param quotes [Quotes] @param [Hash] opts the optional parameters @option opts [Boolean] :summarize_errors If false return 200 OK and mix of successfully created objects and any with validation errors (default to false) @return [Quotes]
# File lib/xero-ruby/api/accounting_api.rb, line 17365 def update_or_create_quotes(xero_tenant_id, quotes, opts = {}) data, _status_code, _headers = update_or_create_quotes_with_http_info(xero_tenant_id, quotes, opts) data end
Updates or creates one or more quotes @param xero_tenant_id [String] Xero identifier for Tenant @param quotes [Quotes] @param [Hash] opts the optional parameters @option opts [Boolean] :summarize_errors If false return 200 OK and mix of successfully created objects and any with validation errors @return [Array<(Quotes, Integer, Hash)>] Quotes data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 17376 def update_or_create_quotes_with_http_info(xero_tenant_id, quotes, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.update_or_create_quotes ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.update_or_create_quotes" end # verify the required parameter 'quotes' is set if @api_client.config.client_side_validation && quotes.nil? fail ArgumentError, "Missing the required parameter 'quotes' when calling AccountingApi.update_or_create_quotes" end # resource path local_var_path = '/Quotes' # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} query_params[:'summarizeErrors'] = opts[:'summarize_errors'] if !opts[:'summarize_errors'].nil? # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(quotes) # return_type return_type = opts[:return_type] || 'Quotes' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#update_or_create_quotes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Updates a specific purchase order @param xero_tenant_id [String] Xero identifier for Tenant @param purchase_order_id [String] Unique identifier for an Purchase Order @param purchase_orders [PurchaseOrders] @param [Hash] opts the optional parameters @return [PurchaseOrders]
# File lib/xero-ruby/api/accounting_api.rb, line 17445 def update_purchase_order(xero_tenant_id, purchase_order_id, purchase_orders, opts = {}) data, _status_code, _headers = update_purchase_order_with_http_info(xero_tenant_id, purchase_order_id, purchase_orders, opts) data end
Updates a specific attachment for a specific purchase order by filename @param xero_tenant_id [String] Xero identifier for Tenant @param purchase_order_id [String] Unique identifier for an Purchase Order @param file_name [String] Name of the attachment @param body [String] Byte array of file in body of request @param [Hash] opts the optional parameters @return [Attachments]
# File lib/xero-ruby/api/accounting_api.rb, line 17529 def update_purchase_order_attachment_by_file_name(xero_tenant_id, purchase_order_id, file_name, body, opts = {}) data, _status_code, _headers = update_purchase_order_attachment_by_file_name_with_http_info(xero_tenant_id, purchase_order_id, file_name, body, opts) data end
Updates a specific attachment for a specific purchase order by filename @param xero_tenant_id [String] Xero identifier for Tenant @param purchase_order_id [String] Unique identifier for an Purchase Order @param file_name [String] Name of the attachment @param body [String] Byte array of file in body of request @param [Hash] opts the optional parameters @return [Array<(Attachments, Integer, Hash)>] Attachments data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 17541 def update_purchase_order_attachment_by_file_name_with_http_info(xero_tenant_id, purchase_order_id, file_name, body, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.update_purchase_order_attachment_by_file_name ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.update_purchase_order_attachment_by_file_name" end # verify the required parameter 'purchase_order_id' is set if @api_client.config.client_side_validation && purchase_order_id.nil? fail ArgumentError, "Missing the required parameter 'purchase_order_id' when calling AccountingApi.update_purchase_order_attachment_by_file_name" end # verify the required parameter 'file_name' is set if @api_client.config.client_side_validation && file_name.nil? fail ArgumentError, "Missing the required parameter 'file_name' when calling AccountingApi.update_purchase_order_attachment_by_file_name" end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? fail ArgumentError, "Missing the required parameter 'body' when calling AccountingApi.update_purchase_order_attachment_by_file_name" end # resource path local_var_path = '/PurchaseOrders/{PurchaseOrderID}/Attachments/{FileName}'.sub('{' + 'PurchaseOrderID' + '}', purchase_order_id.to_s).sub('{' + 'FileName' + '}', file_name.to_s) # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/octet-stream']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(body) # return_type return_type = opts[:return_type] || 'Attachments' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#update_purchase_order_attachment_by_file_name\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Updates a specific purchase order @param xero_tenant_id [String] Xero identifier for Tenant @param purchase_order_id [String] Unique identifier for an Purchase Order @param purchase_orders [PurchaseOrders] @param [Hash] opts the optional parameters @return [Array<(PurchaseOrders, Integer, Hash)>] PurchaseOrders data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 17456 def update_purchase_order_with_http_info(xero_tenant_id, purchase_order_id, purchase_orders, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.update_purchase_order ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.update_purchase_order" end # verify the required parameter 'purchase_order_id' is set if @api_client.config.client_side_validation && purchase_order_id.nil? fail ArgumentError, "Missing the required parameter 'purchase_order_id' when calling AccountingApi.update_purchase_order" end # verify the required parameter 'purchase_orders' is set if @api_client.config.client_side_validation && purchase_orders.nil? fail ArgumentError, "Missing the required parameter 'purchase_orders' when calling AccountingApi.update_purchase_order" end # resource path local_var_path = '/PurchaseOrders/{PurchaseOrderID}'.sub('{' + 'PurchaseOrderID' + '}', purchase_order_id.to_s) # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(purchase_orders) # return_type return_type = opts[:return_type] || 'PurchaseOrders' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#update_purchase_order\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Updates a specific quote @param xero_tenant_id [String] Xero identifier for Tenant @param quote_id [String] Unique identifier for an Quote @param quotes [Quotes] @param [Hash] opts the optional parameters @return [Quotes]
# File lib/xero-ruby/api/accounting_api.rb, line 17617 def update_quote(xero_tenant_id, quote_id, quotes, opts = {}) data, _status_code, _headers = update_quote_with_http_info(xero_tenant_id, quote_id, quotes, opts) data end
Updates a specific attachment from a specific quote by filename @param xero_tenant_id [String] Xero identifier for Tenant @param quote_id [String] Unique identifier for an Quote @param file_name [String] Name of the attachment @param body [String] Byte array of file in body of request @param [Hash] opts the optional parameters @return [Attachments]
# File lib/xero-ruby/api/accounting_api.rb, line 17701 def update_quote_attachment_by_file_name(xero_tenant_id, quote_id, file_name, body, opts = {}) data, _status_code, _headers = update_quote_attachment_by_file_name_with_http_info(xero_tenant_id, quote_id, file_name, body, opts) data end
Updates a specific attachment from a specific quote by filename @param xero_tenant_id [String] Xero identifier for Tenant @param quote_id [String] Unique identifier for an Quote @param file_name [String] Name of the attachment @param body [String] Byte array of file in body of request @param [Hash] opts the optional parameters @return [Array<(Attachments, Integer, Hash)>] Attachments data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 17713 def update_quote_attachment_by_file_name_with_http_info(xero_tenant_id, quote_id, file_name, body, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.update_quote_attachment_by_file_name ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.update_quote_attachment_by_file_name" end # verify the required parameter 'quote_id' is set if @api_client.config.client_side_validation && quote_id.nil? fail ArgumentError, "Missing the required parameter 'quote_id' when calling AccountingApi.update_quote_attachment_by_file_name" end # verify the required parameter 'file_name' is set if @api_client.config.client_side_validation && file_name.nil? fail ArgumentError, "Missing the required parameter 'file_name' when calling AccountingApi.update_quote_attachment_by_file_name" end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? fail ArgumentError, "Missing the required parameter 'body' when calling AccountingApi.update_quote_attachment_by_file_name" end # resource path 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'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/octet-stream']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(body) # return_type return_type = opts[:return_type] || 'Attachments' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#update_quote_attachment_by_file_name\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Updates a specific quote @param xero_tenant_id [String] Xero identifier for Tenant @param quote_id [String] Unique identifier for an Quote @param quotes [Quotes] @param [Hash] opts the optional parameters @return [Array<(Quotes, Integer, Hash)>] Quotes data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 17628 def update_quote_with_http_info(xero_tenant_id, quote_id, quotes, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.update_quote ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.update_quote" end # verify the required parameter 'quote_id' is set if @api_client.config.client_side_validation && quote_id.nil? fail ArgumentError, "Missing the required parameter 'quote_id' when calling AccountingApi.update_quote" end # verify the required parameter 'quotes' is set if @api_client.config.client_side_validation && quotes.nil? fail ArgumentError, "Missing the required parameter 'quotes' when calling AccountingApi.update_quote" end # resource path local_var_path = '/Quotes/{QuoteID}'.sub('{' + 'QuoteID' + '}', quote_id.to_s) # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(quotes) # return_type return_type = opts[:return_type] || 'Quotes' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#update_quote\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Updates a specific draft expense claim receipts @param xero_tenant_id [String] Xero identifier for Tenant @param receipt_id [String] Unique identifier for a Receipt @param receipts [Receipts] @param [Hash] opts the optional parameters @option opts [Integer] :unitdp e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts @return [Receipts]
# File lib/xero-ruby/api/accounting_api.rb, line 17790 def update_receipt(xero_tenant_id, receipt_id, receipts, opts = {}) data, _status_code, _headers = update_receipt_with_http_info(xero_tenant_id, receipt_id, receipts, opts) data end
Updates a specific attachment on a specific expense claim receipts by file name @param xero_tenant_id [String] Xero identifier for Tenant @param receipt_id [String] Unique identifier for a Receipt @param file_name [String] Name of the attachment @param body [String] Byte array of file in body of request @param [Hash] opts the optional parameters @return [Attachments]
# File lib/xero-ruby/api/accounting_api.rb, line 17876 def update_receipt_attachment_by_file_name(xero_tenant_id, receipt_id, file_name, body, opts = {}) data, _status_code, _headers = update_receipt_attachment_by_file_name_with_http_info(xero_tenant_id, receipt_id, file_name, body, opts) data end
Updates a specific attachment on a specific expense claim receipts by file name @param xero_tenant_id [String] Xero identifier for Tenant @param receipt_id [String] Unique identifier for a Receipt @param file_name [String] Name of the attachment @param body [String] Byte array of file in body of request @param [Hash] opts the optional parameters @return [Array<(Attachments, Integer, Hash)>] Attachments data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 17888 def update_receipt_attachment_by_file_name_with_http_info(xero_tenant_id, receipt_id, file_name, body, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.update_receipt_attachment_by_file_name ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.update_receipt_attachment_by_file_name" end # verify the required parameter 'receipt_id' is set if @api_client.config.client_side_validation && receipt_id.nil? fail ArgumentError, "Missing the required parameter 'receipt_id' when calling AccountingApi.update_receipt_attachment_by_file_name" end # verify the required parameter 'file_name' is set if @api_client.config.client_side_validation && file_name.nil? fail ArgumentError, "Missing the required parameter 'file_name' when calling AccountingApi.update_receipt_attachment_by_file_name" end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? fail ArgumentError, "Missing the required parameter 'body' when calling AccountingApi.update_receipt_attachment_by_file_name" end # resource path 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'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/octet-stream']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(body) # return_type return_type = opts[:return_type] || 'Attachments' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#update_receipt_attachment_by_file_name\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Updates a specific draft expense claim receipts @param xero_tenant_id [String] Xero identifier for Tenant @param receipt_id [String] Unique identifier for a Receipt @param receipts [Receipts] @param [Hash] opts the optional parameters @option opts [Integer] :unitdp e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts @return [Array<(Receipts, Integer, Hash)>] Receipts data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 17802 def update_receipt_with_http_info(xero_tenant_id, receipt_id, receipts, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.update_receipt ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.update_receipt" end # verify the required parameter 'receipt_id' is set if @api_client.config.client_side_validation && receipt_id.nil? fail ArgumentError, "Missing the required parameter 'receipt_id' when calling AccountingApi.update_receipt" end # verify the required parameter 'receipts' is set if @api_client.config.client_side_validation && receipts.nil? fail ArgumentError, "Missing the required parameter 'receipts' when calling AccountingApi.update_receipt" end # resource path local_var_path = '/Receipts/{ReceiptID}'.sub('{' + 'ReceiptID' + '}', receipt_id.to_s) # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} query_params[:'unitdp'] = opts[:'unitdp'] if !opts[:'unitdp'].nil? # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(receipts) # return_type return_type = opts[:return_type] || 'Receipts' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#update_receipt\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Updates a specific attachment from a specific repeating invoices by file name @param xero_tenant_id [String] Xero identifier for Tenant @param repeating_invoice_id [String] Unique identifier for a Repeating Invoice @param file_name [String] Name of the attachment @param body [String] Byte array of file in body of request @param [Hash] opts the optional parameters @return [Attachments]
# File lib/xero-ruby/api/accounting_api.rb, line 17965 def update_repeating_invoice_attachment_by_file_name(xero_tenant_id, repeating_invoice_id, file_name, body, opts = {}) data, _status_code, _headers = update_repeating_invoice_attachment_by_file_name_with_http_info(xero_tenant_id, repeating_invoice_id, file_name, body, opts) data end
Updates a specific attachment from a specific repeating invoices by file name @param xero_tenant_id [String] Xero identifier for Tenant @param repeating_invoice_id [String] Unique identifier for a Repeating Invoice @param file_name [String] Name of the attachment @param body [String] Byte array of file in body of request @param [Hash] opts the optional parameters @return [Array<(Attachments, Integer, Hash)>] Attachments data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 17977 def update_repeating_invoice_attachment_by_file_name_with_http_info(xero_tenant_id, repeating_invoice_id, file_name, body, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.update_repeating_invoice_attachment_by_file_name ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.update_repeating_invoice_attachment_by_file_name" end # verify the required parameter 'repeating_invoice_id' is set if @api_client.config.client_side_validation && repeating_invoice_id.nil? fail ArgumentError, "Missing the required parameter 'repeating_invoice_id' when calling AccountingApi.update_repeating_invoice_attachment_by_file_name" end # verify the required parameter 'file_name' is set if @api_client.config.client_side_validation && file_name.nil? fail ArgumentError, "Missing the required parameter 'file_name' when calling AccountingApi.update_repeating_invoice_attachment_by_file_name" end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? fail ArgumentError, "Missing the required parameter 'body' when calling AccountingApi.update_repeating_invoice_attachment_by_file_name" end # resource path 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'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/octet-stream']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(body) # return_type return_type = opts[:return_type] || 'Attachments' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#update_repeating_invoice_attachment_by_file_name\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Updates tax rates @param xero_tenant_id [String] Xero identifier for Tenant @param tax_rates [TaxRates] @param [Hash] opts the optional parameters @return [TaxRates]
# File lib/xero-ruby/api/accounting_api.rb, line 18052 def update_tax_rate(xero_tenant_id, tax_rates, opts = {}) data, _status_code, _headers = update_tax_rate_with_http_info(xero_tenant_id, tax_rates, opts) data end
Updates tax rates @param xero_tenant_id [String] Xero identifier for Tenant @param tax_rates [TaxRates] @param [Hash] opts the optional parameters @return [Array<(TaxRates, Integer, Hash)>] TaxRates data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 18062 def update_tax_rate_with_http_info(xero_tenant_id, tax_rates, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.update_tax_rate ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.update_tax_rate" end # verify the required parameter 'tax_rates' is set if @api_client.config.client_side_validation && tax_rates.nil? fail ArgumentError, "Missing the required parameter 'tax_rates' when calling AccountingApi.update_tax_rate" end # resource path local_var_path = '/TaxRates' # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(tax_rates) # return_type return_type = opts[:return_type] || 'TaxRates' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#update_tax_rate\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Updates a specific tracking category @param xero_tenant_id [String] Xero identifier for Tenant @param tracking_category_id [String] Unique identifier for a TrackingCategory @param tracking_category [TrackingCategory] @param [Hash] opts the optional parameters @return [TrackingCategories]
# File lib/xero-ruby/api/accounting_api.rb, line 18130 def update_tracking_category(xero_tenant_id, tracking_category_id, tracking_category, opts = {}) data, _status_code, _headers = update_tracking_category_with_http_info(xero_tenant_id, tracking_category_id, tracking_category, opts) data end
Updates a specific tracking category @param xero_tenant_id [String] Xero identifier for Tenant @param tracking_category_id [String] Unique identifier for a TrackingCategory @param tracking_category [TrackingCategory] @param [Hash] opts the optional parameters @return [Array<(TrackingCategories, Integer, Hash)>] TrackingCategories data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 18141 def update_tracking_category_with_http_info(xero_tenant_id, tracking_category_id, tracking_category, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.update_tracking_category ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.update_tracking_category" end # verify the required parameter 'tracking_category_id' is set if @api_client.config.client_side_validation && tracking_category_id.nil? fail ArgumentError, "Missing the required parameter 'tracking_category_id' when calling AccountingApi.update_tracking_category" end # verify the required parameter 'tracking_category' is set if @api_client.config.client_side_validation && tracking_category.nil? fail ArgumentError, "Missing the required parameter 'tracking_category' when calling AccountingApi.update_tracking_category" end # resource path local_var_path = '/TrackingCategories/{TrackingCategoryID}'.sub('{' + 'TrackingCategoryID' + '}', tracking_category_id.to_s) # camelize keys of incoming `where` opts opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(tracking_category) # return_type return_type = opts[:return_type] || 'TrackingCategories' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#update_tracking_category\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Updates a specific option for a specific tracking category @param xero_tenant_id [String] Xero identifier for Tenant @param tracking_category_id [String] Unique identifier for a TrackingCategory @param tracking_option_id [String] Unique identifier for a Tracking Option @param tracking_option [TrackingOption] @param [Hash] opts the optional parameters @return [TrackingOptions]
# File lib/xero-ruby/api/accounting_api.rb, line 18214 def update_tracking_options(xero_tenant_id, tracking_category_id, tracking_option_id, tracking_option, opts = {}) data, _status_code, _headers = update_tracking_options_with_http_info(xero_tenant_id, tracking_category_id, tracking_option_id, tracking_option, opts) data end
Updates a specific option for a specific tracking category @param xero_tenant_id [String] Xero identifier for Tenant @param tracking_category_id [String] Unique identifier for a TrackingCategory @param tracking_option_id [String] Unique identifier for a Tracking Option @param tracking_option [TrackingOption] @param [Hash] opts the optional parameters @return [Array<(TrackingOptions, Integer, Hash)>] TrackingOptions data, response status code and response headers
# File lib/xero-ruby/api/accounting_api.rb, line 18226 def update_tracking_options_with_http_info(xero_tenant_id, tracking_category_id, tracking_option_id, tracking_option, options = {}) opts = options.dup if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountingApi.update_tracking_options ...' end # verify the required parameter 'xero_tenant_id' is set if @api_client.config.client_side_validation && xero_tenant_id.nil? fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.update_tracking_options" end # verify the required parameter 'tracking_category_id' is set if @api_client.config.client_side_validation && tracking_category_id.nil? fail ArgumentError, "Missing the required parameter 'tracking_category_id' when calling AccountingApi.update_tracking_options" end # verify the required parameter 'tracking_option_id' is set if @api_client.config.client_side_validation && tracking_option_id.nil? fail ArgumentError, "Missing the required parameter 'tracking_option_id' when calling AccountingApi.update_tracking_options" end # verify the required parameter 'tracking_option' is set if @api_client.config.client_side_validation && tracking_option.nil? fail ArgumentError, "Missing the required parameter 'tracking_option' when calling AccountingApi.update_tracking_options" end # resource path 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'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil? # query parameters query_params = opts[:query_params] || {} # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations: query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil? query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) header_params[:'xero-tenant-id'] = xero_tenant_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(tracking_option) # return_type return_type = opts[:return_type] || 'TrackingOptions' # auth_names auth_names = opts[:auth_names] || ['OAuth2'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, "AccountingApi", new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountingApi#update_tracking_options\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end