class CyberSource::InvoiceSettingsApi
Attributes
Public Class Methods
# File lib/cybersource_rest_client/api/invoice_settings_api.rb, line 19 def initialize(api_client = ApiClient.default, config) @api_client = api_client @api_client.set_configuration(config) end
Public Instance Methods
Get Invoice Settings Get the invoice settings for the invoice payment page. @param [Hash] opts the optional parameters @return [InvoicingV2InvoiceSettingsGet200Response]
# File lib/cybersource_rest_client/api/invoice_settings_api.rb, line 27 def get_invoice_settings(opts = {}) data, status_code, headers = get_invoice_settings_with_http_info(opts) return data, status_code, headers end
Get Invoice Settings Get the invoice settings for the invoice payment page. @param [Hash] opts the optional parameters @return [Array<(InvoicingV2InvoiceSettingsGet200Response
, Fixnum, Hash)>] InvoicingV2InvoiceSettingsGet200Response
data, response status code and response headers
# File lib/cybersource_rest_client/api/invoice_settings_api.rb, line 36 def get_invoice_settings_with_http_info(opts = {}) if @api_client.config.debugging begin raise @api_client.config.logger.debug 'Calling API: InvoiceSettingsApi.get_invoice_settings ...' rescue puts 'Cannot write to log' end end # resource path local_var_path = 'invoicing/v2/invoiceSettings' # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json;charset=utf-8']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json;charset=utf-8']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = [] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'InvoicingV2InvoiceSettingsGet200Response') if @api_client.config.debugging begin raise @api_client.config.logger.debug "API called: InvoiceSettingsApi#get_invoice_settings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" rescue puts 'Cannot write to log' end end return data, status_code, headers end
Update Invoice Settings Update invoice settings for the invoice payment page. @param invoice_settings_request @param [Hash] opts the optional parameters @return [InvoicingV2InvoiceSettingsGet200Response]
# File lib/cybersource_rest_client/api/invoice_settings_api.rb, line 87 def update_invoice_settings(invoice_settings_request, opts = {}) data, status_code, headers = update_invoice_settings_with_http_info(invoice_settings_request, opts) return data, status_code, headers end
Update Invoice Settings Update invoice settings for the invoice payment page. @param invoice_settings_request @param [Hash] opts the optional parameters @return [Array<(InvoicingV2InvoiceSettingsGet200Response
, Fixnum, Hash)>] InvoicingV2InvoiceSettingsGet200Response
data, response status code and response headers
# File lib/cybersource_rest_client/api/invoice_settings_api.rb, line 97 def update_invoice_settings_with_http_info(invoice_settings_request, opts = {}) if @api_client.config.debugging begin raise @api_client.config.logger.debug 'Calling API: InvoiceSettingsApi.update_invoice_settings ...' rescue puts 'Cannot write to log' end end # verify the required parameter 'invoice_settings_request' is set if @api_client.config.client_side_validation && invoice_settings_request.nil? fail ArgumentError, "Missing the required parameter 'invoice_settings_request' when calling InvoiceSettingsApi.update_invoice_settings" end # resource path local_var_path = 'invoicing/v2/invoiceSettings' # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json;charset=utf-8']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json;charset=utf-8']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(invoice_settings_request) auth_names = [] data, status_code, headers = @api_client.call_api(:PUT, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'InvoicingV2InvoiceSettingsGet200Response') if @api_client.config.debugging begin raise @api_client.config.logger.debug "API called: InvoiceSettingsApi#update_invoice_settings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" rescue puts 'Cannot write to log' end end return data, status_code, headers end