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