class Atrium::MerchantsApi
Attributes
Public Class Methods
# File lib/atrium-ruby/api/merchants_api.rb, line 15 def initialize(api_client = ApiClient.default) @api_client = api_client end
Public Instance Methods
List merchant locations Returns a list of all the merchant locations associated with a merchant, including physical location, latitude, longitude, etc. @param merchant_guid The unique identifier for a `merchant`. @param [Hash] opts the optional parameters @return [MerchantLocationsResponseBody]
# File lib/atrium-ruby/api/merchants_api.rb, line 23 def list_merchant_locations(merchant_guid, opts = {}) data, _status_code, _headers = list_merchant_locations_with_http_info(merchant_guid, opts) data end
List merchants Returns a list of merchnants. @param [Hash] opts the optional parameters @return [MerchantsResponseBody]
# File lib/atrium-ruby/api/merchants_api.rb, line 32 def list_merchants(opts = {}) data, _status_code, _headers = list_merchants_with_http_info(opts) data end
Read merchant Returns information about a particular merchant, such as a logo, name, and website. @param merchant_guid The unique identifier for a `merchant`. @param [Hash] opts the optional parameters @return [MerchantResponseBody]
# File lib/atrium-ruby/api/merchants_api.rb, line 42 def read_merchant(merchant_guid, opts = {}) data, _status_code, _headers = read_merchant_with_http_info(merchant_guid, opts) data end
Read merchant location Retuns a specific location associated with a merchant, including physical location, latitude, longitude, etc. @param merchant_guid The unique identifier for a `merchant`. @param merchant_location_guid The unique identifier for a `merchant_location`. @param [Hash] opts the optional parameters @return [MerchantLocationResponseBody]
# File lib/atrium-ruby/api/merchants_api.rb, line 53 def read_merchant_location(merchant_guid, merchant_location_guid, opts = {}) data, _status_code, _headers = read_merchant_location_with_http_info(merchant_guid, merchant_location_guid, opts) data end
Private Instance Methods
List merchant locations Returns a list of all the merchant locations associated with a merchant, including physical location, latitude, longitude, etc. @param merchant_guid The unique identifier for a `merchant`. @param [Hash] opts the optional parameters @return [Array<(MerchantLocationsResponseBody
, Fixnum, Hash)>] MerchantLocationsResponseBody
data, response status code and response headers
# File lib/atrium-ruby/api/merchants_api.rb, line 66 def list_merchant_locations_with_http_info(merchant_guid, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: MerchantsApi.list_merchant_locations ...' end # verify the required parameter 'merchant_guid' is set if @api_client.config.client_side_validation && merchant_guid.nil? fail ArgumentError, "Missing the required parameter 'merchant_guid' when calling MerchantsApi.list_merchant_locations" end # resource path local_var_path = '/merchants/{merchant_guid}/merchant_locations'.sub('{' + 'merchant_guid' + '}', merchant_guid.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/vnd.mx.atrium.v1+json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['apiKey', 'clientID'] 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 => 'MerchantLocationsResponseBody') if @api_client.config.debugging @api_client.config.logger.debug "API called: MerchantsApi#list_merchant_locations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
List merchants Returns a list of merchnants. @param [Hash] opts the optional parameters @return [Array<(MerchantsResponseBody
, Fixnum, Hash)>] MerchantsResponseBody
data, response status code and response headers
# File lib/atrium-ruby/api/merchants_api.rb, line 107 def list_merchants_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: MerchantsApi.list_merchants ...' end # resource path local_var_path = '/merchants' # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/vnd.mx.atrium.v1+json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['apiKey', 'clientID'] 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 => 'MerchantsResponseBody') if @api_client.config.debugging @api_client.config.logger.debug "API called: MerchantsApi#list_merchants\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Read merchant location Retuns a specific location associated with a merchant, including physical location, latitude, longitude, etc. @param merchant_guid The unique identifier for a `merchant`. @param merchant_location_guid The unique identifier for a `merchant_location`. @param [Hash] opts the optional parameters @return [Array<(MerchantLocationResponseBody
, Fixnum, Hash)>] MerchantLocationResponseBody
data, response status code and response headers
# File lib/atrium-ruby/api/merchants_api.rb, line 188 def read_merchant_location_with_http_info(merchant_guid, merchant_location_guid, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: MerchantsApi.read_merchant_location ...' end # verify the required parameter 'merchant_guid' is set if @api_client.config.client_side_validation && merchant_guid.nil? fail ArgumentError, "Missing the required parameter 'merchant_guid' when calling MerchantsApi.read_merchant_location" end # verify the required parameter 'merchant_location_guid' is set if @api_client.config.client_side_validation && merchant_location_guid.nil? fail ArgumentError, "Missing the required parameter 'merchant_location_guid' when calling MerchantsApi.read_merchant_location" end # resource path local_var_path = '/merchants/{merchant_guid}/merchant_locations/{merchant_location_guid}'.sub('{' + 'merchant_guid' + '}', merchant_guid.to_s).sub('{' + 'merchant_location_guid' + '}', merchant_location_guid.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/vnd.mx.atrium.v1+json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['apiKey', 'clientID'] 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 => 'MerchantLocationResponseBody') if @api_client.config.debugging @api_client.config.logger.debug "API called: MerchantsApi#read_merchant_location\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Read merchant Returns information about a particular merchant, such as a logo, name, and website. @param merchant_guid The unique identifier for a `merchant`. @param [Hash] opts the optional parameters @return [Array<(MerchantResponseBody
, Fixnum, Hash)>] MerchantResponseBody
data, response status code and response headers
# File lib/atrium-ruby/api/merchants_api.rb, line 145 def read_merchant_with_http_info(merchant_guid, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: MerchantsApi.read_merchant ...' end # verify the required parameter 'merchant_guid' is set if @api_client.config.client_side_validation && merchant_guid.nil? fail ArgumentError, "Missing the required parameter 'merchant_guid' when calling MerchantsApi.read_merchant" end # resource path local_var_path = '/merchants/{merchant_guid}'.sub('{' + 'merchant_guid' + '}', merchant_guid.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/vnd.mx.atrium.v1+json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['apiKey', 'clientID'] 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 => 'MerchantResponseBody') if @api_client.config.debugging @api_client.config.logger.debug "API called: MerchantsApi#read_merchant\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end