devdraft 1.0.1 → 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.
Files changed (234) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +160 -191
  3. data/Rakefile +2 -0
  4. data/devdraft-1.0.0.gem +0 -0
  5. data/{devdraft_ai_sdk.gemspec → devdraft.gemspec} +15 -11
  6. data/docs/APIHealthApi.md +82 -30
  7. data/docs/AggregatedBalanceResponse.md +19 -6
  8. data/docs/AllBalancesResponse.md +19 -6
  9. data/docs/AppBalancesApi.md +125 -65
  10. data/docs/BridgeFiatPaymentRail.md +15 -0
  11. data/docs/BridgePaymentRail.md +12 -3
  12. data/docs/CreateBankPaymentIntentDto.md +49 -21
  13. data/docs/CreateCustomerDto.md +25 -9
  14. data/docs/CreateDirectBankTransferDto.md +29 -11
  15. data/docs/CreateDirectWalletTransferDto.md +21 -7
  16. data/docs/CreateExternalBankTransferDto.md +40 -0
  17. data/docs/CreateExternalStablecoinTransferDto.md +28 -0
  18. data/docs/CreateInvoiceDto.md +45 -19
  19. data/docs/CreateLiquidationAddressDto.md +43 -18
  20. data/docs/CreatePaymentLinkDto.md +53 -28
  21. data/docs/CreateStablePaymentIntentDto.md +43 -18
  22. data/docs/CreateStablecoinConversionDto.md +23 -8
  23. data/docs/CreateTaxDto.md +26 -0
  24. data/docs/CreateWebhookDto.md +23 -8
  25. data/docs/CustomerStatus.md +12 -3
  26. data/docs/CustomerType.md +15 -0
  27. data/docs/CustomersApi.md +187 -114
  28. data/docs/DestinationCurrency.md +12 -3
  29. data/docs/ExchangeRateResponseDto.md +25 -9
  30. data/docs/ExchangeRatesApi.md +130 -72
  31. data/docs/FiatCurrency.md +12 -3
  32. data/docs/HealthResponseDto.md +25 -9
  33. data/docs/InvoiceProductDto.md +17 -5
  34. data/docs/InvoicesApi.md +177 -104
  35. data/docs/LiquidationAddressResponseDto.md +41 -17
  36. data/docs/LiquidationAddressesApi.md +115 -61
  37. data/docs/PaymentIntentsApi.md +93 -57
  38. data/docs/PaymentLinkProductDto.md +17 -5
  39. data/docs/PaymentLinksApi.md +175 -102
  40. data/docs/PaymentRequestDto.md +21 -7
  41. data/docs/PaymentResponseDto.md +23 -8
  42. data/docs/ProductsApi.md +307 -194
  43. data/docs/PublicHealthResponseDto.md +19 -6
  44. data/docs/RefundResponseDto.md +23 -8
  45. data/docs/StableCoinCurrency.md +12 -3
  46. data/docs/TaxControllerCreate201Response.md +30 -0
  47. data/docs/TaxControllerDeleteWithoutId400Response.md +22 -0
  48. data/docs/TaxControllerUpdateWithoutId400Response.md +22 -0
  49. data/docs/TaxesApi.md +374 -122
  50. data/docs/TestPaymentsApi.md +150 -60
  51. data/docs/TransfersApi.md +274 -72
  52. data/docs/UpdateCustomerDto.md +25 -9
  53. data/docs/UpdateTaxDto.md +26 -0
  54. data/docs/UpdateWebhookDto.md +23 -8
  55. data/docs/WalletsApi.md +44 -24
  56. data/docs/WebhookResponseDto.md +29 -11
  57. data/docs/WebhooksApi.md +225 -134
  58. data/git_push.sh +41 -28
  59. data/lib/devdraft/api/api_health_api.rb +32 -16
  60. data/lib/devdraft/api/app_balances_api.rb +45 -22
  61. data/lib/devdraft/api/customers_api.rb +124 -71
  62. data/lib/devdraft/api/exchange_rates_api.rb +49 -26
  63. data/lib/devdraft/api/invoices_api.rb +89 -53
  64. data/lib/devdraft/api/liquidation_addresses_api.rb +70 -44
  65. data/lib/devdraft/api/payment_intents_api.rb +62 -40
  66. data/lib/devdraft/api/payment_links_api.rb +85 -49
  67. data/lib/devdraft/api/products_api.rb +214 -216
  68. data/lib/devdraft/api/taxes_api.rb +257 -66
  69. data/lib/devdraft/api/test_payments_api.rb +70 -44
  70. data/lib/devdraft/api/transfers_api.rb +206 -46
  71. data/lib/devdraft/api/wallets_api.rb +18 -9
  72. data/lib/devdraft/api/webhooks_api.rb +109 -66
  73. data/lib/devdraft/api_client.rb +76 -71
  74. data/lib/devdraft/api_error.rb +5 -4
  75. data/lib/devdraft/api_model_base.rb +88 -0
  76. data/lib/devdraft/configuration.rb +121 -18
  77. data/lib/devdraft/models/aggregated_balance_response.rb +68 -101
  78. data/lib/devdraft/models/all_balances_response.rb +76 -99
  79. data/lib/devdraft/models/bridge_fiat_payment_rail.rb +45 -0
  80. data/lib/devdraft/models/bridge_payment_rail.rb +36 -24
  81. data/lib/devdraft/models/create_bank_payment_intent_dto.rb +191 -114
  82. data/lib/devdraft/models/create_customer_dto.rb +123 -113
  83. data/lib/devdraft/models/create_direct_bank_transfer_dto.rb +105 -104
  84. data/lib/devdraft/models/create_direct_wallet_transfer_dto.rb +89 -100
  85. data/lib/devdraft/models/create_external_bank_transfer_dto.rb +505 -0
  86. data/lib/devdraft/models/create_external_stablecoin_transfer_dto.rb +266 -0
  87. data/lib/devdraft/models/create_invoice_dto.rb +151 -121
  88. data/lib/devdraft/models/create_liquidation_address_dto.rb +195 -115
  89. data/lib/devdraft/models/create_payment_link_dto.rb +192 -214
  90. data/lib/devdraft/models/create_stable_payment_intent_dto.rb +324 -111
  91. data/lib/devdraft/models/create_stablecoin_conversion_dto.rb +102 -101
  92. data/lib/devdraft/models/create_tax_dto.rb +281 -0
  93. data/lib/devdraft/models/create_webhook_dto.rb +104 -101
  94. data/lib/devdraft/models/customer_status.rb +23 -10
  95. data/lib/devdraft/models/customer_type.rb +45 -0
  96. data/lib/devdraft/models/destination_currency.rb +27 -15
  97. data/lib/devdraft/models/exchange_rate_response_dto.rb +103 -102
  98. data/lib/devdraft/models/fiat_currency.rb +22 -10
  99. data/lib/devdraft/models/health_response_dto.rb +99 -106
  100. data/lib/devdraft/models/invoice_product_dto.rb +63 -98
  101. data/lib/devdraft/models/liquidation_address_response_dto.rb +147 -110
  102. data/lib/devdraft/models/payment_link_product_dto.rb +70 -98
  103. data/lib/devdraft/models/payment_request_dto.rb +77 -100
  104. data/lib/devdraft/models/payment_response_dto.rb +102 -101
  105. data/lib/devdraft/models/public_health_response_dto.rb +68 -101
  106. data/lib/devdraft/models/refund_response_dto.rb +102 -101
  107. data/lib/devdraft/models/stable_coin_currency.rb +21 -9
  108. data/lib/devdraft/models/tax_controller_create201_response.rb +201 -0
  109. data/lib/devdraft/models/tax_controller_delete_without_id400_response.rb +165 -0
  110. data/lib/devdraft/models/tax_controller_update_without_id400_response.rb +165 -0
  111. data/lib/devdraft/models/update_customer_dto.rb +117 -113
  112. data/lib/devdraft/models/update_tax_dto.rb +256 -0
  113. data/lib/devdraft/models/update_webhook_dto.rb +70 -101
  114. data/lib/devdraft/models/webhook_response_dto.rb +140 -103
  115. data/lib/devdraft/version.rb +6 -5
  116. data/lib/devdraft.rb +18 -27
  117. data/spec/api/api_health_api_spec.rb +10 -9
  118. data/spec/api/app_balances_api_spec.rb +11 -10
  119. data/spec/api/customers_api_spec.rb +25 -24
  120. data/spec/api/exchange_rates_api_spec.rb +11 -10
  121. data/spec/api/invoices_api_spec.rb +16 -15
  122. data/spec/api/liquidation_addresses_api_spec.rb +13 -12
  123. data/spec/api/payment_intents_api_spec.rb +12 -11
  124. data/spec/api/payment_links_api_spec.rb +14 -13
  125. data/spec/api/products_api_spec.rb +41 -40
  126. data/spec/api/taxes_api_spec.rb +51 -21
  127. data/spec/api/test_payments_api_spec.rb +14 -13
  128. data/spec/api/transfers_api_spec.rb +36 -13
  129. data/spec/api/wallets_api_spec.rb +9 -8
  130. data/spec/api/webhooks_api_spec.rb +20 -19
  131. data/spec/models/aggregated_balance_response_spec.rb +15 -19
  132. data/spec/models/all_balances_response_spec.rb +14 -18
  133. data/spec/models/bridge_fiat_payment_rail_spec.rb +30 -0
  134. data/spec/models/bridge_payment_rail_spec.rb +11 -15
  135. data/spec/models/create_bank_payment_intent_dto_spec.rb +29 -33
  136. data/spec/models/create_customer_dto_spec.rb +17 -25
  137. data/spec/models/create_direct_bank_transfer_dto_spec.rb +19 -23
  138. data/spec/models/create_direct_wallet_transfer_dto_spec.rb +15 -19
  139. data/spec/models/create_external_bank_transfer_dto_spec.rb +102 -0
  140. data/spec/models/create_external_stablecoin_transfer_dto_spec.rb +66 -0
  141. data/spec/models/create_invoice_dto_spec.rb +31 -35
  142. data/spec/models/create_liquidation_address_dto_spec.rb +28 -32
  143. data/spec/models/create_payment_link_dto_spec.rb +34 -76
  144. data/spec/models/create_stable_payment_intent_dto_spec.rb +26 -30
  145. data/spec/models/create_stablecoin_conversion_dto_spec.rb +16 -20
  146. data/spec/models/create_tax_dto_spec.rb +60 -0
  147. data/spec/models/create_webhook_dto_spec.rb +16 -20
  148. data/spec/models/customer_status_spec.rb +11 -15
  149. data/spec/models/customer_type_spec.rb +30 -0
  150. data/spec/models/destination_currency_spec.rb +11 -15
  151. data/spec/models/exchange_rate_response_dto_spec.rb +17 -21
  152. data/spec/models/fiat_currency_spec.rb +11 -15
  153. data/spec/models/health_response_dto_spec.rb +19 -23
  154. data/spec/models/invoice_product_dto_spec.rb +13 -17
  155. data/spec/models/liquidation_address_response_dto_spec.rb +25 -29
  156. data/spec/models/payment_link_product_dto_spec.rb +13 -17
  157. data/spec/models/payment_request_dto_spec.rb +15 -19
  158. data/spec/models/payment_response_dto_spec.rb +16 -20
  159. data/spec/models/public_health_response_dto_spec.rb +15 -19
  160. data/spec/models/refund_response_dto_spec.rb +16 -20
  161. data/spec/models/stable_coin_currency_spec.rb +11 -15
  162. data/spec/models/tax_controller_create201_response_spec.rb +72 -0
  163. data/spec/models/tax_controller_delete_without_id400_response_spec.rb +48 -0
  164. data/spec/models/tax_controller_update_without_id400_response_spec.rb +48 -0
  165. data/spec/models/update_customer_dto_spec.rb +17 -25
  166. data/spec/models/update_tax_dto_spec.rb +60 -0
  167. data/spec/models/update_webhook_dto_spec.rb +16 -20
  168. data/spec/models/webhook_response_dto_spec.rb +19 -23
  169. data/spec/spec_helper.rb +5 -4
  170. metadata +49 -116
  171. data/docs/AllOfAllBalancesResponseEurc.md +0 -9
  172. data/docs/AllOfAllBalancesResponseUsdc.md +0 -9
  173. data/docs/AllOfCreateBankPaymentIntentDtoDestinationCurrency.md +0 -6
  174. data/docs/AllOfCreateBankPaymentIntentDtoDestinationNetwork.md +0 -6
  175. data/docs/AllOfCreateBankPaymentIntentDtoSourceCurrency.md +0 -6
  176. data/docs/AllOfCreateBankPaymentIntentDtoSourcePaymentRail.md +0 -6
  177. data/docs/AllOfCreateCustomerDtoStatus.md +0 -6
  178. data/docs/AllOfCreateLiquidationAddressDtoDestinationCurrency.md +0 -6
  179. data/docs/AllOfCreateLiquidationAddressDtoDestinationPaymentRail.md +0 -6
  180. data/docs/AllOfCreateStablePaymentIntentDtoDestinationCurrency.md +0 -6
  181. data/docs/AllOfCreateStablePaymentIntentDtoDestinationNetwork.md +0 -6
  182. data/docs/AllOfCreateStablePaymentIntentDtoSourceCurrency.md +0 -6
  183. data/docs/AllOfCreateStablePaymentIntentDtoSourceNetwork.md +0 -6
  184. data/docs/AllOfUpdateCustomerDtoStatus.md +0 -6
  185. data/docs/CreateProductDto.md +0 -18
  186. data/docs/CreateTaxInput.md +0 -6
  187. data/docs/UpdatePaymentLinkDto.md +0 -6
  188. data/docs/UpdatePreferenceInput.md +0 -6
  189. data/docs/UpdateProductDto.md +0 -18
  190. data/docs/UpdateTaxInput.md +0 -6
  191. data/example.rb +0 -94
  192. data/lib/devdraft/models/all_of_all_balances_response_eurc.rb +0 -283
  193. data/lib/devdraft/models/all_of_all_balances_response_usdc.rb +0 -283
  194. data/lib/devdraft/models/all_of_create_bank_payment_intent_dto_destination_currency.rb +0 -202
  195. data/lib/devdraft/models/all_of_create_bank_payment_intent_dto_destination_network.rb +0 -202
  196. data/lib/devdraft/models/all_of_create_bank_payment_intent_dto_source_currency.rb +0 -202
  197. data/lib/devdraft/models/all_of_create_bank_payment_intent_dto_source_payment_rail.rb +0 -202
  198. data/lib/devdraft/models/all_of_create_customer_dto_status.rb +0 -202
  199. data/lib/devdraft/models/all_of_create_liquidation_address_dto_destination_currency.rb +0 -202
  200. data/lib/devdraft/models/all_of_create_liquidation_address_dto_destination_payment_rail.rb +0 -202
  201. data/lib/devdraft/models/all_of_create_stable_payment_intent_dto_destination_currency.rb +0 -202
  202. data/lib/devdraft/models/all_of_create_stable_payment_intent_dto_destination_network.rb +0 -202
  203. data/lib/devdraft/models/all_of_create_stable_payment_intent_dto_source_currency.rb +0 -202
  204. data/lib/devdraft/models/all_of_create_stable_payment_intent_dto_source_network.rb +0 -202
  205. data/lib/devdraft/models/all_of_update_customer_dto_status.rb +0 -202
  206. data/lib/devdraft/models/create_product_dto.rb +0 -370
  207. data/lib/devdraft/models/create_tax_input.rb +0 -197
  208. data/lib/devdraft/models/update_payment_link_dto.rb +0 -197
  209. data/lib/devdraft/models/update_preference_input.rb +0 -197
  210. data/lib/devdraft/models/update_product_dto.rb +0 -355
  211. data/lib/devdraft/models/update_tax_input.rb +0 -197
  212. data/spec/api_client_spec.rb +0 -225
  213. data/spec/base_object_spec.rb +0 -109
  214. data/spec/configuration_spec.rb +0 -41
  215. data/spec/models/all_of_all_balances_response_eurc_spec.rb +0 -56
  216. data/spec/models/all_of_all_balances_response_usdc_spec.rb +0 -56
  217. data/spec/models/all_of_create_bank_payment_intent_dto_destination_currency_spec.rb +0 -34
  218. data/spec/models/all_of_create_bank_payment_intent_dto_destination_network_spec.rb +0 -34
  219. data/spec/models/all_of_create_bank_payment_intent_dto_source_currency_spec.rb +0 -34
  220. data/spec/models/all_of_create_bank_payment_intent_dto_source_payment_rail_spec.rb +0 -34
  221. data/spec/models/all_of_create_customer_dto_status_spec.rb +0 -34
  222. data/spec/models/all_of_create_liquidation_address_dto_destination_currency_spec.rb +0 -34
  223. data/spec/models/all_of_create_liquidation_address_dto_destination_payment_rail_spec.rb +0 -34
  224. data/spec/models/all_of_create_stable_payment_intent_dto_destination_currency_spec.rb +0 -34
  225. data/spec/models/all_of_create_stable_payment_intent_dto_destination_network_spec.rb +0 -34
  226. data/spec/models/all_of_create_stable_payment_intent_dto_source_currency_spec.rb +0 -34
  227. data/spec/models/all_of_create_stable_payment_intent_dto_source_network_spec.rb +0 -34
  228. data/spec/models/all_of_update_customer_dto_status_spec.rb +0 -34
  229. data/spec/models/create_product_dto_spec.rb +0 -110
  230. data/spec/models/create_tax_input_spec.rb +0 -34
  231. data/spec/models/update_payment_link_dto_spec.rb +0 -34
  232. data/spec/models/update_preference_input_spec.rb +0 -34
  233. data/spec/models/update_product_dto_spec.rb +0 -110
  234. data/spec/models/update_tax_input_spec.rb +0 -34
