payzu-pix 2.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 +231 -0
- data/Rakefile +10 -0
- data/docs/AccountApi.md +141 -0
- data/docs/ApiErrorDetailsInner.md +20 -0
- data/docs/BankStatement.md +42 -0
- data/docs/BankStatementListResponse.md +20 -0
- data/docs/BankStatementListResponsePagination.md +22 -0
- data/docs/CallbackDetail.md +34 -0
- data/docs/CallbackListResponse.md +20 -0
- data/docs/CallbackListResponsePagination.md +22 -0
- data/docs/CallbackSecretResponse.md +20 -0
- data/docs/CallbacksApi.md +587 -0
- data/docs/Defense.md +30 -0
- data/docs/DefenseFilesInner.md +24 -0
- data/docs/DefenseHistoryEntry.md +28 -0
- data/docs/DefenseHistoryEntryFilesInner.md +22 -0
- data/docs/DepositPending.md +62 -0
- data/docs/DepositPendingListResponse.md +24 -0
- data/docs/DictConsultResponse.md +30 -0
- data/docs/DownloadUserReport200Response.md +20 -0
- data/docs/EnqueuedCallback.md +18 -0
- data/docs/EnqueuedCallbackEnqueued.md +22 -0
- data/docs/EnqueuedCallbackItem.md +22 -0
- data/docs/ErrorResponse.md +32 -0
- data/docs/GetUser200Response.md +46 -0
- data/docs/GetUser200ResponseDailyWithdrawLimit.md +24 -0
- data/docs/GetUser200ResponseServiceFee.md +28 -0
- data/docs/GetUserBalance200Response.md +20 -0
- data/docs/GetUserTransactionById200Response.md +94 -0
- data/docs/GetUserTransactionById200ResponseAllOfCallbackLogInner.md +26 -0
- data/docs/GetUserTransactionById200ResponseAllOfInfractionInner.md +24 -0
- data/docs/GetUserTransactions200Response.md +22 -0
- data/docs/InfractionDetail.md +40 -0
- data/docs/InfractionDetailTransaction.md +30 -0
- data/docs/InfractionListResponse.md +20 -0
- data/docs/InfractionListResponsePagination.md +24 -0
- data/docs/InfractionsApi.md +413 -0
- data/docs/InternalTransferApi.md +153 -0
- data/docs/KeysAndDICTApi.md +217 -0
- data/docs/ListUserReports200Response.md +22 -0
- data/docs/PixKeyInfo.md +36 -0
- data/docs/PixOperationsApi.md +299 -0
- data/docs/PostInternalTransferRequest.md +30 -0
- data/docs/PostPixQrcodeReadRequest.md +18 -0
- data/docs/PostPixRequest.md +32 -0
- data/docs/PostUserReportRequest.md +24 -0
- data/docs/PostWithdrawQrcodeRequest.md +28 -0
- data/docs/PostWithdrawRequest.md +30 -0
- data/docs/ProofResponse.md +18 -0
- data/docs/QRCodeReadResponse.md +38 -0
- data/docs/Refund.md +34 -0
- data/docs/RefundRequest.md +22 -0
- data/docs/RefundsApi.md +79 -0
- data/docs/ReportJob.md +30 -0
- data/docs/ReportJobAccepted.md +30 -0
- data/docs/ReportJobDetail.md +30 -0
- data/docs/ReportsApi.md +881 -0
- data/docs/ResendUserCallbackSingle200Response.md +18 -0
- data/docs/ResendUserCallbacks200Response.md +20 -0
- data/docs/ResendUserCallbacksRequest.md +28 -0
- data/docs/ResendWebhookCallbacksRequest.md +30 -0
- data/docs/RotateCallbackSecretResponse.md +18 -0
- data/docs/RotateSecretResponse.md +18 -0
- data/docs/SentWebhookDetail.md +40 -0
- data/docs/SentWebhookDetailResponse.md +18 -0
- data/docs/SentWebhooksQuantity.md +18 -0
- data/docs/Summary.md +26 -0
- data/docs/SummaryBlock.md +24 -0
- data/docs/SummaryBlockGroupedInner.md +20 -0
- data/docs/SummaryBlockStatuses.md +26 -0
- data/docs/SummaryStatus.md +22 -0
- data/docs/Transaction.md +90 -0
- data/docs/TransactionWithRefunds.md +92 -0
- data/docs/Webhook.md +30 -0
- data/docs/WebhookCreateRequest.md +24 -0
- data/docs/WebhookEventType.md +15 -0
- data/docs/WebhookListResponse.md +18 -0
- data/docs/WebhookUpdateRequest.md +22 -0
- data/docs/WebhookWithSecret.md +32 -0
- data/docs/WebhooksApi.md +574 -0
- data/docs/WithdrawalsApi.md +299 -0
- data/git_push.sh +57 -0
- data/lib/payzu-pix/api/account_api.rb +136 -0
- data/lib/payzu-pix/api/callbacks_api.rb +577 -0
- data/lib/payzu-pix/api/infractions_api.rb +452 -0
- data/lib/payzu-pix/api/internal_transfer_api.rb +164 -0
- data/lib/payzu-pix/api/keys_and_dict_api.rb +234 -0
- data/lib/payzu-pix/api/pix_operations_api.rb +300 -0
- data/lib/payzu-pix/api/refunds_api.rb +96 -0
- data/lib/payzu-pix/api/reports_api.rb +968 -0
- data/lib/payzu-pix/api/webhooks_api.rb +542 -0
- data/lib/payzu-pix/api/withdrawals_api.rb +305 -0
- data/lib/payzu-pix/api_client.rb +441 -0
- data/lib/payzu-pix/api_error.rb +58 -0
- data/lib/payzu-pix/api_model_base.rb +88 -0
- data/lib/payzu-pix/configuration.rb +392 -0
- data/lib/payzu-pix/models/api_error_details_inner.rb +192 -0
- data/lib/payzu-pix/models/bank_statement.rb +296 -0
- data/lib/payzu-pix/models/bank_statement_list_response.rb +159 -0
- data/lib/payzu-pix/models/bank_statement_list_response_pagination.rb +169 -0
- data/lib/payzu-pix/models/callback_detail.rb +228 -0
- data/lib/payzu-pix/models/callback_list_response.rb +159 -0
- data/lib/payzu-pix/models/callback_list_response_pagination.rb +169 -0
- data/lib/payzu-pix/models/callback_secret_response.rb +158 -0
- data/lib/payzu-pix/models/defense.rb +234 -0
- data/lib/payzu-pix/models/defense_files_inner.rb +179 -0
- data/lib/payzu-pix/models/defense_history_entry.rb +225 -0
- data/lib/payzu-pix/models/defense_history_entry_files_inner.rb +168 -0
- data/lib/payzu-pix/models/deposit_pending.rb +407 -0
- data/lib/payzu-pix/models/deposit_pending_list_response.rb +180 -0
- data/lib/payzu-pix/models/dict_consult_response.rb +231 -0
- data/lib/payzu-pix/models/download_user_report200_response.rb +158 -0
- data/lib/payzu-pix/models/enqueued_callback.rb +147 -0
- data/lib/payzu-pix/models/enqueued_callback_enqueued.rb +170 -0
- data/lib/payzu-pix/models/enqueued_callback_item.rb +190 -0
- data/lib/payzu-pix/models/error_response.rb +336 -0
- data/lib/payzu-pix/models/get_user200_response.rb +334 -0
- data/lib/payzu-pix/models/get_user200_response_daily_withdraw_limit.rb +180 -0
- data/lib/payzu-pix/models/get_user200_response_service_fee.rb +199 -0
- data/lib/payzu-pix/models/get_user_balance200_response.rb +158 -0
- data/lib/payzu-pix/models/get_user_transaction_by_id200_response.rb +595 -0
- data/lib/payzu-pix/models/get_user_transaction_by_id200_response_all_of_callback_log_inner.rb +188 -0
- data/lib/payzu-pix/models/get_user_transaction_by_id200_response_all_of_infraction_inner.rb +202 -0
- data/lib/payzu-pix/models/get_user_transactions200_response.rb +170 -0
- data/lib/payzu-pix/models/infraction_detail.rb +293 -0
- data/lib/payzu-pix/models/infraction_detail_transaction.rb +213 -0
- data/lib/payzu-pix/models/infraction_list_response.rb +159 -0
- data/lib/payzu-pix/models/infraction_list_response_pagination.rb +179 -0
- data/lib/payzu-pix/models/list_user_reports200_response.rb +170 -0
- data/lib/payzu-pix/models/pix_key_info.rb +263 -0
- data/lib/payzu-pix/models/post_internal_transfer_request.rb +377 -0
- data/lib/payzu-pix/models/post_pix_qrcode_read_request.rb +174 -0
- data/lib/payzu-pix/models/post_pix_request.rb +382 -0
- data/lib/payzu-pix/models/post_user_report_request.rb +238 -0
- data/lib/payzu-pix/models/post_withdraw_qrcode_request.rb +302 -0
- data/lib/payzu-pix/models/post_withdraw_request.rb +350 -0
- data/lib/payzu-pix/models/proof_response.rb +148 -0
- data/lib/payzu-pix/models/qr_code_read_response.rb +283 -0
- data/lib/payzu-pix/models/refund.rb +257 -0
- data/lib/payzu-pix/models/refund_request.rb +215 -0
- data/lib/payzu-pix/models/report_job.rb +234 -0
- data/lib/payzu-pix/models/report_job_accepted.rb +237 -0
- data/lib/payzu-pix/models/report_job_detail.rb +237 -0
- data/lib/payzu-pix/models/resend_user_callback_single200_response.rb +148 -0
- data/lib/payzu-pix/models/resend_user_callbacks200_response.rb +158 -0
- data/lib/payzu-pix/models/resend_user_callbacks_request.rb +262 -0
- data/lib/payzu-pix/models/resend_webhook_callbacks_request.rb +274 -0
- data/lib/payzu-pix/models/rotate_callback_secret_response.rb +148 -0
- data/lib/payzu-pix/models/rotate_secret_response.rb +148 -0
- data/lib/payzu-pix/models/sent_webhook_detail.rb +261 -0
- data/lib/payzu-pix/models/sent_webhook_detail_response.rb +164 -0
- data/lib/payzu-pix/models/sent_webhooks_quantity.rb +148 -0
- data/lib/payzu-pix/models/summary.rb +188 -0
- data/lib/payzu-pix/models/summary_block.rb +179 -0
- data/lib/payzu-pix/models/summary_block_grouped_inner.rb +158 -0
- data/lib/payzu-pix/models/summary_block_statuses.rb +189 -0
- data/lib/payzu-pix/models/summary_status.rb +168 -0
- data/lib/payzu-pix/models/transaction.rb +588 -0
- data/lib/payzu-pix/models/transaction_with_refunds.rb +583 -0
- data/lib/payzu-pix/models/webhook.rb +210 -0
- data/lib/payzu-pix/models/webhook_create_request.rb +201 -0
- data/lib/payzu-pix/models/webhook_event_type.rb +47 -0
- data/lib/payzu-pix/models/webhook_list_response.rb +150 -0
- data/lib/payzu-pix/models/webhook_update_request.rb +171 -0
- data/lib/payzu-pix/models/webhook_with_secret.rb +220 -0
- data/lib/payzu-pix/version.rb +15 -0
- data/lib/payzu-pix.rb +119 -0
- data/payzu-pix.gemspec +41 -0
- data/spec/spec_helper.rb +111 -0
- metadata +283 -0
data/docs/WebhooksApi.md
ADDED
|
@@ -0,0 +1,574 @@
|
|
|
1
|
+
# PayZuPix::WebhooksApi
|
|
2
|
+
|
|
3
|
+
All URIs are relative to *https://api.payzu.processamento.com/v1*
|
|
4
|
+
|
|
5
|
+
| Method | HTTP request | Description |
|
|
6
|
+
| ------ | ------------ | ----------- |
|
|
7
|
+
| [**delete_user_webhook**](WebhooksApi.md#delete_user_webhook) | **DELETE** /user/webhooks/{id} | Delete webhook |
|
|
8
|
+
| [**get_user_webhook**](WebhooksApi.md#get_user_webhook) | **GET** /user/webhooks/{id} | Get webhook |
|
|
9
|
+
| [**get_user_webhook_sent_detail**](WebhooksApi.md#get_user_webhook_sent_detail) | **GET** /user/webhooks/{id}/sent/{callbackId} | Get sent callback detail |
|
|
10
|
+
| [**get_user_webhooks**](WebhooksApi.md#get_user_webhooks) | **GET** /user/webhooks | List webhooks |
|
|
11
|
+
| [**get_user_webhooks_sent_quantity**](WebhooksApi.md#get_user_webhooks_sent_quantity) | **GET** /user/webhooks/sent/quantity | Count sent callbacks |
|
|
12
|
+
| [**patch_user_webhook**](WebhooksApi.md#patch_user_webhook) | **PATCH** /user/webhooks/{id} | Update webhook |
|
|
13
|
+
| [**post_user_webhook**](WebhooksApi.md#post_user_webhook) | **POST** /user/webhooks | Create webhook |
|
|
14
|
+
| [**post_user_webhook_rotate_secret**](WebhooksApi.md#post_user_webhook_rotate_secret) | **POST** /user/webhooks/{id}/rotate-secret | Rotate webhook secret |
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
## delete_user_webhook
|
|
18
|
+
|
|
19
|
+
> delete_user_webhook(id)
|
|
20
|
+
|
|
21
|
+
Delete webhook
|
|
22
|
+
|
|
23
|
+
Removes a webhook.
|
|
24
|
+
|
|
25
|
+
### Examples
|
|
26
|
+
|
|
27
|
+
```ruby
|
|
28
|
+
require 'time'
|
|
29
|
+
require 'payzu-pix'
|
|
30
|
+
# setup authorization
|
|
31
|
+
PayZuPix.configure do |config|
|
|
32
|
+
# Configure Bearer authorization: BearerAuth
|
|
33
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
api_instance = PayZuPix::WebhooksApi.new
|
|
37
|
+
id = 'cm3w7k1t40000q8f2r5b9x3ad' # String | Webhook id.
|
|
38
|
+
|
|
39
|
+
begin
|
|
40
|
+
# Delete webhook
|
|
41
|
+
api_instance.delete_user_webhook(id)
|
|
42
|
+
rescue PayZuPix::ApiError => e
|
|
43
|
+
puts "Error when calling WebhooksApi->delete_user_webhook: #{e}"
|
|
44
|
+
end
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
#### Using the delete_user_webhook_with_http_info variant
|
|
48
|
+
|
|
49
|
+
This returns an Array which contains the response data (`nil` in this case), status code and headers.
|
|
50
|
+
|
|
51
|
+
> <Array(nil, Integer, Hash)> delete_user_webhook_with_http_info(id)
|
|
52
|
+
|
|
53
|
+
```ruby
|
|
54
|
+
begin
|
|
55
|
+
# Delete webhook
|
|
56
|
+
data, status_code, headers = api_instance.delete_user_webhook_with_http_info(id)
|
|
57
|
+
p status_code # => 2xx
|
|
58
|
+
p headers # => { ... }
|
|
59
|
+
p data # => nil
|
|
60
|
+
rescue PayZuPix::ApiError => e
|
|
61
|
+
puts "Error when calling WebhooksApi->delete_user_webhook_with_http_info: #{e}"
|
|
62
|
+
end
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
### Parameters
|
|
66
|
+
|
|
67
|
+
| Name | Type | Description | Notes |
|
|
68
|
+
| ---- | ---- | ----------- | ----- |
|
|
69
|
+
| **id** | **String** | Webhook id. | |
|
|
70
|
+
|
|
71
|
+
### Return type
|
|
72
|
+
|
|
73
|
+
nil (empty response body)
|
|
74
|
+
|
|
75
|
+
### Authorization
|
|
76
|
+
|
|
77
|
+
[BearerAuth](../README.md#BearerAuth)
|
|
78
|
+
|
|
79
|
+
### HTTP request headers
|
|
80
|
+
|
|
81
|
+
- **Content-Type**: Not defined
|
|
82
|
+
- **Accept**: application/json
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
## get_user_webhook
|
|
86
|
+
|
|
87
|
+
> <Webhook> get_user_webhook(id)
|
|
88
|
+
|
|
89
|
+
Get webhook
|
|
90
|
+
|
|
91
|
+
Returns a single webhook.
|
|
92
|
+
|
|
93
|
+
### Examples
|
|
94
|
+
|
|
95
|
+
```ruby
|
|
96
|
+
require 'time'
|
|
97
|
+
require 'payzu-pix'
|
|
98
|
+
# setup authorization
|
|
99
|
+
PayZuPix.configure do |config|
|
|
100
|
+
# Configure Bearer authorization: BearerAuth
|
|
101
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
api_instance = PayZuPix::WebhooksApi.new
|
|
105
|
+
id = 'cm3w7k1t40000q8f2r5b9x3ad' # String | Webhook id.
|
|
106
|
+
|
|
107
|
+
begin
|
|
108
|
+
# Get webhook
|
|
109
|
+
result = api_instance.get_user_webhook(id)
|
|
110
|
+
p result
|
|
111
|
+
rescue PayZuPix::ApiError => e
|
|
112
|
+
puts "Error when calling WebhooksApi->get_user_webhook: #{e}"
|
|
113
|
+
end
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
#### Using the get_user_webhook_with_http_info variant
|
|
117
|
+
|
|
118
|
+
This returns an Array which contains the response data, status code and headers.
|
|
119
|
+
|
|
120
|
+
> <Array(<Webhook>, Integer, Hash)> get_user_webhook_with_http_info(id)
|
|
121
|
+
|
|
122
|
+
```ruby
|
|
123
|
+
begin
|
|
124
|
+
# Get webhook
|
|
125
|
+
data, status_code, headers = api_instance.get_user_webhook_with_http_info(id)
|
|
126
|
+
p status_code # => 2xx
|
|
127
|
+
p headers # => { ... }
|
|
128
|
+
p data # => <Webhook>
|
|
129
|
+
rescue PayZuPix::ApiError => e
|
|
130
|
+
puts "Error when calling WebhooksApi->get_user_webhook_with_http_info: #{e}"
|
|
131
|
+
end
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
### Parameters
|
|
135
|
+
|
|
136
|
+
| Name | Type | Description | Notes |
|
|
137
|
+
| ---- | ---- | ----------- | ----- |
|
|
138
|
+
| **id** | **String** | Webhook id. | |
|
|
139
|
+
|
|
140
|
+
### Return type
|
|
141
|
+
|
|
142
|
+
[**Webhook**](Webhook.md)
|
|
143
|
+
|
|
144
|
+
### Authorization
|
|
145
|
+
|
|
146
|
+
[BearerAuth](../README.md#BearerAuth)
|
|
147
|
+
|
|
148
|
+
### HTTP request headers
|
|
149
|
+
|
|
150
|
+
- **Content-Type**: Not defined
|
|
151
|
+
- **Accept**: application/json
|
|
152
|
+
|
|
153
|
+
|
|
154
|
+
## get_user_webhook_sent_detail
|
|
155
|
+
|
|
156
|
+
> <SentWebhookDetailResponse> get_user_webhook_sent_detail(id, callback_id)
|
|
157
|
+
|
|
158
|
+
Get sent callback detail
|
|
159
|
+
|
|
160
|
+
Returns the delivery detail of a single sent callback.
|
|
161
|
+
|
|
162
|
+
### Examples
|
|
163
|
+
|
|
164
|
+
```ruby
|
|
165
|
+
require 'time'
|
|
166
|
+
require 'payzu-pix'
|
|
167
|
+
# setup authorization
|
|
168
|
+
PayZuPix.configure do |config|
|
|
169
|
+
# Configure Bearer authorization: BearerAuth
|
|
170
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
171
|
+
end
|
|
172
|
+
|
|
173
|
+
api_instance = PayZuPix::WebhooksApi.new
|
|
174
|
+
id = 'cm3w7k1t40000q8f2r5b9x3ad' # String | Webhook id.
|
|
175
|
+
callback_id = 'cm3w7l9v20001q8f2u6c1y4be' # String | Callback log id.
|
|
176
|
+
|
|
177
|
+
begin
|
|
178
|
+
# Get sent callback detail
|
|
179
|
+
result = api_instance.get_user_webhook_sent_detail(id, callback_id)
|
|
180
|
+
p result
|
|
181
|
+
rescue PayZuPix::ApiError => e
|
|
182
|
+
puts "Error when calling WebhooksApi->get_user_webhook_sent_detail: #{e}"
|
|
183
|
+
end
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
#### Using the get_user_webhook_sent_detail_with_http_info variant
|
|
187
|
+
|
|
188
|
+
This returns an Array which contains the response data, status code and headers.
|
|
189
|
+
|
|
190
|
+
> <Array(<SentWebhookDetailResponse>, Integer, Hash)> get_user_webhook_sent_detail_with_http_info(id, callback_id)
|
|
191
|
+
|
|
192
|
+
```ruby
|
|
193
|
+
begin
|
|
194
|
+
# Get sent callback detail
|
|
195
|
+
data, status_code, headers = api_instance.get_user_webhook_sent_detail_with_http_info(id, callback_id)
|
|
196
|
+
p status_code # => 2xx
|
|
197
|
+
p headers # => { ... }
|
|
198
|
+
p data # => <SentWebhookDetailResponse>
|
|
199
|
+
rescue PayZuPix::ApiError => e
|
|
200
|
+
puts "Error when calling WebhooksApi->get_user_webhook_sent_detail_with_http_info: #{e}"
|
|
201
|
+
end
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
### Parameters
|
|
205
|
+
|
|
206
|
+
| Name | Type | Description | Notes |
|
|
207
|
+
| ---- | ---- | ----------- | ----- |
|
|
208
|
+
| **id** | **String** | Webhook id. | |
|
|
209
|
+
| **callback_id** | **String** | Callback log id. | |
|
|
210
|
+
|
|
211
|
+
### Return type
|
|
212
|
+
|
|
213
|
+
[**SentWebhookDetailResponse**](SentWebhookDetailResponse.md)
|
|
214
|
+
|
|
215
|
+
### Authorization
|
|
216
|
+
|
|
217
|
+
[BearerAuth](../README.md#BearerAuth)
|
|
218
|
+
|
|
219
|
+
### HTTP request headers
|
|
220
|
+
|
|
221
|
+
- **Content-Type**: Not defined
|
|
222
|
+
- **Accept**: application/json
|
|
223
|
+
|
|
224
|
+
|
|
225
|
+
## get_user_webhooks
|
|
226
|
+
|
|
227
|
+
> <WebhookListResponse> get_user_webhooks(opts)
|
|
228
|
+
|
|
229
|
+
List webhooks
|
|
230
|
+
|
|
231
|
+
Lists the webhooks registered for the account.
|
|
232
|
+
|
|
233
|
+
### Examples
|
|
234
|
+
|
|
235
|
+
```ruby
|
|
236
|
+
require 'time'
|
|
237
|
+
require 'payzu-pix'
|
|
238
|
+
# setup authorization
|
|
239
|
+
PayZuPix.configure do |config|
|
|
240
|
+
# Configure Bearer authorization: BearerAuth
|
|
241
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
242
|
+
end
|
|
243
|
+
|
|
244
|
+
api_instance = PayZuPix::WebhooksApi.new
|
|
245
|
+
opts = {
|
|
246
|
+
active: true # Boolean | Filter by active status.
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
begin
|
|
250
|
+
# List webhooks
|
|
251
|
+
result = api_instance.get_user_webhooks(opts)
|
|
252
|
+
p result
|
|
253
|
+
rescue PayZuPix::ApiError => e
|
|
254
|
+
puts "Error when calling WebhooksApi->get_user_webhooks: #{e}"
|
|
255
|
+
end
|
|
256
|
+
```
|
|
257
|
+
|
|
258
|
+
#### Using the get_user_webhooks_with_http_info variant
|
|
259
|
+
|
|
260
|
+
This returns an Array which contains the response data, status code and headers.
|
|
261
|
+
|
|
262
|
+
> <Array(<WebhookListResponse>, Integer, Hash)> get_user_webhooks_with_http_info(opts)
|
|
263
|
+
|
|
264
|
+
```ruby
|
|
265
|
+
begin
|
|
266
|
+
# List webhooks
|
|
267
|
+
data, status_code, headers = api_instance.get_user_webhooks_with_http_info(opts)
|
|
268
|
+
p status_code # => 2xx
|
|
269
|
+
p headers # => { ... }
|
|
270
|
+
p data # => <WebhookListResponse>
|
|
271
|
+
rescue PayZuPix::ApiError => e
|
|
272
|
+
puts "Error when calling WebhooksApi->get_user_webhooks_with_http_info: #{e}"
|
|
273
|
+
end
|
|
274
|
+
```
|
|
275
|
+
|
|
276
|
+
### Parameters
|
|
277
|
+
|
|
278
|
+
| Name | Type | Description | Notes |
|
|
279
|
+
| ---- | ---- | ----------- | ----- |
|
|
280
|
+
| **active** | **Boolean** | Filter by active status. | [optional] |
|
|
281
|
+
|
|
282
|
+
### Return type
|
|
283
|
+
|
|
284
|
+
[**WebhookListResponse**](WebhookListResponse.md)
|
|
285
|
+
|
|
286
|
+
### Authorization
|
|
287
|
+
|
|
288
|
+
[BearerAuth](../README.md#BearerAuth)
|
|
289
|
+
|
|
290
|
+
### HTTP request headers
|
|
291
|
+
|
|
292
|
+
- **Content-Type**: Not defined
|
|
293
|
+
- **Accept**: application/json
|
|
294
|
+
|
|
295
|
+
|
|
296
|
+
## get_user_webhooks_sent_quantity
|
|
297
|
+
|
|
298
|
+
> <SentWebhooksQuantity> get_user_webhooks_sent_quantity(opts)
|
|
299
|
+
|
|
300
|
+
Count sent callbacks
|
|
301
|
+
|
|
302
|
+
Returns how many webhook deliveries were made, optionally filtered by webhook.
|
|
303
|
+
|
|
304
|
+
### Examples
|
|
305
|
+
|
|
306
|
+
```ruby
|
|
307
|
+
require 'time'
|
|
308
|
+
require 'payzu-pix'
|
|
309
|
+
# setup authorization
|
|
310
|
+
PayZuPix.configure do |config|
|
|
311
|
+
# Configure Bearer authorization: BearerAuth
|
|
312
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
313
|
+
end
|
|
314
|
+
|
|
315
|
+
api_instance = PayZuPix::WebhooksApi.new
|
|
316
|
+
opts = {
|
|
317
|
+
webhook_id: 'cm3w7k1t40000q8f2r5b9x3ad' # String | Filter the count by webhook id.
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
begin
|
|
321
|
+
# Count sent callbacks
|
|
322
|
+
result = api_instance.get_user_webhooks_sent_quantity(opts)
|
|
323
|
+
p result
|
|
324
|
+
rescue PayZuPix::ApiError => e
|
|
325
|
+
puts "Error when calling WebhooksApi->get_user_webhooks_sent_quantity: #{e}"
|
|
326
|
+
end
|
|
327
|
+
```
|
|
328
|
+
|
|
329
|
+
#### Using the get_user_webhooks_sent_quantity_with_http_info variant
|
|
330
|
+
|
|
331
|
+
This returns an Array which contains the response data, status code and headers.
|
|
332
|
+
|
|
333
|
+
> <Array(<SentWebhooksQuantity>, Integer, Hash)> get_user_webhooks_sent_quantity_with_http_info(opts)
|
|
334
|
+
|
|
335
|
+
```ruby
|
|
336
|
+
begin
|
|
337
|
+
# Count sent callbacks
|
|
338
|
+
data, status_code, headers = api_instance.get_user_webhooks_sent_quantity_with_http_info(opts)
|
|
339
|
+
p status_code # => 2xx
|
|
340
|
+
p headers # => { ... }
|
|
341
|
+
p data # => <SentWebhooksQuantity>
|
|
342
|
+
rescue PayZuPix::ApiError => e
|
|
343
|
+
puts "Error when calling WebhooksApi->get_user_webhooks_sent_quantity_with_http_info: #{e}"
|
|
344
|
+
end
|
|
345
|
+
```
|
|
346
|
+
|
|
347
|
+
### Parameters
|
|
348
|
+
|
|
349
|
+
| Name | Type | Description | Notes |
|
|
350
|
+
| ---- | ---- | ----------- | ----- |
|
|
351
|
+
| **webhook_id** | **String** | Filter the count by webhook id. | [optional] |
|
|
352
|
+
|
|
353
|
+
### Return type
|
|
354
|
+
|
|
355
|
+
[**SentWebhooksQuantity**](SentWebhooksQuantity.md)
|
|
356
|
+
|
|
357
|
+
### Authorization
|
|
358
|
+
|
|
359
|
+
[BearerAuth](../README.md#BearerAuth)
|
|
360
|
+
|
|
361
|
+
### HTTP request headers
|
|
362
|
+
|
|
363
|
+
- **Content-Type**: Not defined
|
|
364
|
+
- **Accept**: application/json
|
|
365
|
+
|
|
366
|
+
|
|
367
|
+
## patch_user_webhook
|
|
368
|
+
|
|
369
|
+
> <Webhook> patch_user_webhook(id, webhook_update_request)
|
|
370
|
+
|
|
371
|
+
Update webhook
|
|
372
|
+
|
|
373
|
+
Updates the url, active flag or events of a webhook. Provide at least one field.
|
|
374
|
+
|
|
375
|
+
### Examples
|
|
376
|
+
|
|
377
|
+
```ruby
|
|
378
|
+
require 'time'
|
|
379
|
+
require 'payzu-pix'
|
|
380
|
+
# setup authorization
|
|
381
|
+
PayZuPix.configure do |config|
|
|
382
|
+
# Configure Bearer authorization: BearerAuth
|
|
383
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
384
|
+
end
|
|
385
|
+
|
|
386
|
+
api_instance = PayZuPix::WebhooksApi.new
|
|
387
|
+
id = 'cm3w7k1t40000q8f2r5b9x3ad' # String | Webhook id.
|
|
388
|
+
webhook_update_request = PayZuPix::WebhookUpdateRequest.new # WebhookUpdateRequest |
|
|
389
|
+
|
|
390
|
+
begin
|
|
391
|
+
# Update webhook
|
|
392
|
+
result = api_instance.patch_user_webhook(id, webhook_update_request)
|
|
393
|
+
p result
|
|
394
|
+
rescue PayZuPix::ApiError => e
|
|
395
|
+
puts "Error when calling WebhooksApi->patch_user_webhook: #{e}"
|
|
396
|
+
end
|
|
397
|
+
```
|
|
398
|
+
|
|
399
|
+
#### Using the patch_user_webhook_with_http_info variant
|
|
400
|
+
|
|
401
|
+
This returns an Array which contains the response data, status code and headers.
|
|
402
|
+
|
|
403
|
+
> <Array(<Webhook>, Integer, Hash)> patch_user_webhook_with_http_info(id, webhook_update_request)
|
|
404
|
+
|
|
405
|
+
```ruby
|
|
406
|
+
begin
|
|
407
|
+
# Update webhook
|
|
408
|
+
data, status_code, headers = api_instance.patch_user_webhook_with_http_info(id, webhook_update_request)
|
|
409
|
+
p status_code # => 2xx
|
|
410
|
+
p headers # => { ... }
|
|
411
|
+
p data # => <Webhook>
|
|
412
|
+
rescue PayZuPix::ApiError => e
|
|
413
|
+
puts "Error when calling WebhooksApi->patch_user_webhook_with_http_info: #{e}"
|
|
414
|
+
end
|
|
415
|
+
```
|
|
416
|
+
|
|
417
|
+
### Parameters
|
|
418
|
+
|
|
419
|
+
| Name | Type | Description | Notes |
|
|
420
|
+
| ---- | ---- | ----------- | ----- |
|
|
421
|
+
| **id** | **String** | Webhook id. | |
|
|
422
|
+
| **webhook_update_request** | [**WebhookUpdateRequest**](WebhookUpdateRequest.md) | | |
|
|
423
|
+
|
|
424
|
+
### Return type
|
|
425
|
+
|
|
426
|
+
[**Webhook**](Webhook.md)
|
|
427
|
+
|
|
428
|
+
### Authorization
|
|
429
|
+
|
|
430
|
+
[BearerAuth](../README.md#BearerAuth)
|
|
431
|
+
|
|
432
|
+
### HTTP request headers
|
|
433
|
+
|
|
434
|
+
- **Content-Type**: application/json
|
|
435
|
+
- **Accept**: application/json
|
|
436
|
+
|
|
437
|
+
|
|
438
|
+
## post_user_webhook
|
|
439
|
+
|
|
440
|
+
> <WebhookWithSecret> post_user_webhook(webhook_create_request)
|
|
441
|
+
|
|
442
|
+
Create webhook
|
|
443
|
+
|
|
444
|
+
Registers a webhook endpoint. If `generateSecret` is true, the response includes the HMAC `secret` (shown only here).
|
|
445
|
+
|
|
446
|
+
### Examples
|
|
447
|
+
|
|
448
|
+
```ruby
|
|
449
|
+
require 'time'
|
|
450
|
+
require 'payzu-pix'
|
|
451
|
+
# setup authorization
|
|
452
|
+
PayZuPix.configure do |config|
|
|
453
|
+
# Configure Bearer authorization: BearerAuth
|
|
454
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
455
|
+
end
|
|
456
|
+
|
|
457
|
+
api_instance = PayZuPix::WebhooksApi.new
|
|
458
|
+
webhook_create_request = PayZuPix::WebhookCreateRequest.new({url: 'https://sualoja.com.br/webhook'}) # WebhookCreateRequest |
|
|
459
|
+
|
|
460
|
+
begin
|
|
461
|
+
# Create webhook
|
|
462
|
+
result = api_instance.post_user_webhook(webhook_create_request)
|
|
463
|
+
p result
|
|
464
|
+
rescue PayZuPix::ApiError => e
|
|
465
|
+
puts "Error when calling WebhooksApi->post_user_webhook: #{e}"
|
|
466
|
+
end
|
|
467
|
+
```
|
|
468
|
+
|
|
469
|
+
#### Using the post_user_webhook_with_http_info variant
|
|
470
|
+
|
|
471
|
+
This returns an Array which contains the response data, status code and headers.
|
|
472
|
+
|
|
473
|
+
> <Array(<WebhookWithSecret>, Integer, Hash)> post_user_webhook_with_http_info(webhook_create_request)
|
|
474
|
+
|
|
475
|
+
```ruby
|
|
476
|
+
begin
|
|
477
|
+
# Create webhook
|
|
478
|
+
data, status_code, headers = api_instance.post_user_webhook_with_http_info(webhook_create_request)
|
|
479
|
+
p status_code # => 2xx
|
|
480
|
+
p headers # => { ... }
|
|
481
|
+
p data # => <WebhookWithSecret>
|
|
482
|
+
rescue PayZuPix::ApiError => e
|
|
483
|
+
puts "Error when calling WebhooksApi->post_user_webhook_with_http_info: #{e}"
|
|
484
|
+
end
|
|
485
|
+
```
|
|
486
|
+
|
|
487
|
+
### Parameters
|
|
488
|
+
|
|
489
|
+
| Name | Type | Description | Notes |
|
|
490
|
+
| ---- | ---- | ----------- | ----- |
|
|
491
|
+
| **webhook_create_request** | [**WebhookCreateRequest**](WebhookCreateRequest.md) | | |
|
|
492
|
+
|
|
493
|
+
### Return type
|
|
494
|
+
|
|
495
|
+
[**WebhookWithSecret**](WebhookWithSecret.md)
|
|
496
|
+
|
|
497
|
+
### Authorization
|
|
498
|
+
|
|
499
|
+
[BearerAuth](../README.md#BearerAuth)
|
|
500
|
+
|
|
501
|
+
### HTTP request headers
|
|
502
|
+
|
|
503
|
+
- **Content-Type**: application/json
|
|
504
|
+
- **Accept**: application/json
|
|
505
|
+
|
|
506
|
+
|
|
507
|
+
## post_user_webhook_rotate_secret
|
|
508
|
+
|
|
509
|
+
> <RotateSecretResponse> post_user_webhook_rotate_secret(id)
|
|
510
|
+
|
|
511
|
+
Rotate webhook secret
|
|
512
|
+
|
|
513
|
+
Generates a new HMAC signing secret and invalidates the previous one. The new `secret` is shown only in this response.
|
|
514
|
+
|
|
515
|
+
### Examples
|
|
516
|
+
|
|
517
|
+
```ruby
|
|
518
|
+
require 'time'
|
|
519
|
+
require 'payzu-pix'
|
|
520
|
+
# setup authorization
|
|
521
|
+
PayZuPix.configure do |config|
|
|
522
|
+
# Configure Bearer authorization: BearerAuth
|
|
523
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
524
|
+
end
|
|
525
|
+
|
|
526
|
+
api_instance = PayZuPix::WebhooksApi.new
|
|
527
|
+
id = 'cm3w7k1t40000q8f2r5b9x3ad' # String | Webhook id.
|
|
528
|
+
|
|
529
|
+
begin
|
|
530
|
+
# Rotate webhook secret
|
|
531
|
+
result = api_instance.post_user_webhook_rotate_secret(id)
|
|
532
|
+
p result
|
|
533
|
+
rescue PayZuPix::ApiError => e
|
|
534
|
+
puts "Error when calling WebhooksApi->post_user_webhook_rotate_secret: #{e}"
|
|
535
|
+
end
|
|
536
|
+
```
|
|
537
|
+
|
|
538
|
+
#### Using the post_user_webhook_rotate_secret_with_http_info variant
|
|
539
|
+
|
|
540
|
+
This returns an Array which contains the response data, status code and headers.
|
|
541
|
+
|
|
542
|
+
> <Array(<RotateSecretResponse>, Integer, Hash)> post_user_webhook_rotate_secret_with_http_info(id)
|
|
543
|
+
|
|
544
|
+
```ruby
|
|
545
|
+
begin
|
|
546
|
+
# Rotate webhook secret
|
|
547
|
+
data, status_code, headers = api_instance.post_user_webhook_rotate_secret_with_http_info(id)
|
|
548
|
+
p status_code # => 2xx
|
|
549
|
+
p headers # => { ... }
|
|
550
|
+
p data # => <RotateSecretResponse>
|
|
551
|
+
rescue PayZuPix::ApiError => e
|
|
552
|
+
puts "Error when calling WebhooksApi->post_user_webhook_rotate_secret_with_http_info: #{e}"
|
|
553
|
+
end
|
|
554
|
+
```
|
|
555
|
+
|
|
556
|
+
### Parameters
|
|
557
|
+
|
|
558
|
+
| Name | Type | Description | Notes |
|
|
559
|
+
| ---- | ---- | ----------- | ----- |
|
|
560
|
+
| **id** | **String** | Webhook id. | |
|
|
561
|
+
|
|
562
|
+
### Return type
|
|
563
|
+
|
|
564
|
+
[**RotateSecretResponse**](RotateSecretResponse.md)
|
|
565
|
+
|
|
566
|
+
### Authorization
|
|
567
|
+
|
|
568
|
+
[BearerAuth](../README.md#BearerAuth)
|
|
569
|
+
|
|
570
|
+
### HTTP request headers
|
|
571
|
+
|
|
572
|
+
- **Content-Type**: Not defined
|
|
573
|
+
- **Accept**: application/json
|
|
574
|
+
|