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,14 +1,32 @@
1
- # DevDraftAI::WebhookResponseDto
1
+ # Devdraft::WebhookResponseDto
2
2
 
3
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 |
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **id** | **String** | Unique identifier for the webhook | |
8
+ | **name** | **String** | Name of the webhook | |
9
+ | **url** | **String** | URL where webhook events are sent | |
10
+ | **is_active** | **Boolean** | Whether the webhook is currently active | |
11
+ | **encrypted** | **Boolean** | Whether webhook payloads are encrypted | |
12
+ | **created_at** | **String** | Timestamp when the webhook was created | |
13
+ | **updated_at** | **String** | Timestamp when the webhook was last updated | |
14
+ | **delivery_stats** | **Object** | Webhook delivery statistics | |
15
+
16
+ ## Example
17
+
18
+ ```ruby
19
+ require 'devdraft'
20
+
21
+ instance = Devdraft::WebhookResponseDto.new(
22
+ id: 550e8400-e29b-41d4-a716-446655440000,
23
+ name: Payment Notifications,
24
+ url: https://api.example.com/webhooks/payments,
25
+ is_active: true,
26
+ encrypted: false,
27
+ created_at: 2024-03-20T12:00:00.000Z,
28
+ updated_at: 2024-03-20T12:00:00.000Z,
29
+ delivery_stats: {"total_events":150,"successful_deliveries":145,"failed_deliveries":5,"last_delivery":"2024-03-20T11:55:00.000Z"}
30
+ )
31
+ ```
14
32
 
data/docs/WebhooksApi.md CHANGED
@@ -1,57 +1,77 @@
1
- # DevDraftAI::WebhooksApi
1
+ # Devdraft::WebhooksApi
2
2
 
3
3
  All URIs are relative to *https://api.devdraft.ai*
4
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
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
12
 
13
- # **webhook_controller_create**
14
- > WebhookResponseDto webhook_controller_create(body)
13
+
14
+ ## webhook_controller_create
15
+
16
+ > <WebhookResponseDto> webhook_controller_create(create_webhook_dto)
15
17
 
16
18
  Create a new webhook
17
19
 
18
20
  Creates a new webhook endpoint for receiving event notifications. Requires webhook:create scope.
19
21
 
20
- ### Example
22
+ ### Examples
23
+
21
24
  ```ruby
22
- # load the gem
23
- require 'devdraft_ai_sdk'
25
+ require 'time'
26
+ require 'devdraft'
24
27
  # setup authorization
25
- DevDraftAI.configure do |config|
28
+ Devdraft.configure do |config|
29
+ # Configure API key authorization: x-client-secret
30
+ config.api_key['x-client-secret'] = 'YOUR API KEY'
31
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
32
+ # config.api_key_prefix['x-client-secret'] = 'Bearer'
33
+
26
34
  # Configure API key authorization: x-client-key
27
35
  config.api_key['x-client-key'] = 'YOUR API KEY'
28
36
  # 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'
37
+ # config.api_key_prefix['x-client-key'] = 'Bearer'
38
+ end
30
39
 
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'
40
+ api_instance = Devdraft::WebhooksApi.new
41
+ create_webhook_dto = Devdraft::CreateWebhookDto.new({name: 'Payment Notifications', url: 'https://api.example.com/webhooks/payments', is_active: true, encrypted: false}) # CreateWebhookDto | Webhook configuration details
42
+
43
+ begin
44
+ # Create a new webhook
45
+ result = api_instance.webhook_controller_create(create_webhook_dto)
46
+ p result
47
+ rescue Devdraft::ApiError => e
48
+ puts "Error when calling WebhooksApi->webhook_controller_create: #{e}"
35
49
  end
50
+ ```
36
51
 
37
- api_instance = DevDraftAI::WebhooksApi.new
38
- body = DevDraftAI::CreateWebhookDto.new # CreateWebhookDto | Webhook configuration details
52
+ #### Using the webhook_controller_create_with_http_info variant
39
53
 