@@ -3,13 +3,16 @@
3
3
 
4
4
  # A comprehensive payment processing and business management API that enables seamless integration of cryptocurrency and traditional payment methods.
5
5
 
6
- OpenAPI spec version: 1.0.0
6
+ The version of the OpenAPI document: 1.0.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.17.0
7
10
 
8
- Generated by: https://github.com/swagger-api/swagger-codegen.git
9
- Swagger Codegen version: 3.0.65
10
11
  =end
11
12
 
12
- module DevDraftAI
13
+ require 'cgi'
14
+
15
+ module Devdraft
13
16
  class TestPaymentsApi
14
17
  attr_accessor :api_client
15
18
 
@@ -18,33 +21,33 @@ module DevDraftAI
18
21
  end
19
22
  # Process a test payment
20
23
  # Creates a new payment. Requires an idempotency key to prevent duplicate payments on retry. ## Idempotency Key Best Practices 1. **Generate unique keys**: Use UUIDs or similar unique identifiers, prefixed with a descriptive operation name 2. **Store keys client-side**: Save the key with the original request so you can retry with the same key 3. **Key format**: Between 6-64 alphanumeric characters 4. **Expiration**: Keys expire after 24 hours by default 5. **Use case**: Perfect for ensuring payment operations are never processed twice, even during network failures ## Example Request (curl) ```bash curl -X POST \\ https://api.example.com/rest-api/v0/test-payment \\ -H 'Content-Type: application/json' \\ -H 'Client-Key: your-api-key' \\ -H 'Client-Secret: your-api-secret' \\ -H 'Idempotency-Key: payment_123456_unique_key' \\ -d '{ \"amount\": 100.00, \"currency\": \"USD\", \"description\": \"Test payment for order #12345\", \"customerId\": \"cus_12345\" }' ``` ## Example Response (First Request) ```json { \"id\": \"pay_abc123xyz456\", \"amount\": 100.00, \"currency\": \"USD\", \"status\": \"succeeded\", \"timestamp\": \"2023-07-01T12:00:00.000Z\" } ``` ## Example Response (Duplicate Request) The exact same response will be returned for any duplicate request with the same idempotency key, without creating a new payment. ## Retry Scenario Example Network failure during payment submission: 1. Client creates payment request with idempotency key: \"payment_123456_unique_key\" 2. Request begins processing, but network connection fails before response received 3. Client retries the exact same request with the same idempotency key 4. Server detects duplicate idempotency key and returns the result of the first request 5. No duplicate payment is created If you retry with same key but different parameters (e.g., different amount), you'll receive a 409 Conflict error.
