aurepay 0.1.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/LICENSE +21 -0
- data/README.md +27 -0
- data/lib/aurepay/client.rb +195 -0
- data/lib/aurepay/generated/api/chargebacks_api.rb +138 -0
- data/lib/aurepay/generated/api/company_api.rb +132 -0
- data/lib/aurepay/generated/api/conversions_api.rb +262 -0
- data/lib/aurepay/generated/api/deposits_api.rb +265 -0
- data/lib/aurepay/generated/api/wallets_api.rb +200 -0
- data/lib/aurepay/generated/api/webhooks_api.rb +333 -0
- data/lib/aurepay/generated/api/withdrawals_api.rb +204 -0
- data/lib/aurepay/generated/api_client.rb +441 -0
- data/lib/aurepay/generated/api_error.rb +58 -0
- data/lib/aurepay/generated/api_model_base.rb +88 -0
- data/lib/aurepay/generated/configuration.rb +403 -0
- data/lib/aurepay/generated/models/conversion_create.rb +174 -0
- data/lib/aurepay/generated/models/customer_input.rb +165 -0
- data/lib/aurepay/generated/models/customer_input_document.rb +190 -0
- data/lib/aurepay/generated/models/deposit_create.rb +285 -0
- data/lib/aurepay/generated/models/error_body.rb +214 -0
- data/lib/aurepay/generated/models/error_body_error.rb +199 -0
- data/lib/aurepay/generated/models/success_envelope.rb +198 -0
- data/lib/aurepay/generated/models/wallet_create.rb +158 -0
- data/lib/aurepay/generated/models/webhook_create.rb +184 -0
- data/lib/aurepay/generated/models/withdrawal_create.rb +202 -0
- data/lib/aurepay/version.rb +5 -0
- data/lib/aurepay.rb +8 -0
- metadata +72 -0
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#AurePay REST API
|
|
3
|
+
|
|
4
|
+
#API REST AurePay (camelCase inglês): depósitos PIX, saques, conversões BRL/USDT, webhooks, empresa, carteiras e MED/chargebacks. Auth: headers `X-Api-Key` e `X-Api-Secret`. Envelope: `{ \"success\": true, \"data\": ... }` / `{ \"success\": false, \"error\": { \"code\", \"message\", \"details\" } }`. Fonte para agentes: https://api.aurepay.com.br/llms-full.txt
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 0.1.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.23.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'cgi'
|
|
14
|
+
|
|
15
|
+
module AurePay
|
|
16
|
+
class WalletsApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
# Cria carteira
|
|
23
|
+
# @param [Hash] opts the optional parameters
|
|
24
|
+
# @option opts [WalletCreate] :wallet_create
|
|
25
|
+
# @return [SuccessEnvelope]
|
|
26
|
+
def wallets_create(opts = {})
|
|
27
|
+
data, _status_code, _headers = wallets_create_with_http_info(opts)
|
|
28
|
+
data
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
# Cria carteira
|
|
32
|
+
# @param [Hash] opts the optional parameters
|
|
33
|
+
# @option opts [WalletCreate] :wallet_create
|
|
34
|
+
# @return [Array<(SuccessEnvelope, Integer, Hash)>] SuccessEnvelope data, response status code and response headers
|
|
35
|
+
def wallets_create_with_http_info(opts = {})
|
|
36
|
+
if @api_client.config.debugging
|
|
37
|
+
@api_client.config.logger.debug 'Calling API: WalletsApi.wallets_create ...'
|
|
38
|
+
end
|
|
39
|
+
# resource path
|
|
40
|
+
local_var_path = '/wallets'
|
|
41
|
+
|
|
42
|
+
# query parameters
|
|
43
|
+
query_params = opts[:query_params] || {}
|
|
44
|
+
|
|
45
|
+
# header parameters
|
|
46
|
+
header_params = opts[:header_params] || {}
|
|
47
|
+
# HTTP header 'Accept' (if needed)
|
|
48
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
49
|
+
# HTTP header 'Content-Type'
|
|
50
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
51
|
+
if !content_type.nil?
|
|
52
|
+
header_params['Content-Type'] = content_type
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
# form parameters
|
|
56
|
+
form_params = opts[:form_params] || {}
|
|
57
|
+
|
|
58
|
+
# http body (model)
|
|
59
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'wallet_create'])
|
|
60
|
+
|
|
61
|
+
# return_type
|
|
62
|
+
return_type = opts[:debug_return_type] || 'SuccessEnvelope'
|
|
63
|
+
|
|
64
|
+
# auth_names
|
|
65
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth', 'ApiSecretAuth']
|
|
66
|
+
|
|
67
|
+
new_options = opts.merge(
|
|
68
|
+
:operation => :"WalletsApi.wallets_create",
|
|
69
|
+
:header_params => header_params,
|
|
70
|
+
:query_params => query_params,
|
|
71
|
+
:form_params => form_params,
|
|
72
|
+
:body => post_body,
|
|
73
|
+
:auth_names => auth_names,
|
|
74
|
+
:return_type => return_type
|
|
75
|
+
)
|
|
76
|
+
|
|
77
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
78
|
+
if @api_client.config.debugging
|
|
79
|
+
@api_client.config.logger.debug "API called: WalletsApi#wallets_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
80
|
+
end
|
|
81
|
+
return data, status_code, headers
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
# Consulta carteira
|
|
85
|
+
# @param id [String] Identificador ULID do recurso
|
|
86
|
+
# @param [Hash] opts the optional parameters
|
|
87
|
+
# @return [SuccessEnvelope]
|
|
88
|
+
def wallets_get(id, opts = {})
|
|
89
|
+
data, _status_code, _headers = wallets_get_with_http_info(id, opts)
|
|
90
|
+
data
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
# Consulta carteira
|
|
94
|
+
# @param id [String] Identificador ULID do recurso
|
|
95
|
+
# @param [Hash] opts the optional parameters
|
|
96
|
+
# @return [Array<(SuccessEnvelope, Integer, Hash)>] SuccessEnvelope data, response status code and response headers
|
|
97
|
+
def wallets_get_with_http_info(id, opts = {})
|
|
98
|
+
if @api_client.config.debugging
|
|
99
|
+
@api_client.config.logger.debug 'Calling API: WalletsApi.wallets_get ...'
|
|
100
|
+
end
|
|
101
|
+
# verify the required parameter 'id' is set
|
|
102
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
103
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling WalletsApi.wallets_get"
|
|
104
|
+
end
|
|
105
|
+
# resource path
|
|
106
|
+
local_var_path = '/wallets/{id}'.sub('{id}', CGI.escape(id.to_s))
|
|
107
|
+
|
|
108
|
+
# query parameters
|
|
109
|
+
query_params = opts[:query_params] || {}
|
|
110
|
+
|
|
111
|
+
# header parameters
|
|
112
|
+
header_params = opts[:header_params] || {}
|
|
113
|
+
# HTTP header 'Accept' (if needed)
|
|
114
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
115
|
+
|
|
116
|
+
# form parameters
|
|
117
|
+
form_params = opts[:form_params] || {}
|
|
118
|
+
|
|
119
|
+
# http body (model)
|
|
120
|
+
post_body = opts[:debug_body]
|
|
121
|
+
|
|
122
|
+
# return_type
|
|
123
|
+
return_type = opts[:debug_return_type] || 'SuccessEnvelope'
|
|
124
|
+
|
|
125
|
+
# auth_names
|
|
126
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth', 'ApiSecretAuth']
|
|
127
|
+
|
|
128
|
+
new_options = opts.merge(
|
|
129
|
+
:operation => :"WalletsApi.wallets_get",
|
|
130
|
+
:header_params => header_params,
|
|
131
|
+
:query_params => query_params,
|
|
132
|
+
:form_params => form_params,
|
|
133
|
+
:body => post_body,
|
|
134
|
+
:auth_names => auth_names,
|
|
135
|
+
:return_type => return_type
|
|
136
|
+
)
|
|
137
|
+
|
|
138
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
139
|
+
if @api_client.config.debugging
|
|
140
|
+
@api_client.config.logger.debug "API called: WalletsApi#wallets_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
141
|
+
end
|
|
142
|
+
return data, status_code, headers
|
|
143
|
+
end
|
|
144
|
+
|
|
145
|
+
# Lista carteiras
|
|
146
|
+
# @param [Hash] opts the optional parameters
|
|
147
|
+
# @return [SuccessEnvelope]
|
|
148
|
+
def wallets_list(opts = {})
|
|
149
|
+
data, _status_code, _headers = wallets_list_with_http_info(opts)
|
|
150
|
+
data
|
|
151
|
+
end
|
|
152
|
+
|
|
153
|
+
# Lista carteiras
|
|
154
|
+
# @param [Hash] opts the optional parameters
|
|
155
|
+
# @return [Array<(SuccessEnvelope, Integer, Hash)>] SuccessEnvelope data, response status code and response headers
|
|
156
|
+
def wallets_list_with_http_info(opts = {})
|
|
157
|
+
if @api_client.config.debugging
|
|
158
|
+
@api_client.config.logger.debug 'Calling API: WalletsApi.wallets_list ...'
|
|
159
|
+
end
|
|
160
|
+
# resource path
|
|
161
|
+
local_var_path = '/wallets'
|
|
162
|
+
|
|
163
|
+
# query parameters
|
|
164
|
+
query_params = opts[:query_params] || {}
|
|
165
|
+
|
|
166
|
+
# header parameters
|
|
167
|
+
header_params = opts[:header_params] || {}
|
|
168
|
+
# HTTP header 'Accept' (if needed)
|
|
169
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
170
|
+
|
|
171
|
+
# form parameters
|
|
172
|
+
form_params = opts[:form_params] || {}
|
|
173
|
+
|
|
174
|
+
# http body (model)
|
|
175
|
+
post_body = opts[:debug_body]
|
|
176
|
+
|
|
177
|
+
# return_type
|
|
178
|
+
return_type = opts[:debug_return_type] || 'SuccessEnvelope'
|
|
179
|
+
|
|
180
|
+
# auth_names
|
|
181
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth', 'ApiSecretAuth']
|
|
182
|
+
|
|
183
|
+
new_options = opts.merge(
|
|
184
|
+
:operation => :"WalletsApi.wallets_list",
|
|
185
|
+
:header_params => header_params,
|
|
186
|
+
:query_params => query_params,
|
|
187
|
+
:form_params => form_params,
|
|
188
|
+
:body => post_body,
|
|
189
|
+
:auth_names => auth_names,
|
|
190
|
+
:return_type => return_type
|
|
191
|
+
)
|
|
192
|
+
|
|
193
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
194
|
+
if @api_client.config.debugging
|
|
195
|
+
@api_client.config.logger.debug "API called: WalletsApi#wallets_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
196
|
+
end
|
|
197
|
+
return data, status_code, headers
|
|
198
|
+
end
|
|
199
|
+
end
|
|
200
|
+
end
|
|
@@ -0,0 +1,333 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#AurePay REST API
|
|
3
|
+
|
|
4
|
+
#API REST AurePay (camelCase inglês): depósitos PIX, saques, conversões BRL/USDT, webhooks, empresa, carteiras e MED/chargebacks. Auth: headers `X-Api-Key` e `X-Api-Secret`. Envelope: `{ \"success\": true, \"data\": ... }` / `{ \"success\": false, \"error\": { \"code\", \"message\", \"details\" } }`. Fonte para agentes: https://api.aurepay.com.br/llms-full.txt
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 0.1.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.23.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'cgi'
|
|
14
|
+
|
|
15
|
+
module AurePay
|
|
16
|
+
class WebhooksApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
# Cria webhook
|
|
23
|
+
# @param webhook_create [WebhookCreate]
|
|
24
|
+
# @param [Hash] opts the optional parameters
|
|
25
|
+
# @return [SuccessEnvelope]
|
|
26
|
+
def webhooks_create(webhook_create, opts = {})
|
|
27
|
+
data, _status_code, _headers = webhooks_create_with_http_info(webhook_create, opts)
|
|
28
|
+
data
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
# Cria webhook
|
|
32
|
+
# @param webhook_create [WebhookCreate]
|
|
33
|
+
# @param [Hash] opts the optional parameters
|
|
34
|
+
# @return [Array<(SuccessEnvelope, Integer, Hash)>] SuccessEnvelope data, response status code and response headers
|
|
35
|
+
def webhooks_create_with_http_info(webhook_create, opts = {})
|
|
36
|
+
if @api_client.config.debugging
|
|
37
|
+
@api_client.config.logger.debug 'Calling API: WebhooksApi.webhooks_create ...'
|
|
38
|
+
end
|
|
39
|
+
# verify the required parameter 'webhook_create' is set
|
|
40
|
+
if @api_client.config.client_side_validation && webhook_create.nil?
|
|
41
|
+
fail ArgumentError, "Missing the required parameter 'webhook_create' when calling WebhooksApi.webhooks_create"
|
|
42
|
+
end
|
|
43
|
+
# resource path
|
|
44
|
+
local_var_path = '/webhooks'
|
|
45
|
+
|
|
46
|
+
# query parameters
|
|
47
|
+
query_params = opts[:query_params] || {}
|
|
48
|
+
|
|
49
|
+
# header parameters
|
|
50
|
+
header_params = opts[:header_params] || {}
|
|
51
|
+
# HTTP header 'Accept' (if needed)
|
|
52
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
53
|
+
# HTTP header 'Content-Type'
|
|
54
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
55
|
+
if !content_type.nil?
|
|
56
|
+
header_params['Content-Type'] = content_type
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
# form parameters
|
|
60
|
+
form_params = opts[:form_params] || {}
|
|
61
|
+
|
|
62
|
+
# http body (model)
|
|
63
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(webhook_create)
|
|
64
|
+
|
|
65
|
+
# return_type
|
|
66
|
+
return_type = opts[:debug_return_type] || 'SuccessEnvelope'
|
|
67
|
+
|
|
68
|
+
# auth_names
|
|
69
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth', 'ApiSecretAuth']
|
|
70
|
+
|
|
71
|
+
new_options = opts.merge(
|
|
72
|
+
:operation => :"WebhooksApi.webhooks_create",
|
|
73
|
+
:header_params => header_params,
|
|
74
|
+
:query_params => query_params,
|
|
75
|
+
:form_params => form_params,
|
|
76
|
+
:body => post_body,
|
|
77
|
+
:auth_names => auth_names,
|
|
78
|
+
:return_type => return_type
|
|
79
|
+
)
|
|
80
|
+
|
|
81
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
82
|
+
if @api_client.config.debugging
|
|
83
|
+
@api_client.config.logger.debug "API called: WebhooksApi#webhooks_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
84
|
+
end
|
|
85
|
+
return data, status_code, headers
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
# Remove webhook
|
|
89
|
+
# @param id [String] Identificador ULID do recurso
|
|
90
|
+
# @param [Hash] opts the optional parameters
|
|
91
|
+
# @return [SuccessEnvelope]
|
|
92
|
+
def webhooks_delete(id, opts = {})
|
|
93
|
+
data, _status_code, _headers = webhooks_delete_with_http_info(id, opts)
|
|
94
|
+
data
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
# Remove webhook
|
|
98
|
+
# @param id [String] Identificador ULID do recurso
|
|
99
|
+
# @param [Hash] opts the optional parameters
|
|
100
|
+
# @return [Array<(SuccessEnvelope, Integer, Hash)>] SuccessEnvelope data, response status code and response headers
|
|
101
|
+
def webhooks_delete_with_http_info(id, opts = {})
|
|
102
|
+
if @api_client.config.debugging
|
|
103
|
+
@api_client.config.logger.debug 'Calling API: WebhooksApi.webhooks_delete ...'
|
|
104
|
+
end
|
|
105
|
+
# verify the required parameter 'id' is set
|
|
106
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
107
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling WebhooksApi.webhooks_delete"
|
|
108
|
+
end
|
|
109
|
+
# resource path
|
|
110
|
+
local_var_path = '/webhooks/{id}'.sub('{id}', CGI.escape(id.to_s))
|
|
111
|
+
|
|
112
|
+
# query parameters
|
|
113
|
+
query_params = opts[:query_params] || {}
|
|
114
|
+
|
|
115
|
+
# header parameters
|
|
116
|
+
header_params = opts[:header_params] || {}
|
|
117
|
+
# HTTP header 'Accept' (if needed)
|
|
118
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
119
|
+
|
|
120
|
+
# form parameters
|
|
121
|
+
form_params = opts[:form_params] || {}
|
|
122
|
+
|
|
123
|
+
# http body (model)
|
|
124
|
+
post_body = opts[:debug_body]
|
|
125
|
+
|
|
126
|
+
# return_type
|
|
127
|
+
return_type = opts[:debug_return_type] || 'SuccessEnvelope'
|
|
128
|
+
|
|
129
|
+
# auth_names
|
|
130
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth', 'ApiSecretAuth']
|
|
131
|
+
|
|
132
|
+
new_options = opts.merge(
|
|
133
|
+
:operation => :"WebhooksApi.webhooks_delete",
|
|
134
|
+
:header_params => header_params,
|
|
135
|
+
:query_params => query_params,
|
|
136
|
+
:form_params => form_params,
|
|
137
|
+
:body => post_body,
|
|
138
|
+
:auth_names => auth_names,
|
|
139
|
+
:return_type => return_type
|
|
140
|
+
)
|
|
141
|
+
|
|
142
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
143
|
+
if @api_client.config.debugging
|
|
144
|
+
@api_client.config.logger.debug "API called: WebhooksApi#webhooks_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
145
|
+
end
|
|
146
|
+
return data, status_code, headers
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
# Consulta webhook
|
|
150
|
+
# @param id [String] Identificador ULID do recurso
|
|
151
|
+
# @param [Hash] opts the optional parameters
|
|
152
|
+
# @return [SuccessEnvelope]
|
|
153
|
+
def webhooks_get(id, opts = {})
|
|
154
|
+
data, _status_code, _headers = webhooks_get_with_http_info(id, opts)
|
|
155
|
+
data
|
|
156
|
+
end
|
|
157
|
+
|
|
158
|
+
# Consulta webhook
|
|
159
|
+
# @param id [String] Identificador ULID do recurso
|
|
160
|
+
# @param [Hash] opts the optional parameters
|
|
161
|
+
# @return [Array<(SuccessEnvelope, Integer, Hash)>] SuccessEnvelope data, response status code and response headers
|
|
162
|
+
def webhooks_get_with_http_info(id, opts = {})
|
|
163
|
+
if @api_client.config.debugging
|
|
164
|
+
@api_client.config.logger.debug 'Calling API: WebhooksApi.webhooks_get ...'
|
|
165
|
+
end
|
|
166
|
+
# verify the required parameter 'id' is set
|
|
167
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
168
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling WebhooksApi.webhooks_get"
|
|
169
|
+
end
|
|
170
|
+
# resource path
|
|
171
|
+
local_var_path = '/webhooks/{id}'.sub('{id}', CGI.escape(id.to_s))
|
|
172
|
+
|
|
173
|
+
# query parameters
|
|
174
|
+
query_params = opts[:query_params] || {}
|
|
175
|
+
|
|
176
|
+
# header parameters
|
|
177
|
+
header_params = opts[:header_params] || {}
|
|
178
|
+
# HTTP header 'Accept' (if needed)
|
|
179
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
180
|
+
|
|
181
|
+
# form parameters
|
|
182
|
+
form_params = opts[:form_params] || {}
|
|
183
|
+
|
|
184
|
+
# http body (model)
|
|
185
|
+
post_body = opts[:debug_body]
|
|
186
|
+
|
|
187
|
+
# return_type
|
|
188
|
+
return_type = opts[:debug_return_type] || 'SuccessEnvelope'
|
|
189
|
+
|
|
190
|
+
# auth_names
|
|
191
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth', 'ApiSecretAuth']
|
|
192
|
+
|
|
193
|
+
new_options = opts.merge(
|
|
194
|
+
:operation => :"WebhooksApi.webhooks_get",
|
|
195
|
+
:header_params => header_params,
|
|
196
|
+
:query_params => query_params,
|
|
197
|
+
:form_params => form_params,
|
|
198
|
+
:body => post_body,
|
|
199
|
+
:auth_names => auth_names,
|
|
200
|
+
:return_type => return_type
|
|
201
|
+
)
|
|
202
|
+
|
|
203
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
204
|
+
if @api_client.config.debugging
|
|
205
|
+
@api_client.config.logger.debug "API called: WebhooksApi#webhooks_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
206
|
+
end
|
|
207
|
+
return data, status_code, headers
|
|
208
|
+
end
|
|
209
|
+
|
|
210
|
+
# Lista webhooks
|
|
211
|
+
# @param [Hash] opts the optional parameters
|
|
212
|
+
# @return [SuccessEnvelope]
|
|
213
|
+
def webhooks_list(opts = {})
|
|
214
|
+
data, _status_code, _headers = webhooks_list_with_http_info(opts)
|
|
215
|
+
data
|
|
216
|
+
end
|
|
217
|
+
|
|
218
|
+
# Lista webhooks
|
|
219
|
+
# @param [Hash] opts the optional parameters
|
|
220
|
+
# @return [Array<(SuccessEnvelope, Integer, Hash)>] SuccessEnvelope data, response status code and response headers
|
|
221
|
+
def webhooks_list_with_http_info(opts = {})
|
|
222
|
+
if @api_client.config.debugging
|
|
223
|
+
@api_client.config.logger.debug 'Calling API: WebhooksApi.webhooks_list ...'
|
|
224
|
+
end
|
|
225
|
+
# resource path
|
|
226
|
+
local_var_path = '/webhooks'
|
|
227
|
+
|
|
228
|
+
# query parameters
|
|
229
|
+
query_params = opts[:query_params] || {}
|
|
230
|
+
|
|
231
|
+
# header parameters
|
|
232
|
+
header_params = opts[:header_params] || {}
|
|
233
|
+
# HTTP header 'Accept' (if needed)
|
|
234
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
235
|
+
|
|
236
|
+
# form parameters
|
|
237
|
+
form_params = opts[:form_params] || {}
|
|
238
|
+
|
|
239
|
+
# http body (model)
|
|
240
|
+
post_body = opts[:debug_body]
|
|
241
|
+
|
|
242
|
+
# return_type
|
|
243
|
+
return_type = opts[:debug_return_type] || 'SuccessEnvelope'
|
|
244
|
+
|
|
245
|
+
# auth_names
|
|
246
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth', 'ApiSecretAuth']
|
|
247
|
+
|
|
248
|
+
new_options = opts.merge(
|
|
249
|
+
:operation => :"WebhooksApi.webhooks_list",
|
|
250
|
+
:header_params => header_params,
|
|
251
|
+
:query_params => query_params,
|
|
252
|
+
:form_params => form_params,
|
|
253
|
+
:body => post_body,
|
|
254
|
+
:auth_names => auth_names,
|
|
255
|
+
:return_type => return_type
|
|
256
|
+
)
|
|
257
|
+
|
|
258
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
259
|
+
if @api_client.config.debugging
|
|
260
|
+
@api_client.config.logger.debug "API called: WebhooksApi#webhooks_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
261
|
+
end
|
|
262
|
+
return data, status_code, headers
|
|
263
|
+
end
|
|
264
|
+
|
|
265
|
+
# Atualiza webhook
|
|
266
|
+
# @param id [String] Identificador ULID do recurso
|
|
267
|
+
# @param [Hash] opts the optional parameters
|
|
268
|
+
# @option opts [WebhookCreate] :webhook_create
|
|
269
|
+
# @return [SuccessEnvelope]
|
|
270
|
+
def webhooks_update(id, opts = {})
|
|
271
|
+
data, _status_code, _headers = webhooks_update_with_http_info(id, opts)
|
|
272
|
+
data
|
|
273
|
+
end
|
|
274
|
+
|
|
275
|
+
# Atualiza webhook
|
|
276
|
+
# @param id [String] Identificador ULID do recurso
|
|
277
|
+
# @param [Hash] opts the optional parameters
|
|
278
|
+
# @option opts [WebhookCreate] :webhook_create
|
|
279
|
+
# @return [Array<(SuccessEnvelope, Integer, Hash)>] SuccessEnvelope data, response status code and response headers
|
|
280
|
+
def webhooks_update_with_http_info(id, opts = {})
|
|
281
|
+
if @api_client.config.debugging
|
|
282
|
+
@api_client.config.logger.debug 'Calling API: WebhooksApi.webhooks_update ...'
|
|
283
|
+
end
|
|
284
|
+
# verify the required parameter 'id' is set
|
|
285
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
286
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling WebhooksApi.webhooks_update"
|
|
287
|
+
end
|
|
288
|
+
# resource path
|
|
289
|
+
local_var_path = '/webhooks/{id}'.sub('{id}', CGI.escape(id.to_s))
|
|
290
|
+
|
|
291
|
+
# query parameters
|
|
292
|
+
query_params = opts[:query_params] || {}
|
|
293
|
+
|
|
294
|
+
# header parameters
|
|
295
|
+
header_params = opts[:header_params] || {}
|
|
296
|
+
# HTTP header 'Accept' (if needed)
|
|
297
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
298
|
+
# HTTP header 'Content-Type'
|
|
299
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
300
|
+
if !content_type.nil?
|
|
301
|
+
header_params['Content-Type'] = content_type
|
|
302
|
+
end
|
|
303
|
+
|
|
304
|
+
# form parameters
|
|
305
|
+
form_params = opts[:form_params] || {}
|
|
306
|
+
|
|
307
|
+
# http body (model)
|
|
308
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'webhook_create'])
|
|
309
|
+
|
|
310
|
+
# return_type
|
|
311
|
+
return_type = opts[:debug_return_type] || 'SuccessEnvelope'
|
|
312
|
+
|
|
313
|
+
# auth_names
|
|
314
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth', 'ApiSecretAuth']
|
|
315
|
+
|
|
316
|
+
new_options = opts.merge(
|
|
317
|
+
:operation => :"WebhooksApi.webhooks_update",
|
|
318
|
+
:header_params => header_params,
|
|
319
|
+
:query_params => query_params,
|
|
320
|
+
:form_params => form_params,
|
|
321
|
+
:body => post_body,
|
|
322
|
+
:auth_names => auth_names,
|
|
323
|
+
:return_type => return_type
|
|
324
|
+
)
|
|
325
|
+
|
|
326
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
|
327
|
+
if @api_client.config.debugging
|
|
328
|
+
@api_client.config.logger.debug "API called: WebhooksApi#webhooks_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
329
|
+
end
|
|
330
|
+
return data, status_code, headers
|
|
331
|
+
end
|
|
332
|
+
end
|
|
333
|
+
end
|