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 PaymentIntentsApi
14
17
  attr_accessor :api_client
15
18
 
@@ -18,33 +21,33 @@ module DevDraftAI
18
21
  end
19
22
  # Create a bank payment intent
20
23
  # Creates a new bank payment intent for fiat-to-stablecoin transfers. This endpoint allows you to create payment intents for bank transfers (ACH, Wire, SEPA) that convert to stablecoins. Perfect for onboarding users from traditional banking to crypto. ## Supported Payment Rails - **ACH_PUSH**: US bank transfers (same-day or standard) - **WIRE**: International wire transfers - **SEPA**: European bank transfers ## Use Cases - USD bank account to USDC conversion - EUR bank account to EURC conversion - MXN bank account to stablecoin conversion - Flexible amount payment intents for variable pricing ## Supported Source Currencies - **USD**: US Dollar - **EUR**: Euro - **MXN**: Mexican Peso ## Example: USD Bank to USDC ```json { \"sourcePaymentRail\": \"ach_push\", \"sourceCurrency\": \"usd\", \"destinationCurrency\": \"usdc\", \"destinationNetwork\": \"ethereum\", \"destinationAddress\": \"0x742d35Cc6634C0532925a3b8D4C9db96c4b4d8e1\", \"amount\": \"1000.00\", \"customer_first_name\": \"John\", \"customer_last_name\": \"Doe\", \"customer_email\": \"john.doe@example.com\", \"ach_reference\": \"INV12345\" } ``` ## Reference Fields Use appropriate reference fields based on the payment rail: - `ach_reference`: For ACH transfers (max 10 chars, alphanumeric + spaces) - `wire_message`: For wire transfers (max 256 chars) - `sepa_reference`: For SEPA transfers (6-140 chars, specific character set) ## Idempotency Include an `idempotency-key` header with a unique UUID v4 to prevent duplicate payments. Subsequent requests with the same key will return the original response.
21
- # @param body Bank payment intent creation data
22
- # @param idempotency_key Unique UUID v4 for idempotent requests. Prevents duplicate payments.
24
+ # @param idempotency_key [String] Unique UUID v4 for idempotent requests. Prevents duplicate payments.
25
+ # @param create_bank_payment_intent_dto [CreateBankPaymentIntentDto] Bank payment intent creation data
23
26
  # @param [Hash] opts the optional parameters
24
27
  # @return [nil]
25
- def payment_intent_controller_create_bank_payment_intent(body, idempotency_key, opts = {})
26
- payment_intent_controller_create_bank_payment_intent_with_http_info(body, idempotency_key, opts)
28
+ def payment_intent_controller_create_bank_payment_intent(idempotency_key, create_bank_payment_intent_dto, opts = {})
29
+ payment_intent_controller_create_bank_payment_intent_with_http_info(idempotency_key, create_bank_payment_intent_dto, opts)
27
30
  nil
28
31
  end
29
32
 
30
33
  # Create a bank payment intent
31
34
  # Creates a new bank payment intent for fiat-to-stablecoin transfers. This endpoint allows you to create payment intents for bank transfers (ACH, Wire, SEPA) that convert to stablecoins. Perfect for onboarding users from traditional banking to crypto. ## Supported Payment Rails - **ACH_PUSH**: US bank transfers (same-day or standard) - **WIRE**: International wire transfers - **SEPA**: European bank transfers ## Use Cases - USD bank account to USDC conversion - EUR bank account to EURC conversion - MXN bank account to stablecoin conversion - Flexible amount payment intents for variable pricing ## Supported Source Currencies - **USD**: US Dollar - **EUR**: Euro - **MXN**: Mexican Peso ## Example: USD Bank to USDC ```json { \"sourcePaymentRail\": \"ach_push\", \"sourceCurrency\": \"usd\", \"destinationCurrency\": \"usdc\", \"destinationNetwork\": \"ethereum\", \"destinationAddress\": \"0x742d35Cc6634C0532925a3b8D4C9db96c4b4d8e1\", \"amount\": \"1000.00\", \"customer_first_name\": \"John\", \"customer_last_name\": \"Doe\", \"customer_email\": \"john.doe@example.com\", \"ach_reference\": \"INV12345\" } ``` ## Reference Fields Use appropriate reference fields based on the payment rail: - `ach_reference`: For ACH transfers (max 10 chars, alphanumeric + spaces) - `wire_message`: For wire transfers (max 256 chars) - `sepa_reference`: For SEPA transfers (6-140 chars, specific character set) ## Idempotency Include an `idempotency-key` header with a unique UUID v4 to prevent duplicate payments. Subsequent requests with the same key will return the original response.
32
- # @param body Bank payment intent creation data
33
- # @param idempotency_key Unique UUID v4 for idempotent requests. Prevents duplicate payments.
35
+ # @param idempotency_key [String] Unique UUID v4 for idempotent requests. Prevents duplicate payments.
36
+ # @param create_bank_payment_intent_dto [CreateBankPaymentIntentDto] Bank payment intent creation data
34
37
  # @param [Hash] opts the optional parameters
35
38
  # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
36
- def payment_intent_controller_create_bank_payment_intent_with_http_info(body, idempotency_key, opts = {})
39
+ def payment_intent_controller_create_bank_payment_intent_with_http_info(idempotency_key, create_bank_payment_intent_dto, opts = {})
37
40
  if @api_client.config.debugging
38
41
  @api_client.config.logger.debug 'Calling API: PaymentIntentsApi.payment_intent_controller_create_bank_payment_intent ...'
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 PaymentIntentsApi.payment_intent_controller_create_bank_payment_intent"
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 PaymentIntentsApi.payment_intent_controller_create_bank_payment_intent"
47
46
  end
47
+ # verify the required parameter 'create_bank_payment_intent_dto' is set
48
+ if @api_client.config.client_side_validation && create_bank_payment_intent_dto.nil?
49
+ fail ArgumentError, "Missing the required parameter 'create_bank_payment_intent_dto' when calling PaymentIntentsApi.payment_intent_controller_create_bank_payment_intent"
50
+ end
48
51
  # resource path
49
52
  local_var_path = '/api/v0/payment-intents/bank'
50
53
 
@@ -54,62 +57,72 @@ 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(create_bank_payment_intent_dto)
73
+
74
+ # return_type
75
+ return_type = opts[:debug_return_type]
67
76
 
68
- return_type = opts[:return_type]
77
+ # auth_names
78
+ auth_names = opts[:debug_auth_names] || ['x-client-secret', 'x-client-key']
69
79
 
