Class: Devdraft::ExchangeRatesApi
- Inherits:
-
Object
- Object
- Devdraft::ExchangeRatesApi
- Defined in:
- lib/devdraft/api/exchange_rates_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#exchange_rate_controller_get_eurto_usd_rate(opts = {}) ⇒ ExchangeRateResponseDto
Get EUR to USD exchange rate Retrieves the current exchange rate for converting EUR to USD (EURC to USDC).
-
#exchange_rate_controller_get_eurto_usd_rate_with_http_info(opts = {}) ⇒ Array<(ExchangeRateResponseDto, Integer, Hash)>
Get EUR to USD exchange rate Retrieves the current exchange rate for converting EUR to USD (EURC to USDC).
-
#exchange_rate_controller_get_exchange_rate(from, to, opts = {}) ⇒ ExchangeRateResponseDto
Get exchange rate between specified currencies Retrieves the current exchange rate between two specified currencies.
-
#exchange_rate_controller_get_exchange_rate_with_http_info(from, to, opts = {}) ⇒ Array<(ExchangeRateResponseDto, Integer, Hash)>
Get exchange rate between specified currencies Retrieves the current exchange rate between two specified currencies.
-
#exchange_rate_controller_get_usdto_eur_rate(opts = {}) ⇒ ExchangeRateResponseDto
Get USD to EUR exchange rate Retrieves the current exchange rate for converting USD to EUR (USDC to EURC).
-
#exchange_rate_controller_get_usdto_eur_rate_with_http_info(opts = {}) ⇒ Array<(ExchangeRateResponseDto, Integer, Hash)>
Get USD to EUR exchange rate Retrieves the current exchange rate for converting USD to EUR (USDC to EURC).
-
#initialize(api_client = ApiClient.default) ⇒ ExchangeRatesApi
constructor
A new instance of ExchangeRatesApi.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ ExchangeRatesApi
Returns a new instance of ExchangeRatesApi.
19 20 21 |
# File 'lib/devdraft/api/exchange_rates_api.rb', line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/devdraft/api/exchange_rates_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#exchange_rate_controller_get_eurto_usd_rate(opts = {}) ⇒ ExchangeRateResponseDto
Get EUR to USD exchange rate Retrieves the current exchange rate for converting EUR to USD (EURC to USDC). This endpoint provides real-time exchange rate information for stablecoin conversions: - Mid-market rate for reference pricing - Buy rate for actual conversion calculations - Sell rate for reverse conversion scenarios ## Use Cases - Display current exchange rates in dashboards - Calculate conversion amounts for EURC to USDC transfers - Financial reporting and analytics - Real-time pricing for multi-currency operations ## Rate Information - **Mid-market rate**: The theoretical middle rate between buy and sell - **Buy rate**: Rate used when converting FROM EUR TO USD (what you get) - **Sell rate**: Rate used when converting FROM USD TO EUR (what you pay) The rates are updated in real-time and reflect current market conditions.
26 27 28 29 |
# File 'lib/devdraft/api/exchange_rates_api.rb', line 26 def exchange_rate_controller_get_eurto_usd_rate(opts = {}) data, _status_code, _headers = exchange_rate_controller_get_eurto_usd_rate_with_http_info(opts) data end |
#exchange_rate_controller_get_eurto_usd_rate_with_http_info(opts = {}) ⇒ Array<(ExchangeRateResponseDto, Integer, Hash)>
Get EUR to USD exchange rate Retrieves the current exchange rate for converting EUR to USD (EURC to USDC). This endpoint provides real-time exchange rate information for stablecoin conversions: - Mid-market rate for reference pricing - Buy rate for actual conversion calculations - Sell rate for reverse conversion scenarios ## Use Cases - Display current exchange rates in dashboards - Calculate conversion amounts for EURC to USDC transfers - Financial reporting and analytics - Real-time pricing for multi-currency operations ## Rate Information - **Mid-market rate**: The theoretical middle rate between buy and sell - **Buy rate**: Rate used when converting FROM EUR TO USD (what you get) - **Sell rate**: Rate used when converting FROM USD TO EUR (what you pay) The rates are updated in real-time and reflect current market conditions.
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 |
# File 'lib/devdraft/api/exchange_rates_api.rb', line 35 def exchange_rate_controller_get_eurto_usd_rate_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ExchangeRatesApi.exchange_rate_controller_get_eurto_usd_rate ...' end # resource path local_var_path = '/api/v0/exchange-rate/eur-to-usd' # 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']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ExchangeRateResponseDto' # auth_names auth_names = opts[:debug_auth_names] || ['x-client-secret', 'x-client-key'] = opts.merge( :operation => :"ExchangeRatesApi.exchange_rate_controller_get_eurto_usd_rate", :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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ExchangeRatesApi#exchange_rate_controller_get_eurto_usd_rate\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#exchange_rate_controller_get_exchange_rate(from, to, opts = {}) ⇒ ExchangeRateResponseDto
Get exchange rate between specified currencies Retrieves the current exchange rate between two specified currencies. This flexible endpoint allows you to get exchange rates for any supported currency pair: - Supports USD and EUR currency codes - Provides comprehensive rate information - Real-time market data ## Supported Currency Pairs - USD to EUR (USDC to EURC) - EUR to USD (EURC to USDC) ## Query Parameters - from: Source currency code (usd, eur) - to: Target currency code (usd, eur) ## Use Cases - Flexible exchange rate queries - Multi-currency application support - Dynamic currency conversion calculations - Financial analytics and reporting ## Rate Information All rates are provided with full market context including mid-market, buy, and sell rates.
85 86 87 88 |
# File 'lib/devdraft/api/exchange_rates_api.rb', line 85 def exchange_rate_controller_get_exchange_rate(from, to, opts = {}) data, _status_code, _headers = exchange_rate_controller_get_exchange_rate_with_http_info(from, to, opts) data end |
#exchange_rate_controller_get_exchange_rate_with_http_info(from, to, opts = {}) ⇒ Array<(ExchangeRateResponseDto, Integer, Hash)>
Get exchange rate between specified currencies Retrieves the current exchange rate between two specified currencies. This flexible endpoint allows you to get exchange rates for any supported currency pair: - Supports USD and EUR currency codes - Provides comprehensive rate information - Real-time market data ## Supported Currency Pairs - USD to EUR (USDC to EURC) - EUR to USD (EURC to USDC) ## Query Parameters - from: Source currency code (usd, eur) - to: Target currency code (usd, eur) ## Use Cases - Flexible exchange rate queries - Multi-currency application support - Dynamic currency conversion calculations - Financial analytics and reporting ## Rate Information All rates are provided with full market context including mid-market, buy, and sell rates.
96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 |
# File 'lib/devdraft/api/exchange_rates_api.rb', line 96 def exchange_rate_controller_get_exchange_rate_with_http_info(from, to, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ExchangeRatesApi.exchange_rate_controller_get_exchange_rate ...' end # verify the required parameter 'from' is set if @api_client.config.client_side_validation && from.nil? fail ArgumentError, "Missing the required parameter 'from' when calling ExchangeRatesApi.exchange_rate_controller_get_exchange_rate" end # verify the required parameter 'to' is set if @api_client.config.client_side_validation && to.nil? fail ArgumentError, "Missing the required parameter 'to' when calling ExchangeRatesApi.exchange_rate_controller_get_exchange_rate" end # resource path local_var_path = '/api/v0/exchange-rate' # query parameters query_params = opts[:query_params] || {} query_params[:'from'] = from query_params[:'to'] = to # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ExchangeRateResponseDto' # auth_names auth_names = opts[:debug_auth_names] || ['x-client-secret', 'x-client-key'] = opts.merge( :operation => :"ExchangeRatesApi.exchange_rate_controller_get_exchange_rate", :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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ExchangeRatesApi#exchange_rate_controller_get_exchange_rate\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#exchange_rate_controller_get_usdto_eur_rate(opts = {}) ⇒ ExchangeRateResponseDto
Get USD to EUR exchange rate Retrieves the current exchange rate for converting USD to EUR (USDC to EURC). This endpoint provides real-time exchange rate information for stablecoin conversions: - Mid-market rate for reference pricing - Buy rate for actual conversion calculations - Sell rate for reverse conversion scenarios ## Use Cases - Display current exchange rates in dashboards - Calculate conversion amounts for USDC to EURC transfers - Financial reporting and analytics - Real-time pricing for multi-currency operations ## Rate Information - **Mid-market rate**: The theoretical middle rate between buy and sell - **Buy rate**: Rate used when converting FROM USD TO EUR (what you get) - **Sell rate**: Rate used when converting FROM EUR TO USD (what you pay) The rates are updated in real-time and reflect current market conditions.
154 155 156 157 |
# File 'lib/devdraft/api/exchange_rates_api.rb', line 154 def exchange_rate_controller_get_usdto_eur_rate(opts = {}) data, _status_code, _headers = exchange_rate_controller_get_usdto_eur_rate_with_http_info(opts) data end |
#exchange_rate_controller_get_usdto_eur_rate_with_http_info(opts = {}) ⇒ Array<(ExchangeRateResponseDto, Integer, Hash)>
Get USD to EUR exchange rate Retrieves the current exchange rate for converting USD to EUR (USDC to EURC). This endpoint provides real-time exchange rate information for stablecoin conversions: - Mid-market rate for reference pricing - Buy rate for actual conversion calculations - Sell rate for reverse conversion scenarios ## Use Cases - Display current exchange rates in dashboards - Calculate conversion amounts for USDC to EURC transfers - Financial reporting and analytics - Real-time pricing for multi-currency operations ## Rate Information - **Mid-market rate**: The theoretical middle rate between buy and sell - **Buy rate**: Rate used when converting FROM USD TO EUR (what you get) - **Sell rate**: Rate used when converting FROM EUR TO USD (what you pay) The rates are updated in real-time and reflect current market conditions.
163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 |
# File 'lib/devdraft/api/exchange_rates_api.rb', line 163 def exchange_rate_controller_get_usdto_eur_rate_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ExchangeRatesApi.exchange_rate_controller_get_usdto_eur_rate ...' end # resource path local_var_path = '/api/v0/exchange-rate/usd-to-eur' # 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']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ExchangeRateResponseDto' # auth_names auth_names = opts[:debug_auth_names] || ['x-client-secret', 'x-client-key'] = opts.merge( :operation => :"ExchangeRatesApi.exchange_rate_controller_get_usdto_eur_rate", :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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ExchangeRatesApi#exchange_rate_controller_get_usdto_eur_rate\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |