devdraft 1.0.0

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.
Files changed (205) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +9 -0
  3. data/README.md +1246 -0
  4. data/Rakefile +8 -0
  5. data/devdraft_ai_sdk.gemspec +38 -0
  6. data/docs/APIHealthApi.md +87 -0
  7. data/docs/AggregatedBalanceResponse.md +9 -0
  8. data/docs/AllBalancesResponse.md +9 -0
  9. data/docs/AllOfAllBalancesResponseEurc.md +9 -0
  10. data/docs/AllOfAllBalancesResponseUsdc.md +9 -0
  11. data/docs/AllOfCreateBankPaymentIntentDtoDestinationCurrency.md +6 -0
  12. data/docs/AllOfCreateBankPaymentIntentDtoDestinationNetwork.md +6 -0
  13. data/docs/AllOfCreateBankPaymentIntentDtoSourceCurrency.md +6 -0
  14. data/docs/AllOfCreateBankPaymentIntentDtoSourcePaymentRail.md +6 -0
  15. data/docs/AllOfCreateCustomerDtoStatus.md +6 -0
  16. data/docs/AllOfCreateLiquidationAddressDtoDestinationCurrency.md +6 -0
  17. data/docs/AllOfCreateLiquidationAddressDtoDestinationPaymentRail.md +6 -0
  18. data/docs/AllOfCreateStablePaymentIntentDtoDestinationCurrency.md +6 -0
  19. data/docs/AllOfCreateStablePaymentIntentDtoDestinationNetwork.md +6 -0
  20. data/docs/AllOfCreateStablePaymentIntentDtoSourceCurrency.md +6 -0
  21. data/docs/AllOfCreateStablePaymentIntentDtoSourceNetwork.md +6 -0
  22. data/docs/AllOfUpdateCustomerDtoStatus.md +6 -0
  23. data/docs/AppBalancesApi.md +169 -0
  24. data/docs/BridgePaymentRail.md +6 -0
  25. data/docs/CreateBankPaymentIntentDto.md +24 -0
  26. data/docs/CreateCustomerDto.md +12 -0
  27. data/docs/CreateDirectBankTransferDto.md +14 -0
  28. data/docs/CreateDirectWalletTransferDto.md +10 -0
  29. data/docs/CreateInvoiceDto.md +22 -0
  30. data/docs/CreateLiquidationAddressDto.md +21 -0
  31. data/docs/CreatePaymentLinkDto.md +31 -0
  32. data/docs/CreateProductDto.md +18 -0
  33. data/docs/CreateStablePaymentIntentDto.md +21 -0
  34. data/docs/CreateStablecoinConversionDto.md +11 -0
  35. data/docs/CreateTaxInput.md +6 -0
  36. data/docs/CreateWebhookDto.md +11 -0
  37. data/docs/CustomerStatus.md +6 -0
  38. data/docs/CustomersApi.md +250 -0
  39. data/docs/DestinationCurrency.md +6 -0
  40. data/docs/ExchangeRateResponseDto.md +12 -0
  41. data/docs/ExchangeRatesApi.md +176 -0
  42. data/docs/FiatCurrency.md +6 -0
  43. data/docs/HealthResponseDto.md +12 -0
  44. data/docs/InvoiceProductDto.md +8 -0
  45. data/docs/InvoicesApi.md +236 -0
  46. data/docs/LiquidationAddressResponseDto.md +20 -0
  47. data/docs/LiquidationAddressesApi.md +152 -0
  48. data/docs/PaymentIntentsApi.md +127 -0
  49. data/docs/PaymentLinkProductDto.md +8 -0
  50. data/docs/PaymentLinksApi.md +238 -0
  51. data/docs/PaymentRequestDto.md +10 -0
  52. data/docs/PaymentResponseDto.md +11 -0
  53. data/docs/ProductsApi.md +404 -0
  54. data/docs/PublicHealthResponseDto.md +9 -0
  55. data/docs/RefundResponseDto.md +11 -0
  56. data/docs/StableCoinCurrency.md +6 -0
  57. data/docs/TaxesApi.md +292 -0
  58. data/docs/TestPaymentsApi.md +150 -0
  59. data/docs/TransfersApi.md +175 -0
  60. data/docs/UpdateCustomerDto.md +12 -0
  61. data/docs/UpdatePaymentLinkDto.md +6 -0
  62. data/docs/UpdatePreferenceInput.md +6 -0
  63. data/docs/UpdateProductDto.md +18 -0
  64. data/docs/UpdateTaxInput.md +6 -0
  65. data/docs/UpdateWebhookDto.md +11 -0
  66. data/docs/WalletsApi.md +58 -0
  67. data/docs/WebhookResponseDto.md +14 -0
  68. data/docs/WebhooksApi.md +307 -0
  69. data/git_push.sh +44 -0
  70. data/lib/devdraft/api/api_health_api.rb +116 -0
  71. data/lib/devdraft/api/app_balances_api.rb +170 -0
  72. data/lib/devdraft/api/customers_api.rb +258 -0
  73. data/lib/devdraft/api/exchange_rates_api.rb +184 -0
  74. data/lib/devdraft/api/invoices_api.rb +238 -0
  75. data/lib/devdraft/api/liquidation_addresses_api.rb +202 -0
  76. data/lib/devdraft/api/payment_intents_api.rb +150 -0
  77. data/lib/devdraft/api/payment_links_api.rb +240 -0
  78. data/lib/devdraft/api/products_api.rb +518 -0
  79. data/lib/devdraft/api/taxes_api.rb +290 -0
  80. data/lib/devdraft/api/test_payments_api.rb +202 -0
  81. data/lib/devdraft/api/transfers_api.rb +182 -0
  82. data/lib/devdraft/api/wallets_api.rb +66 -0
  83. data/lib/devdraft/api/webhooks_api.rb +310 -0
  84. data/lib/devdraft/api_client.rb +388 -0
  85. data/lib/devdraft/api_error.rb +57 -0
  86. data/lib/devdraft/configuration.rb +219 -0
  87. data/lib/devdraft/models/aggregated_balance_response.rb +278 -0
  88. data/lib/devdraft/models/all_balances_response.rb +242 -0
  89. data/lib/devdraft/models/all_of_all_balances_response_eurc.rb +283 -0
  90. data/lib/devdraft/models/all_of_all_balances_response_usdc.rb +283 -0
  91. data/lib/devdraft/models/all_of_create_bank_payment_intent_dto_destination_currency.rb +202 -0
  92. data/lib/devdraft/models/all_of_create_bank_payment_intent_dto_destination_network.rb +202 -0
  93. data/lib/devdraft/models/all_of_create_bank_payment_intent_dto_source_currency.rb +202 -0
  94. data/lib/devdraft/models/all_of_create_bank_payment_intent_dto_source_payment_rail.rb +202 -0
  95. data/lib/devdraft/models/all_of_create_customer_dto_status.rb +202 -0
  96. data/lib/devdraft/models/all_of_create_liquidation_address_dto_destination_currency.rb +202 -0
  97. data/lib/devdraft/models/all_of_create_liquidation_address_dto_destination_payment_rail.rb +202 -0
  98. data/lib/devdraft/models/all_of_create_stable_payment_intent_dto_destination_currency.rb +202 -0
  99. data/lib/devdraft/models/all_of_create_stable_payment_intent_dto_destination_network.rb +202 -0
  100. data/lib/devdraft/models/all_of_create_stable_payment_intent_dto_source_currency.rb +202 -0
  101. data/lib/devdraft/models/all_of_create_stable_payment_intent_dto_source_network.rb +202 -0
  102. data/lib/devdraft/models/all_of_update_customer_dto_status.rb +202 -0
  103. data/lib/devdraft/models/bridge_payment_rail.rb +43 -0
  104. data/lib/devdraft/models/create_bank_payment_intent_dto.rb +397 -0
  105. data/lib/devdraft/models/create_customer_dto.rb +308 -0
  106. data/lib/devdraft/models/create_direct_bank_transfer_dto.rb +302 -0
  107. data/lib/devdraft/models/create_direct_wallet_transfer_dto.rb +257 -0
  108. data/lib/devdraft/models/create_invoice_dto.rb +474 -0
  109. data/lib/devdraft/models/create_liquidation_address_dto.rb +408 -0
  110. data/lib/devdraft/models/create_payment_link_dto.rb +603 -0
  111. data/lib/devdraft/models/create_product_dto.rb +370 -0
  112. data/lib/devdraft/models/create_stable_payment_intent_dto.rb +362 -0
  113. data/lib/devdraft/models/create_stablecoin_conversion_dto.rb +272 -0
  114. data/lib/devdraft/models/create_tax_input.rb +197 -0
  115. data/lib/devdraft/models/create_webhook_dto.rb +271 -0
  116. data/lib/devdraft/models/customer_status.rb +29 -0
  117. data/lib/devdraft/models/destination_currency.rb +34 -0
  118. data/lib/devdraft/models/exchange_rate_response_dto.rb +282 -0
  119. data/lib/devdraft/models/fiat_currency.rb +29 -0
  120. data/lib/devdraft/models/health_response_dto.rb +333 -0
  121. data/lib/devdraft/models/invoice_product_dto.rb +227 -0
  122. data/lib/devdraft/models/liquidation_address_response_dto.rb +377 -0
  123. data/lib/devdraft/models/payment_link_product_dto.rb +229 -0
  124. data/lib/devdraft/models/payment_request_dto.rb +252 -0
  125. data/lib/devdraft/models/payment_response_dto.rb +272 -0
  126. data/lib/devdraft/models/public_health_response_dto.rb +276 -0
  127. data/lib/devdraft/models/refund_response_dto.rb +272 -0
  128. data/lib/devdraft/models/stable_coin_currency.rb +28 -0
  129. data/lib/devdraft/models/update_customer_dto.rb +293 -0
  130. data/lib/devdraft/models/update_payment_link_dto.rb +197 -0
  131. data/lib/devdraft/models/update_preference_input.rb +197 -0
  132. data/lib/devdraft/models/update_product_dto.rb +355 -0
  133. data/lib/devdraft/models/update_tax_input.rb +197 -0
  134. data/lib/devdraft/models/update_webhook_dto.rb +251 -0
  135. data/lib/devdraft/models/webhook_response_dto.rb +317 -0
  136. data/lib/devdraft/version.rb +14 -0
  137. data/lib/devdraft.rb +101 -0
  138. data/spec/api/api_health_api_spec.rb +54 -0
  139. data/spec/api/app_balances_api_spec.rb +67 -0
  140. data/spec/api/customers_api_spec.rb +87 -0
  141. data/spec/api/exchange_rates_api_spec.rb +69 -0
  142. data/spec/api/invoices_api_spec.rb +80 -0
  143. data/spec/api/liquidation_addresses_api_spec.rb +72 -0
  144. data/spec/api/payment_intents_api_spec.rb +60 -0
  145. data/spec/api/payment_links_api_spec.rb +81 -0
  146. data/spec/api/products_api_spec.rb +130 -0
  147. data/spec/api/taxes_api_spec.rb +91 -0
  148. data/spec/api/test_payments_api_spec.rb +71 -0
  149. data/spec/api/transfers_api_spec.rb +67 -0
  150. data/spec/api/wallets_api_spec.rb +44 -0
  151. data/spec/api/webhooks_api_spec.rb +96 -0
  152. data/spec/api_client_spec.rb +225 -0
  153. data/spec/base_object_spec.rb +109 -0
  154. data/spec/configuration_spec.rb +41 -0
  155. data/spec/models/aggregated_balance_response_spec.rb +56 -0
  156. data/spec/models/all_balances_response_spec.rb +52 -0
  157. data/spec/models/all_of_all_balances_response_eurc_spec.rb +56 -0
  158. data/spec/models/all_of_all_balances_response_usdc_spec.rb +56 -0
  159. data/spec/models/all_of_create_bank_payment_intent_dto_destination_currency_spec.rb +34 -0
  160. data/spec/models/all_of_create_bank_payment_intent_dto_destination_network_spec.rb +34 -0
  161. data/spec/models/all_of_create_bank_payment_intent_dto_source_currency_spec.rb +34 -0
  162. data/spec/models/all_of_create_bank_payment_intent_dto_source_payment_rail_spec.rb +34 -0
  163. data/spec/models/all_of_create_customer_dto_status_spec.rb +34 -0
  164. data/spec/models/all_of_create_liquidation_address_dto_destination_currency_spec.rb +34 -0
  165. data/spec/models/all_of_create_liquidation_address_dto_destination_payment_rail_spec.rb +34 -0
  166. data/spec/models/all_of_create_stable_payment_intent_dto_destination_currency_spec.rb +34 -0
  167. data/spec/models/all_of_create_stable_payment_intent_dto_destination_network_spec.rb +34 -0
  168. data/spec/models/all_of_create_stable_payment_intent_dto_source_currency_spec.rb +34 -0
  169. data/spec/models/all_of_create_stable_payment_intent_dto_source_network_spec.rb +34 -0
  170. data/spec/models/all_of_update_customer_dto_status_spec.rb +34 -0
  171. data/spec/models/bridge_payment_rail_spec.rb +34 -0
  172. data/spec/models/create_bank_payment_intent_dto_spec.rb +142 -0
  173. data/spec/models/create_customer_dto_spec.rb +74 -0
  174. data/spec/models/create_direct_bank_transfer_dto_spec.rb +82 -0
  175. data/spec/models/create_direct_wallet_transfer_dto_spec.rb +58 -0
  176. data/spec/models/create_invoice_dto_spec.rb +146 -0
  177. data/spec/models/create_liquidation_address_dto_spec.rb +132 -0
  178. data/spec/models/create_payment_link_dto_spec.rb +200 -0
  179. data/spec/models/create_product_dto_spec.rb +110 -0
  180. data/spec/models/create_stable_payment_intent_dto_spec.rb +124 -0
  181. data/spec/models/create_stablecoin_conversion_dto_spec.rb +64 -0
  182. data/spec/models/create_tax_input_spec.rb +34 -0
  183. data/spec/models/create_webhook_dto_spec.rb +64 -0
  184. data/spec/models/customer_status_spec.rb +34 -0
  185. data/spec/models/destination_currency_spec.rb +34 -0
  186. data/spec/models/exchange_rate_response_dto_spec.rb +70 -0
  187. data/spec/models/fiat_currency_spec.rb +34 -0
  188. data/spec/models/health_response_dto_spec.rb +78 -0
  189. data/spec/models/invoice_product_dto_spec.rb +46 -0
  190. data/spec/models/liquidation_address_response_dto_spec.rb +118 -0
  191. data/spec/models/payment_link_product_dto_spec.rb +46 -0
  192. data/spec/models/payment_request_dto_spec.rb +58 -0
  193. data/spec/models/payment_response_dto_spec.rb +64 -0
  194. data/spec/models/public_health_response_dto_spec.rb +56 -0
  195. data/spec/models/refund_response_dto_spec.rb +64 -0
  196. data/spec/models/stable_coin_currency_spec.rb +34 -0
  197. data/spec/models/update_customer_dto_spec.rb +74 -0
  198. data/spec/models/update_payment_link_dto_spec.rb +34 -0
  199. data/spec/models/update_preference_input_spec.rb +34 -0
  200. data/spec/models/update_product_dto_spec.rb +110 -0
  201. data/spec/models/update_tax_input_spec.rb +34 -0
  202. data/spec/models/update_webhook_dto_spec.rb +64 -0
  203. data/spec/models/webhook_response_dto_spec.rb +82 -0
  204. data/spec/spec_helper.rb +110 -0
  205. metadata +375 -0
