devdraft 1.0.2 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +155 -253
- data/Rakefile +2 -0
- data/devdraft-1.0.0.gem +0 -0
- data/{devdraft_ai_sdk.gemspec → devdraft.gemspec} +15 -11
- data/docs/APIHealthApi.md +82 -30
- data/docs/AggregatedBalanceResponse.md +19 -6
- data/docs/AllBalancesResponse.md +19 -6
- data/docs/AppBalancesApi.md +125 -65
- data/docs/BridgeFiatPaymentRail.md +15 -0
- data/docs/BridgePaymentRail.md +12 -3
- data/docs/CreateBankPaymentIntentDto.md +49 -21
- data/docs/CreateCustomerDto.md +25 -9
- data/docs/CreateDirectBankTransferDto.md +29 -11
- data/docs/CreateDirectWalletTransferDto.md +21 -7
- data/docs/CreateExternalBankTransferDto.md +40 -0
- data/docs/CreateExternalStablecoinTransferDto.md +28 -0
- data/docs/CreateInvoiceDto.md +45 -19
- data/docs/CreateLiquidationAddressDto.md +43 -18
- data/docs/CreatePaymentLinkDto.md +53 -28
- data/docs/CreateStablePaymentIntentDto.md +43 -18
- data/docs/CreateStablecoinConversionDto.md +23 -8
- data/docs/CreateTaxDto.md +26 -0
- data/docs/CreateWebhookDto.md +23 -8
- data/docs/CustomerStatus.md +12 -3
- data/docs/CustomerType.md +15 -0
- data/docs/CustomersApi.md +187 -114
- data/docs/DestinationCurrency.md +12 -3
- data/docs/ExchangeRateResponseDto.md +25 -9
- data/docs/ExchangeRatesApi.md +130 -72
- data/docs/FiatCurrency.md +12 -3
- data/docs/HealthResponseDto.md +25 -9
- data/docs/InvoiceProductDto.md +17 -5
- data/docs/InvoicesApi.md +177 -104
- data/docs/LiquidationAddressResponseDto.md +41 -17
- data/docs/LiquidationAddressesApi.md +115 -61
- data/docs/PaymentIntentsApi.md +93 -57
- data/docs/PaymentLinkProductDto.md +17 -5
- data/docs/PaymentLinksApi.md +175 -102
- data/docs/PaymentRequestDto.md +21 -7
- data/docs/PaymentResponseDto.md +23 -8
- data/docs/ProductsApi.md +307 -194
- data/docs/PublicHealthResponseDto.md +19 -6
- data/docs/RefundResponseDto.md +23 -8
- data/docs/StableCoinCurrency.md +12 -3
- data/docs/TaxControllerCreate201Response.md +30 -0
- data/docs/TaxControllerDeleteWithoutId400Response.md +22 -0
- data/docs/TaxControllerUpdateWithoutId400Response.md +22 -0
- data/docs/TaxesApi.md +374 -122
- data/docs/TestPaymentsApi.md +150 -60
- data/docs/TransfersApi.md +274 -72
- data/docs/UpdateCustomerDto.md +25 -9
- data/docs/UpdateTaxDto.md +26 -0
- data/docs/UpdateWebhookDto.md +23 -8
- data/docs/WalletsApi.md +44 -24
- data/docs/WebhookResponseDto.md +29 -11
- data/docs/WebhooksApi.md +225 -134
- data/git_push.sh +41 -28
- data/lib/devdraft/api/api_health_api.rb +32 -16
- data/lib/devdraft/api/app_balances_api.rb +45 -22
- data/lib/devdraft/api/customers_api.rb +124 -71
- data/lib/devdraft/api/exchange_rates_api.rb +49 -26
- data/lib/devdraft/api/invoices_api.rb +89 -53
- data/lib/devdraft/api/liquidation_addresses_api.rb +70 -44
- data/lib/devdraft/api/payment_intents_api.rb +62 -40
- data/lib/devdraft/api/payment_links_api.rb +85 -49
- data/lib/devdraft/api/products_api.rb +214 -216
- data/lib/devdraft/api/taxes_api.rb +257 -66
- data/lib/devdraft/api/test_payments_api.rb +70 -44
- data/lib/devdraft/api/transfers_api.rb +206 -46
- data/lib/devdraft/api/wallets_api.rb +18 -9
- data/lib/devdraft/api/webhooks_api.rb +109 -66
- data/lib/devdraft/api_client.rb +76 -71
- data/lib/devdraft/api_error.rb +5 -4
- data/lib/devdraft/api_model_base.rb +88 -0
- data/lib/devdraft/configuration.rb +121 -18
- data/lib/devdraft/models/aggregated_balance_response.rb +68 -101
- data/lib/devdraft/models/all_balances_response.rb +76 -99
- data/lib/devdraft/models/bridge_fiat_payment_rail.rb +45 -0
- data/lib/devdraft/models/bridge_payment_rail.rb +36 -24
- data/lib/devdraft/models/create_bank_payment_intent_dto.rb +191 -114
- data/lib/devdraft/models/create_customer_dto.rb +123 -113
- data/lib/devdraft/models/create_direct_bank_transfer_dto.rb +105 -104
- data/lib/devdraft/models/create_direct_wallet_transfer_dto.rb +89 -100
- data/lib/devdraft/models/create_external_bank_transfer_dto.rb +505 -0
- data/lib/devdraft/models/create_external_stablecoin_transfer_dto.rb +266 -0
- data/lib/devdraft/models/create_invoice_dto.rb +151 -121
- data/lib/devdraft/models/create_liquidation_address_dto.rb +195 -115
- data/lib/devdraft/models/create_payment_link_dto.rb +192 -214
- data/lib/devdraft/models/create_stable_payment_intent_dto.rb +324 -111
- data/lib/devdraft/models/create_stablecoin_conversion_dto.rb +102 -101
- data/lib/devdraft/models/create_tax_dto.rb +281 -0
- data/lib/devdraft/models/create_webhook_dto.rb +104 -101
- data/lib/devdraft/models/customer_status.rb +23 -10
- data/lib/devdraft/models/customer_type.rb +45 -0
- data/lib/devdraft/models/destination_currency.rb +27 -15
- data/lib/devdraft/models/exchange_rate_response_dto.rb +103 -102
- data/lib/devdraft/models/fiat_currency.rb +22 -10
- data/lib/devdraft/models/health_response_dto.rb +99 -106
- data/lib/devdraft/models/invoice_product_dto.rb +63 -98
- data/lib/devdraft/models/liquidation_address_response_dto.rb +147 -110
- data/lib/devdraft/models/payment_link_product_dto.rb +70 -98
- data/lib/devdraft/models/payment_request_dto.rb +77 -100
- data/lib/devdraft/models/payment_response_dto.rb +102 -101
- data/lib/devdraft/models/public_health_response_dto.rb +68 -101
- data/lib/devdraft/models/refund_response_dto.rb +102 -101
- data/lib/devdraft/models/stable_coin_currency.rb +21 -9
- data/lib/devdraft/models/tax_controller_create201_response.rb +201 -0
- data/lib/devdraft/models/tax_controller_delete_without_id400_response.rb +165 -0
- data/lib/devdraft/models/tax_controller_update_without_id400_response.rb +165 -0
- data/lib/devdraft/models/update_customer_dto.rb +117 -113
- data/lib/devdraft/models/update_tax_dto.rb +256 -0
- data/lib/devdraft/models/update_webhook_dto.rb +70 -101
- data/lib/devdraft/models/webhook_response_dto.rb +140 -103
- data/lib/devdraft/version.rb +6 -5
- data/lib/devdraft.rb +18 -27
- data/spec/api/api_health_api_spec.rb +10 -9
- data/spec/api/app_balances_api_spec.rb +11 -10
- data/spec/api/customers_api_spec.rb +25 -24
- data/spec/api/exchange_rates_api_spec.rb +11 -10
- data/spec/api/invoices_api_spec.rb +16 -15
- data/spec/api/liquidation_addresses_api_spec.rb +13 -12
- data/spec/api/payment_intents_api_spec.rb +12 -11
- data/spec/api/payment_links_api_spec.rb +14 -13
- data/spec/api/products_api_spec.rb +41 -40
- data/spec/api/taxes_api_spec.rb +51 -21
- data/spec/api/test_payments_api_spec.rb +14 -13
- data/spec/api/transfers_api_spec.rb +36 -13
- data/spec/api/wallets_api_spec.rb +9 -8
- data/spec/api/webhooks_api_spec.rb +20 -19
- data/spec/models/aggregated_balance_response_spec.rb +15 -19
- data/spec/models/all_balances_response_spec.rb +14 -18
- data/spec/models/bridge_fiat_payment_rail_spec.rb +30 -0
- data/spec/models/bridge_payment_rail_spec.rb +11 -15
- data/spec/models/create_bank_payment_intent_dto_spec.rb +29 -33
- data/spec/models/create_customer_dto_spec.rb +17 -25
- data/spec/models/create_direct_bank_transfer_dto_spec.rb +19 -23
- data/spec/models/create_direct_wallet_transfer_dto_spec.rb +15 -19
- data/spec/models/create_external_bank_transfer_dto_spec.rb +102 -0
- data/spec/models/create_external_stablecoin_transfer_dto_spec.rb +66 -0
- data/spec/models/create_invoice_dto_spec.rb +31 -35
- data/spec/models/create_liquidation_address_dto_spec.rb +28 -32
- data/spec/models/create_payment_link_dto_spec.rb +34 -76
- data/spec/models/create_stable_payment_intent_dto_spec.rb +26 -30
- data/spec/models/create_stablecoin_conversion_dto_spec.rb +16 -20
- data/spec/models/create_tax_dto_spec.rb +60 -0
- data/spec/models/create_webhook_dto_spec.rb +16 -20
- data/spec/models/customer_status_spec.rb +11 -15
- data/spec/models/customer_type_spec.rb +30 -0
- data/spec/models/destination_currency_spec.rb +11 -15
- data/spec/models/exchange_rate_response_dto_spec.rb +17 -21
- data/spec/models/fiat_currency_spec.rb +11 -15
- data/spec/models/health_response_dto_spec.rb +19 -23
- data/spec/models/invoice_product_dto_spec.rb +13 -17
- data/spec/models/liquidation_address_response_dto_spec.rb +25 -29
- data/spec/models/payment_link_product_dto_spec.rb +13 -17
- data/spec/models/payment_request_dto_spec.rb +15 -19
- data/spec/models/payment_response_dto_spec.rb +16 -20
- data/spec/models/public_health_response_dto_spec.rb +15 -19
- data/spec/models/refund_response_dto_spec.rb +16 -20
- data/spec/models/stable_coin_currency_spec.rb +11 -15
- data/spec/models/tax_controller_create201_response_spec.rb +72 -0
- data/spec/models/tax_controller_delete_without_id400_response_spec.rb +48 -0
- data/spec/models/tax_controller_update_without_id400_response_spec.rb +48 -0
- data/spec/models/update_customer_dto_spec.rb +17 -25
- data/spec/models/update_tax_dto_spec.rb +60 -0
- data/spec/models/update_webhook_dto_spec.rb +16 -20
- data/spec/models/webhook_response_dto_spec.rb +19 -23
- data/spec/spec_helper.rb +5 -4
- metadata +49 -116
- data/docs/AllOfAllBalancesResponseEurc.md +0 -9
- data/docs/AllOfAllBalancesResponseUsdc.md +0 -9
- data/docs/AllOfCreateBankPaymentIntentDtoDestinationCurrency.md +0 -6
- data/docs/AllOfCreateBankPaymentIntentDtoDestinationNetwork.md +0 -6
- data/docs/AllOfCreateBankPaymentIntentDtoSourceCurrency.md +0 -6
- data/docs/AllOfCreateBankPaymentIntentDtoSourcePaymentRail.md +0 -6
- data/docs/AllOfCreateCustomerDtoStatus.md +0 -6
- data/docs/AllOfCreateLiquidationAddressDtoDestinationCurrency.md +0 -6
- data/docs/AllOfCreateLiquidationAddressDtoDestinationPaymentRail.md +0 -6
- data/docs/AllOfCreateStablePaymentIntentDtoDestinationCurrency.md +0 -6
- data/docs/AllOfCreateStablePaymentIntentDtoDestinationNetwork.md +0 -6
- data/docs/AllOfCreateStablePaymentIntentDtoSourceCurrency.md +0 -6
- data/docs/AllOfCreateStablePaymentIntentDtoSourceNetwork.md +0 -6
- data/docs/AllOfUpdateCustomerDtoStatus.md +0 -6
- data/docs/CreateProductDto.md +0 -18
- data/docs/CreateTaxInput.md +0 -6
- data/docs/UpdatePaymentLinkDto.md +0 -6
- data/docs/UpdatePreferenceInput.md +0 -6
- data/docs/UpdateProductDto.md +0 -18
- data/docs/UpdateTaxInput.md +0 -6
- data/example.rb +0 -129
- data/lib/devdraft/models/all_of_all_balances_response_eurc.rb +0 -283
- data/lib/devdraft/models/all_of_all_balances_response_usdc.rb +0 -283
- data/lib/devdraft/models/all_of_create_bank_payment_intent_dto_destination_currency.rb +0 -202
- data/lib/devdraft/models/all_of_create_bank_payment_intent_dto_destination_network.rb +0 -202
- data/lib/devdraft/models/all_of_create_bank_payment_intent_dto_source_currency.rb +0 -202
- data/lib/devdraft/models/all_of_create_bank_payment_intent_dto_source_payment_rail.rb +0 -202
- data/lib/devdraft/models/all_of_create_customer_dto_status.rb +0 -202
- data/lib/devdraft/models/all_of_create_liquidation_address_dto_destination_currency.rb +0 -202
- data/lib/devdraft/models/all_of_create_liquidation_address_dto_destination_payment_rail.rb +0 -202
- data/lib/devdraft/models/all_of_create_stable_payment_intent_dto_destination_currency.rb +0 -202
- data/lib/devdraft/models/all_of_create_stable_payment_intent_dto_destination_network.rb +0 -202
- data/lib/devdraft/models/all_of_create_stable_payment_intent_dto_source_currency.rb +0 -202
- data/lib/devdraft/models/all_of_create_stable_payment_intent_dto_source_network.rb +0 -202
- data/lib/devdraft/models/all_of_update_customer_dto_status.rb +0 -202
- data/lib/devdraft/models/create_product_dto.rb +0 -370
- data/lib/devdraft/models/create_tax_input.rb +0 -197
- data/lib/devdraft/models/update_payment_link_dto.rb +0 -197
- data/lib/devdraft/models/update_preference_input.rb +0 -197
- data/lib/devdraft/models/update_product_dto.rb +0 -355
- data/lib/devdraft/models/update_tax_input.rb +0 -197
- data/spec/api_client_spec.rb +0 -225
- data/spec/base_object_spec.rb +0 -109
- data/spec/configuration_spec.rb +0 -41
- data/spec/models/all_of_all_balances_response_eurc_spec.rb +0 -56
- data/spec/models/all_of_all_balances_response_usdc_spec.rb +0 -56
- data/spec/models/all_of_create_bank_payment_intent_dto_destination_currency_spec.rb +0 -34
- data/spec/models/all_of_create_bank_payment_intent_dto_destination_network_spec.rb +0 -34
- data/spec/models/all_of_create_bank_payment_intent_dto_source_currency_spec.rb +0 -34
- data/spec/models/all_of_create_bank_payment_intent_dto_source_payment_rail_spec.rb +0 -34
- data/spec/models/all_of_create_customer_dto_status_spec.rb +0 -34
- data/spec/models/all_of_create_liquidation_address_dto_destination_currency_spec.rb +0 -34
- data/spec/models/all_of_create_liquidation_address_dto_destination_payment_rail_spec.rb +0 -34
- data/spec/models/all_of_create_stable_payment_intent_dto_destination_currency_spec.rb +0 -34
- data/spec/models/all_of_create_stable_payment_intent_dto_destination_network_spec.rb +0 -34
- data/spec/models/all_of_create_stable_payment_intent_dto_source_currency_spec.rb +0 -34
- data/spec/models/all_of_create_stable_payment_intent_dto_source_network_spec.rb +0 -34
- data/spec/models/all_of_update_customer_dto_status_spec.rb +0 -34
- data/spec/models/create_product_dto_spec.rb +0 -110
- data/spec/models/create_tax_input_spec.rb +0 -34
- data/spec/models/update_payment_link_dto_spec.rb +0 -34
- data/spec/models/update_preference_input_spec.rb +0 -34
- data/spec/models/update_product_dto_spec.rb +0 -110
- data/spec/models/update_tax_input_spec.rb +0 -34
data/docs/ExchangeRatesApi.md
CHANGED
|
@@ -1,49 +1,71 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Devdraft::ExchangeRatesApi
|
|
2
2
|
|
|
3
3
|
All URIs are relative to *https://api.devdraft.ai*
|
|
4
4
|
|
|
5
|
-
Method | HTTP request | Description
|
|
6
|
-
|
|
7
|
-
[**exchange_rate_controller_get_eurto_usd_rate**](ExchangeRatesApi.md#exchange_rate_controller_get_eurto_usd_rate) | **GET** /api/v0/exchange-rate/eur-to-usd | Get EUR to USD exchange rate
|
|
8
|
-
[**exchange_rate_controller_get_exchange_rate**](ExchangeRatesApi.md#exchange_rate_controller_get_exchange_rate) | **GET** /api/v0/exchange-rate | Get exchange rate between specified currencies
|
|
9
|
-
[**exchange_rate_controller_get_usdto_eur_rate**](ExchangeRatesApi.md#exchange_rate_controller_get_usdto_eur_rate) | **GET** /api/v0/exchange-rate/usd-to-eur | Get USD to EUR exchange rate
|
|
5
|
+
| Method | HTTP request | Description |
|
|
6
|
+
| ------ | ------------ | ----------- |
|
|
7
|
+
| [**exchange_rate_controller_get_eurto_usd_rate**](ExchangeRatesApi.md#exchange_rate_controller_get_eurto_usd_rate) | **GET** /api/v0/exchange-rate/eur-to-usd | Get EUR to USD exchange rate |
|
|
8
|
+
| [**exchange_rate_controller_get_exchange_rate**](ExchangeRatesApi.md#exchange_rate_controller_get_exchange_rate) | **GET** /api/v0/exchange-rate | Get exchange rate between specified currencies |
|
|
9
|
+
| [**exchange_rate_controller_get_usdto_eur_rate**](ExchangeRatesApi.md#exchange_rate_controller_get_usdto_eur_rate) | **GET** /api/v0/exchange-rate/usd-to-eur | Get USD to EUR exchange rate |
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
|
|
12
|
+
## exchange_rate_controller_get_eurto_usd_rate
|
|
13
|
+
|
|
14
|
+
> <ExchangeRateResponseDto> exchange_rate_controller_get_eurto_usd_rate
|
|
13
15
|
|
|
14
16
|
Get EUR to USD exchange rate
|
|
15
17
|
|
|
16
18
|
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.
|
|
17
19
|
|
|
18
|
-
###
|
|
20
|
+
### Examples
|
|
21
|
+
|
|
19
22
|
```ruby
|
|
20
|
-
|
|
21
|
-
require '
|
|
23
|
+
require 'time'
|
|
24
|
+
require 'devdraft'
|
|
22
25
|
# setup authorization
|
|
23
|
-
|
|
24
|
-
# Configure API key authorization: x-client-key
|
|
25
|
-
config.api_key['x-client-key'] = 'YOUR API KEY'
|
|
26
|
-
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
27
|
-
#config.api_key_prefix['x-client-key'] = 'Bearer'
|
|
28
|
-
|
|
26
|
+
Devdraft.configure do |config|
|
|
29
27
|
# Configure API key authorization: x-client-secret
|
|
30
28
|
config.api_key['x-client-secret'] = 'YOUR API KEY'
|
|
31
29
|
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
32
|
-
#config.api_key_prefix['x-client-secret'] = 'Bearer'
|
|
30
|
+
# config.api_key_prefix['x-client-secret'] = 'Bearer'
|
|
31
|
+
|
|
32
|
+
# Configure API key authorization: x-client-key
|
|
33
|
+
config.api_key['x-client-key'] = 'YOUR API KEY'
|
|
34
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
35
|
+
# config.api_key_prefix['x-client-key'] = 'Bearer'
|
|
33
36
|
end
|
|
34
37
|
|
|
35
|
-
api_instance =
|
|
38
|
+
api_instance = Devdraft::ExchangeRatesApi.new
|
|
36
39
|
|
|
37
40
|
begin
|
|
38
|
-
#Get EUR to USD exchange rate
|
|
41
|
+
# Get EUR to USD exchange rate
|
|
39
42
|
result = api_instance.exchange_rate_controller_get_eurto_usd_rate
|
|
40
43
|
p result
|
|
41
|
-
rescue
|
|
42
|
-
puts "
|
|
44
|
+
rescue Devdraft::ApiError => e
|
|
45
|
+
puts "Error when calling ExchangeRatesApi->exchange_rate_controller_get_eurto_usd_rate: #{e}"
|
|
46
|
+
end
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
#### Using the exchange_rate_controller_get_eurto_usd_rate_with_http_info variant
|
|
50
|
+
|
|
51
|
+
This returns an Array which contains the response data, status code and headers.
|
|
52
|
+
|
|
53
|
+
> <Array(<ExchangeRateResponseDto>, Integer, Hash)> exchange_rate_controller_get_eurto_usd_rate_with_http_info
|
|
54
|
+
|
|
55
|
+
```ruby
|
|
56
|
+
begin
|
|
57
|
+
# Get EUR to USD exchange rate
|
|
58
|
+
data, status_code, headers = api_instance.exchange_rate_controller_get_eurto_usd_rate_with_http_info
|
|
59
|
+
p status_code # => 2xx
|
|
60
|
+
p headers # => { ... }
|
|
61
|
+
p data # => <ExchangeRateResponseDto>
|
|
62
|
+
rescue Devdraft::ApiError => e
|
|
63
|
+
puts "Error when calling ExchangeRatesApi->exchange_rate_controller_get_eurto_usd_rate_with_http_info: #{e}"
|
|
43
64
|
end
|
|
44
65
|
```
|
|
45
66
|
|
|
46
67
|
### Parameters
|
|
68
|
+
|
|
47
69
|
This endpoint does not need any parameter.
|
|
48
70
|
|
|
49
71
|
### Return type
|
|
@@ -52,59 +74,77 @@ This endpoint does not need any parameter.
|
|
|
52
74
|
|
|
53
75
|
### Authorization
|
|
54
76
|
|
|
55
|
-
[x-client-
|
|
77
|
+
[x-client-secret](../README.md#x-client-secret), [x-client-key](../README.md#x-client-key)
|
|
56
78
|
|
|
57
79
|
### HTTP request headers
|
|
58
80
|
|
|
59
|
-
|
|
60
|
-
|
|
81
|
+
- **Content-Type**: Not defined
|
|
82
|
+
- **Accept**: application/json
|
|
61
83
|
|
|
62
84
|
|
|
85
|
+
## exchange_rate_controller_get_exchange_rate
|
|
63
86
|
|
|
64
|
-
|
|
65
|
-
> ExchangeRateResponseDto exchange_rate_controller_get_exchange_rate(from, to)
|
|
87
|
+
> <ExchangeRateResponseDto> exchange_rate_controller_get_exchange_rate(from, to)
|
|
66
88
|
|
|
67
89
|
Get exchange rate between specified currencies
|
|
68
90
|
|
|
69
91
|
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.
|
|
70
92
|
|
|
71
|
-
###
|
|
93
|
+
### Examples
|
|
94
|
+
|
|
72
95
|
```ruby
|
|
73
|
-
|
|
74
|
-
require '
|
|
96
|
+
require 'time'
|
|
97
|
+
require 'devdraft'
|
|
75
98
|
# setup authorization
|
|
76
|
-
|
|
77
|
-
# Configure API key authorization: x-client-key
|
|
78
|
-
config.api_key['x-client-key'] = 'YOUR API KEY'
|
|
79
|
-
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
80
|
-
#config.api_key_prefix['x-client-key'] = 'Bearer'
|
|
81
|
-
|
|
99
|
+
Devdraft.configure do |config|
|
|
82
100
|
# Configure API key authorization: x-client-secret
|
|
83
101
|
config.api_key['x-client-secret'] = 'YOUR API KEY'
|
|
84
102
|
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
85
|
-
#config.api_key_prefix['x-client-secret'] = 'Bearer'
|
|
86
|
-
end
|
|
103
|
+
# config.api_key_prefix['x-client-secret'] = 'Bearer'
|
|
87
104
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
to
|
|
105
|
+
# Configure API key authorization: x-client-key
|
|
106
|
+
config.api_key['x-client-key'] = 'YOUR API KEY'
|
|
107
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
108
|
+
# config.api_key_prefix['x-client-key'] = 'Bearer'
|
|
109
|
+
end
|
|
91
110
|
|
|
111
|
+
api_instance = Devdraft::ExchangeRatesApi.new
|
|
112
|
+
from = 'usd' # String | Source currency code (e.g., usd)
|
|
113
|
+
to = 'eur' # String | Target currency code (e.g., eur)
|
|
92
114
|
|
|
93
115
|
begin
|
|
94
|
-
#Get exchange rate between specified currencies
|
|
116
|
+
# Get exchange rate between specified currencies
|
|
95
117
|
result = api_instance.exchange_rate_controller_get_exchange_rate(from, to)
|
|
96
118
|
p result
|
|
97
|
-
rescue
|
|
98
|
-
puts "
|
|
119
|
+
rescue Devdraft::ApiError => e
|
|
120
|
+
puts "Error when calling ExchangeRatesApi->exchange_rate_controller_get_exchange_rate: #{e}"
|
|
121
|
+
end
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
#### Using the exchange_rate_controller_get_exchange_rate_with_http_info variant
|
|
125
|
+
|
|
126
|
+
This returns an Array which contains the response data, status code and headers.
|
|
127
|
+
|
|
128
|
+
> <Array(<ExchangeRateResponseDto>, Integer, Hash)> exchange_rate_controller_get_exchange_rate_with_http_info(from, to)
|
|
129
|
+
|
|
130
|
+
```ruby
|
|
131
|
+
begin
|
|
132
|
+
# Get exchange rate between specified currencies
|
|
133
|
+
data, status_code, headers = api_instance.exchange_rate_controller_get_exchange_rate_with_http_info(from, to)
|
|
134
|
+
p status_code # => 2xx
|
|
135
|
+
p headers # => { ... }
|
|
136
|
+
p data # => <ExchangeRateResponseDto>
|
|
137
|
+
rescue Devdraft::ApiError => e
|
|
138
|
+
puts "Error when calling ExchangeRatesApi->exchange_rate_controller_get_exchange_rate_with_http_info: #{e}"
|
|
99
139
|
end
|
|
100
140
|
```
|
|
101
141
|
|
|
102
142
|
### Parameters
|
|
103
143
|
|
|
104
|
-
Name | Type | Description
|
|
105
|
-
|
|
106
|
-
**from** | **String
|
|
107
|
-
**to** | **String
|
|
144
|
+
| Name | Type | Description | Notes |
|
|
145
|
+
| ---- | ---- | ----------- | ----- |
|
|
146
|
+
| **from** | **String** | Source currency code (e.g., usd) | |
|
|
147
|
+
| **to** | **String** | Target currency code (e.g., eur) | |
|
|
108
148
|
|
|
109
149
|
### Return type
|
|
110
150
|
|
|
@@ -112,51 +152,71 @@ Name | Type | Description | Notes
|
|
|
112
152
|
|
|
113
153
|
### Authorization
|
|
114
154
|
|
|
115
|
-
[x-client-
|
|
155
|
+
[x-client-secret](../README.md#x-client-secret), [x-client-key](../README.md#x-client-key)
|
|
116
156
|
|
|
117
157
|
### HTTP request headers
|
|
118
158
|
|
|
119
|
-
|
|
120
|
-
|
|
159
|
+
- **Content-Type**: Not defined
|
|
160
|
+
- **Accept**: application/json
|
|
121
161
|
|
|
122
162
|
|
|
163
|
+
## exchange_rate_controller_get_usdto_eur_rate
|
|
123
164
|
|
|
124
|
-
|
|
125
|
-
> ExchangeRateResponseDto exchange_rate_controller_get_usdto_eur_rate
|
|
165
|
+
> <ExchangeRateResponseDto> exchange_rate_controller_get_usdto_eur_rate
|
|
126
166
|
|
|
127
167
|
Get USD to EUR exchange rate
|
|
128
168
|
|
|
129
169
|
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.
|
|
130
170
|
|
|
131
|
-
###
|
|
171
|
+
### Examples
|
|
172
|
+
|
|
132
173
|
```ruby
|
|
133
|
-
|
|
134
|
-
require '
|
|
174
|
+
require 'time'
|
|
175
|
+
require 'devdraft'
|
|
135
176
|
# setup authorization
|
|
136
|
-
|
|
137
|
-
# Configure API key authorization: x-client-key
|
|
138
|
-
config.api_key['x-client-key'] = 'YOUR API KEY'
|
|
139
|
-
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
140
|
-
#config.api_key_prefix['x-client-key'] = 'Bearer'
|
|
141
|
-
|
|
177
|
+
Devdraft.configure do |config|
|
|
142
178
|
# Configure API key authorization: x-client-secret
|
|
143
179
|
config.api_key['x-client-secret'] = 'YOUR API KEY'
|
|
144
180
|
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
145
|
-
#config.api_key_prefix['x-client-secret'] = 'Bearer'
|
|
181
|
+
# config.api_key_prefix['x-client-secret'] = 'Bearer'
|
|
182
|
+
|
|
183
|
+
# Configure API key authorization: x-client-key
|
|
184
|
+
config.api_key['x-client-key'] = 'YOUR API KEY'
|
|
185
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
186
|
+
# config.api_key_prefix['x-client-key'] = 'Bearer'
|
|
146
187
|
end
|
|
147
188
|
|
|
148
|
-
api_instance =
|
|
189
|
+
api_instance = Devdraft::ExchangeRatesApi.new
|
|
149
190
|
|
|
150
191
|
begin
|
|
151
|
-
#Get USD to EUR exchange rate
|
|
192
|
+
# Get USD to EUR exchange rate
|
|
152
193
|
result = api_instance.exchange_rate_controller_get_usdto_eur_rate
|
|
153
194
|
p result
|
|
154
|
-
rescue
|
|
155
|
-
puts "
|
|
195
|
+
rescue Devdraft::ApiError => e
|
|
196
|
+
puts "Error when calling ExchangeRatesApi->exchange_rate_controller_get_usdto_eur_rate: #{e}"
|
|
197
|
+
end
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
#### Using the exchange_rate_controller_get_usdto_eur_rate_with_http_info variant
|
|
201
|
+
|
|
202
|
+
This returns an Array which contains the response data, status code and headers.
|
|
203
|
+
|
|
204
|
+
> <Array(<ExchangeRateResponseDto>, Integer, Hash)> exchange_rate_controller_get_usdto_eur_rate_with_http_info
|
|
205
|
+
|
|
206
|
+
```ruby
|
|
207
|
+
begin
|
|
208
|
+
# Get USD to EUR exchange rate
|
|
209
|
+
data, status_code, headers = api_instance.exchange_rate_controller_get_usdto_eur_rate_with_http_info
|
|
210
|
+
p status_code # => 2xx
|
|
211
|
+
p headers # => { ... }
|
|
212
|
+
p data # => <ExchangeRateResponseDto>
|
|
213
|
+
rescue Devdraft::ApiError => e
|
|
214
|
+
puts "Error when calling ExchangeRatesApi->exchange_rate_controller_get_usdto_eur_rate_with_http_info: #{e}"
|
|
156
215
|
end
|
|
157
216
|
```
|
|
158
217
|
|
|
159
218
|
### Parameters
|
|
219
|
+
|
|
160
220
|
This endpoint does not need any parameter.
|
|
161
221
|
|
|
162
222
|
### Return type
|
|
@@ -165,12 +225,10 @@ This endpoint does not need any parameter.
|
|
|
165
225
|
|
|
166
226
|
### Authorization
|
|
167
227
|
|
|
168
|
-
[x-client-
|
|
228
|
+
[x-client-secret](../README.md#x-client-secret), [x-client-key](../README.md#x-client-key)
|
|
169
229
|
|
|
170
230
|
### HTTP request headers
|
|
171
231
|
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
232
|
+
- **Content-Type**: Not defined
|
|
233
|
+
- **Accept**: application/json
|
|
176
234
|
|
data/docs/FiatCurrency.md
CHANGED
|
@@ -1,6 +1,15 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Devdraft::FiatCurrency
|
|
2
2
|
|
|
3
3
|
## Properties
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
|
|
8
|
+
## Example
|
|
9
|
+
|
|
10
|
+
```ruby
|
|
11
|
+
require 'devdraft'
|
|
12
|
+
|
|
13
|
+
instance = Devdraft::FiatCurrency.new()
|
|
14
|
+
```
|
|
6
15
|
|
data/docs/HealthResponseDto.md
CHANGED
|
@@ -1,12 +1,28 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Devdraft::HealthResponseDto
|
|
2
2
|
|
|
3
3
|
## Properties
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
**
|
|
8
|
-
**
|
|
9
|
-
**
|
|
10
|
-
**
|
|
11
|
-
**
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **status** | **String** | Overall health status of the service. Returns \"ok\" when healthy, \"error\" when issues detected. | |
|
|
8
|
+
| **timestamp** | **Time** | ISO 8601 timestamp when the health check was performed. | |
|
|
9
|
+
| **version** | **String** | Current version of the API service. Useful for debugging and compatibility checks. | |
|
|
10
|
+
| **database** | **String** | Database connectivity status. Shows \"connected\" when database is accessible, \"error\" when connection fails. | |
|
|
11
|
+
| **message** | **String** | Human-readable message describing the current health status and any issues. | |
|
|
12
|
+
| **authenticated** | **Boolean** | Indicates whether the request was properly authenticated. Always true for this endpoint since authentication is required. | |
|
|
13
|
+
|
|
14
|
+
## Example
|
|
15
|
+
|
|
16
|
+
```ruby
|
|
17
|
+
require 'devdraft'
|
|
18
|
+
|
|
19
|
+
instance = Devdraft::HealthResponseDto.new(
|
|
20
|
+
status: ok,
|
|
21
|
+
timestamp: 2023-07-01T12:00Z,
|
|
22
|
+
version: 1.0.0,
|
|
23
|
+
database: connected,
|
|
24
|
+
message: Service is up and running,
|
|
25
|
+
authenticated: true
|
|
26
|
+
)
|
|
27
|
+
```
|
|
12
28
|
|
data/docs/InvoiceProductDto.md
CHANGED
|
@@ -1,8 +1,20 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Devdraft::InvoiceProductDto
|
|
2
2
|
|
|
3
3
|
## Properties
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
**
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **product_id** | **String** | Product ID | |
|
|
8
|
+
| **quantity** | **Float** | Quantity of the product | |
|
|
9
|
+
|
|
10
|
+
## Example
|
|
11
|
+
|
|
12
|
+
```ruby
|
|
13
|
+
require 'devdraft'
|
|
14
|
+
|
|
15
|
+
instance = Devdraft::InvoiceProductDto.new(
|
|
16
|
+
product_id: null,
|
|
17
|
+
quantity: null
|
|
18
|
+
)
|
|
19
|
+
```
|
|
8
20
|
|