21
- # @param body
22
- # @param idempotency_key Unique key to ensure the request is idempotent. If a request with the same key is sent multiple times, only the first will be processed, and subsequent requests will return the same response.
24
+ # @param idempotency_key [String] Unique key to ensure the request is idempotent. If a request with the same key is sent multiple times, only the first will be processed, and subsequent requests will return the same response.
25
+ # @param payment_request_dto [PaymentRequestDto]
23
26
  # @param [Hash] opts the optional parameters
24
27
  # @return [PaymentResponseDto]
25
- def test_payment_controller_create_payment_v0(body, idempotency_key, opts = {})
26
- data, _status_code, _headers = test_payment_controller_create_payment_v0_with_http_info(body, idempotency_key, opts)
28
+ def test_payment_controller_create_payment_v0(idempotency_key, payment_request_dto, opts = {})
29
+ data, _status_code, _headers = test_payment_controller_create_payment_v0_with_http_info(idempotency_key, payment_request_dto, opts)
27
30
  data
28
31
  end
29
32
 
30
33
  # Process a test payment
31
- # Creates a new payment. Requires an idempotency key to prevent duplicate payments on retry. ## Idempotency Key Best Practices 1. **Generate unique keys**: Use UUIDs or similar unique identifiers, prefixed with a descriptive operation name 2. **Store keys client-side**: Save the key with the original request so you can retry with the same key 3. **Key format**: Between 6-64 alphanumeric characters 4. **Expiration**: Keys expire after 24 hours by default 5. **Use case**: Perfect for ensuring payment operations are never processed twice, even during network failures ## Example Request (curl) ```bash curl -X POST \\ https://api.example.com/rest-api/v0/test-payment \\ -H 'Content-Type: application/json' \\ -H 'Client-Key: your-api-key' \\ -H 'Client-Secret: your-api-secret' \\ -H 'Idempotency-Key: payment_123456_unique_key' \\ -d '{ \"amount\": 100.00, \"currency\": \"USD\", \"description\": \"Test payment for order #12345\", \"customerId\": \"cus_12345\" }' ``` ## Example Response (First Request) ```json { \"id\": \"pay_abc123xyz456\", \"amount\": 100.00, \"currency\": \"USD\", \"status\": \"succeeded\", \"timestamp\": \"2023-07-01T12:00:00.000Z\" } ``` ## Example Response (Duplicate Request) The exact same response will be returned for any duplicate request with the same idempotency key, without creating a new payment. ## Retry Scenario Example Network failure during payment submission: 1. Client creates payment request with idempotency key: \"payment_123456_unique_key\" 2. Request begins processing, but network connection fails before response received 3. Client retries the exact same request with the same idempotency key 4. Server detects duplicate idempotency key and returns the result of the first request 5. No duplicate payment is created If you retry with same key but different parameters (e.g., different amount), you'll receive a 409 Conflict error.
32
- # @param body
33
- # @param idempotency_key Unique key to ensure the request is idempotent. If a request with the same key is sent multiple times, only the first will be processed, and subsequent requests will return the same response.
34
+ # Creates a new payment. Requires an idempotency key to prevent duplicate payments on retry. ## Idempotency Key Best Practices 1. **Generate unique keys**: Use UUIDs or similar unique identifiers, prefixed with a descriptive operation name 2. **Store keys client-side**: Save the key with the original request so you can retry with the same key 3. **Key format**: Between 6-64 alphanumeric characters 4. **Expiration**: Keys expire after 24 hours by default 5. **Use case**: Perfect for ensuring payment operations are never processed twice, even during network failures ## Example Request (curl) ```bash curl -X POST \\ https://api.example.com/rest-api/v0/test-payment \\ -H 'Content-Type: application/json' \\ -H 'Client-Key: your-api-key' \\ -H 'Client-Secret: your-api-secret' \\ -H 'Idempotency-Key: payment_123456_unique_key' \\ -d '{ \"amount\": 100.00, \"currency\": \"USD\", \"description\": \"Test payment for order #12345\", \"customerId\": \"cus_12345\" }' ``` ## Example Response (First Request) ```json { \"id\": \"pay_abc123xyz456\", \"amount\": 100.00, \"currency\": \"USD\", \"status\": \"succeeded\", \"timestamp\": \"2023-07-01T12:00:00.000Z\" } ``` ## Example Response (Duplicate Request) The exact same response will be returned for any duplicate request with the same idempotency key, without creating a new payment. ## Retry Scenario Example Network failure during payment submission: 1. Client creates payment request with idempotency key: \"payment_123456_unique_key\" 2. Request begins processing, but network connection fails before response received 3. Client retries the exact same request with the same idempotency key 4. Server detects duplicate idempotency key and returns the result of the first request 5. No duplicate payment is created If you retry with same key but different parameters (e.g., different amount), you'll receive a 409 Conflict error.
35
+ # @param idempotency_key [String] Unique key to ensure the request is idempotent. If a request with the same key is sent multiple times, only the first will be processed, and subsequent requests will return the same response.
36
+ # @param payment_request_dto [PaymentRequestDto]
34
37
  # @param [Hash] opts the optional parameters
