devdraft 1.0.2 → 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.
- checksums.yaml +4 -4
- data/README.md +155 -253
- data/Rakefile +2 -0
- data/devdraft-1.0.0.gem +0 -0
- data/{devdraft_ai_sdk.gemspec → devdraft.gemspec} +15 -11
- data/docs/APIHealthApi.md +82 -30
- data/docs/AggregatedBalanceResponse.md +19 -6
- data/docs/AllBalancesResponse.md +19 -6
- data/docs/AppBalancesApi.md +125 -65
- data/docs/BridgeFiatPaymentRail.md +15 -0
- data/docs/BridgePaymentRail.md +12 -3
- data/docs/CreateBankPaymentIntentDto.md +49 -21
- data/docs/CreateCustomerDto.md +25 -9
- data/docs/CreateDirectBankTransferDto.md +29 -11
- data/docs/CreateDirectWalletTransferDto.md +21 -7
- data/docs/CreateExternalBankTransferDto.md +40 -0
- data/docs/CreateExternalStablecoinTransferDto.md +28 -0
- data/docs/CreateInvoiceDto.md +45 -19
- data/docs/CreateLiquidationAddressDto.md +43 -18
- data/docs/CreatePaymentLinkDto.md +53 -28
- data/docs/CreateStablePaymentIntentDto.md +43 -18
- data/docs/CreateStablecoinConversionDto.md +23 -8
- data/docs/CreateTaxDto.md +26 -0
- data/docs/CreateWebhookDto.md +23 -8
- data/docs/CustomerStatus.md +12 -3
- data/docs/CustomerType.md +15 -0
- data/docs/CustomersApi.md +187 -114
- data/docs/DestinationCurrency.md +12 -3
- data/docs/ExchangeRateResponseDto.md +25 -9
- data/docs/ExchangeRatesApi.md +130 -72
- data/docs/FiatCurrency.md +12 -3
- data/docs/HealthResponseDto.md +25 -9
- data/docs/InvoiceProductDto.md +17 -5
- data/docs/InvoicesApi.md +177 -104
- data/docs/LiquidationAddressResponseDto.md +41 -17
- data/docs/LiquidationAddressesApi.md +115 -61
- data/docs/PaymentIntentsApi.md +93 -57
- data/docs/PaymentLinkProductDto.md +17 -5
- data/docs/PaymentLinksApi.md +175 -102
- data/docs/PaymentRequestDto.md +21 -7
- data/docs/PaymentResponseDto.md +23 -8
- data/docs/ProductsApi.md +307 -194
- data/docs/PublicHealthResponseDto.md +19 -6
- data/docs/RefundResponseDto.md +23 -8
- data/docs/StableCoinCurrency.md +12 -3
- data/docs/TaxControllerCreate201Response.md +30 -0
- data/docs/TaxControllerDeleteWithoutId400Response.md +22 -0
- data/docs/TaxControllerUpdateWithoutId400Response.md +22 -0
- data/docs/TaxesApi.md +374 -122
- data/docs/TestPaymentsApi.md +150 -60
- data/docs/TransfersApi.md +274 -72
- data/docs/UpdateCustomerDto.md +25 -9
- data/docs/UpdateTaxDto.md +26 -0
- data/docs/UpdateWebhookDto.md +23 -8
- data/docs/WalletsApi.md +44 -24
- data/docs/WebhookResponseDto.md +29 -11
- data/docs/WebhooksApi.md +225 -134
- data/git_push.sh +41 -28
- data/lib/devdraft/api/api_health_api.rb +32 -16
- data/lib/devdraft/api/app_balances_api.rb +45 -22
- data/lib/devdraft/api/customers_api.rb +124 -71
- data/lib/devdraft/api/exchange_rates_api.rb +49 -26
- data/lib/devdraft/api/invoices_api.rb +89 -53
- data/lib/devdraft/api/liquidation_addresses_api.rb +70 -44
- data/lib/devdraft/api/payment_intents_api.rb +62 -40
- data/lib/devdraft/api/payment_links_api.rb +85 -49
- data/lib/devdraft/api/products_api.rb +214 -216
- data/lib/devdraft/api/taxes_api.rb +257 -66
- data/lib/devdraft/api/test_payments_api.rb +70 -44
- data/lib/devdraft/api/transfers_api.rb +206 -46
- data/lib/devdraft/api/wallets_api.rb +18 -9
- data/lib/devdraft/api/webhooks_api.rb +109 -66
- data/lib/devdraft/api_client.rb +76 -71
- data/lib/devdraft/api_error.rb +5 -4
- data/lib/devdraft/api_model_base.rb +88 -0
- data/lib/devdraft/configuration.rb +121 -18
- data/lib/devdraft/models/aggregated_balance_response.rb +68 -101
- data/lib/devdraft/models/all_balances_response.rb +76 -99
- data/lib/devdraft/models/bridge_fiat_payment_rail.rb +45 -0
- data/lib/devdraft/models/bridge_payment_rail.rb +36 -24
- data/lib/devdraft/models/create_bank_payment_intent_dto.rb +191 -114
- data/lib/devdraft/models/create_customer_dto.rb +123 -113
- data/lib/devdraft/models/create_direct_bank_transfer_dto.rb +105 -104
- data/lib/devdraft/models/create_direct_wallet_transfer_dto.rb +89 -100
- data/lib/devdraft/models/create_external_bank_transfer_dto.rb +505 -0
- data/lib/devdraft/models/create_external_stablecoin_transfer_dto.rb +266 -0
- data/lib/devdraft/models/create_invoice_dto.rb +151 -121
- data/lib/devdraft/models/create_liquidation_address_dto.rb +195 -115
- data/lib/devdraft/models/create_payment_link_dto.rb +192 -214
- data/lib/devdraft/models/create_stable_payment_intent_dto.rb +324 -111
- data/lib/devdraft/models/create_stablecoin_conversion_dto.rb +102 -101
- data/lib/devdraft/models/create_tax_dto.rb +281 -0
- data/lib/devdraft/models/create_webhook_dto.rb +104 -101
- data/lib/devdraft/models/customer_status.rb +23 -10
- data/lib/devdraft/models/customer_type.rb +45 -0
- data/lib/devdraft/models/destination_currency.rb +27 -15
- data/lib/devdraft/models/exchange_rate_response_dto.rb +103 -102
- data/lib/devdraft/models/fiat_currency.rb +22 -10
- data/lib/devdraft/models/health_response_dto.rb +99 -106
- data/lib/devdraft/models/invoice_product_dto.rb +63 -98
- data/lib/devdraft/models/liquidation_address_response_dto.rb +147 -110
- data/lib/devdraft/models/payment_link_product_dto.rb +70 -98
- data/lib/devdraft/models/payment_request_dto.rb +77 -100
- data/lib/devdraft/models/payment_response_dto.rb +102 -101
- data/lib/devdraft/models/public_health_response_dto.rb +68 -101
- data/lib/devdraft/models/refund_response_dto.rb +102 -101
- data/lib/devdraft/models/stable_coin_currency.rb +21 -9
- data/lib/devdraft/models/tax_controller_create201_response.rb +201 -0
- data/lib/devdraft/models/tax_controller_delete_without_id400_response.rb +165 -0
- data/lib/devdraft/models/tax_controller_update_without_id400_response.rb +165 -0
- data/lib/devdraft/models/update_customer_dto.rb +117 -113
- data/lib/devdraft/models/update_tax_dto.rb +256 -0
- data/lib/devdraft/models/update_webhook_dto.rb +70 -101
- data/lib/devdraft/models/webhook_response_dto.rb +140 -103
- data/lib/devdraft/version.rb +6 -5
- data/lib/devdraft.rb +18 -27
- data/spec/api/api_health_api_spec.rb +10 -9
- data/spec/api/app_balances_api_spec.rb +11 -10
- data/spec/api/customers_api_spec.rb +25 -24
- data/spec/api/exchange_rates_api_spec.rb +11 -10
- data/spec/api/invoices_api_spec.rb +16 -15
- data/spec/api/liquidation_addresses_api_spec.rb +13 -12
- data/spec/api/payment_intents_api_spec.rb +12 -11
- data/spec/api/payment_links_api_spec.rb +14 -13
- data/spec/api/products_api_spec.rb +41 -40
- data/spec/api/taxes_api_spec.rb +51 -21
- data/spec/api/test_payments_api_spec.rb +14 -13
- data/spec/api/transfers_api_spec.rb +36 -13
- data/spec/api/wallets_api_spec.rb +9 -8
- data/spec/api/webhooks_api_spec.rb +20 -19
- data/spec/models/aggregated_balance_response_spec.rb +15 -19
- data/spec/models/all_balances_response_spec.rb +14 -18
- data/spec/models/bridge_fiat_payment_rail_spec.rb +30 -0
- data/spec/models/bridge_payment_rail_spec.rb +11 -15
- data/spec/models/create_bank_payment_intent_dto_spec.rb +29 -33
- data/spec/models/create_customer_dto_spec.rb +17 -25
- data/spec/models/create_direct_bank_transfer_dto_spec.rb +19 -23
- data/spec/models/create_direct_wallet_transfer_dto_spec.rb +15 -19
- data/spec/models/create_external_bank_transfer_dto_spec.rb +102 -0
- data/spec/models/create_external_stablecoin_transfer_dto_spec.rb +66 -0
- data/spec/models/create_invoice_dto_spec.rb +31 -35
- data/spec/models/create_liquidation_address_dto_spec.rb +28 -32
- data/spec/models/create_payment_link_dto_spec.rb +34 -76
- data/spec/models/create_stable_payment_intent_dto_spec.rb +26 -30
- data/spec/models/create_stablecoin_conversion_dto_spec.rb +16 -20
- data/spec/models/create_tax_dto_spec.rb +60 -0
- data/spec/models/create_webhook_dto_spec.rb +16 -20
- data/spec/models/customer_status_spec.rb +11 -15
- data/spec/models/customer_type_spec.rb +30 -0
- data/spec/models/destination_currency_spec.rb +11 -15
- data/spec/models/exchange_rate_response_dto_spec.rb +17 -21
- data/spec/models/fiat_currency_spec.rb +11 -15
- data/spec/models/health_response_dto_spec.rb +19 -23
- data/spec/models/invoice_product_dto_spec.rb +13 -17
- data/spec/models/liquidation_address_response_dto_spec.rb +25 -29
- data/spec/models/payment_link_product_dto_spec.rb +13 -17
- data/spec/models/payment_request_dto_spec.rb +15 -19
- data/spec/models/payment_response_dto_spec.rb +16 -20
- data/spec/models/public_health_response_dto_spec.rb +15 -19
- data/spec/models/refund_response_dto_spec.rb +16 -20
- data/spec/models/stable_coin_currency_spec.rb +11 -15
- data/spec/models/tax_controller_create201_response_spec.rb +72 -0
- data/spec/models/tax_controller_delete_without_id400_response_spec.rb +48 -0
- data/spec/models/tax_controller_update_without_id400_response_spec.rb +48 -0
- data/spec/models/update_customer_dto_spec.rb +17 -25
- data/spec/models/update_tax_dto_spec.rb +60 -0
- data/spec/models/update_webhook_dto_spec.rb +16 -20
- data/spec/models/webhook_response_dto_spec.rb +19 -23
- data/spec/spec_helper.rb +5 -4
- metadata +49 -116
- data/docs/AllOfAllBalancesResponseEurc.md +0 -9
- data/docs/AllOfAllBalancesResponseUsdc.md +0 -9
- data/docs/AllOfCreateBankPaymentIntentDtoDestinationCurrency.md +0 -6
- data/docs/AllOfCreateBankPaymentIntentDtoDestinationNetwork.md +0 -6
- data/docs/AllOfCreateBankPaymentIntentDtoSourceCurrency.md +0 -6
- data/docs/AllOfCreateBankPaymentIntentDtoSourcePaymentRail.md +0 -6
- data/docs/AllOfCreateCustomerDtoStatus.md +0 -6
- data/docs/AllOfCreateLiquidationAddressDtoDestinationCurrency.md +0 -6
- data/docs/AllOfCreateLiquidationAddressDtoDestinationPaymentRail.md +0 -6
- data/docs/AllOfCreateStablePaymentIntentDtoDestinationCurrency.md +0 -6
- data/docs/AllOfCreateStablePaymentIntentDtoDestinationNetwork.md +0 -6
- data/docs/AllOfCreateStablePaymentIntentDtoSourceCurrency.md +0 -6
- data/docs/AllOfCreateStablePaymentIntentDtoSourceNetwork.md +0 -6
- data/docs/AllOfUpdateCustomerDtoStatus.md +0 -6
- data/docs/CreateProductDto.md +0 -18
- data/docs/CreateTaxInput.md +0 -6
- data/docs/UpdatePaymentLinkDto.md +0 -6
- data/docs/UpdatePreferenceInput.md +0 -6
- data/docs/UpdateProductDto.md +0 -18
- data/docs/UpdateTaxInput.md +0 -6
- data/example.rb +0 -129
- data/lib/devdraft/models/all_of_all_balances_response_eurc.rb +0 -283
- data/lib/devdraft/models/all_of_all_balances_response_usdc.rb +0 -283
- data/lib/devdraft/models/all_of_create_bank_payment_intent_dto_destination_currency.rb +0 -202
- data/lib/devdraft/models/all_of_create_bank_payment_intent_dto_destination_network.rb +0 -202
- data/lib/devdraft/models/all_of_create_bank_payment_intent_dto_source_currency.rb +0 -202
- data/lib/devdraft/models/all_of_create_bank_payment_intent_dto_source_payment_rail.rb +0 -202
- data/lib/devdraft/models/all_of_create_customer_dto_status.rb +0 -202
- data/lib/devdraft/models/all_of_create_liquidation_address_dto_destination_currency.rb +0 -202
- data/lib/devdraft/models/all_of_create_liquidation_address_dto_destination_payment_rail.rb +0 -202
- data/lib/devdraft/models/all_of_create_stable_payment_intent_dto_destination_currency.rb +0 -202
- data/lib/devdraft/models/all_of_create_stable_payment_intent_dto_destination_network.rb +0 -202
- data/lib/devdraft/models/all_of_create_stable_payment_intent_dto_source_currency.rb +0 -202
- data/lib/devdraft/models/all_of_create_stable_payment_intent_dto_source_network.rb +0 -202
- data/lib/devdraft/models/all_of_update_customer_dto_status.rb +0 -202
- data/lib/devdraft/models/create_product_dto.rb +0 -370
- data/lib/devdraft/models/create_tax_input.rb +0 -197
- data/lib/devdraft/models/update_payment_link_dto.rb +0 -197
- data/lib/devdraft/models/update_preference_input.rb +0 -197
- data/lib/devdraft/models/update_product_dto.rb +0 -355
- data/lib/devdraft/models/update_tax_input.rb +0 -197
- data/spec/api_client_spec.rb +0 -225
- data/spec/base_object_spec.rb +0 -109
- data/spec/configuration_spec.rb +0 -41
- data/spec/models/all_of_all_balances_response_eurc_spec.rb +0 -56
- data/spec/models/all_of_all_balances_response_usdc_spec.rb +0 -56
- data/spec/models/all_of_create_bank_payment_intent_dto_destination_currency_spec.rb +0 -34
- data/spec/models/all_of_create_bank_payment_intent_dto_destination_network_spec.rb +0 -34
- data/spec/models/all_of_create_bank_payment_intent_dto_source_currency_spec.rb +0 -34
- data/spec/models/all_of_create_bank_payment_intent_dto_source_payment_rail_spec.rb +0 -34
- data/spec/models/all_of_create_customer_dto_status_spec.rb +0 -34
- data/spec/models/all_of_create_liquidation_address_dto_destination_currency_spec.rb +0 -34
- data/spec/models/all_of_create_liquidation_address_dto_destination_payment_rail_spec.rb +0 -34
- data/spec/models/all_of_create_stable_payment_intent_dto_destination_currency_spec.rb +0 -34
- data/spec/models/all_of_create_stable_payment_intent_dto_destination_network_spec.rb +0 -34
- data/spec/models/all_of_create_stable_payment_intent_dto_source_currency_spec.rb +0 -34
- data/spec/models/all_of_create_stable_payment_intent_dto_source_network_spec.rb +0 -34
- data/spec/models/all_of_update_customer_dto_status_spec.rb +0 -34
- data/spec/models/create_product_dto_spec.rb +0 -110
- data/spec/models/create_tax_input_spec.rb +0 -34
- data/spec/models/update_payment_link_dto_spec.rb +0 -34
- data/spec/models/update_preference_input_spec.rb +0 -34
- data/spec/models/update_product_dto_spec.rb +0 -110
- data/spec/models/update_tax_input_spec.rb +0 -34
|
@@ -3,13 +3,16 @@
|
|
|
3
3
|
|
|
4
4
|
# A comprehensive payment processing and business management API that enables seamless integration of cryptocurrency and traditional payment methods.
|
|
5
5
|
|
|
6
|
-
OpenAPI
|
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.17.0
|
|
7
10
|
|
|
8
|
-
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
9
|
-
Swagger Codegen version: 3.0.65
|
|
10
11
|
=end
|
|
11
12
|
|
|
12
|
-
|
|
13
|
+
require 'cgi'
|
|
14
|
+
|
|
15
|
+
module Devdraft
|
|
13
16
|
class WalletsApi
|
|
14
17
|
attr_accessor :api_client
|
|
15
18
|
|
|
@@ -44,19 +47,25 @@ module DevDraftAI
|
|
|
44
47
|
form_params = opts[:form_params] || {}
|
|
45
48
|
|
|
46
49
|
# http body (model)
|
|
47
|
-
post_body = opts[:
|
|
50
|
+
post_body = opts[:debug_body]
|
|
51
|
+
|
|
52
|
+
# return_type
|
|
53
|
+
return_type = opts[:debug_return_type]
|
|
48
54
|
|
|
49
|
-
|
|
55
|
+
# auth_names
|
|
56
|
+
auth_names = opts[:debug_auth_names] || ['x-client-secret', 'x-client-key']
|
|
50
57
|
|
|
51
|
-
|
|
52
|
-
|
|
58
|
+
new_options = opts.merge(
|
|
59
|
+
:operation => :"WalletsApi.wallet_controller_get_wallets",
|
|
53
60
|
:header_params => header_params,
|
|
54
61
|
:query_params => query_params,
|
|
55
62
|
:form_params => form_params,
|
|
56
63
|
:body => post_body,
|
|
57
64
|
:auth_names => auth_names,
|
|
58
|
-
:return_type => return_type
|
|
65
|
+
:return_type => return_type
|
|
66
|
+
)
|
|
59
67
|
|
|
68
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
60
69
|
if @api_client.config.debugging
|
|
61
70
|
@api_client.config.logger.debug "API called: WalletsApi#wallet_controller_get_wallets\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
62
71
|
end
|
|
@@ -3,13 +3,16 @@
|
|
|
3
3
|
|
|
4
4
|
# A comprehensive payment processing and business management API that enables seamless integration of cryptocurrency and traditional payment methods.
|
|
5
5
|
|
|
6
|
-
OpenAPI
|
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.17.0
|
|
7
10
|
|
|
8
|
-
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
9
|
-
Swagger Codegen version: 3.0.65
|
|
10
11
|
=end
|
|
11
12
|
|
|
12
|
-
|
|
13
|
+
require 'cgi'
|
|
14
|
+
|
|
15
|
+
module Devdraft
|
|
13
16
|
class WebhooksApi
|
|
14
17
|
attr_accessor :api_client
|
|
15
18
|
|
|
@@ -18,26 +21,26 @@ module DevDraftAI
|
|
|
18
21
|
end
|
|
19
22
|
# Create a new webhook
|
|
20
23
|
# Creates a new webhook endpoint for receiving event notifications. Requires webhook:create scope.
|
|
21
|
-
# @param
|
|
24
|
+
# @param create_webhook_dto [CreateWebhookDto] Webhook configuration details
|
|
22
25
|
# @param [Hash] opts the optional parameters
|
|
23
26
|
# @return [WebhookResponseDto]
|
|
24
|
-
def webhook_controller_create(
|
|
25
|
-
data, _status_code, _headers = webhook_controller_create_with_http_info(
|
|
27
|
+
def webhook_controller_create(create_webhook_dto, opts = {})
|
|
28
|
+
data, _status_code, _headers = webhook_controller_create_with_http_info(create_webhook_dto, opts)
|
|
26
29
|
data
|
|
27
30
|
end
|
|
28
31
|
|
|
29
32
|
# Create a new webhook
|
|
30
33
|
# Creates a new webhook endpoint for receiving event notifications. Requires webhook:create scope.
|
|
31
|
-
# @param
|
|
34
|
+
# @param create_webhook_dto [CreateWebhookDto] Webhook configuration details
|
|
32
35
|
# @param [Hash] opts the optional parameters
|
|
33
36
|
# @return [Array<(WebhookResponseDto, Integer, Hash)>] WebhookResponseDto data, response status code and response headers
|
|
34
|
-
def webhook_controller_create_with_http_info(
|
|
37
|
+
def webhook_controller_create_with_http_info(create_webhook_dto, opts = {})
|
|
35
38
|
if @api_client.config.debugging
|
|
36
39
|
@api_client.config.logger.debug 'Calling API: WebhooksApi.webhook_controller_create ...'
|
|
37
40
|
end
|
|
38
|
-
# verify the required parameter '
|
|
39
|
-
if @api_client.config.client_side_validation &&
|
|
40
|
-
fail ArgumentError, "Missing the required parameter '
|
|
41
|
+
# verify the required parameter 'create_webhook_dto' is set
|
|
42
|
+
if @api_client.config.client_side_validation && create_webhook_dto.nil?
|
|
43
|
+
fail ArgumentError, "Missing the required parameter 'create_webhook_dto' when calling WebhooksApi.webhook_controller_create"
|
|
41
44
|
end
|
|
42
45
|
# resource path
|
|
43
46
|
local_var_path = '/api/v0/webhooks'
|
|
@@ -48,37 +51,47 @@ module DevDraftAI
|
|
|
48
51
|
# header parameters
|
|
49
52
|
header_params = opts[:header_params] || {}
|
|
50
53
|
# HTTP header 'Accept' (if needed)
|
|
51
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
54
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
52
55
|
# HTTP header 'Content-Type'
|
|
53
|
-
|
|
56
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
57
|
+
if !content_type.nil?
|
|
58
|
+
header_params['Content-Type'] = content_type
|
|
59
|
+
end
|
|
54
60
|
|
|
55
61
|
# form parameters
|
|
56
62
|
form_params = opts[:form_params] || {}
|
|
57
63
|
|
|
58
64
|
# http body (model)
|
|
59
|
-
post_body = opts[:
|
|
65
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(create_webhook_dto)
|
|
66
|
+
|
|
67
|
+
# return_type
|
|
68
|
+
return_type = opts[:debug_return_type] || 'WebhookResponseDto'
|
|
60
69
|
|
|
61
|
-
|
|
70
|
+
# auth_names
|
|
71
|
+
auth_names = opts[:debug_auth_names] || ['x-client-secret', 'x-client-key']
|
|
62
72
|
|
|
63
|
-
|
|
64
|
-
|
|
73
|
+
new_options = opts.merge(
|
|
74
|
+
:operation => :"WebhooksApi.webhook_controller_create",
|
|
65
75
|
:header_params => header_params,
|
|
66
76
|
:query_params => query_params,
|
|
67
77
|
:form_params => form_params,
|
|
68
78
|
:body => post_body,
|
|
69
79
|
:auth_names => auth_names,
|
|
70
|
-
:return_type => return_type
|
|
80
|
+
:return_type => return_type
|
|
81
|
+
)
|
|
71
82
|
|
|
83
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
72
84
|
if @api_client.config.debugging
|
|
73
85
|
@api_client.config.logger.debug "API called: WebhooksApi#webhook_controller_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
74
86
|
end
|
|
75
87
|
return data, status_code, headers
|
|
76
88
|
end
|
|
89
|
+
|
|
77
90
|
# Get all webhooks
|
|
78
91
|
# Retrieves a list of all webhooks for your application. Requires webhook:read scope.
|
|
79
92
|
# @param [Hash] opts the optional parameters
|
|
80
|
-
# @option opts [
|
|
81
|
-
# @option opts [
|
|
93
|
+
# @option opts [Float] :skip Number of records to skip (default: 0)
|
|
94
|
+
# @option opts [Float] :take Number of records to return (default: 10)
|
|
82
95
|
# @return [Array<WebhookResponseDto>]
|
|
83
96
|
def webhook_controller_find_all(opts = {})
|
|
84
97
|
data, _status_code, _headers = webhook_controller_find_all_with_http_info(opts)
|
|
@@ -88,8 +101,8 @@ module DevDraftAI
|
|
|
88
101
|
# Get all webhooks
|
|
89
102
|
# Retrieves a list of all webhooks for your application. Requires webhook:read scope.
|
|
90
103
|
# @param [Hash] opts the optional parameters
|
|
91
|
-
# @option opts [
|
|
92
|
-
# @option opts [
|
|
104
|
+
# @option opts [Float] :skip Number of records to skip (default: 0)
|
|
105
|
+
# @option opts [Float] :take Number of records to return (default: 10)
|
|
93
106
|
# @return [Array<(Array<WebhookResponseDto>, Integer, Hash)>] Array<WebhookResponseDto> data, response status code and response headers
|
|
94
107
|
def webhook_controller_find_all_with_http_info(opts = {})
|
|
95
108
|
if @api_client.config.debugging
|
|
@@ -106,33 +119,40 @@ module DevDraftAI
|
|
|
106
119
|
# header parameters
|
|
107
120
|
header_params = opts[:header_params] || {}
|
|
108
121
|
# HTTP header 'Accept' (if needed)
|
|
109
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
122
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
110
123
|
|
|
111
124
|
# form parameters
|
|
112
125
|
form_params = opts[:form_params] || {}
|
|
113
126
|
|
|
114
127
|
# http body (model)
|
|
115
|
-
post_body = opts[:
|
|
128
|
+
post_body = opts[:debug_body]
|
|
129
|
+
|
|
130
|
+
# return_type
|
|
131
|
+
return_type = opts[:debug_return_type] || 'Array<WebhookResponseDto>'
|
|
116
132
|
|
|
117
|
-
|
|
133
|
+
# auth_names
|
|
134
|
+
auth_names = opts[:debug_auth_names] || ['x-client-secret', 'x-client-key']
|
|
118
135
|
|
|
119
|
-
|
|
120
|
-
|
|
136
|
+
new_options = opts.merge(
|
|
137
|
+
:operation => :"WebhooksApi.webhook_controller_find_all",
|
|
121
138
|
:header_params => header_params,
|
|
122
139
|
:query_params => query_params,
|
|
123
140
|
:form_params => form_params,
|
|
124
141
|
:body => post_body,
|
|
125
142
|
:auth_names => auth_names,
|
|
126
|
-
:return_type => return_type
|
|
143
|
+
:return_type => return_type
|
|
144
|
+
)
|
|
127
145
|
|
|
146
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
128
147
|
if @api_client.config.debugging
|
|
129
148
|
@api_client.config.logger.debug "API called: WebhooksApi#webhook_controller_find_all\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
130
149
|
end
|
|
131
150
|
return data, status_code, headers
|
|
132
151
|
end
|
|
152
|
+
|
|
133
153
|
# Get a webhook by id
|
|
134
154
|
# Retrieves details for a specific webhook. Requires webhook:read scope.
|
|
135
|
-
# @param id Webhook
|
|
155
|
+
# @param id [String] Webhook unique identifier (UUID)
|
|
136
156
|
# @param [Hash] opts the optional parameters
|
|
137
157
|
# @return [WebhookResponseDto]
|
|
138
158
|
def webhook_controller_find_one(id, opts = {})
|
|
@@ -142,7 +162,7 @@ module DevDraftAI
|
|
|
142
162
|
|
|
143
163
|
# Get a webhook by id
|
|
144
164
|
# Retrieves details for a specific webhook. Requires webhook:read scope.
|
|
145
|
-
# @param id Webhook
|
|
165
|
+
# @param id [String] Webhook unique identifier (UUID)
|
|
146
166
|
# @param [Hash] opts the optional parameters
|
|
147
167
|
# @return [Array<(WebhookResponseDto, Integer, Hash)>] WebhookResponseDto data, response status code and response headers
|
|
148
168
|
def webhook_controller_find_one_with_http_info(id, opts = {})
|
|
@@ -154,7 +174,7 @@ module DevDraftAI
|
|
|
154
174
|
fail ArgumentError, "Missing the required parameter 'id' when calling WebhooksApi.webhook_controller_find_one"
|
|
155
175
|
end
|
|
156
176
|
# resource path
|
|
157
|
-
local_var_path = '/api/v0/webhooks/{id}'.sub('{' + 'id' + '}', id.to_s)
|
|
177
|
+
local_var_path = '/api/v0/webhooks/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
|
158
178
|
|
|
159
179
|
# query parameters
|
|
160
180
|
query_params = opts[:query_params] || {}
|
|
@@ -162,33 +182,40 @@ module DevDraftAI
|
|
|
162
182
|
# header parameters
|
|
163
183
|
header_params = opts[:header_params] || {}
|
|
164
184
|
# HTTP header 'Accept' (if needed)
|
|
165
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
185
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
166
186
|
|
|
167
187
|
# form parameters
|
|
168
188
|
form_params = opts[:form_params] || {}
|
|
169
189
|
|
|
170
190
|
# http body (model)
|
|
171
|
-
post_body = opts[:
|
|
191
|
+
post_body = opts[:debug_body]
|
|
192
|
+
|
|
193
|
+
# return_type
|
|
194
|
+
return_type = opts[:debug_return_type] || 'WebhookResponseDto'
|
|
172
195
|
|
|
173
|
-
|
|
196
|
+
# auth_names
|
|
197
|
+
auth_names = opts[:debug_auth_names] || ['x-client-secret', 'x-client-key']
|
|
174
198
|
|
|
175
|
-
|
|
176
|
-
|
|
199
|
+
new_options = opts.merge(
|
|
200
|
+
:operation => :"WebhooksApi.webhook_controller_find_one",
|
|
177
201
|
:header_params => header_params,
|
|
178
202
|
:query_params => query_params,
|
|
179
203
|
:form_params => form_params,
|
|
180
204
|
:body => post_body,
|
|
181
205
|
:auth_names => auth_names,
|
|
182
|
-
:return_type => return_type
|
|
206
|
+
:return_type => return_type
|
|
207
|
+
)
|
|
183
208
|
|
|
209
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
184
210
|
if @api_client.config.debugging
|
|
185
211
|
@api_client.config.logger.debug "API called: WebhooksApi#webhook_controller_find_one\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
186
212
|
end
|
|
187
213
|
return data, status_code, headers
|
|
188
214
|
end
|
|
215
|
+
|
|
189
216
|
# Delete a webhook
|
|
190
217
|
# Deletes a webhook configuration. Requires webhook:delete scope.
|
|
191
|
-
# @param id Webhook
|
|
218
|
+
# @param id [String] Webhook unique identifier (UUID)
|
|
192
219
|
# @param [Hash] opts the optional parameters
|
|
193
220
|
# @return [WebhookResponseDto]
|
|
194
221
|
def webhook_controller_remove(id, opts = {})
|
|
@@ -198,7 +225,7 @@ module DevDraftAI
|
|
|
198
225
|
|
|
199
226
|
# Delete a webhook
|
|
200
227
|
# Deletes a webhook configuration. Requires webhook:delete scope.
|
|
201
|
-
# @param id Webhook
|
|
228
|
+
# @param id [String] Webhook unique identifier (UUID)
|
|
202
229
|
# @param [Hash] opts the optional parameters
|
|
203
230
|
# @return [Array<(WebhookResponseDto, Integer, Hash)>] WebhookResponseDto data, response status code and response headers
|
|
204
231
|
def webhook_controller_remove_with_http_info(id, opts = {})
|
|
@@ -210,7 +237,7 @@ module DevDraftAI
|
|
|
210
237
|
fail ArgumentError, "Missing the required parameter 'id' when calling WebhooksApi.webhook_controller_remove"
|
|
211
238
|
end
|
|
212
239
|
# resource path
|
|
213
|
-
local_var_path = '/api/v0/webhooks/{id}'.sub('{' + 'id' + '}', id.to_s)
|
|
240
|
+
local_var_path = '/api/v0/webhooks/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
|
214
241
|
|
|
215
242
|
# query parameters
|
|
216
243
|
query_params = opts[:query_params] || {}
|
|
@@ -218,61 +245,68 @@ module DevDraftAI
|
|
|
218
245
|
# header parameters
|
|
219
246
|
header_params = opts[:header_params] || {}
|
|
220
247
|
# HTTP header 'Accept' (if needed)
|
|
221
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
248
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
222
249
|
|
|
223
250
|
# form parameters
|
|
224
251
|
form_params = opts[:form_params] || {}
|
|
225
252
|
|
|
226
253
|
# http body (model)
|
|
227
|
-
post_body = opts[:
|
|
254
|
+
post_body = opts[:debug_body]
|
|
255
|
+
|
|
256
|
+
# return_type
|
|
257
|
+
return_type = opts[:debug_return_type] || 'WebhookResponseDto'
|
|
228
258
|
|
|
229
|
-
|
|
259
|
+
# auth_names
|
|
260
|
+
auth_names = opts[:debug_auth_names] || ['x-client-secret', 'x-client-key']
|
|
230
261
|
|
|
231
|
-
|
|
232
|
-
|
|
262
|
+
new_options = opts.merge(
|
|
263
|
+
:operation => :"WebhooksApi.webhook_controller_remove",
|
|
233
264
|
:header_params => header_params,
|
|
234
265
|
:query_params => query_params,
|
|
235
266
|
:form_params => form_params,
|
|
236
267
|
:body => post_body,
|
|
237
268
|
:auth_names => auth_names,
|
|
238
|
-
:return_type => return_type
|
|
269
|
+
:return_type => return_type
|
|
270
|
+
)
|
|
239
271
|
|
|
272
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
240
273
|
if @api_client.config.debugging
|
|
241
274
|
@api_client.config.logger.debug "API called: WebhooksApi#webhook_controller_remove\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
242
275
|
end
|
|
243
276
|
return data, status_code, headers
|
|
244
277
|
end
|
|
278
|
+
|
|
245
279
|
# Update a webhook
|
|
246
280
|
# Updates an existing webhook configuration. Requires webhook:update scope.
|
|
247
|
-
# @param
|
|
248
|
-
# @param
|
|
281
|
+
# @param id [String] Webhook unique identifier (UUID)
|
|
282
|
+
# @param update_webhook_dto [UpdateWebhookDto] Webhook update details
|
|
249
283
|
# @param [Hash] opts the optional parameters
|
|
250
284
|
# @return [WebhookResponseDto]
|
|
251
|
-
def webhook_controller_update(
|
|
252
|
-
data, _status_code, _headers = webhook_controller_update_with_http_info(
|
|
285
|
+
def webhook_controller_update(id, update_webhook_dto, opts = {})
|
|
286
|
+
data, _status_code, _headers = webhook_controller_update_with_http_info(id, update_webhook_dto, opts)
|
|
253
287
|
data
|
|
254
288
|
end
|
|
255
289
|
|
|
256
290
|
# Update a webhook
|
|
257
291
|
# Updates an existing webhook configuration. Requires webhook:update scope.
|
|
258
|
-
# @param
|
|
259
|
-
# @param
|
|
292
|
+
# @param id [String] Webhook unique identifier (UUID)
|
|
293
|
+
# @param update_webhook_dto [UpdateWebhookDto] Webhook update details
|
|
260
294
|
# @param [Hash] opts the optional parameters
|
|
261
295
|
# @return [Array<(WebhookResponseDto, Integer, Hash)>] WebhookResponseDto data, response status code and response headers
|
|
262
|
-
def webhook_controller_update_with_http_info(
|
|
296
|
+
def webhook_controller_update_with_http_info(id, update_webhook_dto, opts = {})
|
|
263
297
|
if @api_client.config.debugging
|
|
264
298
|
@api_client.config.logger.debug 'Calling API: WebhooksApi.webhook_controller_update ...'
|
|
265
299
|
end
|
|
266
|
-
# verify the required parameter 'body' is set
|
|
267
|
-
if @api_client.config.client_side_validation && body.nil?
|
|
268
|
-
fail ArgumentError, "Missing the required parameter 'body' when calling WebhooksApi.webhook_controller_update"
|
|
269
|
-
end
|
|
270
300
|
# verify the required parameter 'id' is set
|
|
271
301
|
if @api_client.config.client_side_validation && id.nil?
|
|
272
302
|
fail ArgumentError, "Missing the required parameter 'id' when calling WebhooksApi.webhook_controller_update"
|
|
273
303
|
end
|
|
304
|
+
# verify the required parameter 'update_webhook_dto' is set
|
|
305
|
+
if @api_client.config.client_side_validation && update_webhook_dto.nil?
|
|
306
|
+
fail ArgumentError, "Missing the required parameter 'update_webhook_dto' when calling WebhooksApi.webhook_controller_update"
|
|
307
|
+
end
|
|
274
308
|
# resource path
|
|
275
|
-
local_var_path = '/api/v0/webhooks/{id}'.sub('{' + 'id' + '}', id.to_s)
|
|
309
|
+
local_var_path = '/api/v0/webhooks/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
|
276
310
|
|
|
277
311
|
# query parameters
|
|
278
312
|
query_params = opts[:query_params] || {}
|
|
@@ -280,27 +314,36 @@ module DevDraftAI
|
|
|
280
314
|
# header parameters
|
|
281
315
|
header_params = opts[:header_params] || {}
|
|
282
316
|
# HTTP header 'Accept' (if needed)
|
|
283
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
317
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
284
318
|
# HTTP header 'Content-Type'
|
|
285
|
-
|
|
319
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
320
|
+
if !content_type.nil?
|
|
321
|
+
header_params['Content-Type'] = content_type
|
|
322
|
+
end
|
|
286
323
|
|
|
287
324
|
# form parameters
|
|
288
325
|
form_params = opts[:form_params] || {}
|
|
289
326
|
|
|
290
327
|
# http body (model)
|
|
291
|
-
post_body = opts[:
|
|
328
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(update_webhook_dto)
|
|
329
|
+
|
|
330
|
+
# return_type
|
|
331
|
+
return_type = opts[:debug_return_type] || 'WebhookResponseDto'
|
|
292
332
|
|
|
293
|
-
|
|
333
|
+
# auth_names
|
|
334
|
+
auth_names = opts[:debug_auth_names] || ['x-client-secret', 'x-client-key']
|
|
294
335
|
|
|
295
|
-
|
|
296
|
-
|
|
336
|
+
new_options = opts.merge(
|
|
337
|
+
:operation => :"WebhooksApi.webhook_controller_update",
|
|
297
338
|
:header_params => header_params,
|
|
298
339
|
:query_params => query_params,
|
|
299
340
|
:form_params => form_params,
|
|
300
341
|
:body => post_body,
|
|
301
342
|
:auth_names => auth_names,
|
|
302
|
-
:return_type => return_type
|
|
343
|
+
:return_type => return_type
|
|
344
|
+
)
|
|
303
345
|
|
|
346
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
|
|
304
347
|
if @api_client.config.debugging
|
|
305
348
|
@api_client.config.logger.debug "API called: WebhooksApi#webhook_controller_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
306
349
|
end
|