class Hubspot::Crm::Extensions::Accounting::CallbacksApi
Attributes
Public Class Methods
# File lib/hubspot/codegen/crm/extensions/accounting/api/callbacks_api.rb, line 22 def initialize(api_client = ApiClient.default) @api_client = api_client end
Public Instance Methods
Endpoint for customer creation response Call this endpoint with the response to a customer creation request. @param request_id [String] The ID of the request that this response is for @param result_id_accounting_response [ResultIdAccountingResponse] The ID of the created customer. @param [Hash] opts the optional parameters @return [nil]
# File lib/hubspot/codegen/crm/extensions/accounting/api/callbacks_api.rb, line 31 def create_customer(request_id, result_id_accounting_response, opts = {}) create_customer_with_http_info(request_id, result_id_accounting_response, opts) nil end
Endpoint for customer creation response Call this endpoint with the response to a customer creation request. @param request_id [String] The ID of the request that this response is for @param result_id_accounting_response [ResultIdAccountingResponse] The ID of the created customer. @param [Hash] opts the optional parameters @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
# File lib/hubspot/codegen/crm/extensions/accounting/api/callbacks_api.rb, line 42 def create_customer_with_http_info(request_id, result_id_accounting_response, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: CallbacksApi.create_customer ...' end # verify the required parameter 'request_id' is set if @api_client.config.client_side_validation && request_id.nil? fail ArgumentError, "Missing the required parameter 'request_id' when calling CallbacksApi.create_customer" end # verify the required parameter 'result_id_accounting_response' is set if @api_client.config.client_side_validation && result_id_accounting_response.nil? fail ArgumentError, "Missing the required parameter 'result_id_accounting_response' when calling CallbacksApi.create_customer" end # resource path local_var_path = '/crm/v3/extensions/accounting/callback/customer-create/{requestId}'.sub('{' + 'requestId' + '}', CGI.escape(request_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['*/*']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(result_id_accounting_response) # return_type return_type = opts[:return_type] # auth_names auth_names = opts[:auth_names] || ['hapikey', '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, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: CallbacksApi#create_customer\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Endpoint for exchange rate response Call this endpoint with the response to an exchange rate request. @param request_id [String] The ID of the request that this response is for @param exchange_rate_response [ExchangeRateResponse] The result of the exchange rate request. @param [Hash] opts the optional parameters @return [nil]
# File lib/hubspot/codegen/crm/extensions/accounting/api/callbacks_api.rb, line 101 def create_exchange_rate(request_id, exchange_rate_response, opts = {}) create_exchange_rate_with_http_info(request_id, exchange_rate_response, opts) nil end
Endpoint for exchange rate response Call this endpoint with the response to an exchange rate request. @param request_id [String] The ID of the request that this response is for @param exchange_rate_response [ExchangeRateResponse] The result of the exchange rate request. @param [Hash] opts the optional parameters @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
# File lib/hubspot/codegen/crm/extensions/accounting/api/callbacks_api.rb, line 112 def create_exchange_rate_with_http_info(request_id, exchange_rate_response, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: CallbacksApi.create_exchange_rate ...' end # verify the required parameter 'request_id' is set if @api_client.config.client_side_validation && request_id.nil? fail ArgumentError, "Missing the required parameter 'request_id' when calling CallbacksApi.create_exchange_rate" end # verify the required parameter 'exchange_rate_response' is set if @api_client.config.client_side_validation && exchange_rate_response.nil? fail ArgumentError, "Missing the required parameter 'exchange_rate_response' when calling CallbacksApi.create_exchange_rate" end # resource path local_var_path = '/crm/v3/extensions/accounting/callback/exchange-rate/{requestId}'.sub('{' + 'requestId' + '}', CGI.escape(request_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['*/*']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(exchange_rate_response) # return_type return_type = opts[:return_type] # auth_names auth_names = opts[:auth_names] || ['hapikey', '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, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: CallbacksApi#create_exchange_rate\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Endpoint for invoice creation response Call this endpoint with the response to a invoice creation request. @param request_id [String] The ID of the request that this response is for @param result_id_accounting_response [ResultIdAccountingResponse] The ID of the created invoice. @param [Hash] opts the optional parameters @return [nil]
# File lib/hubspot/codegen/crm/extensions/accounting/api/callbacks_api.rb, line 171 def create_invoice(request_id, result_id_accounting_response, opts = {}) create_invoice_with_http_info(request_id, result_id_accounting_response, opts) nil end
Endpoint for invoice creation response Call this endpoint with the response to a invoice creation request. @param request_id [String] The ID of the request that this response is for @param result_id_accounting_response [ResultIdAccountingResponse] The ID of the created invoice. @param [Hash] opts the optional parameters @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
# File lib/hubspot/codegen/crm/extensions/accounting/api/callbacks_api.rb, line 182 def create_invoice_with_http_info(request_id, result_id_accounting_response, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: CallbacksApi.create_invoice ...' end # verify the required parameter 'request_id' is set if @api_client.config.client_side_validation && request_id.nil? fail ArgumentError, "Missing the required parameter 'request_id' when calling CallbacksApi.create_invoice" end # verify the required parameter 'result_id_accounting_response' is set if @api_client.config.client_side_validation && result_id_accounting_response.nil? fail ArgumentError, "Missing the required parameter 'result_id_accounting_response' when calling CallbacksApi.create_invoice" end # resource path local_var_path = '/crm/v3/extensions/accounting/callback/invoice-create/{requestId}'.sub('{' + 'requestId' + '}', CGI.escape(request_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['*/*']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(result_id_accounting_response) # return_type return_type = opts[:return_type] # auth_names auth_names = opts[:auth_names] || ['hapikey', '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, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: CallbacksApi#create_invoice\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Endpoint for terms search response Call this endpoint with the response to a terms search request. @param request_id [String] The ID of the request that this response is for @param terms_response [TermsResponse] The result of the terms search @param [Hash] opts the optional parameters @return [nil]
# File lib/hubspot/codegen/crm/extensions/accounting/api/callbacks_api.rb, line 241 def create_term(request_id, terms_response, opts = {}) create_term_with_http_info(request_id, terms_response, opts) nil end
Endpoint for terms search response Call this endpoint with the response to a terms search request. @param request_id [String] The ID of the request that this response is for @param terms_response [TermsResponse] The result of the terms search @param [Hash] opts the optional parameters @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
# File lib/hubspot/codegen/crm/extensions/accounting/api/callbacks_api.rb, line 252 def create_term_with_http_info(request_id, terms_response, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: CallbacksApi.create_term ...' end # verify the required parameter 'request_id' is set if @api_client.config.client_side_validation && request_id.nil? fail ArgumentError, "Missing the required parameter 'request_id' when calling CallbacksApi.create_term" end # verify the required parameter 'terms_response' is set if @api_client.config.client_side_validation && terms_response.nil? fail ArgumentError, "Missing the required parameter 'terms_response' when calling CallbacksApi.create_term" end # resource path local_var_path = '/crm/v3/extensions/accounting/callback/terms/{requestId}'.sub('{' + 'requestId' + '}', CGI.escape(request_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['*/*']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(terms_response) # return_type return_type = opts[:return_type] # auth_names auth_names = opts[:auth_names] || ['hapikey', '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, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: CallbacksApi#create_term\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Endpoint for customer search response Call this endpoint with the response to a customer search request. @param request_id [String] The ID of the request that this response is for @param customer_search_response_external [CustomerSearchResponseExternal] The result of the customer search request. @param [Hash] opts the optional parameters @return [nil]
# File lib/hubspot/codegen/crm/extensions/accounting/api/callbacks_api.rb, line 311 def do_customer_search(request_id, customer_search_response_external, opts = {}) do_customer_search_with_http_info(request_id, customer_search_response_external, opts) nil end
Endpoint for customer search response Call this endpoint with the response to a customer search request. @param request_id [String] The ID of the request that this response is for @param customer_search_response_external [CustomerSearchResponseExternal] The result of the customer search request. @param [Hash] opts the optional parameters @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
# File lib/hubspot/codegen/crm/extensions/accounting/api/callbacks_api.rb, line 322 def do_customer_search_with_http_info(request_id, customer_search_response_external, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: CallbacksApi.do_customer_search ...' end # verify the required parameter 'request_id' is set if @api_client.config.client_side_validation && request_id.nil? fail ArgumentError, "Missing the required parameter 'request_id' when calling CallbacksApi.do_customer_search" end # verify the required parameter 'customer_search_response_external' is set if @api_client.config.client_side_validation && customer_search_response_external.nil? fail ArgumentError, "Missing the required parameter 'customer_search_response_external' when calling CallbacksApi.do_customer_search" end # resource path local_var_path = '/crm/v3/extensions/accounting/callback/customer-search/{requestId}'.sub('{' + 'requestId' + '}', CGI.escape(request_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['*/*']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(customer_search_response_external) # return_type return_type = opts[:return_type] # auth_names auth_names = opts[:auth_names] || ['hapikey', '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, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: CallbacksApi#do_customer_search\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Endpoint for invoice search response Call this endpoint with the response to a invoice search request. @param request_id [String] The ID of the request that this response is for @param invoice_search_response [InvoiceSearchResponse] The result of the invoice search request. @param [Hash] opts the optional parameters @return [nil]
# File lib/hubspot/codegen/crm/extensions/accounting/api/callbacks_api.rb, line 381 def do_invoice_search(request_id, invoice_search_response, opts = {}) do_invoice_search_with_http_info(request_id, invoice_search_response, opts) nil end
Endpoint for invoice search response Call this endpoint with the response to a invoice search request. @param request_id [String] The ID of the request that this response is for @param invoice_search_response [InvoiceSearchResponse] The result of the invoice search request. @param [Hash] opts the optional parameters @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
# File lib/hubspot/codegen/crm/extensions/accounting/api/callbacks_api.rb, line 392 def do_invoice_search_with_http_info(request_id, invoice_search_response, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: CallbacksApi.do_invoice_search ...' end # verify the required parameter 'request_id' is set if @api_client.config.client_side_validation && request_id.nil? fail ArgumentError, "Missing the required parameter 'request_id' when calling CallbacksApi.do_invoice_search" end # verify the required parameter 'invoice_search_response' is set if @api_client.config.client_side_validation && invoice_search_response.nil? fail ArgumentError, "Missing the required parameter 'invoice_search_response' when calling CallbacksApi.do_invoice_search" end # resource path local_var_path = '/crm/v3/extensions/accounting/callback/invoice-search/{requestId}'.sub('{' + 'requestId' + '}', CGI.escape(request_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['*/*']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(invoice_search_response) # return_type return_type = opts[:return_type] # auth_names auth_names = opts[:auth_names] || ['hapikey', '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, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: CallbacksApi#do_invoice_search\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Endpoint for product search response Call this endpoint with the response to a product search request. @param request_id [String] The ID of the request that this response is for @param product_search_response [ProductSearchResponse] The result of the product search request. @param [Hash] opts the optional parameters @return [nil]
# File lib/hubspot/codegen/crm/extensions/accounting/api/callbacks_api.rb, line 451 def do_product_search(request_id, product_search_response, opts = {}) do_product_search_with_http_info(request_id, product_search_response, opts) nil end
Endpoint for product search response Call this endpoint with the response to a product search request. @param request_id [String] The ID of the request that this response is for @param product_search_response [ProductSearchResponse] The result of the product search request. @param [Hash] opts the optional parameters @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
# File lib/hubspot/codegen/crm/extensions/accounting/api/callbacks_api.rb, line 462 def do_product_search_with_http_info(request_id, product_search_response, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: CallbacksApi.do_product_search ...' end # verify the required parameter 'request_id' is set if @api_client.config.client_side_validation && request_id.nil? fail ArgumentError, "Missing the required parameter 'request_id' when calling CallbacksApi.do_product_search" end # verify the required parameter 'product_search_response' is set if @api_client.config.client_side_validation && product_search_response.nil? fail ArgumentError, "Missing the required parameter 'product_search_response' when calling CallbacksApi.do_product_search" end # resource path local_var_path = '/crm/v3/extensions/accounting/callback/product-search/{requestId}'.sub('{' + 'requestId' + '}', CGI.escape(request_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['*/*']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(product_search_response) # return_type return_type = opts[:return_type] # auth_names auth_names = opts[:auth_names] || ['hapikey', '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, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: CallbacksApi#do_product_search\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Endpoint for taxes search response Call this endpoint with the response to a taxes search request. @param request_id [String] The ID of the request that this response is for @param tax_search_response [TaxSearchResponse] The result of the taxes search request. @param [Hash] opts the optional parameters @return [nil]
# File lib/hubspot/codegen/crm/extensions/accounting/api/callbacks_api.rb, line 521 def do_tax_search(request_id, tax_search_response, opts = {}) do_tax_search_with_http_info(request_id, tax_search_response, opts) nil end
Endpoint for taxes search response Call this endpoint with the response to a taxes search request. @param request_id [String] The ID of the request that this response is for @param tax_search_response [TaxSearchResponse] The result of the taxes search request. @param [Hash] opts the optional parameters @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
# File lib/hubspot/codegen/crm/extensions/accounting/api/callbacks_api.rb, line 532 def do_tax_search_with_http_info(request_id, tax_search_response, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: CallbacksApi.do_tax_search ...' end # verify the required parameter 'request_id' is set if @api_client.config.client_side_validation && request_id.nil? fail ArgumentError, "Missing the required parameter 'request_id' when calling CallbacksApi.do_tax_search" end # verify the required parameter 'tax_search_response' is set if @api_client.config.client_side_validation && tax_search_response.nil? fail ArgumentError, "Missing the required parameter 'tax_search_response' when calling CallbacksApi.do_tax_search" end # resource path local_var_path = '/crm/v3/extensions/accounting/callback/tax-search/{requestId}'.sub('{' + 'requestId' + '}', CGI.escape(request_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['*/*']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(tax_search_response) # return_type return_type = opts[:return_type] # auth_names auth_names = opts[:auth_names] || ['hapikey', '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, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: CallbacksApi#do_tax_search\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Endpoint for invoice get-by-id response Call this endpoint with the response to a invoice get-by-id request. @param request_id [String] The ID of the request that this response is for @param invoices_response_external [InvoicesResponseExternal] The result of the invoice request. @param [Hash] opts the optional parameters @return [nil]
# File lib/hubspot/codegen/crm/extensions/accounting/api/callbacks_api.rb, line 591 def get_by_id(request_id, invoices_response_external, opts = {}) get_by_id_with_http_info(request_id, invoices_response_external, opts) nil end
Endpoint for invoice get-by-id response Call this endpoint with the response to a invoice get-by-id request. @param request_id [String] The ID of the request that this response is for @param invoices_response_external [InvoicesResponseExternal] The result of the invoice request. @param [Hash] opts the optional parameters @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
# File lib/hubspot/codegen/crm/extensions/accounting/api/callbacks_api.rb, line 602 def get_by_id_with_http_info(request_id, invoices_response_external, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: CallbacksApi.get_by_id ...' end # verify the required parameter 'request_id' is set if @api_client.config.client_side_validation && request_id.nil? fail ArgumentError, "Missing the required parameter 'request_id' when calling CallbacksApi.get_by_id" end # verify the required parameter 'invoices_response_external' is set if @api_client.config.client_side_validation && invoices_response_external.nil? fail ArgumentError, "Missing the required parameter 'invoices_response_external' when calling CallbacksApi.get_by_id" end # resource path local_var_path = '/crm/v3/extensions/accounting/callback/invoices/{requestId}'.sub('{' + 'requestId' + '}', CGI.escape(request_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['*/*']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(invoices_response_external) # return_type return_type = opts[:return_type] # auth_names auth_names = opts[:auth_names] || ['hapikey', '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, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: CallbacksApi#get_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Endpoint for PDF content of invoice Call this endpoint with the PDF content of a requested invoice. @param request_id [String] The ID of the request that this response is for @param invoice_pdf_response [InvoicePdfResponse] The bytes of the invoice PDF. @param [Hash] opts the optional parameters @return [nil]
# File lib/hubspot/codegen/crm/extensions/accounting/api/callbacks_api.rb, line 661 def invoice_pdf(request_id, invoice_pdf_response, opts = {}) invoice_pdf_with_http_info(request_id, invoice_pdf_response, opts) nil end
Endpoint for PDF content of invoice Call this endpoint with the PDF content of a requested invoice. @param request_id [String] The ID of the request that this response is for @param invoice_pdf_response [InvoicePdfResponse] The bytes of the invoice PDF. @param [Hash] opts the optional parameters @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
# File lib/hubspot/codegen/crm/extensions/accounting/api/callbacks_api.rb, line 672 def invoice_pdf_with_http_info(request_id, invoice_pdf_response, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: CallbacksApi.invoice_pdf ...' end # verify the required parameter 'request_id' is set if @api_client.config.client_side_validation && request_id.nil? fail ArgumentError, "Missing the required parameter 'request_id' when calling CallbacksApi.invoice_pdf" end # verify the required parameter 'invoice_pdf_response' is set if @api_client.config.client_side_validation && invoice_pdf_response.nil? fail ArgumentError, "Missing the required parameter 'invoice_pdf_response' when calling CallbacksApi.invoice_pdf" end # resource path local_var_path = '/crm/v3/extensions/accounting/callback/invoice-pdf/{requestId}'.sub('{' + 'requestId' + '}', CGI.escape(request_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['*/*']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(invoice_pdf_response) # return_type return_type = opts[:return_type] # auth_names auth_names = opts[:auth_names] || ['hapikey', '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, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: CallbacksApi#invoice_pdf\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end