35
38
  # @return [Array<(PaymentResponseDto, Integer, Hash)>] PaymentResponseDto data, response status code and response headers
36
- def test_payment_controller_create_payment_v0_with_http_info(body, idempotency_key, opts = {})
39
+ def test_payment_controller_create_payment_v0_with_http_info(idempotency_key, payment_request_dto, opts = {})
37
40
  if @api_client.config.debugging
38
41
  @api_client.config.logger.debug 'Calling API: TestPaymentsApi.test_payment_controller_create_payment_v0 ...'
39
42
  end
40
- # verify the required parameter 'body' is set
41
- if @api_client.config.client_side_validation && body.nil?
42
- fail ArgumentError, "Missing the required parameter 'body' when calling TestPaymentsApi.test_payment_controller_create_payment_v0"
43
- end
44
43
  # verify the required parameter 'idempotency_key' is set
45
44
  if @api_client.config.client_side_validation && idempotency_key.nil?
46
45
  fail ArgumentError, "Missing the required parameter 'idempotency_key' when calling TestPaymentsApi.test_payment_controller_create_payment_v0"
47
46
  end
47
+ # verify the required parameter 'payment_request_dto' is set
48
+ if @api_client.config.client_side_validation && payment_request_dto.nil?
49
+ fail ArgumentError, "Missing the required parameter 'payment_request_dto' when calling TestPaymentsApi.test_payment_controller_create_payment_v0"
50
+ end
48
51
  # resource path
49
52
  local_var_path = '/api/v0/test-payment'
50
53
 
@@ -54,35 +57,45 @@ module DevDraftAI
54
57
  # header parameters
55
58
  header_params = opts[:header_params] || {}
56
59
  # HTTP header 'Accept' (if needed)
57
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
60
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
58
61
  # HTTP header 'Content-Type'
59
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
62
+ content_type = @api_client.select_header_content_type(['application/json'])
63
+ if !content_type.nil?
64
+ header_params['Content-Type'] = content_type
65
+ end
60
66
  header_params[:'idempotency-key'] = idempotency_key
61
67
 
62
68
  # form parameters
63
69
  form_params = opts[:form_params] || {}
64
70
 
65
71
  # http body (model)
66
- post_body = opts[:body] || @api_client.object_to_http_body(body)
72
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(payment_request_dto)
67
73
 
68
- return_type = opts[:return_type] || 'PaymentResponseDto'
74
+ # return_type
75
+ return_type = opts[:debug_return_type] || 'PaymentResponseDto'
69
76
 
70
- auth_names = opts[:auth_names] || []
71
- data, status_code, headers = @api_client.call_api(:POST, local_var_path,
77
+ # auth_names
78
+ auth_names = opts[:debug_auth_names] || ['x-client-secret', 'x-client-key']
79
+
80
+ new_options = opts.merge(
81
+ :operation => :"TestPaymentsApi.test_payment_controller_create_payment_v0",
72
82
  :header_params => header_params,
73
83
  :query_params => query_params,
74
84
  :form_params => form_params,
75
85
  :body => post_body,
76
86
  :auth_names => auth_names,
77
- :return_type => return_type)
87
+ :return_type => return_type
88
+ )
78
89
 
90
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
79
91
  if @api_client.config.debugging
80
92
  @api_client.config.logger.debug "API called: TestPaymentsApi#test_payment_controller_create_payment_v0\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
81
93
  end
82
94
  return data, status_code, headers
83
95
  end
96
+
84
97
  # Get payment details by ID