54
+ This returns an Array which contains the response data, status code and headers.
40
55
 
56
+ > <Array(<WebhookResponseDto>, Integer, Hash)> webhook_controller_create_with_http_info(create_webhook_dto)
57
+
58
+ ```ruby
41
59
  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}"
60
+ # Create a new webhook
61
+ data, status_code, headers = api_instance.webhook_controller_create_with_http_info(create_webhook_dto)
62
+ p status_code # => 2xx
63
+ p headers # => { ... }
64
+ p data # => <WebhookResponseDto>
65
+ rescue Devdraft::ApiError => e
66
+ puts "Error when calling WebhooksApi->webhook_controller_create_with_http_info: #{e}"
47
67
  end
48
68
  ```
49
69
 
50
70
  ### Parameters
51
71
 
52
- Name | Type | Description | Notes
53
- ------------- | ------------- | ------------- | -------------
54
- **body** | [**CreateWebhookDto**](CreateWebhookDto.md)| Webhook configuration details |
72
+ | Name | Type | Description | Notes |
73
+ | ---- | ---- | ----------- | ----- |
74
+ | **create_webhook_dto** | [**CreateWebhookDto**](CreateWebhookDto.md) | Webhook configuration details | |
55
75
 
56
76
  ### Return type
57
77
 
@@ -59,60 +79,79 @@ Name | Type | Description | Notes
59
79
 
60
80
  ### Authorization
61
81
 
