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,55 +1,75 @@
1
- # DevDraftAI::PaymentLinksApi
1
+ # Devdraft::PaymentLinksApi
2
2
 
3
3
  All URIs are relative to *https://api.devdraft.ai*
4
4
 
5
- Method | HTTP request | Description
6
- ------------- | ------------- | -------------
7
- [**payment_links_controller_create**](PaymentLinksApi.md#payment_links_controller_create) | **POST** /api/v0/payment-links | Create a new payment link
8
- [**payment_links_controller_find_all**](PaymentLinksApi.md#payment_links_controller_find_all) | **GET** /api/v0/payment-links | Get all payment links
9
- [**payment_links_controller_find_one**](PaymentLinksApi.md#payment_links_controller_find_one) | **GET** /api/v0/payment-links/{id} | Get a payment link by ID
10
- [**payment_links_controller_update**](PaymentLinksApi.md#payment_links_controller_update) | **PUT** /api/v0/payment-links/{id} | Update a payment link
5
+ | Method | HTTP request | Description |
6
+ | ------ | ------------ | ----------- |
7
+ | [**payment_links_controller_create**](PaymentLinksApi.md#payment_links_controller_create) | **POST** /api/v0/payment-links | Create a new payment link |
8
+ | [**payment_links_controller_find_all**](PaymentLinksApi.md#payment_links_controller_find_all) | **GET** /api/v0/payment-links | Get all payment links |
9
+ | [**payment_links_controller_find_one**](PaymentLinksApi.md#payment_links_controller_find_one) | **GET** /api/v0/payment-links/{id} | Get a payment link by ID |
10
+ | [**payment_links_controller_update**](PaymentLinksApi.md#payment_links_controller_update) | **PUT** /api/v0/payment-links/{id} | Update a payment link |
11
11
 
12
- # **payment_links_controller_create**
13
- > payment_links_controller_create(body)
12
+
13
+ ## payment_links_controller_create
14
+
15
+ > payment_links_controller_create(create_payment_link_dto)
14
16
 
15
17
  Create a new payment link
16
18
 
17
19
  Creates a new payment link with the provided details. Supports both simple one-time payments and complex product bundles.
18
20
 
19
- ### Example
21
+ ### Examples
22
+
20
23
  ```ruby
21
- # load the gem
22
- require 'devdraft_ai_sdk'
24
+ require 'time'
25
+ require 'devdraft'
23
26
  # setup authorization
24
- DevDraftAI.configure do |config|
27
+ Devdraft.configure do |config|
28
+ # Configure API key authorization: x-client-secret
29
+ config.api_key['x-client-secret'] = 'YOUR API KEY'
30
+ # 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'
32
+
25
33
  # Configure API key authorization: x-client-key
26
34
  config.api_key['x-client-key'] = 'YOUR API KEY'
27
35
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
28
- #config.api_key_prefix['x-client-key'] = 'Bearer'
36
+ # config.api_key_prefix['x-client-key'] = 'Bearer'
37
+ end
29
38
 
30
- # Configure API key authorization: x-client-secret
31
- config.api_key['x-client-secret'] = 'YOUR API KEY'
32
- # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
33
- #config.api_key_prefix['x-client-secret'] = 'Bearer'
39
+ api_instance = Devdraft::PaymentLinksApi.new
40
+ create_payment_link_dto = Devdraft::CreatePaymentLinkDto.new({title: 'Premium Subscription', url: 'premium-subscription', link_type: 'INVOICE', allow_quantity_adjustment: true, collect_tax: true, collect_address: true, allow_mobile_payment: true, currency: 'usdc'}) # CreatePaymentLinkDto | Payment link creation data
41
+
42
+ begin
43
+ # Create a new payment link
44
+ api_instance.payment_links_controller_create(create_payment_link_dto)
45
+ rescue Devdraft::ApiError => e
46
+ puts "Error when calling PaymentLinksApi->payment_links_controller_create: #{e}"
34
47
  end
48
+ ```
35
49
 
36
- api_instance = DevDraftAI::PaymentLinksApi.new
37
- body = DevDraftAI::CreatePaymentLinkDto.new # CreatePaymentLinkDto | Payment link creation data
50
+ #### Using the payment_links_controller_create_with_http_info variant
38
51
 
52
+ This returns an Array which contains the response data (`nil` in this case), status code and headers.
39
53
 
54
+ > <Array(nil, Integer, Hash)> payment_links_controller_create_with_http_info(create_payment_link_dto)
55
+
56
+ ```ruby
40
57
  begin
41
- #Create a new payment link
42
- api_instance.payment_links_controller_create(body)
43
- rescue DevDraftAI::ApiError => e
44
- puts "Exception when calling PaymentLinksApi->payment_links_controller_create: #{e}"
58
+ # Create a new payment link
59
+ data, status_code, headers = api_instance.payment_links_controller_create_with_http_info(create_payment_link_dto)
60
+ p status_code # => 2xx
61
+ p headers # => { ... }
62
+ p data # => nil
63
+ rescue Devdraft::ApiError => e
64
+ puts "Error when calling PaymentLinksApi->payment_links_controller_create_with_http_info: #{e}"
45
65
  end
46
66
  ```
47
67
 
48
68
  ### Parameters
49
69
 
50
- Name | Type | Description | Notes
51
- ------------- | ------------- | ------------- | -------------
52
- **body** | [**CreatePaymentLinkDto**](CreatePaymentLinkDto.md)| Payment link creation data |
70
+ | Name | Type | Description | Notes |
71
+ | ---- | ---- | ----------- | ----- |
72
+ | **create_payment_link_dto** | [**CreatePaymentLinkDto**](CreatePaymentLinkDto.md) | Payment link creation data | |
53
73
 
54
74
  ### Return type
55
75
 
@@ -57,57 +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**: Not defined
84
+ - **Content-Type**: application/json
85
+ - **Accept**: Not defined
66
86
 
67
87
 
88
+ ## payment_links_controller_find_all
68
89
 
69
- # **payment_links_controller_find_all**
70
90
  > payment_links_controller_find_all(opts)
71
91
 
72
92
  Get all payment links
73
93
 
74
- ### Example
94
+ ### Examples
95
+
75
96
  ```ruby
76
- # load the gem
77
- require 'devdraft_ai_sdk'
97
+ require 'time'
98
+ require 'devdraft'
78
99
  # setup authorization
79
- DevDraftAI.configure do |config|
80
- # Configure API key authorization: x-client-key
81
- config.api_key['x-client-key'] = 'YOUR API KEY'
82
- # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
83
- #config.api_key_prefix['x-client-key'] = 'Bearer'
84
-
100
+ Devdraft.configure do |config|
85
101
  # Configure API key authorization: x-client-secret
86
102
  config.api_key['x-client-secret'] = 'YOUR API KEY'
87
103
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
88
- #config.api_key_prefix['x-client-secret'] = 'Bearer'
104
+ # config.api_key_prefix['x-client-secret'] = 'Bearer'
105
+
106
+ # Configure API key authorization: x-client-key
107
+ config.api_key['x-client-key'] = 'YOUR API KEY'
108
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
109
+ # config.api_key_prefix['x-client-key'] = 'Bearer'
89
110
  end
90
111
 
91
- api_instance = DevDraftAI::PaymentLinksApi.new
92
- opts = {
112
+ api_instance = Devdraft::PaymentLinksApi.new
113
+ opts = {
93
114
  skip: 'skip_example', # String | Number of records to skip (must be non-negative)
94
115
  take: 'take_example' # String | Number of records to take (must be positive)
95
116
  }
96
117
 
97
118
  begin
98
- #Get all payment links
119
+ # Get all payment links
99
120
  api_instance.payment_links_controller_find_all(opts)
100
- rescue DevDraftAI::ApiError => e
101
- puts "Exception when calling PaymentLinksApi->payment_links_controller_find_all: #{e}"
121
+ rescue Devdraft::ApiError => e
122
+ puts "Error when calling PaymentLinksApi->payment_links_controller_find_all: #{e}"
123
+ end
124
+ ```
125
+
126
+ #### Using the payment_links_controller_find_all_with_http_info variant
127
+
128
+ This returns an Array which contains the response data (`nil` in this case), status code and headers.
129
+
130
+ > <Array(nil, Integer, Hash)> payment_links_controller_find_all_with_http_info(opts)
131
+
132
+ ```ruby
133
+ begin
134
+ # Get all payment links
135
+ data, status_code, headers = api_instance.payment_links_controller_find_all_with_http_info(opts)
136
+ p status_code # => 2xx
137
+ p headers # => { ... }
138
+ p data # => nil
139
+ rescue Devdraft::ApiError => e
140
+ puts "Error when calling PaymentLinksApi->payment_links_controller_find_all_with_http_info: #{e}"
102
141
  end
103
142
  ```
104
143
 
105
144
  ### Parameters
106
145
 
107
- Name | Type | Description | Notes
108
- ------------- | ------------- | ------------- | -------------
109
- **skip** | **String**| Number of records to skip (must be non-negative) | [optional]
110
- **take** | **String**| Number of records to take (must be positive) | [optional]
146
+ | Name | Type | Description | Notes |
147
+ | ---- | ---- | ----------- | ----- |
148
+ | **skip** | **String** | Number of records to skip (must be non-negative) | [optional] |
149
+ | **take** | **String** | Number of records to take (must be positive) | [optional] |
111
150
 
112
151
  ### Return type
113
152
 
@@ -115,54 +154,72 @@ nil (empty response body)
115
154
 
116
155
  ### Authorization
117
156
 
118
- [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)
119
158
 
120
159
  ### HTTP request headers
121
160
 
122
- - **Content-Type**: Not defined
123
- - **Accept**: Not defined
161
+ - **Content-Type**: Not defined
162
+ - **Accept**: Not defined
124
163
 
125
164
 
165
+ ## payment_links_controller_find_one
126
166
 
127
- # **payment_links_controller_find_one**
128
167
  > payment_links_controller_find_one(id)
129
168
 
130
169
  Get a payment link by ID
131
170
 
132
- ### Example
171
+ ### Examples
172
+
133
173
  ```ruby
134
- # load the gem
135
- require 'devdraft_ai_sdk'
174
+ require 'time'
175
+ require 'devdraft'
136
176
  # setup authorization
137
- DevDraftAI.configure do |config|
138
- # Configure API key authorization: x-client-key
139
- config.api_key['x-client-key'] = 'YOUR API KEY'
140
- # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
141
- #config.api_key_prefix['x-client-key'] = 'Bearer'
142
-
177
+ Devdraft.configure do |config|
143
178
  # Configure API key authorization: x-client-secret
144
179
  config.api_key['x-client-secret'] = 'YOUR API KEY'
145
180
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
146
- #config.api_key_prefix['x-client-secret'] = 'Bearer'
181
+ # config.api_key_prefix['x-client-secret'] = 'Bearer'
182
+
183
+ # Configure API key authorization: x-client-key
184
+ config.api_key['x-client-key'] = 'YOUR API KEY'
185
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
186
+ # config.api_key_prefix['x-client-key'] = 'Bearer'
147
187
  end
148
188
 
149
- api_instance = DevDraftAI::PaymentLinksApi.new
189
+ api_instance = Devdraft::PaymentLinksApi.new
150
190
  id = 'id_example' # String | Payment Link ID
151
191
 
152
-
153
192
  begin
154
- #Get a payment link by ID
193
+ # Get a payment link by ID
155
194
  api_instance.payment_links_controller_find_one(id)
156
- rescue DevDraftAI::ApiError => e
157
- puts "Exception when calling PaymentLinksApi->payment_links_controller_find_one: #{e}"
195
+ rescue Devdraft::ApiError => e
196
+ puts "Error when calling PaymentLinksApi->payment_links_controller_find_one: #{e}"
197
+ end
198
+ ```
199
+
200
+ #### Using the payment_links_controller_find_one_with_http_info variant
201
+
202
+ This returns an Array which contains the response data (`nil` in this case), status code and headers.
203
+
204
+ > <Array(nil, Integer, Hash)> payment_links_controller_find_one_with_http_info(id)
205
+
206
+ ```ruby
207
+ begin
208
+ # Get a payment link by ID
209
+ data, status_code, headers = api_instance.payment_links_controller_find_one_with_http_info(id)
210
+ p status_code # => 2xx
211
+ p headers # => { ... }
212
+ p data # => nil
213
+ rescue Devdraft::ApiError => e
214
+ puts "Error when calling PaymentLinksApi->payment_links_controller_find_one_with_http_info: #{e}"
158
215
  end
159
216
  ```
160
217
 
161
218
  ### Parameters
162
219
 
163
- Name | Type | Description | Notes
164
- ------------- | ------------- | ------------- | -------------
165
- **id** | **String**| Payment Link ID |
220
+ | Name | Type | Description | Notes |
221
+ | ---- | ---- | ----------- | ----- |
222
+ | **id** | **String** | Payment Link ID | |
166
223
 
167
224
  ### Return type
168
225
 
@@ -170,56 +227,74 @@ nil (empty response body)
170
227
 
171
228
  ### Authorization
172
229
 
173
- [x-client-key](../README.md#x-client-key), [x-client-secret](../README.md#x-client-secret)
230
+ [x-client-secret](../README.md#x-client-secret), [x-client-key](../README.md#x-client-key)
174
231
 
175
232
  ### HTTP request headers
176
233
 
177
- - **Content-Type**: Not defined
178
- - **Accept**: Not defined
234
+ - **Content-Type**: Not defined
235
+ - **Accept**: Not defined
179
236
 
180
237
 
238
+ ## payment_links_controller_update
181
239
 
182
- # **payment_links_controller_update**
183
- > payment_links_controller_update(bodyid)
240
+ > payment_links_controller_update(id, body)
184
241
 
185
242
  Update a payment link
186
243
 
187
- ### Example
244
+ ### Examples
245
+
188
246
  ```ruby
189
- # load the gem
190
- require 'devdraft_ai_sdk'
247
+ require 'time'
248
+ require 'devdraft'
191
249
  # setup authorization
192
- DevDraftAI.configure do |config|
193
- # Configure API key authorization: x-client-key
194
- config.api_key['x-client-key'] = 'YOUR API KEY'
195
- # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
196
- #config.api_key_prefix['x-client-key'] = 'Bearer'
197
-
250
+ Devdraft.configure do |config|
198
251
  # Configure API key authorization: x-client-secret
199
252
  config.api_key['x-client-secret'] = 'YOUR API KEY'
200
253
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
201
- #config.api_key_prefix['x-client-secret'] = 'Bearer'
254
+ # config.api_key_prefix['x-client-secret'] = 'Bearer'
255
+
256
+ # Configure API key authorization: x-client-key
257
+ config.api_key['x-client-key'] = 'YOUR API KEY'
258
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
259
+ # config.api_key_prefix['x-client-key'] = 'Bearer'
202
260
  end
203
261
 
204
- api_instance = DevDraftAI::PaymentLinksApi.new
205
- body = DevDraftAI::UpdatePaymentLinkDto.new # UpdatePaymentLinkDto |
262
+ api_instance = Devdraft::PaymentLinksApi.new
206
263
  id = 'id_example' # String | Payment Link ID
264
+ body = { ... } # Object |
207
265
 
266
+ begin
267
+ # Update a payment link
268
+ api_instance.payment_links_controller_update(id, body)
269
+ rescue Devdraft::ApiError => e
270
+ puts "Error when calling PaymentLinksApi->payment_links_controller_update: #{e}"
271
+ end
272
+ ```
273
+
274
+ #### Using the payment_links_controller_update_with_http_info variant
275
+
276
+ This returns an Array which contains the response data (`nil` in this case), status code and headers.
208
277
 
278
+ > <Array(nil, Integer, Hash)> payment_links_controller_update_with_http_info(id, body)
279
+
280
+ ```ruby
209
281
  begin
210
- #Update a payment link
211
- api_instance.payment_links_controller_update(bodyid)
212
- rescue DevDraftAI::ApiError => e
213
- puts "Exception when calling PaymentLinksApi->payment_links_controller_update: #{e}"
282
+ # Update a payment link
283
+ data, status_code, headers = api_instance.payment_links_controller_update_with_http_info(id, body)
284
+ p status_code # => 2xx
285
+ p headers # => { ... }
286
+ p data # => nil
287
+ rescue Devdraft::ApiError => e
288
+ puts "Error when calling PaymentLinksApi->payment_links_controller_update_with_http_info: #{e}"
214
289
  end
215
290
  ```
216
291
 
217
292
  ### Parameters
218
293
 
219
- Name | Type | Description | Notes
220
- ------------- | ------------- | ------------- | -------------
221
- **body** | [**UpdatePaymentLinkDto**](UpdatePaymentLinkDto.md)| |
222
- **id** | **String**| Payment Link ID |
294
+ | Name | Type | Description | Notes |
295
+ | ---- | ---- | ----------- | ----- |
296
+ | **id** | **String** | Payment Link ID | |
297
+ | **body** | **Object** | | |
223
298
 
224
299
  ### Return type
225
300
 
@@ -227,12 +302,10 @@ nil (empty response body)
227
302
 
228
303
  ### Authorization
229
304
 
230
- [x-client-key](../README.md#x-client-key), [x-client-secret](../README.md#x-client-secret)
305
+ [x-client-secret](../README.md#x-client-secret), [x-client-key](../README.md#x-client-key)
231
306
 
232
307
  ### HTTP request headers
233
308
 
234
- - **Content-Type**: application/json
235
- - **Accept**: Not defined
236
-
237
-
309
+ - **Content-Type**: application/json
310
+ - **Accept**: Not defined
238
311
 
@@ -1,10 +1,24 @@
1
- # DevDraftAI::PaymentRequestDto
1
+ # Devdraft::PaymentRequestDto
2
2
 
3
3
  ## Properties
4
- Name | Type | Description | Notes
5
- ------------ | ------------- | ------------- | -------------
6
- **amount** | [**BigDecimal**](BigDecimal.md) | The amount to charge |
7
- **currency** | **String** | The currency code |
8
- **description** | **String** | Description of the payment |
9
- **customer_id** | **String** | Customer reference ID | [optional]
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **amount** | **Float** | The amount to charge | |
8
+ | **currency** | **String** | The currency code | |
9
+ | **description** | **String** | Description of the payment | |
10
+ | **customer_id** | **String** | Customer reference ID | [optional] |
11
+
12
+ ## Example
13
+
14
+ ```ruby
15
+ require 'devdraft'
16
+
17
+ instance = Devdraft::PaymentRequestDto.new(
18
+ amount: 100.5,
19
+ currency: USD,
20
+ description: Test payment for API,
21
+ customer_id: cus_12345
22
+ )
23
+ ```
10
24
 
@@ -1,11 +1,26 @@
1
- # DevDraftAI::PaymentResponseDto
1
+ # Devdraft::PaymentResponseDto
2
2
 
3
3
  ## Properties
4
- Name | Type | Description | Notes
5
- ------------ | ------------- | ------------- | -------------
6
- **id** | **String** | Payment ID |
7
- **amount** | [**BigDecimal**](BigDecimal.md) | The amount charged |
8
- **currency** | **String** | The currency code |
9
- **status** | **String** | Payment status |
10
- **timestamp** | **String** | Timestamp of the payment |
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **id** | **String** | Payment ID | |
8
+ | **amount** | **Float** | The amount charged | |
9
+ | **currency** | **String** | The currency code | |
10
+ | **status** | **String** | Payment status | |
11
+ | **timestamp** | **String** | Timestamp of the payment | |
12
+
13
+ ## Example
14
+
15
+ ```ruby
16
+ require 'devdraft'
17
+
18
+ instance = Devdraft::PaymentResponseDto.new(
19
+ id: pay_12345abcdef,
20
+ amount: 100.5,
21
+ currency: USD,
22
+ status: succeeded,
23
+ timestamp: 2023-07-01T12:00:00.000Z
24
+ )
25
+ ```
11
26