devdraft 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (205) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +9 -0
  3. data/README.md +1246 -0
  4. data/Rakefile +8 -0
  5. data/devdraft_ai_sdk.gemspec +38 -0
  6. data/docs/APIHealthApi.md +87 -0
  7. data/docs/AggregatedBalanceResponse.md +9 -0
  8. data/docs/AllBalancesResponse.md +9 -0
  9. data/docs/AllOfAllBalancesResponseEurc.md +9 -0
  10. data/docs/AllOfAllBalancesResponseUsdc.md +9 -0
  11. data/docs/AllOfCreateBankPaymentIntentDtoDestinationCurrency.md +6 -0
  12. data/docs/AllOfCreateBankPaymentIntentDtoDestinationNetwork.md +6 -0
  13. data/docs/AllOfCreateBankPaymentIntentDtoSourceCurrency.md +6 -0
  14. data/docs/AllOfCreateBankPaymentIntentDtoSourcePaymentRail.md +6 -0
  15. data/docs/AllOfCreateCustomerDtoStatus.md +6 -0
  16. data/docs/AllOfCreateLiquidationAddressDtoDestinationCurrency.md +6 -0
  17. data/docs/AllOfCreateLiquidationAddressDtoDestinationPaymentRail.md +6 -0
  18. data/docs/AllOfCreateStablePaymentIntentDtoDestinationCurrency.md +6 -0
  19. data/docs/AllOfCreateStablePaymentIntentDtoDestinationNetwork.md +6 -0
  20. data/docs/AllOfCreateStablePaymentIntentDtoSourceCurrency.md +6 -0
  21. data/docs/AllOfCreateStablePaymentIntentDtoSourceNetwork.md +6 -0
  22. data/docs/AllOfUpdateCustomerDtoStatus.md +6 -0
  23. data/docs/AppBalancesApi.md +169 -0
  24. data/docs/BridgePaymentRail.md +6 -0
  25. data/docs/CreateBankPaymentIntentDto.md +24 -0
  26. data/docs/CreateCustomerDto.md +12 -0
  27. data/docs/CreateDirectBankTransferDto.md +14 -0
  28. data/docs/CreateDirectWalletTransferDto.md +10 -0
  29. data/docs/CreateInvoiceDto.md +22 -0
  30. data/docs/CreateLiquidationAddressDto.md +21 -0
  31. data/docs/CreatePaymentLinkDto.md +31 -0
  32. data/docs/CreateProductDto.md +18 -0
  33. data/docs/CreateStablePaymentIntentDto.md +21 -0
  34. data/docs/CreateStablecoinConversionDto.md +11 -0
  35. data/docs/CreateTaxInput.md +6 -0
  36. data/docs/CreateWebhookDto.md +11 -0
  37. data/docs/CustomerStatus.md +6 -0
  38. data/docs/CustomersApi.md +250 -0
  39. data/docs/DestinationCurrency.md +6 -0
  40. data/docs/ExchangeRateResponseDto.md +12 -0
  41. data/docs/ExchangeRatesApi.md +176 -0
  42. data/docs/FiatCurrency.md +6 -0
  43. data/docs/HealthResponseDto.md +12 -0
  44. data/docs/InvoiceProductDto.md +8 -0
  45. data/docs/InvoicesApi.md +236 -0
  46. data/docs/LiquidationAddressResponseDto.md +20 -0
  47. data/docs/LiquidationAddressesApi.md +152 -0
  48. data/docs/PaymentIntentsApi.md +127 -0
  49. data/docs/PaymentLinkProductDto.md +8 -0
  50. data/docs/PaymentLinksApi.md +238 -0
  51. data/docs/PaymentRequestDto.md +10 -0
  52. data/docs/PaymentResponseDto.md +11 -0
  53. data/docs/ProductsApi.md +404 -0
  54. data/docs/PublicHealthResponseDto.md +9 -0
  55. data/docs/RefundResponseDto.md +11 -0
  56. data/docs/StableCoinCurrency.md +6 -0
  57. data/docs/TaxesApi.md +292 -0
  58. data/docs/TestPaymentsApi.md +150 -0
  59. data/docs/TransfersApi.md +175 -0
  60. data/docs/UpdateCustomerDto.md +12 -0
  61. data/docs/UpdatePaymentLinkDto.md +6 -0
  62. data/docs/UpdatePreferenceInput.md +6 -0
  63. data/docs/UpdateProductDto.md +18 -0
  64. data/docs/UpdateTaxInput.md +6 -0
  65. data/docs/UpdateWebhookDto.md +11 -0
  66. data/docs/WalletsApi.md +58 -0
  67. data/docs/WebhookResponseDto.md +14 -0
  68. data/docs/WebhooksApi.md +307 -0
  69. data/git_push.sh +44 -0
  70. data/lib/devdraft/api/api_health_api.rb +116 -0
  71. data/lib/devdraft/api/app_balances_api.rb +170 -0
  72. data/lib/devdraft/api/customers_api.rb +258 -0
  73. data/lib/devdraft/api/exchange_rates_api.rb +184 -0
  74. data/lib/devdraft/api/invoices_api.rb +238 -0
  75. data/lib/devdraft/api/liquidation_addresses_api.rb +202 -0
  76. data/lib/devdraft/api/payment_intents_api.rb +150 -0
  77. data/lib/devdraft/api/payment_links_api.rb +240 -0
  78. data/lib/devdraft/api/products_api.rb +518 -0
  79. data/lib/devdraft/api/taxes_api.rb +290 -0
  80. data/lib/devdraft/api/test_payments_api.rb +202 -0
  81. data/lib/devdraft/api/transfers_api.rb +182 -0
  82. data/lib/devdraft/api/wallets_api.rb +66 -0
  83. data/lib/devdraft/api/webhooks_api.rb +310 -0
  84. data/lib/devdraft/api_client.rb +388 -0
  85. data/lib/devdraft/api_error.rb +57 -0
  86. data/lib/devdraft/configuration.rb +219 -0
  87. data/lib/devdraft/models/aggregated_balance_response.rb +278 -0
  88. data/lib/devdraft/models/all_balances_response.rb +242 -0
  89. data/lib/devdraft/models/all_of_all_balances_response_eurc.rb +283 -0
  90. data/lib/devdraft/models/all_of_all_balances_response_usdc.rb +283 -0
  91. data/lib/devdraft/models/all_of_create_bank_payment_intent_dto_destination_currency.rb +202 -0
  92. data/lib/devdraft/models/all_of_create_bank_payment_intent_dto_destination_network.rb +202 -0
  93. data/lib/devdraft/models/all_of_create_bank_payment_intent_dto_source_currency.rb +202 -0
  94. data/lib/devdraft/models/all_of_create_bank_payment_intent_dto_source_payment_rail.rb +202 -0
  95. data/lib/devdraft/models/all_of_create_customer_dto_status.rb +202 -0
  96. data/lib/devdraft/models/all_of_create_liquidation_address_dto_destination_currency.rb +202 -0
  97. data/lib/devdraft/models/all_of_create_liquidation_address_dto_destination_payment_rail.rb +202 -0
  98. data/lib/devdraft/models/all_of_create_stable_payment_intent_dto_destination_currency.rb +202 -0
  99. data/lib/devdraft/models/all_of_create_stable_payment_intent_dto_destination_network.rb +202 -0
  100. data/lib/devdraft/models/all_of_create_stable_payment_intent_dto_source_currency.rb +202 -0
  101. data/lib/devdraft/models/all_of_create_stable_payment_intent_dto_source_network.rb +202 -0
  102. data/lib/devdraft/models/all_of_update_customer_dto_status.rb +202 -0
  103. data/lib/devdraft/models/bridge_payment_rail.rb +43 -0
  104. data/lib/devdraft/models/create_bank_payment_intent_dto.rb +397 -0
  105. data/lib/devdraft/models/create_customer_dto.rb +308 -0
  106. data/lib/devdraft/models/create_direct_bank_transfer_dto.rb +302 -0
  107. data/lib/devdraft/models/create_direct_wallet_transfer_dto.rb +257 -0
  108. data/lib/devdraft/models/create_invoice_dto.rb +474 -0
  109. data/lib/devdraft/models/create_liquidation_address_dto.rb +408 -0
  110. data/lib/devdraft/models/create_payment_link_dto.rb +603 -0
  111. data/lib/devdraft/models/create_product_dto.rb +370 -0
  112. data/lib/devdraft/models/create_stable_payment_intent_dto.rb +362 -0
  113. data/lib/devdraft/models/create_stablecoin_conversion_dto.rb +272 -0
  114. data/lib/devdraft/models/create_tax_input.rb +197 -0
  115. data/lib/devdraft/models/create_webhook_dto.rb +271 -0
  116. data/lib/devdraft/models/customer_status.rb +29 -0
  117. data/lib/devdraft/models/destination_currency.rb +34 -0
  118. data/lib/devdraft/models/exchange_rate_response_dto.rb +282 -0
  119. data/lib/devdraft/models/fiat_currency.rb +29 -0
  120. data/lib/devdraft/models/health_response_dto.rb +333 -0
  121. data/lib/devdraft/models/invoice_product_dto.rb +227 -0
  122. data/lib/devdraft/models/liquidation_address_response_dto.rb +377 -0
  123. data/lib/devdraft/models/payment_link_product_dto.rb +229 -0
  124. data/lib/devdraft/models/payment_request_dto.rb +252 -0
  125. data/lib/devdraft/models/payment_response_dto.rb +272 -0
  126. data/lib/devdraft/models/public_health_response_dto.rb +276 -0
  127. data/lib/devdraft/models/refund_response_dto.rb +272 -0
  128. data/lib/devdraft/models/stable_coin_currency.rb +28 -0
  129. data/lib/devdraft/models/update_customer_dto.rb +293 -0
  130. data/lib/devdraft/models/update_payment_link_dto.rb +197 -0
  131. data/lib/devdraft/models/update_preference_input.rb +197 -0
  132. data/lib/devdraft/models/update_product_dto.rb +355 -0
  133. data/lib/devdraft/models/update_tax_input.rb +197 -0
  134. data/lib/devdraft/models/update_webhook_dto.rb +251 -0
  135. data/lib/devdraft/models/webhook_response_dto.rb +317 -0
  136. data/lib/devdraft/version.rb +14 -0
  137. data/lib/devdraft.rb +101 -0
  138. data/spec/api/api_health_api_spec.rb +54 -0
  139. data/spec/api/app_balances_api_spec.rb +67 -0
  140. data/spec/api/customers_api_spec.rb +87 -0
  141. data/spec/api/exchange_rates_api_spec.rb +69 -0
  142. data/spec/api/invoices_api_spec.rb +80 -0
  143. data/spec/api/liquidation_addresses_api_spec.rb +72 -0
  144. data/spec/api/payment_intents_api_spec.rb +60 -0
  145. data/spec/api/payment_links_api_spec.rb +81 -0
  146. data/spec/api/products_api_spec.rb +130 -0
  147. data/spec/api/taxes_api_spec.rb +91 -0
  148. data/spec/api/test_payments_api_spec.rb +71 -0
  149. data/spec/api/transfers_api_spec.rb +67 -0
  150. data/spec/api/wallets_api_spec.rb +44 -0
  151. data/spec/api/webhooks_api_spec.rb +96 -0
  152. data/spec/api_client_spec.rb +225 -0
  153. data/spec/base_object_spec.rb +109 -0
  154. data/spec/configuration_spec.rb +41 -0
  155. data/spec/models/aggregated_balance_response_spec.rb +56 -0
  156. data/spec/models/all_balances_response_spec.rb +52 -0
  157. data/spec/models/all_of_all_balances_response_eurc_spec.rb +56 -0
  158. data/spec/models/all_of_all_balances_response_usdc_spec.rb +56 -0
  159. data/spec/models/all_of_create_bank_payment_intent_dto_destination_currency_spec.rb +34 -0
  160. data/spec/models/all_of_create_bank_payment_intent_dto_destination_network_spec.rb +34 -0
  161. data/spec/models/all_of_create_bank_payment_intent_dto_source_currency_spec.rb +34 -0
  162. data/spec/models/all_of_create_bank_payment_intent_dto_source_payment_rail_spec.rb +34 -0
  163. data/spec/models/all_of_create_customer_dto_status_spec.rb +34 -0
  164. data/spec/models/all_of_create_liquidation_address_dto_destination_currency_spec.rb +34 -0
  165. data/spec/models/all_of_create_liquidation_address_dto_destination_payment_rail_spec.rb +34 -0
  166. data/spec/models/all_of_create_stable_payment_intent_dto_destination_currency_spec.rb +34 -0
  167. data/spec/models/all_of_create_stable_payment_intent_dto_destination_network_spec.rb +34 -0
  168. data/spec/models/all_of_create_stable_payment_intent_dto_source_currency_spec.rb +34 -0
  169. data/spec/models/all_of_create_stable_payment_intent_dto_source_network_spec.rb +34 -0
  170. data/spec/models/all_of_update_customer_dto_status_spec.rb +34 -0
  171. data/spec/models/bridge_payment_rail_spec.rb +34 -0
  172. data/spec/models/create_bank_payment_intent_dto_spec.rb +142 -0
  173. data/spec/models/create_customer_dto_spec.rb +74 -0
  174. data/spec/models/create_direct_bank_transfer_dto_spec.rb +82 -0
  175. data/spec/models/create_direct_wallet_transfer_dto_spec.rb +58 -0
  176. data/spec/models/create_invoice_dto_spec.rb +146 -0
  177. data/spec/models/create_liquidation_address_dto_spec.rb +132 -0
  178. data/spec/models/create_payment_link_dto_spec.rb +200 -0
  179. data/spec/models/create_product_dto_spec.rb +110 -0
  180. data/spec/models/create_stable_payment_intent_dto_spec.rb +124 -0
  181. data/spec/models/create_stablecoin_conversion_dto_spec.rb +64 -0
  182. data/spec/models/create_tax_input_spec.rb +34 -0
  183. data/spec/models/create_webhook_dto_spec.rb +64 -0
  184. data/spec/models/customer_status_spec.rb +34 -0
  185. data/spec/models/destination_currency_spec.rb +34 -0
  186. data/spec/models/exchange_rate_response_dto_spec.rb +70 -0
  187. data/spec/models/fiat_currency_spec.rb +34 -0
  188. data/spec/models/health_response_dto_spec.rb +78 -0
  189. data/spec/models/invoice_product_dto_spec.rb +46 -0
  190. data/spec/models/liquidation_address_response_dto_spec.rb +118 -0
  191. data/spec/models/payment_link_product_dto_spec.rb +46 -0
  192. data/spec/models/payment_request_dto_spec.rb +58 -0
  193. data/spec/models/payment_response_dto_spec.rb +64 -0
  194. data/spec/models/public_health_response_dto_spec.rb +56 -0
  195. data/spec/models/refund_response_dto_spec.rb +64 -0
  196. data/spec/models/stable_coin_currency_spec.rb +34 -0
  197. data/spec/models/update_customer_dto_spec.rb +74 -0
  198. data/spec/models/update_payment_link_dto_spec.rb +34 -0
  199. data/spec/models/update_preference_input_spec.rb +34 -0
  200. data/spec/models/update_product_dto_spec.rb +110 -0
  201. data/spec/models/update_tax_input_spec.rb +34 -0
  202. data/spec/models/update_webhook_dto_spec.rb +64 -0
  203. data/spec/models/webhook_response_dto_spec.rb +82 -0
  204. data/spec/spec_helper.rb +110 -0
  205. metadata +375 -0
