class Bfwd::CybersourcetokensApi
Attributes
Public Class Methods
# File lib/bf_ruby2/api/cybersourcetokens_api.rb, line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end
Public Instance Methods
Create a cybersource-token. {"nickname":"Create a cybersource-token","request":"createCybersourceTokenRequest.html","response":"createCybersourceTokenResponse.html"} @param cybersource_token The cybersource-token object to be created. @param [Hash] opts the optional parameters @return [CybersourceTokenPagedMetadata]
# File lib/bf_ruby2/api/cybersourcetokens_api.rb, line 28 def create_cybersource_token(cybersource_token, opts = {}) data, _status_code, _headers = create_cybersource_token_with_http_info(cybersource_token, opts) return data end
Create a cybersource-token. {"nickname":"Create a cybersource-token","request":"createCybersourceTokenRequest.html","response":"createCybersourceTokenResponse.html"} @param cybersource_token The cybersource-token object to be created. @param [Hash] opts the optional parameters @return [Array<(CybersourceTokenPagedMetadata
, Fixnum, Hash)>] CybersourceTokenPagedMetadata
data, response status code and response headers
# File lib/bf_ruby2/api/cybersourcetokens_api.rb, line 38 def create_cybersource_token_with_http_info(cybersource_token, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: CybersourcetokensApi.create_cybersource_token ..." end # verify the required parameter 'cybersource_token' is set if @api_client.config.client_side_validation && cybersource_token.nil? fail ArgumentError, "Missing the required parameter 'cybersource_token' when calling CybersourcetokensApi.create_cybersource_token" end # resource path local_var_path = "/cybersource-tokens" # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['text/xml', 'application/xml', '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(cybersource_token) auth_names = [] 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, :return_type => 'CybersourceTokenPagedMetadata') if @api_client.config.debugging @api_client.config.logger.debug "API called: CybersourcetokensApi#create_cybersource_token\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Returns a single cybersource-token, specified by the token-ID parameter. {"nickname":"NICKNAME","response":"getCybersourceTokenByID.html"} @param token_id The unique sting ID of the cybersource token. @param [Hash] opts the optional parameters @option opts [Array<String>] :organizations A list of organization-IDs used to restrict the scope of API calls. @return [CybersourceTokenPagedMetadata]
# File lib/bf_ruby2/api/cybersourcetokens_api.rb, line 84 def get_cybersource_token_by_id(token_id, opts = {}) data, _status_code, _headers = get_cybersource_token_by_id_with_http_info(token_id, opts) return data end
Returns a single cybersource-token, specified by the token-ID parameter. {"nickname":"NICKNAME","response":"getCybersourceTokenByID.html"} @param token_id The unique sting ID of the cybersource token. @param [Hash] opts the optional parameters @option opts [Array<String>] :organizations A list of organization-IDs used to restrict the scope of API calls. @return [Array<(CybersourceTokenPagedMetadata
, Fixnum, Hash)>] CybersourceTokenPagedMetadata
data, response status code and response headers
# File lib/bf_ruby2/api/cybersourcetokens_api.rb, line 95 def get_cybersource_token_by_id_with_http_info(token_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: CybersourcetokensApi.get_cybersource_token_by_id ..." end # verify the required parameter 'token_id' is set if @api_client.config.client_side_validation && token_id.nil? fail ArgumentError, "Missing the required parameter 'token_id' when calling CybersourcetokensApi.get_cybersource_token_by_id" end # resource path local_var_path = "/cybersource-tokens/{token-ID}".sub('{' + 'token-ID' + '}', token_id.to_s) # query parameters query_params = {} query_params[:'organizations'] = @api_client.build_collection_param(opts[:'organizations'], :multi) if !opts[:'organizations'].nil? # 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(['text/plain']) # 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 => 'CybersourceTokenPagedMetadata') if @api_client.config.debugging @api_client.config.logger.debug "API called: CybersourcetokensApi#get_cybersource_token_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Returns a single cybersource-token, specified by the recurring-subscription-ID parameter. {"nickname":"NICKNAME","response":"getCybersourceTokenByID.html"} @param recurring_subscription_id The recurring-subscription-info-subscription-ID of the cybersource token. @param [Hash] opts the optional parameters @option opts [Array<String>] :organizations A list of organization-IDs used to restrict the scope of API calls. @return [CybersourceTokenPagedMetadata]
# File lib/bf_ruby2/api/cybersourcetokens_api.rb, line 142 def get_cybersource_token_by_recurring_subscription_id(recurring_subscription_id, opts = {}) data, _status_code, _headers = get_cybersource_token_by_recurring_subscription_id_with_http_info(recurring_subscription_id, opts) return data end
Returns a single cybersource-token, specified by the recurring-subscription-ID parameter. {"nickname":"NICKNAME","response":"getCybersourceTokenByID.html"} @param recurring_subscription_id The recurring-subscription-info-subscription-ID of the cybersource token. @param [Hash] opts the optional parameters @option opts [Array<String>] :organizations A list of organization-IDs used to restrict the scope of API calls. @return [Array<(CybersourceTokenPagedMetadata
, Fixnum, Hash)>] CybersourceTokenPagedMetadata
data, response status code and response headers
# File lib/bf_ruby2/api/cybersourcetokens_api.rb, line 153 def get_cybersource_token_by_recurring_subscription_id_with_http_info(recurring_subscription_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: CybersourcetokensApi.get_cybersource_token_by_recurring_subscription_id ..." end # verify the required parameter 'recurring_subscription_id' is set if @api_client.config.client_side_validation && recurring_subscription_id.nil? fail ArgumentError, "Missing the required parameter 'recurring_subscription_id' when calling CybersourcetokensApi.get_cybersource_token_by_recurring_subscription_id" end # resource path local_var_path = "/cybersource-tokens/recurring-subscription-info/{recurring-subscription-ID}".sub('{' + 'recurring-subscription-ID' + '}', recurring_subscription_id.to_s) # query parameters query_params = {} query_params[:'organizations'] = @api_client.build_collection_param(opts[:'organizations'], :multi) if !opts[:'organizations'].nil? # 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(['text/plain']) # 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 => 'CybersourceTokenPagedMetadata') if @api_client.config.debugging @api_client.config.logger.debug "API called: CybersourcetokensApi#get_cybersource_token_by_recurring_subscription_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retires the cybersource token specified by the token-ID parameter. {"nickname":"NICKNAME","response":"deleteCybersourceToken.html"} @param token_id ID of the cybersource-token. @param organizations A list of organization-IDs used to restrict the scope of API calls. @param [Hash] opts the optional parameters @return [CybersourceTokenPagedMetadata]
# File lib/bf_ruby2/api/cybersourcetokens_api.rb, line 200 def retire_cybersource_token(token_id, organizations, opts = {}) data, _status_code, _headers = retire_cybersource_token_with_http_info(token_id, organizations, opts) return data end
Retires the cybersource token specified by the token-ID parameter. {"nickname":"NICKNAME","response":"deleteCybersourceToken.html"} @param token_id ID of the cybersource-token. @param organizations A list of organization-IDs used to restrict the scope of API calls. @param [Hash] opts the optional parameters @return [Array<(CybersourceTokenPagedMetadata
, Fixnum, Hash)>] CybersourceTokenPagedMetadata
data, response status code and response headers
# File lib/bf_ruby2/api/cybersourcetokens_api.rb, line 211 def retire_cybersource_token_with_http_info(token_id, organizations, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: CybersourcetokensApi.retire_cybersource_token ..." end # verify the required parameter 'token_id' is set if @api_client.config.client_side_validation && token_id.nil? fail ArgumentError, "Missing the required parameter 'token_id' when calling CybersourcetokensApi.retire_cybersource_token" end # verify the required parameter 'organizations' is set if @api_client.config.client_side_validation && organizations.nil? fail ArgumentError, "Missing the required parameter 'organizations' when calling CybersourcetokensApi.retire_cybersource_token" end # resource path local_var_path = "/cybersource-tokens/{token-ID}".sub('{' + 'token-ID' + '}', token_id.to_s) # query parameters query_params = {} query_params[:'organizations'] = @api_client.build_collection_param(organizations, :multi) # 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(['text/plain']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = [] data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'CybersourceTokenPagedMetadata') if @api_client.config.debugging @api_client.config.logger.debug "API called: CybersourcetokensApi#retire_cybersource_token\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Update a cybersource-token. {"nickname":"Update a cybersource-token","request":"updateCybersourceTokenRequest.html","response":"updateCybersourceTokenResponse.html"} @param cybersource_token The cybersource-token object to be updated. @param [Hash] opts the optional parameters @return [CybersourceTokenPagedMetadata]
# File lib/bf_ruby2/api/cybersourcetokens_api.rb, line 261 def update_cybersource_token(cybersource_token, opts = {}) data, _status_code, _headers = update_cybersource_token_with_http_info(cybersource_token, opts) return data end
Update a cybersource-token. {"nickname":"Update a cybersource-token","request":"updateCybersourceTokenRequest.html","response":"updateCybersourceTokenResponse.html"} @param cybersource_token The cybersource-token object to be updated. @param [Hash] opts the optional parameters @return [Array<(CybersourceTokenPagedMetadata
, Fixnum, Hash)>] CybersourceTokenPagedMetadata
data, response status code and response headers
# File lib/bf_ruby2/api/cybersourcetokens_api.rb, line 271 def update_cybersource_token_with_http_info(cybersource_token, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: CybersourcetokensApi.update_cybersource_token ..." end # verify the required parameter 'cybersource_token' is set if @api_client.config.client_side_validation && cybersource_token.nil? fail ArgumentError, "Missing the required parameter 'cybersource_token' when calling CybersourcetokensApi.update_cybersource_token" end # resource path local_var_path = "/cybersource-tokens" # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['text/xml', 'application/xml', '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(cybersource_token) 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 => 'CybersourceTokenPagedMetadata') if @api_client.config.debugging @api_client.config.logger.debug "API called: CybersourcetokensApi#update_cybersource_token\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end