class Rates
Public Class Methods
new(api_key)
click to toggle source
Calls superclass method
Api::new
# File lib/rates.rb, line 4 def initialize(api_key) super(api_key) end
Public Instance Methods
get_rate(country_code: nil, country_name: nil, ip_address: nil, use_client_ip: nil)
click to toggle source
# File lib/rates.rb, line 8 def get_rate(country_code: nil, country_name: nil, ip_address: nil, use_client_ip: nil) self.api_get('rate', { 'country_code' => country_code, 'country_name' => country_name, 'ip_address' => ip_address, 'use_client_ip' => use_client_ip, }) end
get_rate_by_country_code(country_code)
click to toggle source
# File lib/rates.rb, line 25 def get_rate_by_country_code(country_code) self.api_get('rate/' + country_code) end
get_rates(limit: 100, page: 1, member_state: false)
click to toggle source
# File lib/rates.rb, line 17 def get_rates(limit: 100, page: 1, member_state: false) self.api_get('rates', { 'limit' => limit, 'page' => page, 'member_state' => member_state }) end