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
@@ -1,45 +1,65 @@
1
- # DevDraftAI::LiquidationAddressesApi
1
+ # Devdraft::LiquidationAddressesApi
2
2
 
3
3
  All URIs are relative to *https://api.devdraft.ai*
4
4
 
5
- Method | HTTP request | Description
6
- ------------- | ------------- | -------------
7
- [**liquidation_address_controller_create_liquidation_address**](LiquidationAddressesApi.md#liquidation_address_controller_create_liquidation_address) | **POST** /api/v0/customers/{customerId}/liquidation_addresses | Create a new liquidation address for a customer
8
- [**liquidation_address_controller_get_liquidation_address**](LiquidationAddressesApi.md#liquidation_address_controller_get_liquidation_address) | **GET** /api/v0/customers/{customerId}/liquidation_addresses/{liquidationAddressId} | Get a specific liquidation address
9
- [**liquidation_address_controller_get_liquidation_addresses**](LiquidationAddressesApi.md#liquidation_address_controller_get_liquidation_addresses) | **GET** /api/v0/customers/{customerId}/liquidation_addresses | Get all liquidation addresses for a customer
5
+ | Method | HTTP request | Description |
6
+ | ------ | ------------ | ----------- |
7
+ | [**liquidation_address_controller_create_liquidation_address**](LiquidationAddressesApi.md#liquidation_address_controller_create_liquidation_address) | **POST** /api/v0/customers/{customerId}/liquidation_addresses | Create a new liquidation address for a customer |
8
+ | [**liquidation_address_controller_get_liquidation_address**](LiquidationAddressesApi.md#liquidation_address_controller_get_liquidation_address) | **GET** /api/v0/customers/{customerId}/liquidation_addresses/{liquidationAddressId} | Get a specific liquidation address |
9
+ | [**liquidation_address_controller_get_liquidation_addresses**](LiquidationAddressesApi.md#liquidation_address_controller_get_liquidation_addresses) | **GET** /api/v0/customers/{customerId}/liquidation_addresses | Get all liquidation addresses for a customer |
10
10
 
11
- # **liquidation_address_controller_create_liquidation_address**
12
- > LiquidationAddressResponseDto liquidation_address_controller_create_liquidation_address(bodycustomer_id)
11
+
12
+ ## liquidation_address_controller_create_liquidation_address
13
+
14
+ > <LiquidationAddressResponseDto> liquidation_address_controller_create_liquidation_address(customer_id, create_liquidation_address_dto)
13
15
 
14
16
  Create a new liquidation address for a customer
15
17
 
16
18
  Create a new liquidation address for a customer. Liquidation addresses allow customers to automatically liquidate cryptocurrency holdings to fiat or other stablecoins based on configured parameters. **Required fields:** - chain: Blockchain network (ethereum, polygon, arbitrum, base) - currency: Stablecoin currency (usdc, eurc, dai, pyusd, usdt) - address: Valid blockchain address **At least one destination must be specified:** - external_account_id: External bank account - prefunded_account_id: Developer's prefunded account - bridge_wallet_id: Bridge wallet - destination_address: Crypto wallet address **Payment Rails:** Different payment rails have different requirements: - ACH: Requires external_account_id, supports destination_ach_reference - SEPA: Requires external_account_id, supports destination_sepa_reference - Wire: Requires external_account_id, supports destination_wire_message - Crypto: Requires destination_address, supports destination_blockchain_memo
17
19
 
18
- ### Example
19
- ```ruby
20
- # load the gem
21
- require 'devdraft_ai_sdk'
20
+ ### Examples
22
21
 
23
- api_instance = DevDraftAI::LiquidationAddressesApi.new
24
- body = DevDraftAI::CreateLiquidationAddressDto.new # CreateLiquidationAddressDto |
25
- customer_id = 'customer_id_example' # String | Unique identifier for the customer
22
+ ```ruby
23
+ require 'time'
24
+ require 'devdraft'
26
25
 
26
+ api_instance = Devdraft::LiquidationAddressesApi.new
27
+ customer_id = 'cust_123' # String | Unique identifier for the customer
28
+ create_liquidation_address_dto = Devdraft::CreateLiquidationAddressDto.new({chain: 'ethereum', currency: 'usdc', address: '0x4d0280da2f2fDA5103914bCc5aad114743152A9c'}) # CreateLiquidationAddressDto |
27
29
 
28
30
  begin
29
- #Create a new liquidation address for a customer
30
- result = api_instance.liquidation_address_controller_create_liquidation_address(bodycustomer_id)
31
+ # Create a new liquidation address for a customer
32
+ result = api_instance.liquidation_address_controller_create_liquidation_address(customer_id, create_liquidation_address_dto)
31
33
  p result
32
- rescue DevDraftAI::ApiError => e
33
- puts "Exception when calling LiquidationAddressesApi->liquidation_address_controller_create_liquidation_address: #{e}"
34
+ rescue Devdraft::ApiError => e
35
+ puts "Error when calling LiquidationAddressesApi->liquidation_address_controller_create_liquidation_address: #{e}"
36
+ end
37
+ ```
38
+
39
+ #### Using the liquidation_address_controller_create_liquidation_address_with_http_info variant
40
+
41
+ This returns an Array which contains the response data, status code and headers.
42
+
43
+ > <Array(<LiquidationAddressResponseDto>, Integer, Hash)> liquidation_address_controller_create_liquidation_address_with_http_info(customer_id, create_liquidation_address_dto)
44
+
45
+ ```ruby
46
+ begin
47
+ # Create a new liquidation address for a customer
48
+ data, status_code, headers = api_instance.liquidation_address_controller_create_liquidation_address_with_http_info(customer_id, create_liquidation_address_dto)
49
+ p status_code # => 2xx
50
+ p headers # => { ... }
51
+ p data # => <LiquidationAddressResponseDto>
52
+ rescue Devdraft::ApiError => e
53
+ puts "Error when calling LiquidationAddressesApi->liquidation_address_controller_create_liquidation_address_with_http_info: #{e}"
34
54
  end
35
55
  ```
36
56
 
37
57
  ### Parameters
38
58
 
39
- Name | Type | Description | Notes
40
- ------------- | ------------- | ------------- | -------------
41
- **body** | [**CreateLiquidationAddressDto**](CreateLiquidationAddressDto.md)| |
42
- **customer_id** | **String**| Unique identifier for the customer |
59
+ | Name | Type | Description | Notes |
60
+ | ---- | ---- | ----------- | ----- |
61
+ | **customer_id** | **String** | Unique identifier for the customer | |
62
+ | **create_liquidation_address_dto** | [**CreateLiquidationAddressDto**](CreateLiquidationAddressDto.md) | | |
43
63
 
44
64
  ### Return type
45
65
 
@@ -51,43 +71,61 @@ No authorization required
51
71
 
52
72
  ### HTTP request headers
53
73
 
54
- - **Content-Type**: application/json
55
- - **Accept**: application/json
74
+ - **Content-Type**: application/json
75
+ - **Accept**: application/json
56
76
 
57
77
 
78
+ ## liquidation_address_controller_get_liquidation_address
58
79
 
59
- # **liquidation_address_controller_get_liquidation_address**
60
- > LiquidationAddressResponseDto liquidation_address_controller_get_liquidation_address(customer_id, liquidation_address_id)
80
+ > <LiquidationAddressResponseDto> liquidation_address_controller_get_liquidation_address(customer_id, liquidation_address_id)
61
81
 
62
82
  Get a specific liquidation address
63
83
 
64
84
  Retrieve a specific liquidation address by its ID for a given customer.
65
85
 
66
- ### Example
67
- ```ruby
68
- # load the gem
69
- require 'devdraft_ai_sdk'
86
+ ### Examples
70
87
 
71
- api_instance = DevDraftAI::LiquidationAddressesApi.new
72
- customer_id = 'customer_id_example' # String | Unique identifier for the customer
73
- liquidation_address_id = 'liquidation_address_id_example' # String | Unique identifier for the liquidation address
88
+ ```ruby
89
+ require 'time'
90
+ require 'devdraft'
74
91
 
92
+ api_instance = Devdraft::LiquidationAddressesApi.new
93
+ customer_id = 'cust_123' # String | Unique identifier for the customer
94
+ liquidation_address_id = 'la_generated_id_123' # String | Unique identifier for the liquidation address
75
95
 
76
96
  begin
77
- #Get a specific liquidation address
97
+ # Get a specific liquidation address
78
98
  result = api_instance.liquidation_address_controller_get_liquidation_address(customer_id, liquidation_address_id)
79
99
  p result
80
- rescue DevDraftAI::ApiError => e
81
- puts "Exception when calling LiquidationAddressesApi->liquidation_address_controller_get_liquidation_address: #{e}"
100
+ rescue Devdraft::ApiError => e
101
+ puts "Error when calling LiquidationAddressesApi->liquidation_address_controller_get_liquidation_address: #{e}"
102
+ end
103
+ ```
104
+
105
+ #### Using the liquidation_address_controller_get_liquidation_address_with_http_info variant
106
+
107
+ This returns an Array which contains the response data, status code and headers.
108
+
109
+ > <Array(<LiquidationAddressResponseDto>, Integer, Hash)> liquidation_address_controller_get_liquidation_address_with_http_info(customer_id, liquidation_address_id)
110
+
111
+ ```ruby
112
+ begin
113
+ # Get a specific liquidation address
114
+ data, status_code, headers = api_instance.liquidation_address_controller_get_liquidation_address_with_http_info(customer_id, liquidation_address_id)
115
+ p status_code # => 2xx
116
+ p headers # => { ... }
117
+ p data # => <LiquidationAddressResponseDto>
118
+ rescue Devdraft::ApiError => e
119
+ puts "Error when calling LiquidationAddressesApi->liquidation_address_controller_get_liquidation_address_with_http_info: #{e}"
82
120
  end
83
121
  ```
84
122
 
85
123
  ### Parameters
86
124
 
87
- Name | Type | Description | Notes
88
- ------------- | ------------- | ------------- | -------------
89
- **customer_id** | **String**| Unique identifier for the customer |
90
- **liquidation_address_id** | **String**| Unique identifier for the liquidation address |
125
+ | Name | Type | Description | Notes |
126
+ | ---- | ---- | ----------- | ----- |
127
+ | **customer_id** | **String** | Unique identifier for the customer | |
128
+ | **liquidation_address_id** | **String** | Unique identifier for the liquidation address | |
91
129
 
92
130
  ### Return type
93
131
 
@@ -99,41 +137,59 @@ No authorization required
99
137
 
100
138
  ### HTTP request headers
101
139
 
102
- - **Content-Type**: Not defined
103
- - **Accept**: application/json
140
+ - **Content-Type**: Not defined
141
+ - **Accept**: application/json
104
142
 
105
143
 
144
+ ## liquidation_address_controller_get_liquidation_addresses
106
145
 
107
- # **liquidation_address_controller_get_liquidation_addresses**
108
- > Array&lt;LiquidationAddressResponseDto&gt; liquidation_address_controller_get_liquidation_addresses(customer_id)
146
+ > <Array<LiquidationAddressResponseDto>> liquidation_address_controller_get_liquidation_addresses(customer_id)
109
147
 
110
148
  Get all liquidation addresses for a customer
111
149
 
112
150
  Retrieve all liquidation addresses associated with a specific customer.
113
151
 
114
- ### Example
115
- ```ruby
116
- # load the gem
117
- require 'devdraft_ai_sdk'
152
+ ### Examples
118
153
 
119
- api_instance = DevDraftAI::LiquidationAddressesApi.new
120
- customer_id = 'customer_id_example' # String | Unique identifier for the customer
154
+ ```ruby
155
+ require 'time'
156
+ require 'devdraft'
121
157
 
158
+ api_instance = Devdraft::LiquidationAddressesApi.new
159
+ customer_id = 'cust_123' # String | Unique identifier for the customer
122
160
 
123
161
  begin
124
- #Get all liquidation addresses for a customer
162
+ # Get all liquidation addresses for a customer
125
163
  result = api_instance.liquidation_address_controller_get_liquidation_addresses(customer_id)
126
164
  p result
127
- rescue DevDraftAI::ApiError => e
128
- puts "Exception when calling LiquidationAddressesApi->liquidation_address_controller_get_liquidation_addresses: #{e}"
165
+ rescue Devdraft::ApiError => e
166
+ puts "Error when calling LiquidationAddressesApi->liquidation_address_controller_get_liquidation_addresses: #{e}"
167
+ end
168
+ ```
169
+
170
+ #### Using the liquidation_address_controller_get_liquidation_addresses_with_http_info variant
171
+
172
+ This returns an Array which contains the response data, status code and headers.
173
+
174
+ > <Array(<Array<LiquidationAddressResponseDto>>, Integer, Hash)> liquidation_address_controller_get_liquidation_addresses_with_http_info(customer_id)
175
+
176
+ ```ruby
177
+ begin
178
+ # Get all liquidation addresses for a customer
179
+ data, status_code, headers = api_instance.liquidation_address_controller_get_liquidation_addresses_with_http_info(customer_id)
180
+ p status_code # => 2xx
181
+ p headers # => { ... }
182
+ p data # => <Array<LiquidationAddressResponseDto>>
183
+ rescue Devdraft::ApiError => e
184
+ puts "Error when calling LiquidationAddressesApi->liquidation_address_controller_get_liquidation_addresses_with_http_info: #{e}"
129
185
  end
130
186
  ```
131
187
 
132
188
  ### Parameters
133
189
 
134
- Name | Type | Description | Notes
135
- ------------- | ------------- | ------------- | -------------
136
- **customer_id** | **String**| Unique identifier for the customer |
190
+ | Name | Type | Description | Notes |
191
+ | ---- | ---- | ----------- | ----- |
192
+ | **customer_id** | **String** | Unique identifier for the customer | |
137
193
 
138
194
  ### Return type
139
195
 
@@ -145,8 +201,6 @@ No authorization required
145
201
 
146
202
  ### HTTP request headers
147
203
 
148
- - **Content-Type**: Not defined
149
- - **Accept**: application/json
150
-
151
-
204
+ - **Content-Type**: Not defined
205
+ - **Accept**: application/json
152
206
 
@@ -1,55 +1,75 @@
1
- # DevDraftAI::PaymentIntentsApi
1
+ # Devdraft::PaymentIntentsApi
2
2
 
3
3
  All URIs are relative to *https://api.devdraft.ai*
4
4
 
5
- Method | HTTP request | Description
6
- ------------- | ------------- | -------------
7
- [**payment_intent_controller_create_bank_payment_intent**](PaymentIntentsApi.md#payment_intent_controller_create_bank_payment_intent) | **POST** /api/v0/payment-intents/bank | Create a bank payment intent
8
- [**payment_intent_controller_create_stable_payment_intent**](PaymentIntentsApi.md#payment_intent_controller_create_stable_payment_intent) | **POST** /api/v0/payment-intents/stablecoin | Create a stable payment intent
5
+ | Method | HTTP request | Description |
6
+ | ------ | ------------ | ----------- |
7
+ | [**payment_intent_controller_create_bank_payment_intent**](PaymentIntentsApi.md#payment_intent_controller_create_bank_payment_intent) | **POST** /api/v0/payment-intents/bank | Create a bank payment intent |
8
+ | [**payment_intent_controller_create_stable_payment_intent**](PaymentIntentsApi.md#payment_intent_controller_create_stable_payment_intent) | **POST** /api/v0/payment-intents/stablecoin | Create a stable payment intent |
9
9
 
10
- # **payment_intent_controller_create_bank_payment_intent**
11
- > payment_intent_controller_create_bank_payment_intent(bodyidempotency_key)
10
+
11
+ ## payment_intent_controller_create_bank_payment_intent
12
+
13
+ > payment_intent_controller_create_bank_payment_intent(idempotency_key, create_bank_payment_intent_dto)
12
14
 
13
15
  Create a bank payment intent
14
16
 
15
17
  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.
16
18
 
17
- ### Example
19
+ ### Examples
20
+
18
21
  ```ruby
19
- # load the gem
20
- require 'devdraft_ai_sdk'
22
+ require 'time'
23
+ require 'devdraft'
21
24
  # setup authorization
22
- DevDraftAI.configure do |config|
23
- # Configure API key authorization: x-client-key
24
- config.api_key['x-client-key'] = 'YOUR API KEY'
25
- # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
26
- #config.api_key_prefix['x-client-key'] = 'Bearer'
27
-
25
+ Devdraft.configure do |config|
28
26
  # Configure API key authorization: x-client-secret
29
27
  config.api_key['x-client-secret'] = 'YOUR API KEY'
30
28
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
31
- #config.api_key_prefix['x-client-secret'] = 'Bearer'
29
+ # config.api_key_prefix['x-client-secret'] = 'Bearer'
30
+
31
+ # Configure API key authorization: x-client-key
32
+ config.api_key['x-client-key'] = 'YOUR API KEY'
33
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
34
+ # config.api_key_prefix['x-client-key'] = 'Bearer'
32
35
  end
33
36
 
34
- api_instance = DevDraftAI::PaymentIntentsApi.new
35
- body = DevDraftAI::CreateBankPaymentIntentDto.new # CreateBankPaymentIntentDto | Bank payment intent creation data
37
+ api_instance = Devdraft::PaymentIntentsApi.new
36
38
  idempotency_key = 'idempotency_key_example' # String | Unique UUID v4 for idempotent requests. Prevents duplicate payments.
39
+ create_bank_payment_intent_dto = Devdraft::CreateBankPaymentIntentDto.new({source_payment_rail: Devdraft::BridgePaymentRail::ETHEREUM, source_currency: Devdraft::FiatCurrency::USD, destination_currency: Devdraft::StableCoinCurrency::USDC, destination_network: Devdraft::BridgePaymentRail::ETHEREUM}) # CreateBankPaymentIntentDto | Bank payment intent creation data
37
40
 
41
+ begin
42
+ # Create a bank payment intent
43
+ api_instance.payment_intent_controller_create_bank_payment_intent(idempotency_key, create_bank_payment_intent_dto)
44
+ rescue Devdraft::ApiError => e
45
+ puts "Error when calling PaymentIntentsApi->payment_intent_controller_create_bank_payment_intent: #{e}"
46
+ end
47
+ ```
38
48
 
49
+ #### Using the payment_intent_controller_create_bank_payment_intent_with_http_info variant
50
+
51
+ This returns an Array which contains the response data (`nil` in this case), status code and headers.
52
+
53
+ > <Array(nil, Integer, Hash)> payment_intent_controller_create_bank_payment_intent_with_http_info(idempotency_key, create_bank_payment_intent_dto)
54
+
55
+ ```ruby
39
56
  begin
40
- #Create a bank payment intent
41
- api_instance.payment_intent_controller_create_bank_payment_intent(bodyidempotency_key)
42
- rescue DevDraftAI::ApiError => e
43
- puts "Exception when calling PaymentIntentsApi->payment_intent_controller_create_bank_payment_intent: #{e}"
57
+ # Create a bank payment intent
58
+ data, status_code, headers = api_instance.payment_intent_controller_create_bank_payment_intent_with_http_info(idempotency_key, create_bank_payment_intent_dto)
59
+ p status_code # => 2xx
60
+ p headers # => { ... }
61
+ p data # => nil
62
+ rescue Devdraft::ApiError => e
63
+ puts "Error when calling PaymentIntentsApi->payment_intent_controller_create_bank_payment_intent_with_http_info: #{e}"
44
64
  end
45
65
  ```
46
66
 
47
67
  ### Parameters
48
68
 
49
- Name | Type | Description | Notes
50
- ------------- | ------------- | ------------- | -------------
51
- **body** | [**CreateBankPaymentIntentDto**](CreateBankPaymentIntentDto.md)| Bank payment intent creation data |
52
- **idempotency_key** | **String**| Unique UUID v4 for idempotent requests. Prevents duplicate payments. |
69
+ | Name | Type | Description | Notes |
70
+ | ---- | ---- | ----------- | ----- |
71
+ | **idempotency_key** | **String** | Unique UUID v4 for idempotent requests. Prevents duplicate payments. | |
72
+ | **create_bank_payment_intent_dto** | [**CreateBankPaymentIntentDto**](CreateBankPaymentIntentDto.md) | Bank payment intent creation data | |
53
73
 
54
74
  ### Return type
55
75
 
@@ -57,58 +77,76 @@ nil (empty response body)
57
77
 
58
78
  ### Authorization
59
79
 
60
- [x-client-key](../README.md#x-client-key), [x-client-secret](../README.md#x-client-secret)
80
+ [x-client-secret](../README.md#x-client-secret), [x-client-key](../README.md#x-client-key)
61
81
 
62
82
  ### HTTP request headers
63
83
 
64
- - **Content-Type**: application/json
65
- - **Accept**: application/json
84
+ - **Content-Type**: application/json
85
+ - **Accept**: application/json
66
86
 
67
87
 
88
+ ## payment_intent_controller_create_stable_payment_intent
68
89
 
69
- # **payment_intent_controller_create_stable_payment_intent**
70
- > payment_intent_controller_create_stable_payment_intent(bodyidempotency_key)
90
+ > payment_intent_controller_create_stable_payment_intent(idempotency_key, create_stable_payment_intent_dto)
71
91
 
72
92
  Create a stable payment intent
73
93
 
74
94
  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.
75
95
 
76
- ### Example
96
+ ### Examples
97
+
77
98
  ```ruby
78
- # load the gem
79
- require 'devdraft_ai_sdk'
99
+ require 'time'
100
+ require 'devdraft'
80
101
  # setup authorization
81
- DevDraftAI.configure do |config|
82
- # Configure API key authorization: x-client-key
83
- config.api_key['x-client-key'] = 'YOUR API KEY'
84
- # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
85
- #config.api_key_prefix['x-client-key'] = 'Bearer'
86
-
102
+ Devdraft.configure do |config|
87
103
  # Configure API key authorization: x-client-secret
88
104
  config.api_key['x-client-secret'] = 'YOUR API KEY'
89
105
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
90
- #config.api_key_prefix['x-client-secret'] = 'Bearer'
106
+ # config.api_key_prefix['x-client-secret'] = 'Bearer'
107
+
108
+ # Configure API key authorization: x-client-key
109
+ config.api_key['x-client-key'] = 'YOUR API KEY'
110
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
111
+ # config.api_key_prefix['x-client-key'] = 'Bearer'
91
112
  end
92
113
 
93
- api_instance = DevDraftAI::PaymentIntentsApi.new
94
- body = DevDraftAI::CreateStablePaymentIntentDto.new # CreateStablePaymentIntentDto | Stable payment intent creation data
114
+ api_instance = Devdraft::PaymentIntentsApi.new
95
115
  idempotency_key = 'idempotency_key_example' # String | Unique UUID v4 for idempotent requests. Prevents duplicate payments.
116
+ create_stable_payment_intent_dto = Devdraft::CreateStablePaymentIntentDto.new({source_currency: Devdraft::StableCoinCurrency::USDC, source_network: Devdraft::BridgePaymentRail::ETHEREUM, destination_network: Devdraft::BridgePaymentRail::ETHEREUM}) # CreateStablePaymentIntentDto | Stable payment intent creation data
96
117
 
118
+ begin
119
+ # Create a stable payment intent
120
+ api_instance.payment_intent_controller_create_stable_payment_intent(idempotency_key, create_stable_payment_intent_dto)
121
+ rescue Devdraft::ApiError => e
122
+ puts "Error when calling PaymentIntentsApi->payment_intent_controller_create_stable_payment_intent: #{e}"
123
+ end
124
+ ```
125
+
126
+ #### Using the payment_intent_controller_create_stable_payment_intent_with_http_info variant
127
+
128
+ This returns an Array which contains the response data (`nil` in this case), status code and headers.
97
129
 
130
+ > <Array(nil, Integer, Hash)> payment_intent_controller_create_stable_payment_intent_with_http_info(idempotency_key, create_stable_payment_intent_dto)
131
+
132
+ ```ruby
98
133
  begin
99
- #Create a stable payment intent
100
- api_instance.payment_intent_controller_create_stable_payment_intent(bodyidempotency_key)
101
- rescue DevDraftAI::ApiError => e
102
- puts "Exception when calling PaymentIntentsApi->payment_intent_controller_create_stable_payment_intent: #{e}"
134
+ # Create a stable payment intent
135
+ data, status_code, headers = api_instance.payment_intent_controller_create_stable_payment_intent_with_http_info(idempotency_key, create_stable_payment_intent_dto)
136
+ p status_code # => 2xx
137
+ p headers # => { ... }
138
+ p data # => nil
139
+ rescue Devdraft::ApiError => e
140
+ puts "Error when calling PaymentIntentsApi->payment_intent_controller_create_stable_payment_intent_with_http_info: #{e}"
103
141
  end
104
142
  ```
105
143
 
106
144
  ### Parameters
107
145
 
108
- Name | Type | Description | Notes
109
- ------------- | ------------- | ------------- | -------------
110
- **body** | [**CreateStablePaymentIntentDto**](CreateStablePaymentIntentDto.md)| Stable payment intent creation data |
111
- **idempotency_key** | **String**| Unique UUID v4 for idempotent requests. Prevents duplicate payments. |
146
+ | Name | Type | Description | Notes |
147
+ | ---- | ---- | ----------- | ----- |
148
+ | **idempotency_key** | **String** | Unique UUID v4 for idempotent requests. Prevents duplicate payments. | |
149
+ | **create_stable_payment_intent_dto** | [**CreateStablePaymentIntentDto**](CreateStablePaymentIntentDto.md) | Stable payment intent creation data | |
112
150
 
113
151
  ### Return type
114
152
 
@@ -116,12 +154,10 @@ nil (empty response body)
116
154
 
117
155
  ### Authorization
118
156
 
119
- [x-client-key](../README.md#x-client-key), [x-client-secret](../README.md#x-client-secret)
157
+ [x-client-secret](../README.md#x-client-secret), [x-client-key](../README.md#x-client-key)
120
158
 
121
159
  ### HTTP request headers
122
160
 
123
- - **Content-Type**: application/json
124
- - **Accept**: application/json
125
-
126
-
161
+ - **Content-Type**: application/json
162
+ - **Accept**: application/json
127
163
 
@@ -1,8 +1,20 @@
1
- # DevDraftAI::PaymentLinkProductDto
1
+ # Devdraft::PaymentLinkProductDto
2
2
 
3
3
  ## Properties
4
- Name | Type | Description | Notes
5
- ------------ | ------------- | ------------- | -------------
6
- **product_id** | **String** | UUID of the product to include in this payment link. Must be a valid product from your catalog. |
7
- **quantity** | **Integer** | Quantity of this product to include. Must be at least 1. | [default to 1]
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **product_id** | **String** | UUID of the product to include in this payment link. Must be a valid product from your catalog. | |
8
+ | **quantity** | **Integer** | Quantity of this product to include. Must be at least 1. | [default to 1] |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'devdraft'
14
+
15
+ instance = Devdraft::PaymentLinkProductDto.new(
16
+ product_id: 123e4567-e89b-12d3-a456-426614174000,
17
+ quantity: 2
18
+ )
19
+ ```
8
20