@@ -0,0 +1,170 @@
1
+ =begin
2
+ #Devdraft AI Payment & Business Management API
3
+
4
+ # A comprehensive payment processing and business management API that enables seamless integration of cryptocurrency and traditional payment methods.
5
+
6
+ OpenAPI spec version: 1.0.0
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 3.0.65
10
+ =end
11
+
12
+ module DevDraftAI
13
+ class AppBalancesApi
14
+ attr_accessor :api_client
15
+
16
+ def initialize(api_client = ApiClient.default)
17
+ @api_client = api_client
18
+ end
19
+ # Get all stablecoin balances for an app
20
+ # Retrieves both USDC and EURC balances across all wallets for the specified app. This comprehensive endpoint provides: - Complete USDC balance aggregation with detailed breakdown - Complete EURC balance aggregation with detailed breakdown - Total USD equivalent value across both currencies - Individual wallet and chain-specific balance details ## Use Cases - Complete financial dashboard overview - Multi-currency balance reporting - Comprehensive wallet management - Cross-currency analytics and reporting ## Response Format The response includes separate aggregations for each currency plus a combined USD value estimate, providing complete visibility into stablecoin holdings.
21
+ # @param [Hash] opts the optional parameters
22
+ # @return [AllBalancesResponse]
23
+ def balance_controller_get_all_balances(opts = {})
24
+ data, _status_code, _headers = balance_controller_get_all_balances_with_http_info(opts)
25
+ data
26
+ end
27
+
28
+ # Get all stablecoin balances for an app
29
+ # Retrieves both USDC and EURC balances across all wallets for the specified app. This comprehensive endpoint provides: - Complete USDC balance aggregation with detailed breakdown - Complete EURC balance aggregation with detailed breakdown - Total USD equivalent value across both currencies - Individual wallet and chain-specific balance details ## Use Cases - Complete financial dashboard overview - Multi-currency balance reporting - Comprehensive wallet management - Cross-currency analytics and reporting ## Response Format The response includes separate aggregations for each currency plus a combined USD value estimate, providing complete visibility into stablecoin holdings.
30
+ # @param [Hash] opts the optional parameters
31
+ # @return [Array<(AllBalancesResponse, Integer, Hash)>] AllBalancesResponse data, response status code and response headers
32
+ def balance_controller_get_all_balances_with_http_info(opts = {})
33
+ if @api_client.config.debugging
34
+ @api_client.config.logger.debug 'Calling API: AppBalancesApi.balance_controller_get_all_balances ...'
35
+ end
36
+ # resource path
37
+ local_var_path = '/api/v0/balance'
38
+
39
+ # query parameters
40
+ query_params = opts[:query_params] || {}
41
+
42
+ # header parameters
43
+ header_params = opts[:header_params] || {}
44
+ # HTTP header 'Accept' (if needed)
45
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
46
+
47
+ # form parameters
48
+ form_params = opts[:form_params] || {}
49
+
50
+ # http body (model)
51
+ post_body = opts[:body]
52
+
53
+ return_type = opts[:return_type] || 'AllBalancesResponse'
54
+
55
+ auth_names = opts[:auth_names] || ['x-client-key', 'x-client-secret']
56
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
57
+ :header_params => header_params,
58
+ :query_params => query_params,
59
+ :form_params => form_params,
60
+ :body => post_body,
61
+ :auth_names => auth_names,
62
+ :return_type => return_type)
63
+
64
+ if @api_client.config.debugging
65
+ @api_client.config.logger.debug "API called: AppBalancesApi#balance_controller_get_all_balances\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
66
+ end
67
+ return data, status_code, headers
68
+ end
69
+ # Get EURC balance for an app
70
+ # Retrieves the total EURC balance across all wallets for the specified app. This endpoint aggregates EURC balances from all associated wallets and provides: - Total EURC balance across all chains and wallets - Detailed breakdown by individual wallet and blockchain network - Contract addresses and wallet identifiers for each balance ## Use Cases - Dashboard balance display - European market operations - Euro-denominated financial reporting - Cross-currency balance tracking ## Response Format The response includes both the aggregated total and detailed breakdown, enabling comprehensive euro stablecoin balance management.
71
+ # @param [Hash] opts the optional parameters
72
+ # @return [AggregatedBalanceResponse]
73
+ def balance_controller_get_eurc_balance(opts = {})
74
+ data, _status_code, _headers = balance_controller_get_eurc_balance_with_http_info(opts)
75
+ data
76
+ end
77
+
78
+ # Get EURC balance for an app
79
+ # Retrieves the total EURC balance across all wallets for the specified app. This endpoint aggregates EURC balances from all associated wallets and provides: - Total EURC balance across all chains and wallets - Detailed breakdown by individual wallet and blockchain network - Contract addresses and wallet identifiers for each balance ## Use Cases - Dashboard balance display - European market operations - Euro-denominated financial reporting - Cross-currency balance tracking ## Response Format The response includes both the aggregated total and detailed breakdown, enabling comprehensive euro stablecoin balance management.
80
+ # @param [Hash] opts the optional parameters
81
+ # @return [Array<(AggregatedBalanceResponse, Integer, Hash)>] AggregatedBalanceResponse data, response status code and response headers
82
+ def balance_controller_get_eurc_balance_with_http_info(opts = {})
83
+ if @api_client.config.debugging
84
+ @api_client.config.logger.debug 'Calling API: AppBalancesApi.balance_controller_get_eurc_balance ...'
85
+ end
86
+ # resource path
87
+ local_var_path = '/api/v0/balance/eurc'
88
+
89
+ # query parameters
90
+ query_params = opts[:query_params] || {}
91
+
92
+ # header parameters
93
+ header_params = opts[:header_params] || {}
94
+ # HTTP header 'Accept' (if needed)
95
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
96
+
97
+ # form parameters
98
+ form_params = opts[:form_params] || {}
99
+
100
+ # http body (model)
101
+ post_body = opts[:body]
102
+
103
+ return_type = opts[:return_type] || 'AggregatedBalanceResponse'
104
+
105
+ auth_names = opts[:auth_names] || ['x-client-key', 'x-client-secret']
106
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
107
+ :header_params => header_params,
108
+ :query_params => query_params,
109
+ :form_params => form_params,
110
+ :body => post_body,
111
+ :auth_names => auth_names,
112
+ :return_type => return_type)
113
+
114
+ if @api_client.config.debugging
115
+ @api_client.config.logger.debug "API called: AppBalancesApi#balance_controller_get_eurc_balance\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
116
+ end
117
+ return data, status_code, headers
118
+ end
119
+ # Get USDC balance for an app
120
+ # Retrieves the total USDC balance across all wallets for the specified app. This endpoint aggregates USDC balances from all associated wallets and provides: - Total USDC balance across all chains and wallets - Detailed breakdown by individual wallet and blockchain network - Contract addresses and wallet identifiers for each balance ## Use Cases - Dashboard balance display - Financial reporting and reconciliation - Real-time balance monitoring - Multi-chain balance aggregation ## Response Format The response includes both the aggregated total and detailed breakdown, allowing for comprehensive balance tracking and wallet-specific analysis.
121
+ # @param [Hash] opts the optional parameters
122
+ # @return [AggregatedBalanceResponse]
123
+ def balance_controller_get_usdc_balance(opts = {})
124
+ data, _status_code, _headers = balance_controller_get_usdc_balance_with_http_info(opts)
125
+ data
126
+ end
127
+
128
+ # Get USDC balance for an app
129
+ # Retrieves the total USDC balance across all wallets for the specified app. This endpoint aggregates USDC balances from all associated wallets and provides: - Total USDC balance across all chains and wallets - Detailed breakdown by individual wallet and blockchain network - Contract addresses and wallet identifiers for each balance ## Use Cases - Dashboard balance display - Financial reporting and reconciliation - Real-time balance monitoring - Multi-chain balance aggregation ## Response Format The response includes both the aggregated total and detailed breakdown, allowing for comprehensive balance tracking and wallet-specific analysis.
130
+ # @param [Hash] opts the optional parameters
131
+ # @return [Array<(AggregatedBalanceResponse, Integer, Hash)>] AggregatedBalanceResponse data, response status code and response headers
132
+ def balance_controller_get_usdc_balance_with_http_info(opts = {})
133
+ if @api_client.config.debugging
134
+ @api_client.config.logger.debug 'Calling API: AppBalancesApi.balance_controller_get_usdc_balance ...'
135
+ end
136
+ # resource path
137
+ local_var_path = '/api/v0/balance/usdc'
138
+
139
+ # query parameters
140
+ query_params = opts[:query_params] || {}
141
+
142
+ # header parameters
143
+ header_params = opts[:header_params] || {}
144
+ # HTTP header 'Accept' (if needed)
145
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
146
+
147
+ # form parameters
148
+ form_params = opts[:form_params] || {}
149
+
150
+ # http body (model)
151
+ post_body = opts[:body]
152
+
153
+ return_type = opts[:return_type] || 'AggregatedBalanceResponse'
154
+
155
+ auth_names = opts[:auth_names] || ['x-client-key', 'x-client-secret']
156
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
157
+ :header_params => header_params,
158
+ :query_params => query_params,
159
+ :form_params => form_params,
160
+ :body => post_body,
161
+ :auth_names => auth_names,
162
+ :return_type => return_type)
163
+
164
+ if @api_client.config.debugging
165
+ @api_client.config.logger.debug "API called: AppBalancesApi#balance_controller_get_usdc_balance\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
166
+ end
167
+ return data, status_code, headers
168
+ end
169
+ end
170
+ end
@@ -0,0 +1,258 @@
1
+ =begin
2
+ #Devdraft AI Payment & Business Management API
3
+
4
+ # A comprehensive payment processing and business management API that enables seamless integration of cryptocurrency and traditional payment methods.
5
+
6
+ OpenAPI spec version: 1.0.0
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 3.0.65
10
+ =end
11
+
12
+ module DevDraftAI
13
+ class CustomersApi
14
+ attr_accessor :api_client
15
+
16
+ def initialize(api_client = ApiClient.default)
17
+ @api_client = api_client
18
+ end
19
+ # Create a new customer
20
+ # Creates a new customer in the system with their personal and contact information. This endpoint allows you to register new customers and store their details for future transactions. ## Use Cases - Register new customers for payment processing - Store customer information for recurring payments - Maintain customer profiles for transaction history ## Example: Create New Customer ```json { \"firstName\": \"John\", \"lastName\": \"Doe\", \"email\": \"john.doe@example.com\", \"phone\": \"+1234567890\", \"address\": { \"street\": \"123 Main St\", \"city\": \"New York\", \"state\": \"NY\", \"zipCode\": \"10001\", \"country\": \"USA\" } } ``` ## Required Fields - `firstName`: Customer's first name - `lastName`: Customer's last name - `email`: Valid email address (must be unique) ## Optional Fields - `phone`: Contact phone number - `address`: Complete address information - `street`: Street address - `city`: City name - `state`: State/province - `zipCode`: Postal/ZIP code - `country`: Country name
21
+ # @param body Customer creation data
22
+ # @param [Hash] opts the optional parameters
23
+ # @return [nil]
24
+ def customer_controller_create(body, opts = {})
25
+ customer_controller_create_with_http_info(body, opts)
26
+ nil
27
+ end
28
+
29
+ # Create a new customer
30
+ # Creates a new customer in the system with their personal and contact information. This endpoint allows you to register new customers and store their details for future transactions. ## Use Cases - Register new customers for payment processing - Store customer information for recurring payments - Maintain customer profiles for transaction history ## Example: Create New Customer &#x60;&#x60;&#x60;json { \&quot;firstName\&quot;: \&quot;John\&quot;, \&quot;lastName\&quot;: \&quot;Doe\&quot;, \&quot;email\&quot;: \&quot;john.doe@example.com\&quot;, \&quot;phone\&quot;: \&quot;+1234567890\&quot;, \&quot;address\&quot;: { \&quot;street\&quot;: \&quot;123 Main St\&quot;, \&quot;city\&quot;: \&quot;New York\&quot;, \&quot;state\&quot;: \&quot;NY\&quot;, \&quot;zipCode\&quot;: \&quot;10001\&quot;, \&quot;country\&quot;: \&quot;USA\&quot; } } &#x60;&#x60;&#x60; ## Required Fields - &#x60;firstName&#x60;: Customer&#x27;s first name - &#x60;lastName&#x60;: Customer&#x27;s last name - &#x60;email&#x60;: Valid email address (must be unique) ## Optional Fields - &#x60;phone&#x60;: Contact phone number - &#x60;address&#x60;: Complete address information - &#x60;street&#x60;: Street address - &#x60;city&#x60;: City name - &#x60;state&#x60;: State/province - &#x60;zipCode&#x60;: Postal/ZIP code - &#x60;country&#x60;: Country name
31
+ # @param body Customer creation data
32
+ # @param [Hash] opts the optional parameters
33
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
34
+ def customer_controller_create_with_http_info(body, opts = {})
35
+ if @api_client.config.debugging
36
+ @api_client.config.logger.debug 'Calling API: CustomersApi.customer_controller_create ...'
37
+ end
38
+ # verify the required parameter 'body' is set
39
+ if @api_client.config.client_side_validation && body.nil?
40
+ fail ArgumentError, "Missing the required parameter 'body' when calling CustomersApi.customer_controller_create"
41
+ end
42
+ # resource path
43
+ local_var_path = '/api/v0/customers'
44
+
45
+ # query parameters
46
+ query_params = opts[:query_params] || {}
47
+
48
+ # header parameters
49
+ header_params = opts[:header_params] || {}
50
+ # HTTP header 'Content-Type'
51
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
52
+
53
+ # form parameters
54
+ form_params = opts[:form_params] || {}
55
+
56
+ # http body (model)
57
+ post_body = opts[:body] || @api_client.object_to_http_body(body)
58
+
59
+ return_type = opts[:return_type]
60
+
61
+ auth_names = opts[:auth_names] || ['x-client-key', 'x-client-secret']
62
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
63
+ :header_params => header_params,
64
+ :query_params => query_params,
65
+ :form_params => form_params,
66
+ :body => post_body,
67
+ :auth_names => auth_names,
68
+ :return_type => return_type)
69
+
70
+ if @api_client.config.debugging
71
+ @api_client.config.logger.debug "API called: CustomersApi#customer_controller_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
72
+ end
73
+ return data, status_code, headers
74
+ end
75
+ # Get all customers with filters
76
+ # Retrieves a list of customers with optional filtering and pagination. This endpoint allows you to search and filter customers based on various criteria. ## Use Cases - List all customers with pagination - Search customers by name or email - Filter customers by status - Export customer data ## Query Parameters - `skip`: Number of records to skip (default: 0) - `take`: Number of records to take (default: 10) - `status`: Filter by customer status (ACTIVE, INACTIVE, SUSPENDED) - `name`: Filter by customer name (partial match) - `email`: Filter by customer email (exact match) ## Example Response ```json { \"data\": [ { \"id\": \"cust_123456\", \"firstName\": \"John\", \"lastName\": \"Doe\", \"email\": \"john.doe@example.com\", \"status\": \"ACTIVE\", \"createdAt\": \"2024-03-20T10:00:00Z\" } ], \"total\": 100, \"skip\": 0, \"take\": 10 } ```
77
+ # @param [Hash] opts the optional parameters
78
+ # @option opts [String] :status Filter by customer status
79
+ # @option opts [String] :name Filter by customer name
80
+ # @option opts [String] :email Filter by customer email
81
+ # @option opts [BigDecimal] :take Number of records to take
82
+ # @option opts [BigDecimal] :skip Number of records to skip
83
+ # @return [nil]
84
+ def customer_controller_find_all(opts = {})
85
+ customer_controller_find_all_with_http_info(opts)
86
+ nil
87
+ end
88
+
89
+ # Get all customers with filters
90
+ # Retrieves a list of customers with optional filtering and pagination. This endpoint allows you to search and filter customers based on various criteria. ## Use Cases - List all customers with pagination - Search customers by name or email - Filter customers by status - Export customer data ## Query Parameters - &#x60;skip&#x60;: Number of records to skip (default: 0) - &#x60;take&#x60;: Number of records to take (default: 10) - &#x60;status&#x60;: Filter by customer status (ACTIVE, INACTIVE, SUSPENDED) - &#x60;name&#x60;: Filter by customer name (partial match) - &#x60;email&#x60;: Filter by customer email (exact match) ## Example Response &#x60;&#x60;&#x60;json { \&quot;data\&quot;: [ { \&quot;id\&quot;: \&quot;cust_123456\&quot;, \&quot;firstName\&quot;: \&quot;John\&quot;, \&quot;lastName\&quot;: \&quot;Doe\&quot;, \&quot;email\&quot;: \&quot;john.doe@example.com\&quot;, \&quot;status\&quot;: \&quot;ACTIVE\&quot;, \&quot;createdAt\&quot;: \&quot;2024-03-20T10:00:00Z\&quot; } ], \&quot;total\&quot;: 100, \&quot;skip\&quot;: 0, \&quot;take\&quot;: 10 } &#x60;&#x60;&#x60;
91
+ # @param [Hash] opts the optional parameters
92
+ # @option opts [String] :status Filter by customer status
93
+ # @option opts [String] :name Filter by customer name
94
+ # @option opts [String] :email Filter by customer email
95
+ # @option opts [BigDecimal] :take Number of records to take
96
+ # @option opts [BigDecimal] :skip Number of records to skip
97
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
98
+ def customer_controller_find_all_with_http_info(opts = {})
99
+ if @api_client.config.debugging
100
+ @api_client.config.logger.debug 'Calling API: CustomersApi.customer_controller_find_all ...'
101
+ end
102
+ if @api_client.config.client_side_validation && opts[:'status'] && !['ACTIVE', 'BLACKLISTED', 'DEACTIVATED'].include?(opts[:'status'])
103
+ fail ArgumentError, 'invalid value for "status", must be one of ACTIVE, BLACKLISTED, DEACTIVATED'
104
+ end
105
+ # resource path
106
+ local_var_path = '/api/v0/customers'
107
+
108
+ # query parameters
109
+ query_params = opts[:query_params] || {}
110
+ query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil?
111
+ query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil?
112
+ query_params[:'email'] = opts[:'email'] if !opts[:'email'].nil?
113
+ query_params[:'take'] = opts[:'take'] if !opts[:'take'].nil?
114
+ query_params[:'skip'] = opts[:'skip'] if !opts[:'skip'].nil?
115
+
116
+ # header parameters
117
+ header_params = opts[:header_params] || {}
118
+
119
+ # form parameters
120
+ form_params = opts[:form_params] || {}
121
+
122
+ # http body (model)
123
+ post_body = opts[:body]
124
+
125
+ return_type = opts[:return_type]
126
+
127
+ auth_names = opts[:auth_names] || ['x-client-key', 'x-client-secret']
128
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
129
+ :header_params => header_params,
130
+ :query_params => query_params,
131
+ :form_params => form_params,
132
+ :body => post_body,
133
+ :auth_names => auth_names,
134
+ :return_type => return_type)
135
+
136
+ if @api_client.config.debugging
137
+ @api_client.config.logger.debug "API called: CustomersApi#customer_controller_find_all\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
138
+ end
139
+ return data, status_code, headers
140
+ end
141
+ # Get a customer by ID
142
+ # Retrieves detailed information about a specific customer. This endpoint allows you to fetch complete customer details including their address and contact information. ## Use Cases - View customer details - Verify customer information - Update customer records ## Example Response ```json { \"id\": \"cust_123456\", \"firstName\": \"John\", \"lastName\": \"Doe\", \"email\": \"john.doe@example.com\", \"phone\": \"+1234567890\", \"status\": \"ACTIVE\", \"address\": { \"street\": \"123 Main St\", \"city\": \"New York\", \"state\": \"NY\", \"zipCode\": \"10001\", \"country\": \"USA\" }, \"createdAt\": \"2024-03-20T10:00:00Z\", \"updatedAt\": \"2024-03-20T10:00:00Z\" } ```
143
+ # @param id
144
+ # @param [Hash] opts the optional parameters
145
+ # @return [nil]
146
+ def customer_controller_find_one(id, opts = {})
147
+ customer_controller_find_one_with_http_info(id, opts)
148
+ nil
149
+ end
150
+
151
+ # Get a customer by ID
152
+ # Retrieves detailed information about a specific customer. This endpoint allows you to fetch complete customer details including their address and contact information. ## Use Cases - View customer details - Verify customer information - Update customer records ## Example Response &#x60;&#x60;&#x60;json { \&quot;id\&quot;: \&quot;cust_123456\&quot;, \&quot;firstName\&quot;: \&quot;John\&quot;, \&quot;lastName\&quot;: \&quot;Doe\&quot;, \&quot;email\&quot;: \&quot;john.doe@example.com\&quot;, \&quot;phone\&quot;: \&quot;+1234567890\&quot;, \&quot;status\&quot;: \&quot;ACTIVE\&quot;, \&quot;address\&quot;: { \&quot;street\&quot;: \&quot;123 Main St\&quot;, \&quot;city\&quot;: \&quot;New York\&quot;, \&quot;state\&quot;: \&quot;NY\&quot;, \&quot;zipCode\&quot;: \&quot;10001\&quot;, \&quot;country\&quot;: \&quot;USA\&quot; }, \&quot;createdAt\&quot;: \&quot;2024-03-20T10:00:00Z\&quot;, \&quot;updatedAt\&quot;: \&quot;2024-03-20T10:00:00Z\&quot; } &#x60;&#x60;&#x60;
153
+ # @param id
154
+ # @param [Hash] opts the optional parameters
155
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
156
+ def customer_controller_find_one_with_http_info(id, opts = {})
157
+ if @api_client.config.debugging
158
+ @api_client.config.logger.debug 'Calling API: CustomersApi.customer_controller_find_one ...'
159
+ end
160
+ # verify the required parameter 'id' is set
161
+ if @api_client.config.client_side_validation && id.nil?
162
+ fail ArgumentError, "Missing the required parameter 'id' when calling CustomersApi.customer_controller_find_one"
163
+ end
164
+ # resource path
165
+ local_var_path = '/api/v0/customers/{id}'.sub('{' + 'id' + '}', id.to_s)
166
+
167
+ # query parameters
168
+ query_params = opts[:query_params] || {}
169
+
170
+ # header parameters
171
+ header_params = opts[:header_params] || {}
172
+
173
+ # form parameters
174
+ form_params = opts[:form_params] || {}
175
+
176
+ # http body (model)
177
+ post_body = opts[:body]
178
+
179
+ return_type = opts[:return_type]
180
+
181
+ auth_names = opts[:auth_names] || ['x-client-key', 'x-client-secret']
182
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
183
+ :header_params => header_params,
184
+ :query_params => query_params,
185
+ :form_params => form_params,
186
+ :body => post_body,
187
+ :auth_names => auth_names,
188
+ :return_type => return_type)
189
+
190
+ if @api_client.config.debugging
191
+ @api_client.config.logger.debug "API called: CustomersApi#customer_controller_find_one\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
192
+ end
193
+ return data, status_code, headers
194
+ end
195
+ # Update a customer
196
+ # Updates an existing customer's information. This endpoint allows you to modify customer details while preserving their core information. ## Use Cases - Update customer contact information - Change customer address - Modify customer status ## Example Request ```json { \"firstName\": \"John\", \"lastName\": \"Smith\", \"phone\": \"+1987654321\", \"address\": { \"street\": \"456 Oak St\", \"city\": \"Los Angeles\", \"state\": \"CA\", \"zipCode\": \"90001\", \"country\": \"USA\" } } ``` ## Notes - Only include fields that need to be updated - Email address cannot be changed - Status changes may require additional verification
197
+ # @param body Customer update data
198
+ # @param id
199
+ # @param [Hash] opts the optional parameters
200
+ # @return [nil]
201
+ def customer_controller_update(body, id, opts = {})
202
+ customer_controller_update_with_http_info(body, id, opts)
203
+ nil
204
+ end
205
+
206
+ # Update a customer
207
+ # Updates an existing customer&#x27;s information. This endpoint allows you to modify customer details while preserving their core information. ## Use Cases - Update customer contact information - Change customer address - Modify customer status ## Example Request &#x60;&#x60;&#x60;json { \&quot;firstName\&quot;: \&quot;John\&quot;, \&quot;lastName\&quot;: \&quot;Smith\&quot;, \&quot;phone\&quot;: \&quot;+1987654321\&quot;, \&quot;address\&quot;: { \&quot;street\&quot;: \&quot;456 Oak St\&quot;, \&quot;city\&quot;: \&quot;Los Angeles\&quot;, \&quot;state\&quot;: \&quot;CA\&quot;, \&quot;zipCode\&quot;: \&quot;90001\&quot;, \&quot;country\&quot;: \&quot;USA\&quot; } } &#x60;&#x60;&#x60; ## Notes - Only include fields that need to be updated - Email address cannot be changed - Status changes may require additional verification
208
+ # @param body Customer update data
209
+ # @param id
210
+ # @param [Hash] opts the optional parameters
211
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
212
+ def customer_controller_update_with_http_info(body, id, opts = {})
213
+ if @api_client.config.debugging
214
+ @api_client.config.logger.debug 'Calling API: CustomersApi.customer_controller_update ...'
215
+ end
216
+ # verify the required parameter 'body' is set
217
+ if @api_client.config.client_side_validation && body.nil?
218
+ fail ArgumentError, "Missing the required parameter 'body' when calling CustomersApi.customer_controller_update"
219
+ end
220
+ # verify the required parameter 'id' is set
221
+ if @api_client.config.client_side_validation && id.nil?
222
+ fail ArgumentError, "Missing the required parameter 'id' when calling CustomersApi.customer_controller_update"
223
+ end
224
+ # resource path
225
+ local_var_path = '/api/v0/customers/{id}'.sub('{' + 'id' + '}', id.to_s)
226
+
227
+ # query parameters
228
+ query_params = opts[:query_params] || {}
229
+
230
+ # header parameters
231
+ header_params = opts[:header_params] || {}
232
+ # HTTP header 'Content-Type'
233
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
234
+
235
+ # form parameters
236
+ form_params = opts[:form_params] || {}
237
+
238
+ # http body (model)
239
+ post_body = opts[:body] || @api_client.object_to_http_body(body)
240
+
241
+ return_type = opts[:return_type]
242
+
243
+ auth_names = opts[:auth_names] || ['x-client-key', 'x-client-secret']
244
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
245
+ :header_params => header_params,
246
+ :query_params => query_params,
247
+ :form_params => form_params,
248
+ :body => post_body,
249
+ :auth_names => auth_names,
250
+ :return_type => return_type)
251
+
252
+ if @api_client.config.debugging
253
+ @api_client.config.logger.debug "API called: CustomersApi#customer_controller_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
254
+ end
255
+ return data, status_code, headers
256
+ end
257
+ end
258
+ end
@@ -0,0 +1,184 @@
1
+ =begin
2
+ #Devdraft AI Payment & Business Management API
3
+
4
+ # A comprehensive payment processing and business management API that enables seamless integration of cryptocurrency and traditional payment methods.
5
+
6
+ OpenAPI spec version: 1.0.0
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 3.0.65
10
+ =end
11
+
12
+ module DevDraftAI
13
+ class ExchangeRatesApi
14
+ attr_accessor :api_client
15
+
16
+ def initialize(api_client = ApiClient.default)
17
+ @api_client = api_client
18
+ end
19
+ # Get EUR to USD exchange rate
20
+ # 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.
21
+ # @param [Hash] opts the optional parameters
22
+ # @return [ExchangeRateResponseDto]
23
+ def exchange_rate_controller_get_eurto_usd_rate(opts = {})
24
+ data, _status_code, _headers = exchange_rate_controller_get_eurto_usd_rate_with_http_info(opts)
25
+ data
26
+ end
27
+
28
+ # Get EUR to USD exchange rate
29
+ # 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.
30
+ # @param [Hash] opts the optional parameters
31
+ # @return [Array<(ExchangeRateResponseDto, Integer, Hash)>] ExchangeRateResponseDto data, response status code and response headers
32
+ def exchange_rate_controller_get_eurto_usd_rate_with_http_info(opts = {})
33
+ if @api_client.config.debugging
34
+ @api_client.config.logger.debug 'Calling API: ExchangeRatesApi.exchange_rate_controller_get_eurto_usd_rate ...'
35
+ end
36
+ # resource path
37
+ local_var_path = '/api/v0/exchange-rate/eur-to-usd'
38
+
39
+ # query parameters
40
+ query_params = opts[:query_params] || {}
41
+
42
+ # header parameters
43
+ header_params = opts[:header_params] || {}
44
+ # HTTP header 'Accept' (if needed)
45
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
46
+
47
+ # form parameters
48
+ form_params = opts[:form_params] || {}
49
+
50
+ # http body (model)
51
+ post_body = opts[:body]
52
+
53
+ return_type = opts[:return_type] || 'ExchangeRateResponseDto'
54
+
55
+ auth_names = opts[:auth_names] || ['x-client-key', 'x-client-secret']
56
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
57
+ :header_params => header_params,
58
+ :query_params => query_params,
59
+ :form_params => form_params,
60
+ :body => post_body,
61
+ :auth_names => auth_names,
62
+ :return_type => return_type)
63
+
64
+ if @api_client.config.debugging
65
+ @api_client.config.logger.debug "API called: ExchangeRatesApi#exchange_rate_controller_get_eurto_usd_rate\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
66
+ end
67
+ return data, status_code, headers
68
+ end
69
+ # Get exchange rate between specified currencies
70
+ # 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.
71
+ # @param from Source currency code (e.g., usd)
72
+ # @param to Target currency code (e.g., eur)
73
+ # @param [Hash] opts the optional parameters
74
+ # @return [ExchangeRateResponseDto]
75
+ def exchange_rate_controller_get_exchange_rate(from, to, opts = {})
76
+ data, _status_code, _headers = exchange_rate_controller_get_exchange_rate_with_http_info(from, to, opts)
77
+ data
78
+ end
79
+
80
+ # Get exchange rate between specified currencies
81
+ # 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.
82
+ # @param from Source currency code (e.g., usd)
83
+ # @param to Target currency code (e.g., eur)
84
+ # @param [Hash] opts the optional parameters
85
+ # @return [Array<(ExchangeRateResponseDto, Integer, Hash)>] ExchangeRateResponseDto data, response status code and response headers
86
+ def exchange_rate_controller_get_exchange_rate_with_http_info(from, to, opts = {})
87
+ if @api_client.config.debugging
88
+ @api_client.config.logger.debug 'Calling API: ExchangeRatesApi.exchange_rate_controller_get_exchange_rate ...'
89
+ end
90
+ # verify the required parameter 'from' is set
91
+ if @api_client.config.client_side_validation && from.nil?
92
+ fail ArgumentError, "Missing the required parameter 'from' when calling ExchangeRatesApi.exchange_rate_controller_get_exchange_rate"
93
+ end
94
+ # verify the required parameter 'to' is set
95
+ if @api_client.config.client_side_validation && to.nil?
96
+ fail ArgumentError, "Missing the required parameter 'to' when calling ExchangeRatesApi.exchange_rate_controller_get_exchange_rate"
97
+ end
98
+ # resource path
99
+ local_var_path = '/api/v0/exchange-rate'
100
+
101
+ # query parameters
102
+ query_params = opts[:query_params] || {}
103
+ query_params[:'from'] = from
104
+ query_params[:'to'] = to
105
+
106
+ # header parameters
107
+ header_params = opts[:header_params] || {}
108
+ # HTTP header 'Accept' (if needed)
109
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
110
+
111
+ # form parameters
112
+ form_params = opts[:form_params] || {}
113
+
114
+ # http body (model)
115
+ post_body = opts[:body]
116
+
117
+ return_type = opts[:return_type] || 'ExchangeRateResponseDto'
118
+
119
+ auth_names = opts[:auth_names] || ['x-client-key', 'x-client-secret']
120
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
121
+ :header_params => header_params,
122
+ :query_params => query_params,
123
+ :form_params => form_params,
124
+ :body => post_body,
125
+ :auth_names => auth_names,
126
+ :return_type => return_type)
127
+
128
+ if @api_client.config.debugging
129
+ @api_client.config.logger.debug "API called: ExchangeRatesApi#exchange_rate_controller_get_exchange_rate\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
130
+ end
131
+ return data, status_code, headers
132
+ end
133
+ # Get USD to EUR exchange rate
134
+ # 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.
135
+ # @param [Hash] opts the optional parameters
136
+ # @return [ExchangeRateResponseDto]
137
+ def exchange_rate_controller_get_usdto_eur_rate(opts = {})
138
+ data, _status_code, _headers = exchange_rate_controller_get_usdto_eur_rate_with_http_info(opts)
139
+ data
140
+ end
141
+
142
+ # Get USD to EUR exchange rate
143
+ # 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.
144
+ # @param [Hash] opts the optional parameters
145
+ # @return [Array<(ExchangeRateResponseDto, Integer, Hash)>] ExchangeRateResponseDto data, response status code and response headers
146
+ def exchange_rate_controller_get_usdto_eur_rate_with_http_info(opts = {})
147
+ if @api_client.config.debugging
148
+ @api_client.config.logger.debug 'Calling API: ExchangeRatesApi.exchange_rate_controller_get_usdto_eur_rate ...'
149
+ end
150
+ # resource path
151
+ local_var_path = '/api/v0/exchange-rate/usd-to-eur'
152
+
153
+ # query parameters
154
+ query_params = opts[:query_params] || {}
155
+
156
+ # header parameters
157
+ header_params = opts[:header_params] || {}
158
+ # HTTP header 'Accept' (if needed)
159
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
160
+
161
+ # form parameters
162
+ form_params = opts[:form_params] || {}
163
+
164
+ # http body (model)
165
+ post_body = opts[:body]
166
+
167
+ return_type = opts[:return_type] || 'ExchangeRateResponseDto'
168
+
169
+ auth_names = opts[:auth_names] || ['x-client-key', 'x-client-secret']
170
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
171
+ :header_params => header_params,
172
+ :query_params => query_params,
173
+ :form_params => form_params,
174
+ :body => post_body,
175
+ :auth_names => auth_names,
176
+ :return_type => return_type)
177
+
178
+ if @api_client.config.debugging
179
+ @api_client.config.logger.debug "API called: ExchangeRatesApi#exchange_rate_controller_get_usdto_eur_rate\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
180
+ end
181
+ return data, status_code, headers
182
+ end
183
+ end
184
+ end