85
- # @param id Payment ID
98
+ # @param id [String] Payment ID
86
99
  # @param [Hash] opts the optional parameters
87
100
  # @return [PaymentResponseDto]
88
101
  def test_payment_controller_get_payment_v0(id, opts = {})
@@ -91,7 +104,7 @@ module DevDraftAI
91
104
  end
92
105
 
93
106
  # Get payment details by ID
94
- # @param id Payment ID
107
+ # @param id [String] Payment ID
95
108
  # @param [Hash] opts the optional parameters
96
109
  # @return [Array<(PaymentResponseDto, Integer, Hash)>] PaymentResponseDto data, response status code and response headers
97
110
  def test_payment_controller_get_payment_v0_with_http_info(id, opts = {})
@@ -103,7 +116,7 @@ module DevDraftAI
103
116
  fail ArgumentError, "Missing the required parameter 'id' when calling TestPaymentsApi.test_payment_controller_get_payment_v0"
104
117
  end
105
118
  # resource path
106
- local_var_path = '/api/v0/test-payment/{id}'.sub('{' + 'id' + '}', id.to_s)
119
+ local_var_path = '/api/v0/test-payment/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
107
120
 
108
121
  # query parameters
109
122
  query_params = opts[:query_params] || {}
@@ -111,34 +124,41 @@ module DevDraftAI
111
124
  # header parameters
112
125
  header_params = opts[:header_params] || {}
113
126
  # HTTP header 'Accept' (if needed)
114
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
127
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
115
128
 
116
129
  # form parameters
117
130
  form_params = opts[:form_params] || {}
118
131
 
119
132
  # http body (model)
120
- post_body = opts[:body]
133
+ post_body = opts[:debug_body]
134
+
135
+ # return_type
136
+ return_type = opts[:debug_return_type] || 'PaymentResponseDto'
121
137
 
122
- return_type = opts[:return_type] || 'PaymentResponseDto'
138
+ # auth_names
139
+ auth_names = opts[:debug_auth_names] || ['x-client-secret', 'x-client-key']
123
140
 
124
- auth_names = opts[:auth_names] || []
125
- data, status_code, headers = @api_client.call_api(:GET, local_var_path,
141
+ new_options = opts.merge(
142
+ :operation => :"TestPaymentsApi.test_payment_controller_get_payment_v0",
126
143
  :header_params => header_params,
127
144
  :query_params => query_params,
128
145
  :form_params => form_params,
129
146
  :body => post_body,
130
147
  :auth_names => auth_names,
131
- :return_type => return_type)
148
+ :return_type => return_type
149
+ )
132
150
 
151
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
133
152
  if @api_client.config.debugging
134
153
  @api_client.config.logger.debug "API called: TestPaymentsApi#test_payment_controller_get_payment_v0\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
135
154
  end
136
155
  return data, status_code, headers
137
156
  end
157
+
138
158
  # Refund a payment
139
159
  # Refunds an existing payment. Requires an idempotency key to prevent duplicate refunds on retry. ## Idempotency Key Benefits for Refunds Refunds are critical financial operations where duplicates can cause serious issues. Using idempotency keys ensures: 1. **Prevent duplicate refunds**: Even if a request times out or fails, retrying with the same key won't issue multiple refunds 2. **Safe retries**: Network failures or timeouts won't risk creating multiple refunds 3. **Consistent response**: Always get the same response for the same operation ## Example Request (curl) ```bash curl -X POST \\ https://api.example.com/rest-api/v0/test-payment/pay_abc123xyz456/refund \\ -H 'Content-Type: application/json' \\ -H 'Client-Key: your-api-key' \\ -H 'Client-Secret: your-api-secret' \\ -H 'Idempotency-Key: refund_123456_unique_key' ``` ## Example Response (First Request) ```json { \"id\": \"ref_xyz789\", \"paymentId\": \"pay_abc123xyz456\", \"amount\": 100.00, \"status\": \"succeeded\", \"timestamp\": \"2023-07-01T14:30:00.000Z\" } ``` ## Example Response (Duplicate Request) The exact same response will be returned for any duplicate request with the same idempotency key, without creating a new refund. ## Idempotency Key Guidelines - Use a unique key for each distinct refund operation - Store keys client-side to ensure you can retry with the same key if needed - Keys expire after 24 hours by default
140
- # @param id Payment ID to refund
141
- # @param idempotency_key Unique key to ensure the refund request is idempotent. If a request with the same key is sent multiple times, only the first will be processed, and subsequent requests will return the same response.
160
+ # @param id [String] Payment ID to refund
161
+ # @param idempotency_key [String] Unique key to ensure the refund request is idempotent. If a request with the same key is sent multiple times, only the first will be processed, and subsequent requests will return the same response.
142
162
  # @param [Hash] opts the optional parameters
143
163
  # @return [RefundResponseDto]
144
164
  def test_payment_controller_refund_payment_v0(id, idempotency_key, opts = {})
@@ -147,9 +167,9 @@ module DevDraftAI
147
167
  end
148
168
 
149
169
  # Refund a payment
150
- # Refunds an existing payment. Requires an idempotency key to prevent duplicate refunds on retry. ## Idempotency Key Benefits for Refunds Refunds are critical financial operations where duplicates can cause serious issues. Using idempotency keys ensures: 1. **Prevent duplicate refunds**: Even if a request times out or fails, retrying with the same key won&#x27;t issue multiple refunds 2. **Safe retries**: Network failures or timeouts won&#x27;t risk creating multiple refunds 3. **Consistent response**: Always get the same response for the same operation ## Example Request (curl) &#x60;&#x60;&#x60;bash curl -X POST \\ https://api.example.com/rest-api/v0/test-payment/pay_abc123xyz456/refund \\ -H &#x27;Content-Type: application/json&#x27; \\ -H &#x27;Client-Key: your-api-key&#x27; \\ -H &#x27;Client-Secret: your-api-secret&#x27; \\ -H &#x27;Idempotency-Key: refund_123456_unique_key&#x27; &#x60;&#x60;&#x60; ## Example Response (First Request) &#x60;&#x60;&#x60;json { \&quot;id\&quot;: \&quot;ref_xyz789\&quot;, \&quot;paymentId\&quot;: \&quot;pay_abc123xyz456\&quot;, \&quot;amount\&quot;: 100.00, \&quot;status\&quot;: \&quot;succeeded\&quot;, \&quot;timestamp\&quot;: \&quot;2023-07-01T14:30:00.000Z\&quot; } &#x60;&#x60;&#x60; ## Example Response (Duplicate Request) The exact same response will be returned for any duplicate request with the same idempotency key, without creating a new refund. ## Idempotency Key Guidelines - Use a unique key for each distinct refund operation - Store keys client-side to ensure you can retry with the same key if needed - Keys expire after 24 hours by default
151
- # @param id Payment ID to refund
152
- # @param idempotency_key Unique key to ensure the refund request is idempotent. If a request with the same key is sent multiple times, only the first will be processed, and subsequent requests will return the same response.
170
+ # Refunds an existing payment. Requires an idempotency key to prevent duplicate refunds on retry. ## Idempotency Key Benefits for Refunds Refunds are critical financial operations where duplicates can cause serious issues. Using idempotency keys ensures: 1. **Prevent duplicate refunds**: Even if a request times out or fails, retrying with the same key won&#39;t issue multiple refunds 2. **Safe retries**: Network failures or timeouts won&#39;t risk creating multiple refunds 3. **Consistent response**: Always get the same response for the same operation ## Example Request (curl) &#x60;&#x60;&#x60;bash curl -X POST \\ https://api.example.com/rest-api/v0/test-payment/pay_abc123xyz456/refund \\ -H &#39;Content-Type: application/json&#39; \\ -H &#39;Client-Key: your-api-key&#39; \\ -H &#39;Client-Secret: your-api-secret&#39; \\ -H &#39;Idempotency-Key: refund_123456_unique_key&#39; &#x60;&#x60;&#x60; ## Example Response (First Request) &#x60;&#x60;&#x60;json { \&quot;id\&quot;: \&quot;ref_xyz789\&quot;, \&quot;paymentId\&quot;: \&quot;pay_abc123xyz456\&quot;, \&quot;amount\&quot;: 100.00, \&quot;status\&quot;: \&quot;succeeded\&quot;, \&quot;timestamp\&quot;: \&quot;2023-07-01T14:30:00.000Z\&quot; } &#x60;&#x60;&#x60; ## Example Response (Duplicate Request) The exact same response will be returned for any duplicate request with the same idempotency key, without creating a new refund. ## Idempotency Key Guidelines - Use a unique key for each distinct refund operation - Store keys client-side to ensure you can retry with the same key if needed - Keys expire after 24 hours by default
171
+ # @param id [String] Payment ID to refund
172
+ # @param idempotency_key [String] Unique key to ensure the refund request is idempotent. If a request with the same key is sent multiple times, only the first will be processed, and subsequent requests will return the same response.
153
173
  # @param [Hash] opts the optional parameters