62
- [x-client-key](../README.md#x-client-key), [x-client-secret](../README.md#x-client-secret)
82
+ [x-client-secret](../README.md#x-client-secret), [x-client-key](../README.md#x-client-key)
63
83
 
64
84
  ### HTTP request headers
65
85
 
66
- - **Content-Type**: application/json
67
- - **Accept**: application/json
86
+ - **Content-Type**: application/json
87
+ - **Accept**: application/json
68
88
 
69
89
 
90
+ ## webhook_controller_find_all
70
91
 
71
- # **webhook_controller_find_all**
72
- > Array&lt;WebhookResponseDto&gt; webhook_controller_find_all(opts)
92
+ > <Array<WebhookResponseDto>> webhook_controller_find_all(opts)
73
93
 
74
94
  Get all webhooks
75
95
 
76
96
  Retrieves a list of all webhooks for your application. Requires webhook:read scope.
77
97
 
78
- ### Example
98
+ ### Examples
99
+
79
100
  ```ruby
80
- # load the gem
81
- require 'devdraft_ai_sdk'
101
+ require 'time'
102
+ require 'devdraft'
82
103
  # 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
-
104
+ Devdraft.configure do |config|
89
105
  # Configure API key authorization: x-client-secret
90
106
  config.api_key['x-client-secret'] = 'YOUR API KEY'
91
107
  # 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'
108
+ # config.api_key_prefix['x-client-secret'] = 'Bearer'
109
+
110
+ # Configure API key authorization: x-client-key
111
+ config.api_key['x-client-key'] = 'YOUR API KEY'
112
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
113
+ # config.api_key_prefix['x-client-key'] = 'Bearer'
93
114
  end
94
115
 
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)
116
+ api_instance = Devdraft::WebhooksApi.new
117
+ opts = {
118
+ skip: 8.14, # Float | Number of records to skip (default: 0)
119
+ take: 8.14 # Float | Number of records to return (default: 10)
99
120
  }
100
121
 
101
122
  begin
102
- #Get all webhooks
123
+ # Get all webhooks
103
124
  result = api_instance.webhook_controller_find_all(opts)
104
125
  p result
105
- rescue DevDraftAI::ApiError => e
106
- puts "Exception when calling WebhooksApi->webhook_controller_find_all: #{e}"
126
+ rescue Devdraft::ApiError => e
127
+ puts "Error when calling WebhooksApi->webhook_controller_find_all: #{e}"
128
+ end
129
+ ```
130
+
131
+ #### Using the webhook_controller_find_all_with_http_info variant
132
+
133
+ This returns an Array which contains the response data, status code and headers.
134
+
135
+ > <Array(<Array<WebhookResponseDto>>, Integer, Hash)> webhook_controller_find_all_with_http_info(opts)
136
+
137
+ ```ruby
138
+ begin
139
+ # Get all webhooks
140
+ data, status_code, headers = api_instance.webhook_controller_find_all_with_http_info(opts)
141
+ p status_code # => 2xx
142
+ p headers # => { ... }
143
+ p data # => <Array<WebhookResponseDto>>
144
+ rescue Devdraft::ApiError => e
145
+ puts "Error when calling WebhooksApi->webhook_controller_find_all_with_http_info: #{e}"
107
146
  end
108
147
  ```
109
148
 
110
149
  ### Parameters
111
150
 
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]
151
+ | Name | Type | Description | Notes |
152
+ | ---- | ---- | ----------- | ----- |
153
+ | **skip** | **Float** | Number of records to skip (default: 0) | [optional] |
154
+ | **take** | **Float** | Number of records to return (default: 10) | [optional] |
116
155
 
117
156
  ### Return type
118
157
 
@@ -120,57 +159,75 @@ Name | Type | Description | Notes
120
159
 
121
160
  ### Authorization
122
161
 
123
- [x-client-key](../README.md#x-client-key), [x-client-secret](../README.md#x-client-secret)
162
+ [x-client-secret](../README.md#x-client-secret), [x-client-key](../README.md#x-client-key)
124
163
 
125
164
  ### HTTP request headers
126
165
 
127
- - **Content-Type**: Not defined
128
- - **Accept**: application/json
166
+ - **Content-Type**: Not defined
167
+ - **Accept**: application/json
129
168
 
130
169
 
170
+ ## webhook_controller_find_one
131
171
 
132
- # **webhook_controller_find_one**
133
- > WebhookResponseDto webhook_controller_find_one(id)
172
+ > <WebhookResponseDto> webhook_controller_find_one(id)
134
173
 
135
174
  Get a webhook by id
136
175
 
137
176
  Retrieves details for a specific webhook. Requires webhook:read scope.
138
177
 
139
- ### Example
178
+ ### Examples
179
+
140
180
  ```ruby
141
- # load the gem
142
- require 'devdraft_ai_sdk'
181
+ require 'time'
182
+ require 'devdraft'
143
183
  # 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
-
184
+ Devdraft.configure do |config|
150
185
  # Configure API key authorization: x-client-secret
151
186
  config.api_key['x-client-secret'] = 'YOUR API KEY'
152
187
  # 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
188
+ # config.api_key_prefix['x-client-secret'] = 'Bearer'
155
189
 
156
- api_instance = DevDraftAI::WebhooksApi.new
157
- id = 'id_example' # String | Webhook ID
190
+ # Configure API key authorization: x-client-key
191
+ config.api_key['x-client-key'] = 'YOUR API KEY'
192
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
193
+ # config.api_key_prefix['x-client-key'] = 'Bearer'
194
+ end
158
195
 
196
+ api_instance = Devdraft::WebhooksApi.new
197
+ id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String | Webhook unique identifier (UUID)
159
198
 
160
199
  begin
161
- #Get a webhook by id
200
+ # Get a webhook by id
162
201
  result = api_instance.webhook_controller_find_one(id)
163
202
  p result
164
- rescue DevDraftAI::ApiError => e
165
- puts "Exception when calling WebhooksApi->webhook_controller_find_one: #{e}"
203
+ rescue Devdraft::ApiError => e
204
+ puts "Error when calling WebhooksApi->webhook_controller_find_one: #{e}"
205
+ end
206
+ ```
207
+
208
+ #### Using the webhook_controller_find_one_with_http_info variant
209
+
210
+ This returns an Array which contains the response data, status code and headers.
211
+
212
+ > <Array(<WebhookResponseDto>, Integer, Hash)> webhook_controller_find_one_with_http_info(id)
213
+
214
+ ```ruby
215
+ begin
216
+ # Get a webhook by id
217
+ data, status_code, headers = api_instance.webhook_controller_find_one_with_http_info(id)
218
+ p status_code # => 2xx
219
+ p headers # => { ... }
220
+ p data # => <WebhookResponseDto>
221
+ rescue Devdraft::ApiError => e
222
+ puts "Error when calling WebhooksApi->webhook_controller_find_one_with_http_info: #{e}"
166
223
  end
167
224
  ```
168
225
 
169
226
  ### Parameters
170
227
 
171
- Name | Type | Description | Notes
172
- ------------- | ------------- | ------------- | -------------
173
- **id** | **String**| Webhook ID |
228
+ | Name | Type | Description | Notes |
229
+ | ---- | ---- | ----------- | ----- |
230
+ | **id** | **String** | Webhook unique identifier (UUID) | |
174
231
 
175
232
  ### Return type
176
233
 
@@ -178,57 +235,75 @@ Name | Type | Description | Notes
178
235
 
179
236
  ### Authorization
180
237
 
181
- [x-client-key](../README.md#x-client-key), [x-client-secret](../README.md#x-client-secret)
238
+ [x-client-secret](../README.md#x-client-secret), [x-client-key](../README.md#x-client-key)
182
239
 
183
240
  ### HTTP request headers
184
241
 
185
- - **Content-Type**: Not defined
186
- - **Accept**: application/json
242
+ - **Content-Type**: Not defined
243
+ - **Accept**: application/json
187
244
 
188
245
 
246
+ ## webhook_controller_remove
189
247
 
190
- # **webhook_controller_remove**
191
- > WebhookResponseDto webhook_controller_remove(id)
248
+ > <WebhookResponseDto> webhook_controller_remove(id)
192
249
 
193
250
  Delete a webhook
194
251
 
195
252
  Deletes a webhook configuration. Requires webhook:delete scope.
196
253
 
197
- ### Example
254
+ ### Examples
255
+
198
256
  ```ruby
199
- # load the gem
200
- require 'devdraft_ai_sdk'
257
+ require 'time'
258
+ require 'devdraft'
201
259
  # 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
-
260
+ Devdraft.configure do |config|
208
261
  # Configure API key authorization: x-client-secret
209
262
  config.api_key['x-client-secret'] = 'YOUR API KEY'
210
263
  # 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
264
+ # config.api_key_prefix['x-client-secret'] = 'Bearer'
213
265
 
214
- api_instance = DevDraftAI::WebhooksApi.new
215
- id = 'id_example' # String | Webhook ID
266
+ # Configure API key authorization: x-client-key
267
+ config.api_key['x-client-key'] = '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-key'] = 'Bearer'
270
+ end
216
271
 
272
+ api_instance = Devdraft::WebhooksApi.new
273
+ id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String | Webhook unique identifier (UUID)
217
274
 
218
275
  begin
219
- #Delete a webhook
276
+ # Delete a webhook
220
277
  result = api_instance.webhook_controller_remove(id)
221
278
  p result
222
- rescue DevDraftAI::ApiError => e
223
- puts "Exception when calling WebhooksApi->webhook_controller_remove: #{e}"
279
+ rescue Devdraft::ApiError => e
280
+ puts "Error when calling WebhooksApi->webhook_controller_remove: #{e}"
281
+ end
282
+ ```
283
+
284
+ #### Using the webhook_controller_remove_with_http_info variant
285
+
286
+ This returns an Array which contains the response data, status code and headers.
287
+
288
+ > <Array(<WebhookResponseDto>, Integer, Hash)> webhook_controller_remove_with_http_info(id)
289
+
290
+ ```ruby
291
+ begin
292
+ # Delete a webhook
293
+ data, status_code, headers = api_instance.webhook_controller_remove_with_http_info(id)
294
+ p status_code # => 2xx
295
+ p headers # => { ... }
296
+ p data # => <WebhookResponseDto>
297
+ rescue Devdraft::ApiError => e
298
+ puts "Error when calling WebhooksApi->webhook_controller_remove_with_http_info: #{e}"
224
299
  end
225
300
  ```
226
301
 
227
302
  ### Parameters
228
303
 
229
- Name | Type | Description | Notes
230
- ------------- | ------------- | ------------- | -------------
231
- **id** | **String**| Webhook ID |
304
+ | Name | Type | Description | Notes |
305
+ | ---- | ---- | ----------- | ----- |
306
+ | **id** | **String** | Webhook unique identifier (UUID) | |
232
307
 
233
308
  ### Return type
234
309
 
@@ -236,59 +311,77 @@ Name | Type | Description | Notes
236
311
 
237
312
  ### Authorization
238
313
 
239
- [x-client-key](../README.md#x-client-key), [x-client-secret](../README.md#x-client-secret)
314
+ [x-client-secret](../README.md#x-client-secret), [x-client-key](../README.md#x-client-key)
240
315
 
241
316
  ### HTTP request headers
242
317
 
243
- - **Content-Type**: Not defined
244
- - **Accept**: application/json
318
+ - **Content-Type**: Not defined
319
+ - **Accept**: application/json
245
320
 
246
321
 
322
+ ## webhook_controller_update
247
323
 
248
- # **webhook_controller_update**
249
- > WebhookResponseDto webhook_controller_update(bodyid)
324
+ > <WebhookResponseDto> webhook_controller_update(id, update_webhook_dto)
250
325
 
251
326
  Update a webhook
252
327
 
253
328
  Updates an existing webhook configuration. Requires webhook:update scope.
254
329
 
255
- ### Example
330
+ ### Examples
331
+
256
332
  ```ruby
257
- # load the gem
258
- require 'devdraft_ai_sdk'
333
+ require 'time'
334
+ require 'devdraft'
259
335
  # setup authorization
260
- DevDraftAI.configure do |config|
336
+ Devdraft.configure do |config|
337
+ # Configure API key authorization: x-client-secret
338
+ config.api_key['x-client-secret'] = 'YOUR API KEY'
339
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
340
+ # config.api_key_prefix['x-client-secret'] = 'Bearer'
341
+
261
342
  # Configure API key authorization: x-client-key
262
343
  config.api_key['x-client-key'] = 'YOUR API KEY'
263
344
  # 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'
345
+ # config.api_key_prefix['x-client-key'] = 'Bearer'
346
+ end
265
347
 
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'
348
+ api_instance = Devdraft::WebhooksApi.new
349
+ id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String | Webhook unique identifier (UUID)
350
+ update_webhook_dto = Devdraft::UpdateWebhookDto.new # UpdateWebhookDto | Webhook update details
351
+
352
+ begin
353
+ # Update a webhook
354
+ result = api_instance.webhook_controller_update(id, update_webhook_dto)
355
+ p result
356
+ rescue Devdraft::ApiError => e
357
+ puts "Error when calling WebhooksApi->webhook_controller_update: #{e}"
270
358
  end
359
+ ```
271
360
 
272
- api_instance = DevDraftAI::WebhooksApi.new
273
- body = DevDraftAI::UpdateWebhookDto.new # UpdateWebhookDto | Webhook update details
274
- id = 'id_example' # String | Webhook ID
361
+ #### Using the webhook_controller_update_with_http_info variant
275
362
 
363
+ This returns an Array which contains the response data, status code and headers.
276
364
 
365
+ > <Array(<WebhookResponseDto>, Integer, Hash)> webhook_controller_update_with_http_info(id, update_webhook_dto)
366
+
367
+ ```ruby
277
368
  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}"
369
+ # Update a webhook
370
+ data, status_code, headers = api_instance.webhook_controller_update_with_http_info(id, update_webhook_dto)
371
+ p status_code # => 2xx
372
+ p headers # => { ... }
373
+ p data # => <WebhookResponseDto>
374
+ rescue Devdraft::ApiError => e
375
+ puts "Error when calling WebhooksApi->webhook_controller_update_with_http_info: #{e}"
283
376
  end
284
377
  ```
285
378
 
286
379
  ### Parameters
287
380
 
288
- Name | Type | Description | Notes
289
- ------------- | ------------- | ------------- | -------------
290
- **body** | [**UpdateWebhookDto**](UpdateWebhookDto.md)| Webhook update details |
291
- **id** | **String**| Webhook ID |
381
+ | Name | Type | Description | Notes |
382
+ | ---- | ---- | ----------- | ----- |
383
+ | **id** | **String** | Webhook unique identifier (UUID) | |
384
+ | **update_webhook_dto** | [**UpdateWebhookDto**](UpdateWebhookDto.md) | Webhook update details | |
292
385
 
293
386
  ### Return type
294
387
 
@@ -296,12 +389,10 @@ Name | Type | Description | Notes
296
389
 
297
390
  ### Authorization
298
391
 
299
- [x-client-key](../README.md#x-client-key), [x-client-secret](../README.md#x-client-secret)
392
+ [x-client-secret](../README.md#x-client-secret), [x-client-key](../README.md#x-client-key)
300
393
 
301
394
  ### HTTP request headers
302
395
 
303
- - **Content-Type**: application/json
304
- - **Accept**: application/json
305
-
306
-
396
+ - **Content-Type**: application/json
397
+ - **Accept**: application/json
307
398
 
data/git_push.sh CHANGED
@@ -1,44 +1,57 @@
1
1
  #!/bin/sh
2
- #
3
- # Generated by: https://github.com/swagger-api/swagger-codegen.git
4
- #
5
2
  # ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
6
3
  #
7
- # Usage example: /bin/sh ./git_push.sh wing328 swagger-petstore-perl "minor update"
4
+ # Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com"
5
+
6
+ git_user_id=$1
7
+ git_repo_id=$2
8
+ release_note=$3
9
+ git_host=$4
10
+
11
+ if [ "$git_host" = "" ]; then
12
+ git_host="github.com"
13
+ echo "[INFO] No command line input provided. Set \$git_host to $git_host"
14
+ fi
15
+
16
+ if [ "$git_user_id" = "" ]; then
17
+ git_user_id="GIT_USER_ID"
18
+ echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
19
+ fi
8
20
 
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"
21
+ if [ "$git_repo_id" = "" ]; then
22
+ git_repo_id="GIT_REPO_ID"
23
+ echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
24
+ fi
25
+
26
+ if [ "$release_note" = "" ]; then
27
+ release_note="Minor update"
28
+ echo "[INFO] No command line input provided. Set \$release_note to $release_note"
29
+ fi
14
30
 
15
31
  # Initialize the local directory as a Git repository
16
32
  git init
17
33
 
18
- # Remove any existing remote
19
- git remote remove origin 2>/dev/null || true
20
-
21
34
  # Adds the files in the local repository and stages them for commit.
22
35
  git add .
23
36
 
24
37
  # 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
38
+ git commit -m "$release_note"
39
+
40
+ # Sets the new remote
41
+ git_remote=$(git remote)
42
+ if [ "$git_remote" = "" ]; then # git remote not defined
34
43
 
35
- # Create and switch to main branch
36
- git branch -M main
44
+ if [ "$GIT_TOKEN" = "" ]; then
45
+ echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
46
+ git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git
47
+ else
48
+ git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git
49
+ fi
37
50
 
38
- # Pull from main branch (ignore errors on first push)
39
- git pull origin main || true
51
+ fi
40
52
 
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'
53
+ git pull origin master
44
54
 
55
+ # Pushes (Forces) the changes in the local repository up to the remote repository
56
+ echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git"
57
+ git push origin master 2>&1 | grep -v 'To https'