class VeloPayments::CountriesApi
Attributes
Public Class Methods
# File lib/velopayments/api/countries_api.rb, line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end
Public Instance Methods
List Supported Countries List the supported countries. @param [Hash] opts the optional parameters @return [SupportedCountriesResponse2]
# File lib/velopayments/api/countries_api.rb, line 26 def list_supported_countries(opts = {}) data, _status_code, _headers = list_supported_countries_with_http_info(opts) data end
List Supported Countries <p>List the supported countries.</p> <p>This version will be retired in March 2020. Use /v2/supportedCountries</p> @param [Hash] opts the optional parameters @return [SupportedCountriesResponse]
# File lib/velopayments/api/countries_api.rb, line 82 def list_supported_countries_v1(opts = {}) data, _status_code, _headers = list_supported_countries_v1_with_http_info(opts) data end
List Supported Countries <p>List the supported countries.</p> <p>This version will be retired in March 2020. Use /v2/supportedCountries</p> @param [Hash] opts the optional parameters @return [Array<(SupportedCountriesResponse
, Integer, Hash)>] SupportedCountriesResponse
data, response status code and response headers
# File lib/velopayments/api/countries_api.rb, line 91 def list_supported_countries_v1_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: CountriesApi.list_supported_countries_v1 ...' end # resource path local_var_path = '/v1/supportedCountries' # 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(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'SupportedCountriesResponse' # auth_names auth_names = opts[:auth_names] || [] 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(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: CountriesApi#list_supported_countries_v1\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
List Supported Countries List the supported countries. @param [Hash] opts the optional parameters @return [Array<(SupportedCountriesResponse2
, Integer, Hash)>] SupportedCountriesResponse2
data, response status code and response headers
# File lib/velopayments/api/countries_api.rb, line 35 def list_supported_countries_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: CountriesApi.list_supported_countries ...' end # resource path local_var_path = '/v2/supportedCountries' # 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(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'SupportedCountriesResponse2' # auth_names auth_names = opts[:auth_names] || [] 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(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: CountriesApi#list_supported_countries\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
List Payment Channel Country Rules List the country specific payment channel rules. @param [Hash] opts the optional parameters @return [PaymentChannelRulesResponse]
# File lib/velopayments/api/countries_api.rb, line 138 def v1_payment_channel_rules_get(opts = {}) data, _status_code, _headers = v1_payment_channel_rules_get_with_http_info(opts) data end
List Payment Channel Country Rules List the country specific payment channel rules. @param [Hash] opts the optional parameters @return [Array<(PaymentChannelRulesResponse
, Integer, Hash)>] PaymentChannelRulesResponse
data, response status code and response headers
# File lib/velopayments/api/countries_api.rb, line 147 def v1_payment_channel_rules_get_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: CountriesApi.v1_payment_channel_rules_get ...' end # resource path local_var_path = '/v1/paymentChannelRules' # 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(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'PaymentChannelRulesResponse' # auth_names auth_names = opts[:auth_names] || ['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(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: CountriesApi#v1_payment_channel_rules_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end