Class: DevDraftAI::ExchangeRatesApi
- Inherits:
-
Object
- Object
- DevDraftAI::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.
16 17 18 |
# File 'lib/devdraft/api/exchange_rates_api.rb', line 16 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
14 15 16 |
# File 'lib/devdraft/api/exchange_rates_api.rb', line 14 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.
23 24 25 26 |
# File 'lib/devdraft/api/exchange_rates_api.rb', line 23 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.
32 33 34 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 |
# File 'lib/devdraft/api/exchange_rates_api.rb', line 32 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']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] return_type = opts[:return_type] || 'ExchangeRateResponseDto' auth_names = opts[:auth_names] || ['x-client-key', 'x-client-secret'] 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 => return_type) 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.
75 76 77 78 |
# File 'lib/devdraft/api/exchange_rates_api.rb', line 75 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.
86 87 88 89 90 91 92 93 94 95 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 |
# File 'lib/devdraft/api/exchange_rates_api.rb', line 86 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']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] return_type = opts[:return_type] || 'ExchangeRateResponseDto' auth_names = opts[:auth_names] || ['x-client-key', 'x-client-secret'] 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 => return_type) 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.
137 138 139 140 |
# File 'lib/devdraft/api/exchange_rates_api.rb', line 137 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.
146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 |
# File 'lib/devdraft/api/exchange_rates_api.rb', line 146 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']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] return_type = opts[:return_type] || 'ExchangeRateResponseDto' auth_names = opts[:auth_names] || ['x-client-key', 'x-client-secret'] 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 => return_type) 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 |