@@ -0,0 +1,58 @@
1
+ # DevDraftAI::WalletsApi
2
+
3
+ All URIs are relative to *https://api.devdraft.ai*
4
+
5
+ Method | HTTP request | Description
6
+ ------------- | ------------- | -------------
7
+ [**wallet_controller_get_wallets**](WalletsApi.md#wallet_controller_get_wallets) | **GET** /api/v0/wallets | Get wallets for an app
8
+
9
+ # **wallet_controller_get_wallets**
10
+ > wallet_controller_get_wallets
11
+
12
+ Get wallets for an app
13
+
14
+ ### Example
15
+ ```ruby
16
+ # load the gem
17
+ require 'devdraft_ai_sdk'
18
+ # setup authorization
19
+ DevDraftAI.configure do |config|
20
+ # Configure API key authorization: x-client-key
21
+ config.api_key['x-client-key'] = 'YOUR API KEY'
22
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
23
+ #config.api_key_prefix['x-client-key'] = 'Bearer'
24
+
25
+ # Configure API key authorization: x-client-secret
26
+ config.api_key['x-client-secret'] = 'YOUR API KEY'
27
+ # 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-secret'] = 'Bearer'
29
+ end
30
+
31
+ api_instance = DevDraftAI::WalletsApi.new
32
+
33
+ begin
34
+ #Get wallets for an app
35
+ api_instance.wallet_controller_get_wallets
36
+ rescue DevDraftAI::ApiError => e
37
+ puts "Exception when calling WalletsApi->wallet_controller_get_wallets: #{e}"
38
+ end
39
+ ```
40
+
41
+ ### Parameters
42
+ This endpoint does not need any parameter.
43
+
44
+ ### Return type
45
+
46
+ nil (empty response body)
47
+
48
+ ### Authorization
49
+
50
+ [x-client-key](../README.md#x-client-key), [x-client-secret](../README.md#x-client-secret)
51
+
52
+ ### HTTP request headers
53
+
54
+ - **Content-Type**: Not defined
55
+ - **Accept**: Not defined
56
+
57
+
58
+
@@ -0,0 +1,14 @@
1
+ # DevDraftAI::WebhookResponseDto
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **id** | **String** | Unique identifier for the webhook |
7
+ **name** | **String** | Name of the webhook |
8
+ **url** | **String** | URL where webhook events are sent |
9
+ **is_active** | **BOOLEAN** | Whether the webhook is currently active |
10
+ **encrypted** | **BOOLEAN** | Whether webhook payloads are encrypted |
11
+ **created_at** | **String** | Timestamp when the webhook was created |
12
+ **updated_at** | **String** | Timestamp when the webhook was last updated |
13
+ **delivery_stats** | **Object** | Webhook delivery statistics |
14
+
@@ -0,0 +1,307 @@
1
+ # DevDraftAI::WebhooksApi
2
+
3
+ All URIs are relative to *https://api.devdraft.ai*
4
+
5
+ Method | HTTP request | Description
6
+ ------------- | ------------- | -------------
7
+ [**webhook_controller_create**](WebhooksApi.md#webhook_controller_create) | **POST** /api/v0/webhooks | Create a new webhook
8
+ [**webhook_controller_find_all**](WebhooksApi.md#webhook_controller_find_all) | **GET** /api/v0/webhooks | Get all webhooks
9
+ [**webhook_controller_find_one**](WebhooksApi.md#webhook_controller_find_one) | **GET** /api/v0/webhooks/{id} | Get a webhook by id
10
+ [**webhook_controller_remove**](WebhooksApi.md#webhook_controller_remove) | **DELETE** /api/v0/webhooks/{id} | Delete a webhook
11
+ [**webhook_controller_update**](WebhooksApi.md#webhook_controller_update) | **PATCH** /api/v0/webhooks/{id} | Update a webhook
12
+
13
+ # **webhook_controller_create**
14
+ > WebhookResponseDto webhook_controller_create(body)
15
+
16
+ Create a new webhook
17
+
18
+ Creates a new webhook endpoint for receiving event notifications. Requires webhook:create scope.
19
+
20
+ ### Example
21
+ ```ruby
22
+ # load the gem
23
+ require 'devdraft_ai_sdk'
24
+ # setup authorization
25
+ DevDraftAI.configure do |config|
26
+ # Configure API key authorization: x-client-key
27
+ config.api_key['x-client-key'] = 'YOUR API KEY'
28
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
29
+ #config.api_key_prefix['x-client-key'] = 'Bearer'
30
+
31
+ # Configure API key authorization: x-client-secret
32
+ config.api_key['x-client-secret'] = '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-secret'] = 'Bearer'
35
+ end
36
+
37
+ api_instance = DevDraftAI::WebhooksApi.new
38
+ body = DevDraftAI::CreateWebhookDto.new # CreateWebhookDto | Webhook configuration details
39
+
40
+
41
+ begin
42
+ #Create a new webhook
43
+ result = api_instance.webhook_controller_create(body)
44
+ p result
45
+ rescue DevDraftAI::ApiError => e
46
+ puts "Exception when calling WebhooksApi->webhook_controller_create: #{e}"
47
+ end
48
+ ```
49
+
50
+ ### Parameters
51
+
52
+ Name | Type | Description | Notes
53
+ ------------- | ------------- | ------------- | -------------
54
+ **body** | [**CreateWebhookDto**](CreateWebhookDto.md)| Webhook configuration details |
55
+
56
+ ### Return type
57
+
58
+ [**WebhookResponseDto**](WebhookResponseDto.md)
59
+
60
+ ### Authorization
61
+
62
+ [x-client-key](../README.md#x-client-key), [x-client-secret](../README.md#x-client-secret)
63
+
64
+ ### HTTP request headers
65
+
66
+ - **Content-Type**: application/json
67
+ - **Accept**: application/json
68
+
69
+
70
+
71
+ # **webhook_controller_find_all**
72
+ > Array<WebhookResponseDto> webhook_controller_find_all(opts)
73
+
74
+ Get all webhooks
75
+
76
+ Retrieves a list of all webhooks for your application. Requires webhook:read scope.
77
+
78
+ ### Example
79
+ ```ruby
80
+ # load the gem
81
+ require 'devdraft_ai_sdk'
82
+ # setup authorization
83
+ DevDraftAI.configure do |config|
84
+ # Configure API key authorization: x-client-key
85
+ config.api_key['x-client-key'] = 'YOUR API KEY'
86
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
87
+ #config.api_key_prefix['x-client-key'] = 'Bearer'
88
+
89
+ # Configure API key authorization: x-client-secret
90
+ config.api_key['x-client-secret'] = 'YOUR API KEY'
91
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
92
+ #config.api_key_prefix['x-client-secret'] = 'Bearer'
93
+ end
94
+
95
+ api_instance = DevDraftAI::WebhooksApi.new
96
+ opts = {
97
+ skip: DevDraftAI::BigDecimal.new, # BigDecimal | Number of records to skip (default: 0)
98
+ take: DevDraftAI::BigDecimal.new # BigDecimal | Number of records to return (default: 10)
99
+ }
100
+
101
+ begin
102
+ #Get all webhooks
103
+ result = api_instance.webhook_controller_find_all(opts)
104
+ p result
105
+ rescue DevDraftAI::ApiError => e
106
+ puts "Exception when calling WebhooksApi->webhook_controller_find_all: #{e}"
107
+ end
108
+ ```
109
+
110
+ ### Parameters
111
+
112
+ Name | Type | Description | Notes
113
+ ------------- | ------------- | ------------- | -------------
114
+ **skip** | **BigDecimal**| Number of records to skip (default: 0) | [optional]
115
+ **take** | **BigDecimal**| Number of records to return (default: 10) | [optional]
116
+
117
+ ### Return type
118
+
119
+ [**Array<WebhookResponseDto>**](WebhookResponseDto.md)
120
+
121
+ ### Authorization
122
+
123
+ [x-client-key](../README.md#x-client-key), [x-client-secret](../README.md#x-client-secret)
124
+
125
+ ### HTTP request headers
126
+
127
+ - **Content-Type**: Not defined
128
+ - **Accept**: application/json
129
+
130
+
131
+
132
+ # **webhook_controller_find_one**
133
+ > WebhookResponseDto webhook_controller_find_one(id)
134
+
135
+ Get a webhook by id
136
+
137
+ Retrieves details for a specific webhook. Requires webhook:read scope.
138
+
139
+ ### Example
140
+ ```ruby
141
+ # load the gem
142
+ require 'devdraft_ai_sdk'
143
+ # setup authorization
144
+ DevDraftAI.configure do |config|
145
+ # Configure API key authorization: x-client-key
146
+ config.api_key['x-client-key'] = 'YOUR API KEY'
147
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
148
+ #config.api_key_prefix['x-client-key'] = 'Bearer'
149
+
150
+ # Configure API key authorization: x-client-secret
151
+ config.api_key['x-client-secret'] = 'YOUR API KEY'
152
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
153
+ #config.api_key_prefix['x-client-secret'] = 'Bearer'
154
+ end
155
+
156
+ api_instance = DevDraftAI::WebhooksApi.new
157
+ id = 'id_example' # String | Webhook ID
158
+
159
+
160
+ begin
161
+ #Get a webhook by id
162
+ result = api_instance.webhook_controller_find_one(id)
163
+ p result
164
+ rescue DevDraftAI::ApiError => e
165
+ puts "Exception when calling WebhooksApi->webhook_controller_find_one: #{e}"
166
+ end
167
+ ```
168
+
169
+ ### Parameters
170
+
171
+ Name | Type | Description | Notes
172
+ ------------- | ------------- | ------------- | -------------
173
+ **id** | **String**| Webhook ID |
174
+
175
+ ### Return type
176
+
177
+ [**WebhookResponseDto**](WebhookResponseDto.md)
178
+
179
+ ### Authorization
180
+
181
+ [x-client-key](../README.md#x-client-key), [x-client-secret](../README.md#x-client-secret)
182
+
183
+ ### HTTP request headers
184
+
185
+ - **Content-Type**: Not defined
186
+ - **Accept**: application/json
187
+
188
+
189
+
190
+ # **webhook_controller_remove**
191
+ > WebhookResponseDto webhook_controller_remove(id)
192
+
193
+ Delete a webhook
194
+
195
+ Deletes a webhook configuration. Requires webhook:delete scope.
196
+
197
+ ### Example
198
+ ```ruby
199
+ # load the gem
200
+ require 'devdraft_ai_sdk'
201
+ # setup authorization
202
+ DevDraftAI.configure do |config|
203
+ # Configure API key authorization: x-client-key
204
+ config.api_key['x-client-key'] = 'YOUR API KEY'
205
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
206
+ #config.api_key_prefix['x-client-key'] = 'Bearer'
207
+
208
+ # Configure API key authorization: x-client-secret
209
+ config.api_key['x-client-secret'] = 'YOUR API KEY'
210
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
211
+ #config.api_key_prefix['x-client-secret'] = 'Bearer'
212
+ end
213
+
214
+ api_instance = DevDraftAI::WebhooksApi.new
215
+ id = 'id_example' # String | Webhook ID
216
+
217
+
218
+ begin
219
+ #Delete a webhook
220
+ result = api_instance.webhook_controller_remove(id)
221
+ p result
222
+ rescue DevDraftAI::ApiError => e
223
+ puts "Exception when calling WebhooksApi->webhook_controller_remove: #{e}"
224
+ end
225
+ ```
226
+
227
+ ### Parameters
228
+
229
+ Name | Type | Description | Notes
230
+ ------------- | ------------- | ------------- | -------------
231
+ **id** | **String**| Webhook ID |
232
+
233
+ ### Return type
234
+
235
+ [**WebhookResponseDto**](WebhookResponseDto.md)
236
+
237
+ ### Authorization
238
+
239
+ [x-client-key](../README.md#x-client-key), [x-client-secret](../README.md#x-client-secret)
240
+
241
+ ### HTTP request headers
242
+
243
+ - **Content-Type**: Not defined
244
+ - **Accept**: application/json
245
+
246
+
247
+
248
+ # **webhook_controller_update**
249
+ > WebhookResponseDto webhook_controller_update(bodyid)
250
+
251
+ Update a webhook
252
+
253
+ Updates an existing webhook configuration. Requires webhook:update scope.
254
+
255
+ ### Example
256
+ ```ruby
257
+ # load the gem
258
+ require 'devdraft_ai_sdk'
259
+ # setup authorization
260
+ DevDraftAI.configure do |config|
261
+ # Configure API key authorization: x-client-key
262
+ config.api_key['x-client-key'] = 'YOUR API KEY'
263
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
264
+ #config.api_key_prefix['x-client-key'] = 'Bearer'
265
+
266
+ # Configure API key authorization: x-client-secret
267
+ config.api_key['x-client-secret'] = 'YOUR API KEY'
268
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
269
+ #config.api_key_prefix['x-client-secret'] = 'Bearer'
270
+ end
271
+
272
+ api_instance = DevDraftAI::WebhooksApi.new
273
+ body = DevDraftAI::UpdateWebhookDto.new # UpdateWebhookDto | Webhook update details
274
+ id = 'id_example' # String | Webhook ID
275
+
276
+
277
+ begin
278
+ #Update a webhook
279
+ result = api_instance.webhook_controller_update(bodyid)
280
+ p result
281
+ rescue DevDraftAI::ApiError => e
282
+ puts "Exception when calling WebhooksApi->webhook_controller_update: #{e}"
283
+ end
284
+ ```
285
+
286
+ ### Parameters
287
+
288
+ Name | Type | Description | Notes
289
+ ------------- | ------------- | ------------- | -------------
290
+ **body** | [**UpdateWebhookDto**](UpdateWebhookDto.md)| Webhook update details |
291
+ **id** | **String**| Webhook ID |
292
+
293
+ ### Return type
294
+
295
+ [**WebhookResponseDto**](WebhookResponseDto.md)
296
+
297
+ ### Authorization
298
+
299
+ [x-client-key](../README.md#x-client-key), [x-client-secret](../README.md#x-client-secret)
300
+
301
+ ### HTTP request headers
302
+
303
+ - **Content-Type**: application/json
304
+ - **Accept**: application/json
305
+
306
+
307
+
data/git_push.sh ADDED
@@ -0,0 +1,44 @@
1
+ #!/bin/sh
2
+ #
3
+ # Generated by: https://github.com/swagger-api/swagger-codegen.git
4
+ #
5
+ # ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
6
+ #
7
+ # Usage example: /bin/sh ./git_push.sh wing328 swagger-petstore-perl "minor update"
8
+
9
+ # Set repository details
10
+ GIT_USER_ID="devraftengineer"
11
+ GIT_REPO_ID="devdraft-sdk-ruby"
12
+ RELEASE_NOTE="Initial release: DevDraft Ruby SDK"
13
+ GIT_REPO_BASE_URL="github.com"
14
+
15
+ # Initialize the local directory as a Git repository
16
+ git init
17
+
18
+ # Remove any existing remote
19
+ git remote remove origin 2>/dev/null || true
20
+
21
+ # Adds the files in the local repository and stages them for commit.
22
+ git add .
23
+
24
+ # Commits the tracked changes and prepares them to be pushed to a remote repository.
25
+ git commit -m "$RELEASE_NOTE"
26
+
27
+ # Add the new remote
28
+ if [ "$GIT_TOKEN" = "" ]; then
29
+ echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
30
+ git remote add origin "https://${GIT_REPO_BASE_URL}/${GIT_USER_ID}/${GIT_REPO_ID}.git"
31
+ else
32
+ git remote add origin "https://${GIT_USER_ID}:${GIT_TOKEN}@${GIT_REPO_BASE_URL}/${GIT_USER_ID}/${GIT_REPO_ID}.git"
33
+ fi
34
+
35
+ # Create and switch to main branch
36
+ git branch -M main
37
+
38
+ # Pull from main branch (ignore errors on first push)
39
+ git pull origin main || true
40
+
41
+ # Pushes the changes in the local repository up to the remote repository
42
+ echo "Git pushing to https://${GIT_REPO_BASE_URL}/${GIT_USER_ID}/${GIT_REPO_ID}.git"
43
+ git push -u origin main 2>&1 | grep -v 'To https'
44
+
@@ -0,0 +1,116 @@
1
+ =begin
2
+ #Devdraft AI Payment & Business Management API
3
+
4
+ # A comprehensive payment processing and business management API that enables seamless integration of cryptocurrency and traditional payment methods.
5
+
6
+ OpenAPI spec version: 1.0.0
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 3.0.65
10
+ =end
11
+
12
+ module DevDraftAI
13
+ class APIHealthApi
14
+ attr_accessor :api_client
15
+
16
+ def initialize(api_client = ApiClient.default)
17
+ @api_client = api_client
18
+ end
19
+ # Authenticated health check endpoint
20
+ # @param [Hash] opts the optional parameters
21
+ # @return [HealthResponseDto]
22
+ def health_controller_check_v0(opts = {})
23
+ data, _status_code, _headers = health_controller_check_v0_with_http_info(opts)
24
+ data
25
+ end
26
+
27
+ # Authenticated health check endpoint
28
+ # @param [Hash] opts the optional parameters
29
+ # @return [Array<(HealthResponseDto, Integer, Hash)>] HealthResponseDto data, response status code and response headers
30
+ def health_controller_check_v0_with_http_info(opts = {})
31
+ if @api_client.config.debugging
32
+ @api_client.config.logger.debug 'Calling API: APIHealthApi.health_controller_check_v0 ...'
33
+ end
34
+ # resource path
35
+ local_var_path = '/api/v0/health'
36
+
37
+ # query parameters
38
+ query_params = opts[:query_params] || {}
39
+
40
+ # header parameters
41
+ header_params = opts[:header_params] || {}
42
+ # HTTP header 'Accept' (if needed)
43
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
44
+
45
+ # form parameters
46
+ form_params = opts[:form_params] || {}
47
+
48
+ # http body (model)
49
+ post_body = opts[:body]
50
+
51
+ return_type = opts[:return_type] || 'HealthResponseDto'
52
+
53
+ auth_names = opts[:auth_names] || []
54
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
55
+ :header_params => header_params,
56
+ :query_params => query_params,
57
+ :form_params => form_params,
58
+ :body => post_body,
59
+ :auth_names => auth_names,
60
+ :return_type => return_type)
61
+
62
+ if @api_client.config.debugging
63
+ @api_client.config.logger.debug "API called: APIHealthApi#health_controller_check_v0\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
64
+ end
65
+ return data, status_code, headers
66
+ end
67
+ # Public health check endpoint
68
+ # @param [Hash] opts the optional parameters
69
+ # @return [PublicHealthResponseDto]
70
+ def health_controller_public_health_check_v0(opts = {})
71
+ data, _status_code, _headers = health_controller_public_health_check_v0_with_http_info(opts)
72
+ data
73
+ end
74
+
75
+ # Public health check endpoint
76
+ # @param [Hash] opts the optional parameters
77
+ # @return [Array<(PublicHealthResponseDto, Integer, Hash)>] PublicHealthResponseDto data, response status code and response headers
78
+ def health_controller_public_health_check_v0_with_http_info(opts = {})
79
+ if @api_client.config.debugging
80
+ @api_client.config.logger.debug 'Calling API: APIHealthApi.health_controller_public_health_check_v0 ...'
81
+ end
82
+ # resource path
83
+ local_var_path = '/api/v0/health/public'
84
+
85
+ # query parameters
86
+ query_params = opts[:query_params] || {}
87
+
88
+ # header parameters
89
+ header_params = opts[:header_params] || {}
90
+ # HTTP header 'Accept' (if needed)
91
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
92
+
93
+ # form parameters
94
+ form_params = opts[:form_params] || {}
95
+
96
+ # http body (model)
97
+ post_body = opts[:body]
98
+
99
+ return_type = opts[:return_type] || 'PublicHealthResponseDto'
100
+
101
+ auth_names = opts[:auth_names] || []
102
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
103
+ :header_params => header_params,
104
+ :query_params => query_params,
105
+ :form_params => form_params,
106
+ :body => post_body,
107
+ :auth_names => auth_names,
108
+ :return_type => return_type)
109
+
110
+ if @api_client.config.debugging
111
+ @api_client.config.logger.debug "API called: APIHealthApi#health_controller_public_health_check_v0\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
112
+ end
113
+ return data, status_code, headers
114
+ end
115
+ end
116
+ end