=begin #Subskribe API #No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: 1.0.0 Generated by: https://github.com/swagger-api/swagger-codegen.git Swagger Codegen version: 2.4.41 =end require 'uri' module SubskribeDevClient class ERPApi attr_accessor :api_client def initialize(api_client = ApiClient.default) @api_client = api_client end # Trigger ERP journal entry deletion task # Trigger ERP journal entry deletion task for the given accounting period id # @param accounting_period_id # @param [Hash] opts the optional parameters # @return [nil] def process_delete_tasks(accounting_period_id, opts = {}) process_delete_tasks_with_http_info(accounting_period_id, opts) nil end # Trigger ERP journal entry deletion task # Trigger ERP journal entry deletion task for the given accounting period id # @param accounting_period_id # @param [Hash] opts the optional parameters # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers def process_delete_tasks_with_http_info(accounting_period_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ERPApi.process_delete_tasks ...' end # verify the required parameter 'accounting_period_id' is set if @api_client.config.client_side_validation && accounting_period_id.nil? fail ArgumentError, "Missing the required parameter 'accounting_period_id' when calling ERPApi.process_delete_tasks" end # resource path local_var_path = '/erp/processDeleteTasks/{accountingPeriodId}'.sub('{' + 'accountingPeriodId' + '}', accounting_period_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['ApiKeyAuth'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: ERPApi#process_delete_tasks\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Trigger ERP journal entry sync task # Trigger ERP journal entry sync task for given accounting period id # @param accounting_period_id # @param [Hash] opts the optional parameters # @return [nil] def process_sync_tasks(accounting_period_id, opts = {}) process_sync_tasks_with_http_info(accounting_period_id, opts) nil end # Trigger ERP journal entry sync task # Trigger ERP journal entry sync task for given accounting period id # @param accounting_period_id # @param [Hash] opts the optional parameters # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers def process_sync_tasks_with_http_info(accounting_period_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ERPApi.process_sync_tasks ...' end # verify the required parameter 'accounting_period_id' is set if @api_client.config.client_side_validation && accounting_period_id.nil? fail ArgumentError, "Missing the required parameter 'accounting_period_id' when calling ERPApi.process_sync_tasks" end # resource path local_var_path = '/erp/processSyncTasks/{accountingPeriodId}'.sub('{' + 'accountingPeriodId' + '}', accounting_period_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['ApiKeyAuth'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: ERPApi#process_sync_tasks\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Trigger ERP credit memo sync task # Trigger ERP credit memo sync task for the given credit memo number # @param credit_memo_number # @param [Hash] opts the optional parameters # @return [nil] def sync_credit_memo_to_erp(credit_memo_number, opts = {}) sync_credit_memo_to_erp_with_http_info(credit_memo_number, opts) nil end # Trigger ERP credit memo sync task # Trigger ERP credit memo sync task for the given credit memo number # @param credit_memo_number # @param [Hash] opts the optional parameters # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers def sync_credit_memo_to_erp_with_http_info(credit_memo_number, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ERPApi.sync_credit_memo_to_erp ...' end # verify the required parameter 'credit_memo_number' is set if @api_client.config.client_side_validation && credit_memo_number.nil? fail ArgumentError, "Missing the required parameter 'credit_memo_number' when calling ERPApi.sync_credit_memo_to_erp" end # resource path local_var_path = '/erp/syncCreditMemo/{creditMemoNumber}'.sub('{' + 'creditMemoNumber' + '}', credit_memo_number.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['ApiKeyAuth'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: ERPApi#sync_credit_memo_to_erp\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Trigger ERP invoice sync task # Trigger ERP invoice sync task for the given invoice id # @param invoice_id # @param [Hash] opts the optional parameters # @return [nil] def sync_invoice_to_erp(invoice_id, opts = {}) sync_invoice_to_erp_with_http_info(invoice_id, opts) nil end # Trigger ERP invoice sync task # Trigger ERP invoice sync task for the given invoice id # @param invoice_id # @param [Hash] opts the optional parameters # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers def sync_invoice_to_erp_with_http_info(invoice_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ERPApi.sync_invoice_to_erp ...' 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 ERPApi.sync_invoice_to_erp" end # resource path local_var_path = '/erp/syncInvoice/{invoiceId}'.sub('{' + 'invoiceId' + '}', invoice_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['ApiKeyAuth'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: ERPApi#sync_invoice_to_erp\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Trigger ERP void invoice sync task # Trigger ERP void invoice sync task for the given invoice number # @param invoice_number # @param [Hash] opts the optional parameters # @return [nil] def sync_void_invoice_to_erp(invoice_number, opts = {}) sync_void_invoice_to_erp_with_http_info(invoice_number, opts) nil end # Trigger ERP void invoice sync task # Trigger ERP void invoice sync task for the given invoice number # @param invoice_number # @param [Hash] opts the optional parameters # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers def sync_void_invoice_to_erp_with_http_info(invoice_number, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ERPApi.sync_void_invoice_to_erp ...' end # verify the required parameter 'invoice_number' is set if @api_client.config.client_side_validation && invoice_number.nil? fail ArgumentError, "Missing the required parameter 'invoice_number' when calling ERPApi.sync_void_invoice_to_erp" end # resource path local_var_path = '/erp/syncVoidInvoice/{invoiceNumber}'.sub('{' + 'invoiceNumber' + '}', invoice_number.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['ApiKeyAuth'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: ERPApi#sync_void_invoice_to_erp\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end end end