154
174
  # @return [Array<(RefundResponseDto, Integer, Hash)>] RefundResponseDto data, response status code and response headers
155
175
  def test_payment_controller_refund_payment_v0_with_http_info(id, idempotency_key, opts = {})
@@ -165,7 +185,7 @@ module DevDraftAI
165
185
  fail ArgumentError, "Missing the required parameter 'idempotency_key' when calling TestPaymentsApi.test_payment_controller_refund_payment_v0"
166
186
  end
167
187
  # resource path
168
- local_var_path = '/api/v0/test-payment/{id}/refund'.sub('{' + 'id' + '}', id.to_s)
188
+ local_var_path = '/api/v0/test-payment/{id}/refund'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
169
189
 
170
190
  # query parameters
171
191
  query_params = opts[:query_params] || {}
@@ -173,26 +193,32 @@ module DevDraftAI
173
193
  # header parameters
174
194
  header_params = opts[:header_params] || {}
175
195
  # HTTP header 'Accept' (if needed)
176
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
196
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
177
197
  header_params[:'idempotency-key'] = idempotency_key
178
198
 
179
199
  # form parameters
180
200
  form_params = opts[:form_params] || {}
181
201
 
182
202
  # http body (model)
183
- post_body = opts[:body]
203
+ post_body = opts[:debug_body]
204
+
205
+ # return_type
206
+ return_type = opts[:debug_return_type] || 'RefundResponseDto'
184
207
 
185
- return_type = opts[:return_type] || 'RefundResponseDto'
208
+ # auth_names
209
+ auth_names = opts[:debug_auth_names] || ['x-client-secret', 'x-client-key']
186
210
 
187
- auth_names = opts[:auth_names] || []
188
- data, status_code, headers = @api_client.call_api(:POST, local_var_path,
211
+ new_options = opts.merge(
212
+ :operation => :"TestPaymentsApi.test_payment_controller_refund_payment_v0",
189
213
  :header_params => header_params,
190
214
  :query_params => query_params,
191
215
  :form_params => form_params,
192
216
  :body => post_body,
193
217
  :auth_names => auth_names,
194
- :return_type => return_type)
218
+ :return_type => return_type
219
+ )
195
220
 
221
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
196
222
  if @api_client.config.debugging
197
223
  @api_client.config.logger.debug "API called: TestPaymentsApi#test_payment_controller_refund_payment_v0\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
198
224
  end
@@ -3,13 +3,16 @@
3
3
 
4
4
  # A comprehensive payment processing and business management API that enables seamless integration of cryptocurrency and traditional payment methods.
5
5
 
6
- OpenAPI spec version: 1.0.0
6
+ The version of the OpenAPI document: 1.0.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.17.0
7
10
 
8
- Generated by: https://github.com/swagger-api/swagger-codegen.git
9
- Swagger Codegen version: 3.0.65
10
11
  =end
11
12
 
12
- module DevDraftAI
13
+ require 'cgi'
14
+
15
+ module Devdraft
13
16
  class TransfersApi
14
17
  attr_accessor :api_client
15
18
 
@@ -17,25 +20,25 @@ module DevDraftAI
17
20
  @api_client = api_client
18
21
  end
19
22
  # Create a direct bank transfer
20
- # @param body
23
+ # @param create_direct_bank_transfer_dto [CreateDirectBankTransferDto]
21
24
  # @param [Hash] opts the optional parameters
22
25
  # @return [nil]
23
- def transfer_controller_create_direct_bank_transfer(body, opts = {})
24
- transfer_controller_create_direct_bank_transfer_with_http_info(body, opts)
26
+ def transfer_controller_create_direct_bank_transfer(create_direct_bank_transfer_dto, opts = {})
27
+ transfer_controller_create_direct_bank_transfer_with_http_info(create_direct_bank_transfer_dto, opts)
25
28
  nil
26
29
  end
27
30
 
28
31
  # Create a direct bank transfer
29
- # @param body
32
+ # @param create_direct_bank_transfer_dto [CreateDirectBankTransferDto]
30
33
  # @param [Hash] opts the optional parameters
31
34
  # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
32
- def transfer_controller_create_direct_bank_transfer_with_http_info(body, opts = {})
35
+ def transfer_controller_create_direct_bank_transfer_with_http_info(create_direct_bank_transfer_dto, opts = {})
33
36
  if @api_client.config.debugging
34
37
  @api_client.config.logger.debug 'Calling API: TransfersApi.transfer_controller_create_direct_bank_transfer ...'
35
38
  end
36
- # verify the required parameter 'body' is set
37
- if @api_client.config.client_side_validation && body.nil?
38
- fail ArgumentError, "Missing the required parameter 'body' when calling TransfersApi.transfer_controller_create_direct_bank_transfer"
39
+ # verify the required parameter 'create_direct_bank_transfer_dto' is set
40
+ if @api_client.config.client_side_validation && create_direct_bank_transfer_dto.nil?
41
+ fail ArgumentError, "Missing the required parameter 'create_direct_bank_transfer_dto' when calling TransfersApi.transfer_controller_create_direct_bank_transfer"
39
42
  end
40
43
  # resource path
41
44
  local_var_path = '/api/v0/transfers/direct-bank'
@@ -46,50 +49,60 @@ module DevDraftAI
46
49
  # header parameters
47
50
  header_params = opts[:header_params] || {}
48
51
  # HTTP header 'Content-Type'
49
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
52
+ content_type = @api_client.select_header_content_type(['application/json'])
53
+ if !content_type.nil?
54
+ header_params['Content-Type'] = content_type
55
+ end
50
56
 
51
57
  # form parameters
52
58
  form_params = opts[:form_params] || {}