70
- auth_names = opts[:auth_names] || ['x-client-key', 'x-client-secret']
71
- data, status_code, headers = @api_client.call_api(:POST, local_var_path,
80
+ new_options = opts.merge(
81
+ :operation => :"PaymentIntentsApi.payment_intent_controller_create_bank_payment_intent",
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: PaymentIntentsApi#payment_intent_controller_create_bank_payment_intent\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
  # Create a stable payment intent
85
98
  # Creates a new stable payment intent for stablecoin-to-stablecoin transfers. This endpoint allows you to create payment intents for transfers between different stablecoins and networks. Perfect for cross-chain stablecoin swaps and conversions. ## Use Cases - USDC to EURC conversions - Cross-chain stablecoin transfers (e.g., Ethereum USDC to Polygon USDC) - Flexible amount payment intents for dynamic pricing ## Example: USDC to EURC Conversion ```json { \"sourceCurrency\": \"usdc\", \"sourceNetwork\": \"ethereum\", \"destinationCurrency\": \"eurc\", \"destinationNetwork\": \"polygon\", \"destinationAddress\": \"0x742d35Cc6634C0532925a3b8D4C9db96c4b4d8e1\", \"amount\": \"100.00\", \"customer_first_name\": \"John\", \"customer_last_name\": \"Doe\", \"customer_email\": \"john.doe@example.com\" } ``` ## Flexible Amount Payments Omit the `amount` field to create a flexible payment intent where users can specify the amount during payment. ## Idempotency Include an `idempotency-key` header with a unique UUID v4 to prevent duplicate payments. Subsequent requests with the same key will return the original response.
86
- # @param body Stable payment intent creation data
87
- # @param idempotency_key Unique UUID v4 for idempotent requests. Prevents duplicate payments.
99
+ # @param idempotency_key [String] Unique UUID v4 for idempotent requests. Prevents duplicate payments.
100
+ # @param create_stable_payment_intent_dto [CreateStablePaymentIntentDto] Stable payment intent creation data
88
101
  # @param [Hash] opts the optional parameters
89
102
  # @return [nil]
90
- def payment_intent_controller_create_stable_payment_intent(body, idempotency_key, opts = {})
91
- payment_intent_controller_create_stable_payment_intent_with_http_info(body, idempotency_key, opts)
103
+ def payment_intent_controller_create_stable_payment_intent(idempotency_key, create_stable_payment_intent_dto, opts = {})
104
+ payment_intent_controller_create_stable_payment_intent_with_http_info(idempotency_key, create_stable_payment_intent_dto, opts)
92
105
  nil
93
106
  end
94
107
 
95
108
  # Create a stable payment intent
96
109
  # Creates a new stable payment intent for stablecoin-to-stablecoin transfers. This endpoint allows you to create payment intents for transfers between different stablecoins and networks. Perfect for cross-chain stablecoin swaps and conversions. ## Use Cases - USDC to EURC conversions - Cross-chain stablecoin transfers (e.g., Ethereum USDC to Polygon USDC) - Flexible amount payment intents for dynamic pricing ## Example: USDC to EURC Conversion &#x60;&#x60;&#x60;json { \&quot;sourceCurrency\&quot;: \&quot;usdc\&quot;, \&quot;sourceNetwork\&quot;: \&quot;ethereum\&quot;, \&quot;destinationCurrency\&quot;: \&quot;eurc\&quot;, \&quot;destinationNetwork\&quot;: \&quot;polygon\&quot;, \&quot;destinationAddress\&quot;: \&quot;0x742d35Cc6634C0532925a3b8D4C9db96c4b4d8e1\&quot;, \&quot;amount\&quot;: \&quot;100.00\&quot;, \&quot;customer_first_name\&quot;: \&quot;John\&quot;, \&quot;customer_last_name\&quot;: \&quot;Doe\&quot;, \&quot;customer_email\&quot;: \&quot;john.doe@example.com\&quot; } &#x60;&#x60;&#x60; ## Flexible Amount Payments Omit the &#x60;amount&#x60; field to create a flexible payment intent where users can specify the amount during payment. ## Idempotency Include an &#x60;idempotency-key&#x60; header with a unique UUID v4 to prevent duplicate payments. Subsequent requests with the same key will return the original response.
97
- # @param body Stable payment intent creation data
98
- # @param idempotency_key Unique UUID v4 for idempotent requests. Prevents duplicate payments.
110
+ # @param idempotency_key [String] Unique UUID v4 for idempotent requests. Prevents duplicate payments.
111
+ # @param create_stable_payment_intent_dto [CreateStablePaymentIntentDto] Stable payment intent creation data
99
112
  # @param [Hash] opts the optional parameters
100
113
  # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
101
- def payment_intent_controller_create_stable_payment_intent_with_http_info(body, idempotency_key, opts = {})
114
+ def payment_intent_controller_create_stable_payment_intent_with_http_info(idempotency_key, create_stable_payment_intent_dto, opts = {})
102
115
  if @api_client.config.debugging
103
116
  @api_client.config.logger.debug 'Calling API: PaymentIntentsApi.payment_intent_controller_create_stable_payment_intent ...'
104
117
  end
105
- # verify the required parameter 'body' is set
106
- if @api_client.config.client_side_validation && body.nil?
107
- fail ArgumentError, "Missing the required parameter 'body' when calling PaymentIntentsApi.payment_intent_controller_create_stable_payment_intent"
108
- end
109
118
  # verify the required parameter 'idempotency_key' is set
110
119
  if @api_client.config.client_side_validation && idempotency_key.nil?
111
120
  fail ArgumentError, "Missing the required parameter 'idempotency_key' when calling PaymentIntentsApi.payment_intent_controller_create_stable_payment_intent"
112
121
  end
122
+ # verify the required parameter 'create_stable_payment_intent_dto' is set
123
+ if @api_client.config.client_side_validation && create_stable_payment_intent_dto.nil?
124
+ fail ArgumentError, "Missing the required parameter 'create_stable_payment_intent_dto' when calling PaymentIntentsApi.payment_intent_controller_create_stable_payment_intent"
125
+ end
113
126
  # resource path
114
127
  local_var_path = '/api/v0/payment-intents/stablecoin'
115
128
 
@@ -119,28 +132,37 @@ module DevDraftAI
119
132
  # header parameters
120
133
  header_params = opts[:header_params] || {}
121
134
  # HTTP header 'Accept' (if needed)
122
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
135
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
123
136
  # HTTP header 'Content-Type'
124
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
137
+ content_type = @api_client.select_header_content_type(['application/json'])
138
+ if !content_type.nil?
139
+ header_params['Content-Type'] = content_type
140
+ end
125
141
  header_params[:'idempotency-key'] = idempotency_key
126
142
 
127
143
  # form parameters
128
144
  form_params = opts[:form_params] || {}
129
145
 
130
146
  # http body (model)
131
- post_body = opts[:body] || @api_client.object_to_http_body(body)
147
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(create_stable_payment_intent_dto)
148
+
149
+ # return_type
150
+ return_type = opts[:debug_return_type]
132
151
 
133
- return_type = opts[:return_type]
152
+ # auth_names
153
+ auth_names = opts[:debug_auth_names] || ['x-client-secret', 'x-client-key']
134
154
 
135
- auth_names = opts[:auth_names] || ['x-client-key', 'x-client-secret']
136
- data, status_code, headers = @api_client.call_api(:POST, local_var_path,
155
+ new_options = opts.merge(
156
+ :operation => :"PaymentIntentsApi.payment_intent_controller_create_stable_payment_intent",
137
157
  :header_params => header_params,
138
158
  :query_params => query_params,
139
159
  :form_params => form_params,
140
160
  :body => post_body,
141
161
  :auth_names => auth_names,
142
- :return_type => return_type)
162
+ :return_type => return_type
163
+ )
143
164
 
165
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
144
166
  if @api_client.config.debugging
145
167
  @api_client.config.logger.debug "API called: PaymentIntentsApi#payment_intent_controller_create_stable_payment_intent\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
146
168
  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 PaymentLinksApi
14
17
  attr_accessor :api_client
15
18
 
@@ -18,26 +21,26 @@ module DevDraftAI
18
21
  end
19
22
  # Create a new payment link
20
23
  # Creates a new payment link with the provided details. Supports both simple one-time payments and complex product bundles.
21
- # @param body Payment link creation data
24
+ # @param create_payment_link_dto [CreatePaymentLinkDto] Payment link creation data
22
25
  # @param [Hash] opts the optional parameters
23
26
  # @return [nil]
24
- def payment_links_controller_create(body, opts = {})
25
- payment_links_controller_create_with_http_info(body, opts)
27
+ def payment_links_controller_create(create_payment_link_dto, opts = {})
28
+ payment_links_controller_create_with_http_info(create_payment_link_dto, opts)
26
29
  nil
27
30
  end
28
31
 
29
32
  # Create a new payment link
30
33
  # Creates a new payment link with the provided details. Supports both simple one-time payments and complex product bundles.
31
- # @param body Payment link creation data
34
+ # @param create_payment_link_dto [CreatePaymentLinkDto] Payment link creation data
32
35
  # @param [Hash] opts the optional parameters
33
36
  # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
34
- def payment_links_controller_create_with_http_info(body, opts = {})
37
+ def payment_links_controller_create_with_http_info(create_payment_link_dto, opts = {})
35
38
  if @api_client.config.debugging
36
39
  @api_client.config.logger.debug 'Calling API: PaymentLinksApi.payment_links_controller_create ...'
37
40
  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 PaymentLinksApi.payment_links_controller_create"
41
+ # verify the required parameter 'create_payment_link_dto' is set
42
+ if @api_client.config.client_side_validation && create_payment_link_dto.nil?
43
+ fail ArgumentError, "Missing the required parameter 'create_payment_link_dto' when calling PaymentLinksApi.payment_links_controller_create"
41
44
  end
42
45
  # resource path
43
46
  local_var_path = '/api/v0/payment-links'
@@ -48,30 +51,40 @@ module DevDraftAI
48
51
  # header parameters
49
52
  header_params = opts[:header_params] || {}
50
53
  # HTTP header 'Content-Type'
51
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
54
+ content_type = @api_client.select_header_content_type(['application/json'])
55
+ if !content_type.nil?
56
+ header_params['Content-Type'] = content_type
57
+ end
52
58
 
53
59
  # form parameters
54
60
  form_params = opts[:form_params] || {}
55
61
 
56
62
  # http body (model)
57
- post_body = opts[:body] || @api_client.object_to_http_body(body)
63
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(create_payment_link_dto)
64
+
65
+ # return_type
66
+ return_type = opts[:debug_return_type]
58
67
 
59
- return_type = opts[:return_type]
68
+ # auth_names
69
+ auth_names = opts[:debug_auth_names] || ['x-client-secret', 'x-client-key']
60
70
 
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,
71
+ new_options = opts.merge(
72
+ :operation => :"PaymentLinksApi.payment_links_controller_create",
63
73
  :header_params => header_params,
64
74
  :query_params => query_params,
65
75
  :form_params => form_params,
66
76
  :body => post_body,
67
77
  :auth_names => auth_names,
68
- :return_type => return_type)
78
+ :return_type => return_type
79
+ )
69
80
 
81
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
70
82
  if @api_client.config.debugging
71
83
  @api_client.config.logger.debug "API called: PaymentLinksApi#payment_links_controller_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
72
84
  end
73
85
  return data, status_code, headers
74
86
  end
87
+
75
88
  # Get all payment links
76
89
  # @param [Hash] opts the optional parameters
77
90
  # @option opts [String] :skip Number of records to skip (must be non-negative)
@@ -106,26 +119,33 @@ module DevDraftAI
106
119
  form_params = opts[:form_params] || {}
107
120
 
108
121
  # http body (model)
109
- post_body = opts[:body]
122
+ post_body = opts[:debug_body]
123
+
124
+ # return_type
125
+ return_type = opts[:debug_return_type]
110
126
 
111
- return_type = opts[:return_type]
127
+ # auth_names
128
+ auth_names = opts[:debug_auth_names] || ['x-client-secret', 'x-client-key']
112
129
 
113
- auth_names = opts[:auth_names] || ['x-client-key', 'x-client-secret']
114
- data, status_code, headers = @api_client.call_api(:GET, local_var_path,
130
+ new_options = opts.merge(
131
+ :operation => :"PaymentLinksApi.payment_links_controller_find_all",
115
132
  :header_params => header_params,
116
133
  :query_params => query_params,
117
134
  :form_params => form_params,
118
135
  :body => post_body,
119
136
  :auth_names => auth_names,
120
- :return_type => return_type)
137
+ :return_type => return_type
138
+ )
121
139
 
140
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
122
141
  if @api_client.config.debugging
123
142
  @api_client.config.logger.debug "API called: PaymentLinksApi#payment_links_controller_find_all\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
124
143
  end
125
144
  return data, status_code, headers
126
145
  end
146
+
127
147
  # Get a payment link by ID
128
- # @param id Payment Link ID
148
+ # @param id [String] Payment Link ID
129
149
  # @param [Hash] opts the optional parameters
130
150
  # @return [nil]
131
151
  def payment_links_controller_find_one(id, opts = {})
@@ -134,7 +154,7 @@ module DevDraftAI
134
154
  end
135
155
 
136
156
  # Get a payment link by ID
137
- # @param id Payment Link ID
157
+ # @param id [String] Payment Link ID
138
158
  # @param [Hash] opts the optional parameters
139
159
  # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
140
160
  def payment_links_controller_find_one_with_http_info(id, opts = {})
@@ -146,7 +166,7 @@ module DevDraftAI
146
166
  fail ArgumentError, "Missing the required parameter 'id' when calling PaymentLinksApi.payment_links_controller_find_one"
147
167
  end
148
168
  # resource path
149
- local_var_path = '/api/v0/payment-links/{id}'.sub('{' + 'id' + '}', id.to_s)
169
+ local_var_path = '/api/v0/payment-links/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
150
170
 
151
171
  # query parameters
152
172
  query_params = opts[:query_params] || {}
@@ -158,53 +178,60 @@ module DevDraftAI
158
178
  form_params = opts[:form_params] || {}
159
179
 
160
180
  # http body (model)
161
- post_body = opts[:body]
181
+ post_body = opts[:debug_body]
162
182
 
163
- return_type = opts[:return_type]
183
+ # return_type
184
+ return_type = opts[:debug_return_type]
164
185
 
165
- auth_names = opts[:auth_names] || ['x-client-key', 'x-client-secret']
166
- data, status_code, headers = @api_client.call_api(:GET, local_var_path,
186
+ # auth_names
187
+ auth_names = opts[:debug_auth_names] || ['x-client-secret', 'x-client-key']
188
+
189
+ new_options = opts.merge(
190
+ :operation => :"PaymentLinksApi.payment_links_controller_find_one",
167
191
  :header_params => header_params,
168
192
  :query_params => query_params,
169
193
  :form_params => form_params,
170
194
  :body => post_body,
171
195
  :auth_names => auth_names,
172
- :return_type => return_type)
196
+ :return_type => return_type
197
+ )
173
198
 
199
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
174
200
  if @api_client.config.debugging
175
201
  @api_client.config.logger.debug "API called: PaymentLinksApi#payment_links_controller_find_one\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
176
202
  end
177
203
  return data, status_code, headers
178
204
  end
205
+
179
206
  # Update a payment link
180
- # @param body
181
- # @param id Payment Link ID
207
+ # @param id [String] Payment Link ID
208
+ # @param body [Object]
182
209
  # @param [Hash] opts the optional parameters
183
210
  # @return [nil]
184
- def payment_links_controller_update(body, id, opts = {})
185
- payment_links_controller_update_with_http_info(body, id, opts)
211
+ def payment_links_controller_update(id, body, opts = {})
212
+ payment_links_controller_update_with_http_info(id, body, opts)
186
213
  nil
187
214
  end
188
215
 
189
216
  # Update a payment link
190
- # @param body
191
- # @param id Payment Link ID
217
+ # @param id [String] Payment Link ID
218
+ # @param body [Object]
192
219
  # @param [Hash] opts the optional parameters
193
220
  # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
194
- def payment_links_controller_update_with_http_info(body, id, opts = {})
221
+ def payment_links_controller_update_with_http_info(id, body, opts = {})
195
222
  if @api_client.config.debugging
196
223
  @api_client.config.logger.debug 'Calling API: PaymentLinksApi.payment_links_controller_update ...'
197
224
  end
198
- # verify the required parameter 'body' is set
199
- if @api_client.config.client_side_validation && body.nil?
200
- fail ArgumentError, "Missing the required parameter 'body' when calling PaymentLinksApi.payment_links_controller_update"
201
- end
202
225
  # verify the required parameter 'id' is set
203
226
  if @api_client.config.client_side_validation && id.nil?
204
227
  fail ArgumentError, "Missing the required parameter 'id' when calling PaymentLinksApi.payment_links_controller_update"
205
228
  end
229
+ # verify the required parameter 'body' is set
230
+ if @api_client.config.client_side_validation && body.nil?
231
+ fail ArgumentError, "Missing the required parameter 'body' when calling PaymentLinksApi.payment_links_controller_update"
232
+ end
206
233
  # resource path
207
- local_var_path = '/api/v0/payment-links/{id}'.sub('{' + 'id' + '}', id.to_s)
234
+ local_var_path = '/api/v0/payment-links/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
208
235
 
209
236
  # query parameters
210
237
  query_params = opts[:query_params] || {}
@@ -212,25 +239,34 @@ module DevDraftAI
212
239
  # header parameters
213
240
  header_params = opts[:header_params] || {}
214
241
  # HTTP header 'Content-Type'
215
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
242
+ content_type = @api_client.select_header_content_type(['application/json'])
243
+ if !content_type.nil?
244
+ header_params['Content-Type'] = content_type
245
+ end
216
246
 
217
247
  # form parameters
218
248
  form_params = opts[:form_params] || {}
219
249
 
220
250
  # http body (model)
221
- post_body = opts[:body] || @api_client.object_to_http_body(body)
251
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
252
+
253
+ # return_type
254
+ return_type = opts[:debug_return_type]
222
255
 
223
- return_type = opts[:return_type]
256
+ # auth_names
257
+ auth_names = opts[:debug_auth_names] || ['x-client-secret', 'x-client-key']
224
258
 
225
- auth_names = opts[:auth_names] || ['x-client-key', 'x-client-secret']
226
- data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
259
+ new_options = opts.merge(
260
+ :operation => :"PaymentLinksApi.payment_links_controller_update",
227
261
  :header_params => header_params,
228
262
  :query_params => query_params,
229
263
  :form_params => form_params,
230
264
  :body => post_body,
231
265
  :auth_names => auth_names,
232
- :return_type => return_type)
266
+ :return_type => return_type
267
+ )
233
268
 
269
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
234
270
  if @api_client.config.debugging
235
271
  @api_client.config.logger.debug "API called: PaymentLinksApi#payment_links_controller_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
236
272
  end