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.
@@ -0,0 +1,262 @@
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 ConversionsApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Cria conversão
23
+ # @param [Hash] opts the optional parameters
24
+ # @option opts [ConversionCreate] :conversion_create
25
+ # @return [SuccessEnvelope]
26
+ def conversions_create(opts = {})
27
+ data, _status_code, _headers = conversions_create_with_http_info(opts)
28
+ data
29
+ end
30
+
31
+ # Cria conversão
32
+ # @param [Hash] opts the optional parameters
33
+ # @option opts [ConversionCreate] :conversion_create
34
+ # @return [Array<(SuccessEnvelope, Integer, Hash)>] SuccessEnvelope data, response status code and response headers
35
+ def conversions_create_with_http_info(opts = {})
36
+ if @api_client.config.debugging
37
+ @api_client.config.logger.debug 'Calling API: ConversionsApi.conversions_create ...'
38
+ end
39
+ # resource path
40
+ local_var_path = '/conversions'
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[:'conversion_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 => :"ConversionsApi.conversions_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: ConversionsApi#conversions_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
80
+ end
81
+ return data, status_code, headers
82
+ end
83
+
84
+ # Consulta conversão
85
+ # @param id [String] Identificador ULID do recurso
86
+ # @param [Hash] opts the optional parameters
87
+ # @return [SuccessEnvelope]
88
+ def conversions_get(id, opts = {})
89
+ data, _status_code, _headers = conversions_get_with_http_info(id, opts)
90
+ data
91
+ end
92
+
93
+ # Consulta conversão
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 conversions_get_with_http_info(id, opts = {})
98
+ if @api_client.config.debugging
99
+ @api_client.config.logger.debug 'Calling API: ConversionsApi.conversions_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 ConversionsApi.conversions_get"
104
+ end
105
+ # resource path
106
+ local_var_path = '/conversions/{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 => :"ConversionsApi.conversions_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: ConversionsApi#conversions_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
141
+ end
142
+ return data, status_code, headers
143
+ end
144
+
145
+ # Lista conversões
146
+ # @param [Hash] opts the optional parameters
147
+ # @return [SuccessEnvelope]
148
+ def conversions_list(opts = {})
149
+ data, _status_code, _headers = conversions_list_with_http_info(opts)
150
+ data
151
+ end
152
+
153
+ # Lista conversões
154
+ # @param [Hash] opts the optional parameters
155
+ # @return [Array<(SuccessEnvelope, Integer, Hash)>] SuccessEnvelope data, response status code and response headers
156
+ def conversions_list_with_http_info(opts = {})
157
+ if @api_client.config.debugging
158
+ @api_client.config.logger.debug 'Calling API: ConversionsApi.conversions_list ...'
159
+ end
160
+ # resource path
161
+ local_var_path = '/conversions'
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 => :"ConversionsApi.conversions_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: ConversionsApi#conversions_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
196
+ end
197
+ return data, status_code, headers
198
+ end
199
+
200
+ # Cotação de conversão
201
+ # @param [Hash] opts the optional parameters
202
+ # @option opts [ConversionCreate] :conversion_create
203
+ # @return [SuccessEnvelope]
204
+ def conversions_quote(opts = {})
205
+ data, _status_code, _headers = conversions_quote_with_http_info(opts)
206
+ data
207
+ end
208
+
209
+ # Cotação de conversão
210
+ # @param [Hash] opts the optional parameters
211
+ # @option opts [ConversionCreate] :conversion_create
212
+ # @return [Array<(SuccessEnvelope, Integer, Hash)>] SuccessEnvelope data, response status code and response headers
213
+ def conversions_quote_with_http_info(opts = {})
214
+ if @api_client.config.debugging
215
+ @api_client.config.logger.debug 'Calling API: ConversionsApi.conversions_quote ...'
216
+ end
217
+ # resource path
218
+ local_var_path = '/conversions/quote'
219
+
220
+ # query parameters
221
+ query_params = opts[:query_params] || {}
222
+
223
+ # header parameters
224
+ header_params = opts[:header_params] || {}
225
+ # HTTP header 'Accept' (if needed)
226
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
227
+ # HTTP header 'Content-Type'
228
+ content_type = @api_client.select_header_content_type(['application/json'])
229
+ if !content_type.nil?
230
+ header_params['Content-Type'] = content_type
231
+ end
232
+
233
+ # form parameters
234
+ form_params = opts[:form_params] || {}
235
+
236
+ # http body (model)
237
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'conversion_create'])
238
+
239
+ # return_type
240
+ return_type = opts[:debug_return_type] || 'SuccessEnvelope'
241
+
242
+ # auth_names
243
+ auth_names = opts[:debug_auth_names] || ['ApiKeyAuth', 'ApiSecretAuth']
244
+
245
+ new_options = opts.merge(
246
+ :operation => :"ConversionsApi.conversions_quote",
247
+ :header_params => header_params,
248
+ :query_params => query_params,
249
+ :form_params => form_params,
250
+ :body => post_body,
251
+ :auth_names => auth_names,
252
+ :return_type => return_type
253
+ )
254
+
255
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
256
+ if @api_client.config.debugging
257
+ @api_client.config.logger.debug "API called: ConversionsApi#conversions_quote\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
258
+ end
259
+ return data, status_code, headers
260
+ end
261
+ end
262
+ end
@@ -0,0 +1,265 @@
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 DepositsApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Cria depósito (Pix In)
23
+ # @param deposit_create [DepositCreate]
24
+ # @param [Hash] opts the optional parameters
25
+ # @return [SuccessEnvelope]
26
+ def deposits_create(deposit_create, opts = {})
27
+ data, _status_code, _headers = deposits_create_with_http_info(deposit_create, opts)
28
+ data
29
+ end
30
+
31
+ # Cria depósito (Pix In)
32
+ # @param deposit_create [DepositCreate]
33
+ # @param [Hash] opts the optional parameters
34
+ # @return [Array<(SuccessEnvelope, Integer, Hash)>] SuccessEnvelope data, response status code and response headers
35
+ def deposits_create_with_http_info(deposit_create, opts = {})
36
+ if @api_client.config.debugging
37
+ @api_client.config.logger.debug 'Calling API: DepositsApi.deposits_create ...'
38
+ end
39
+ # verify the required parameter 'deposit_create' is set
40
+ if @api_client.config.client_side_validation && deposit_create.nil?
41
+ fail ArgumentError, "Missing the required parameter 'deposit_create' when calling DepositsApi.deposits_create"
42
+ end
43
+ # resource path
44
+ local_var_path = '/deposits'
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(deposit_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 => :"DepositsApi.deposits_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: DepositsApi#deposits_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
84
+ end
85
+ return data, status_code, headers
86
+ end
87
+
88
+ # Consulta depósito
89
+ # @param id [String] Identificador ULID do recurso
90
+ # @param [Hash] opts the optional parameters
91
+ # @return [SuccessEnvelope]
92
+ def deposits_get(id, opts = {})
93
+ data, _status_code, _headers = deposits_get_with_http_info(id, opts)
94
+ data
95
+ end
96
+
97
+ # Consulta depósito
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 deposits_get_with_http_info(id, opts = {})
102
+ if @api_client.config.debugging
103
+ @api_client.config.logger.debug 'Calling API: DepositsApi.deposits_get ...'
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 DepositsApi.deposits_get"
108
+ end
109
+ # resource path
110
+ local_var_path = '/deposits/{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 => :"DepositsApi.deposits_get",
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(:GET, local_var_path, new_options)
143
+ if @api_client.config.debugging
144
+ @api_client.config.logger.debug "API called: DepositsApi#deposits_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
145
+ end
146
+ return data, status_code, headers
147
+ end
148
+
149
+ # Lista depósitos
150
+ # @param [Hash] opts the optional parameters
151
+ # @return [SuccessEnvelope]
152
+ def deposits_list(opts = {})
153
+ data, _status_code, _headers = deposits_list_with_http_info(opts)
154
+ data
155
+ end
156
+
157
+ # Lista depósitos
158
+ # @param [Hash] opts the optional parameters
159
+ # @return [Array<(SuccessEnvelope, Integer, Hash)>] SuccessEnvelope data, response status code and response headers
160
+ def deposits_list_with_http_info(opts = {})
161
+ if @api_client.config.debugging
162
+ @api_client.config.logger.debug 'Calling API: DepositsApi.deposits_list ...'
163
+ end
164
+ # resource path
165
+ local_var_path = '/deposits'
166
+
167
+ # query parameters
168
+ query_params = opts[:query_params] || {}
169
+
170
+ # header parameters
171
+ header_params = opts[:header_params] || {}
172
+ # HTTP header 'Accept' (if needed)
173
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
174
+
175
+ # form parameters
176
+ form_params = opts[:form_params] || {}
177
+
178
+ # http body (model)
179
+ post_body = opts[:debug_body]
180
+
181
+ # return_type
182
+ return_type = opts[:debug_return_type] || 'SuccessEnvelope'
183
+
184
+ # auth_names
185
+ auth_names = opts[:debug_auth_names] || ['ApiKeyAuth', 'ApiSecretAuth']
186
+
187
+ new_options = opts.merge(
188
+ :operation => :"DepositsApi.deposits_list",
189
+ :header_params => header_params,
190
+ :query_params => query_params,
191
+ :form_params => form_params,
192
+ :body => post_body,
193
+ :auth_names => auth_names,
194
+ :return_type => return_type
195
+ )
196
+
197
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
198
+ if @api_client.config.debugging
199
+ @api_client.config.logger.debug "API called: DepositsApi#deposits_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
200
+ end
201
+ return data, status_code, headers
202
+ end
203
+
204
+ # Estorna depósito PIX liquidado
205
+ # @param id [String] Identificador ULID do recurso
206
+ # @param [Hash] opts the optional parameters
207
+ # @return [SuccessEnvelope]
208
+ def deposits_refund(id, opts = {})
209
+ data, _status_code, _headers = deposits_refund_with_http_info(id, opts)
210
+ data
211
+ end
212
+
213
+ # Estorna depósito PIX liquidado
214
+ # @param id [String] Identificador ULID do recurso
215
+ # @param [Hash] opts the optional parameters
216
+ # @return [Array<(SuccessEnvelope, Integer, Hash)>] SuccessEnvelope data, response status code and response headers
217
+ def deposits_refund_with_http_info(id, opts = {})
218
+ if @api_client.config.debugging
219
+ @api_client.config.logger.debug 'Calling API: DepositsApi.deposits_refund ...'
220
+ end
221
+ # verify the required parameter 'id' is set
222
+ if @api_client.config.client_side_validation && id.nil?
223
+ fail ArgumentError, "Missing the required parameter 'id' when calling DepositsApi.deposits_refund"
224
+ end
225
+ # resource path
226
+ local_var_path = '/deposits/{id}/refund'.sub('{id}', CGI.escape(id.to_s))
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 => :"DepositsApi.deposits_refund",
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(:POST, local_var_path, new_options)
259
+ if @api_client.config.debugging
260
+ @api_client.config.logger.debug "API called: DepositsApi#deposits_refund\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
261
+ end
262
+ return data, status_code, headers
263
+ end
264
+ end
265
+ end