53
59
 
54
60
  # http body (model)
55
- post_body = opts[:body] || @api_client.object_to_http_body(body)
61
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(create_direct_bank_transfer_dto)
56
62
 
57
- return_type = opts[:return_type]
63
+ # return_type
64
+ return_type = opts[:debug_return_type]
58
65
 
59
- auth_names = opts[:auth_names] || ['x-client-key', 'x-client-secret']
60
- data, status_code, headers = @api_client.call_api(:POST, local_var_path,
66
+ # auth_names
67
+ auth_names = opts[:debug_auth_names] || ['x-client-secret', 'x-client-key']
68
+
69
+ new_options = opts.merge(
70
+ :operation => :"TransfersApi.transfer_controller_create_direct_bank_transfer",
61
71
  :header_params => header_params,
62
72
  :query_params => query_params,
63
73
  :form_params => form_params,
64
74
  :body => post_body,
65
75
  :auth_names => auth_names,
66
- :return_type => return_type)
76
+ :return_type => return_type
77
+ )
67
78
 
79
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
68
80
  if @api_client.config.debugging
69
81
  @api_client.config.logger.debug "API called: TransfersApi#transfer_controller_create_direct_bank_transfer\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
70
82
  end
71
83
  return data, status_code, headers
72
84
  end
85
+
73
86
  # Create a direct wallet transfer
74
- # @param body
87
+ # @param create_direct_wallet_transfer_dto [CreateDirectWalletTransferDto]
75
88
  # @param [Hash] opts the optional parameters
76
89
  # @return [nil]
77
- def transfer_controller_create_direct_wallet_transfer(body, opts = {})
78
- transfer_controller_create_direct_wallet_transfer_with_http_info(body, opts)
90
+ def transfer_controller_create_direct_wallet_transfer(create_direct_wallet_transfer_dto, opts = {})
91
+ transfer_controller_create_direct_wallet_transfer_with_http_info(create_direct_wallet_transfer_dto, opts)
79
92
  nil
80
93
  end
81
94
 
82
95
  # Create a direct wallet transfer
83
- # @param body
96
+ # @param create_direct_wallet_transfer_dto [CreateDirectWalletTransferDto]
84
97
  # @param [Hash] opts the optional parameters
85
98
  # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
86
- def transfer_controller_create_direct_wallet_transfer_with_http_info(body, opts = {})
99
+ def transfer_controller_create_direct_wallet_transfer_with_http_info(create_direct_wallet_transfer_dto, opts = {})
87
100
  if @api_client.config.debugging
88
101
  @api_client.config.logger.debug 'Calling API: TransfersApi.transfer_controller_create_direct_wallet_transfer ...'
89
102
  end
90
- # verify the required parameter 'body' is set
91
- if @api_client.config.client_side_validation && body.nil?
92
- fail ArgumentError, "Missing the required parameter 'body' when calling TransfersApi.transfer_controller_create_direct_wallet_transfer"
103
+ # verify the required parameter 'create_direct_wallet_transfer_dto' is set
104
+ if @api_client.config.client_side_validation && create_direct_wallet_transfer_dto.nil?
105
+ fail ArgumentError, "Missing the required parameter 'create_direct_wallet_transfer_dto' when calling TransfersApi.transfer_controller_create_direct_wallet_transfer"
93
106
  end
94
107
  # resource path
95
108
  local_var_path = '/api/v0/transfers/direct-wallet'
@@ -100,50 +113,188 @@ module DevDraftAI
100
113
  # header parameters
101
114
  header_params = opts[:header_params] || {}
102
115
  # HTTP header 'Content-Type'
103
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
116
+ content_type = @api_client.select_header_content_type(['application/json'])
117
+ if !content_type.nil?
118
+ header_params['Content-Type'] = content_type
119
+ end
104
120
 
105
121
  # form parameters
106
122
  form_params = opts[:form_params] || {}
107
123
 
108
124
  # http body (model)
109
- post_body = opts[:body] || @api_client.object_to_http_body(body)
125
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(create_direct_wallet_transfer_dto)
110
126
 
111
- return_type = opts[:return_type]
127
+ # return_type
128
+ return_type = opts[:debug_return_type]
112
129
 
113
- auth_names = opts[:auth_names] || ['x-client-key', 'x-client-secret']
114
- data, status_code, headers = @api_client.call_api(:POST, local_var_path,
130
+ # auth_names
131
+ auth_names = opts[:debug_auth_names] || ['x-client-secret', 'x-client-key']
132
+
133
+ new_options = opts.merge(
134
+ :operation => :"TransfersApi.transfer_controller_create_direct_wallet_transfer",
115
135
  :header_params => header_params,
116
136
  :query_params => query_params,
117
137
  :form_params => form_params,
118
138
  :body => post_body,
119
139
  :auth_names => auth_names,
120
- :return_type => return_type)
140
+ :return_type => return_type
141
+ )
121
142
 
143
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
122
144
  if @api_client.config.debugging
123
145
  @api_client.config.logger.debug "API called: TransfersApi#transfer_controller_create_direct_wallet_transfer\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
124
146
  end
125
147
  return data, status_code, headers
126
148
  end
149
+
150
+ # Create an external bank transfer
151
+ # @param create_external_bank_transfer_dto [CreateExternalBankTransferDto]
152
+ # @param [Hash] opts the optional parameters
153
+ # @return [nil]
154
+ def transfer_controller_create_external_bank_transfer(create_external_bank_transfer_dto, opts = {})
155
+ transfer_controller_create_external_bank_transfer_with_http_info(create_external_bank_transfer_dto, opts)
156
+ nil
157
+ end
158
+
159
+ # Create an external bank transfer
160
+ # @param create_external_bank_transfer_dto [CreateExternalBankTransferDto]
161
+ # @param [Hash] opts the optional parameters
162
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
163
+ def transfer_controller_create_external_bank_transfer_with_http_info(create_external_bank_transfer_dto, opts = {})
164
+ if @api_client.config.debugging
165
+ @api_client.config.logger.debug 'Calling API: TransfersApi.transfer_controller_create_external_bank_transfer ...'
166
+ end
167
+ # verify the required parameter 'create_external_bank_transfer_dto' is set
168
+ if @api_client.config.client_side_validation && create_external_bank_transfer_dto.nil?
169
+ fail ArgumentError, "Missing the required parameter 'create_external_bank_transfer_dto' when calling TransfersApi.transfer_controller_create_external_bank_transfer"
170
+ end
171
+ # resource path
172
+ local_var_path = '/api/v0/transfers/external-bank-transfer'
173
+
174
+ # query parameters
175
+ query_params = opts[:query_params] || {}
176
+
177
+ # header parameters
178
+ header_params = opts[:header_params] || {}
179
+ # HTTP header 'Content-Type'
180
+ content_type = @api_client.select_header_content_type(['application/json'])
181
+ if !content_type.nil?
182
+ header_params['Content-Type'] = content_type
183
+ end
184
+
185
+ # form parameters
186
+ form_params = opts[:form_params] || {}
187
+
188
+ # http body (model)
189
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(create_external_bank_transfer_dto)
190
+
191
+ # return_type
192
+ return_type = opts[:debug_return_type]
193
+
194
+ # auth_names
195
+ auth_names = opts[:debug_auth_names] || ['x-client-secret', 'x-client-key']
196
+
197
+ new_options = opts.merge(
198
+ :operation => :"TransfersApi.transfer_controller_create_external_bank_transfer",
199
+ :header_params => header_params,
200
+ :query_params => query_params,
201
+ :form_params => form_params,
202
+ :body => post_body,
203
+ :auth_names => auth_names,
204
+ :return_type => return_type
205
+ )
206
+
207
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
208
+ if @api_client.config.debugging
209
+ @api_client.config.logger.debug "API called: TransfersApi#transfer_controller_create_external_bank_transfer\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
210
+ end
211
+ return data, status_code, headers
212
+ end
213
+
214
+ # Create an external stablecoin transfer
215
+ # @param create_external_stablecoin_transfer_dto [CreateExternalStablecoinTransferDto]
216
+ # @param [Hash] opts the optional parameters
217
+ # @return [nil]
218
+ def transfer_controller_create_external_stablecoin_transfer(create_external_stablecoin_transfer_dto, opts = {})
219
+ transfer_controller_create_external_stablecoin_transfer_with_http_info(create_external_stablecoin_transfer_dto, opts)
220
+ nil
221
+ end
222
+
223
+ # Create an external stablecoin transfer
224
+ # @param create_external_stablecoin_transfer_dto [CreateExternalStablecoinTransferDto]
225
+ # @param [Hash] opts the optional parameters
226
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
227
+ def transfer_controller_create_external_stablecoin_transfer_with_http_info(create_external_stablecoin_transfer_dto, opts = {})
228
+ if @api_client.config.debugging
229
+ @api_client.config.logger.debug 'Calling API: TransfersApi.transfer_controller_create_external_stablecoin_transfer ...'
230
+ end
231
+ # verify the required parameter 'create_external_stablecoin_transfer_dto' is set
232
+ if @api_client.config.client_side_validation && create_external_stablecoin_transfer_dto.nil?
233
+ fail ArgumentError, "Missing the required parameter 'create_external_stablecoin_transfer_dto' when calling TransfersApi.transfer_controller_create_external_stablecoin_transfer"
234
+ end
235
+ # resource path
236
+ local_var_path = '/api/v0/transfers/external-stablecoin-transfer'
237
+
238
+ # query parameters
239
+ query_params = opts[:query_params] || {}
240
+
241
+ # header parameters
242
+ header_params = opts[:header_params] || {}
243
+ # HTTP header 'Content-Type'
244
+ content_type = @api_client.select_header_content_type(['application/json'])
245
+ if !content_type.nil?
246
+ header_params['Content-Type'] = content_type
247
+ end
248
+
249
+ # form parameters
250
+ form_params = opts[:form_params] || {}
251
+
252
+ # http body (model)
253
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(create_external_stablecoin_transfer_dto)
254
+
255
+ # return_type
256
+ return_type = opts[:debug_return_type]
257
+
258
+ # auth_names
259
+ auth_names = opts[:debug_auth_names] || ['x-client-secret', 'x-client-key']
260
+
261
+ new_options = opts.merge(
262
+ :operation => :"TransfersApi.transfer_controller_create_external_stablecoin_transfer",
263
+ :header_params => header_params,
264
+ :query_params => query_params,
265
+ :form_params => form_params,
266
+ :body => post_body,
267
+ :auth_names => auth_names,
268
+ :return_type => return_type
269
+ )
270
+
271
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
272
+ if @api_client.config.debugging
273
+ @api_client.config.logger.debug "API called: TransfersApi#transfer_controller_create_external_stablecoin_transfer\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
274
+ end
275
+ return data, status_code, headers
276
+ end
277
+
127
278
  # Create a stablecoin conversion
128
- # @param body
279
+ # @param create_stablecoin_conversion_dto [CreateStablecoinConversionDto]
129
280
  # @param [Hash] opts the optional parameters
130
281
  # @return [nil]
131
- def transfer_controller_create_stablecoin_conversion(body, opts = {})
132
- transfer_controller_create_stablecoin_conversion_with_http_info(body, opts)
282
+ def transfer_controller_create_stablecoin_conversion(create_stablecoin_conversion_dto, opts = {})
283
+ transfer_controller_create_stablecoin_conversion_with_http_info(create_stablecoin_conversion_dto, opts)
133
284
  nil
134
285
  end
135
286
 
136
287
  # Create a stablecoin conversion
137
- # @param body
288
+ # @param create_stablecoin_conversion_dto [CreateStablecoinConversionDto]
138
289
  # @param [Hash] opts the optional parameters
139
290
  # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
140
- def transfer_controller_create_stablecoin_conversion_with_http_info(body, opts = {})
291
+ def transfer_controller_create_stablecoin_conversion_with_http_info(create_stablecoin_conversion_dto, opts = {})
141
292
  if @api_client.config.debugging
142
293
  @api_client.config.logger.debug 'Calling API: TransfersApi.transfer_controller_create_stablecoin_conversion ...'
143
294
  end
144
- # verify the required parameter 'body' is set
145
- if @api_client.config.client_side_validation && body.nil?
146
- fail ArgumentError, "Missing the required parameter 'body' when calling TransfersApi.transfer_controller_create_stablecoin_conversion"
295
+ # verify the required parameter 'create_stablecoin_conversion_dto' is set
296
+ if @api_client.config.client_side_validation && create_stablecoin_conversion_dto.nil?
297
+ fail ArgumentError, "Missing the required parameter 'create_stablecoin_conversion_dto' when calling TransfersApi.transfer_controller_create_stablecoin_conversion"
147
298
  end
148
299
  # resource path
149
300
  local_var_path = '/api/v0/transfers/stablecoin-conversion'
@@ -154,25 +305,34 @@ module DevDraftAI
154
305
  # header parameters
155
306
  header_params = opts[:header_params] || {}
156
307
  # HTTP header 'Content-Type'
157
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
308
+ content_type = @api_client.select_header_content_type(['application/json'])
309
+ if !content_type.nil?
310
+ header_params['Content-Type'] = content_type
311
+ end
158
312
 
159
313
  # form parameters
160
314
  form_params = opts[:form_params] || {}
161
315
 
162
316
  # http body (model)
163
- post_body = opts[:body] || @api_client.object_to_http_body(body)
317
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(create_stablecoin_conversion_dto)
318
+
319
+ # return_type
320
+ return_type = opts[:debug_return_type]
164
321
 
165
- return_type = opts[:return_type]
322
+ # auth_names
323
+ auth_names = opts[:debug_auth_names] || ['x-client-secret', 'x-client-key']
166
324
 
167
- auth_names = opts[:auth_names] || ['x-client-key', 'x-client-secret']
168
- data, status_code, headers = @api_client.call_api(:POST, local_var_path,
325
+ new_options = opts.merge(
326
+ :operation => :"TransfersApi.transfer_controller_create_stablecoin_conversion",
169
327
  :header_params => header_params,
170
328
  :query_params => query_params,
171
329
  :form_params => form_params,
172
330
  :body => post_body,
173
331
  :auth_names => auth_names,
174
- :return_type => return_type)
332
+ :return_type => return_type
333
+ )
175
334
 
335
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
176
336
  if @api_client.config.debugging
177
337
  @api_client.config.logger.debug "API called: TransfersApi#transfer_controller_create_stablecoin_conversion\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
178
338
  end