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.
Files changed (172) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +9 -0
  3. data/README.md +231 -0
  4. data/Rakefile +10 -0
  5. data/docs/AccountApi.md +141 -0
  6. data/docs/ApiErrorDetailsInner.md +20 -0
  7. data/docs/BankStatement.md +42 -0
  8. data/docs/BankStatementListResponse.md +20 -0
  9. data/docs/BankStatementListResponsePagination.md +22 -0
  10. data/docs/CallbackDetail.md +34 -0
  11. data/docs/CallbackListResponse.md +20 -0
  12. data/docs/CallbackListResponsePagination.md +22 -0
  13. data/docs/CallbackSecretResponse.md +20 -0
  14. data/docs/CallbacksApi.md +587 -0
  15. data/docs/Defense.md +30 -0
  16. data/docs/DefenseFilesInner.md +24 -0
  17. data/docs/DefenseHistoryEntry.md +28 -0
  18. data/docs/DefenseHistoryEntryFilesInner.md +22 -0
  19. data/docs/DepositPending.md +62 -0
  20. data/docs/DepositPendingListResponse.md +24 -0
  21. data/docs/DictConsultResponse.md +30 -0
  22. data/docs/DownloadUserReport200Response.md +20 -0
  23. data/docs/EnqueuedCallback.md +18 -0
  24. data/docs/EnqueuedCallbackEnqueued.md +22 -0
  25. data/docs/EnqueuedCallbackItem.md +22 -0
  26. data/docs/ErrorResponse.md +32 -0
  27. data/docs/GetUser200Response.md +46 -0
  28. data/docs/GetUser200ResponseDailyWithdrawLimit.md +24 -0
  29. data/docs/GetUser200ResponseServiceFee.md +28 -0
  30. data/docs/GetUserBalance200Response.md +20 -0
  31. data/docs/GetUserTransactionById200Response.md +94 -0
  32. data/docs/GetUserTransactionById200ResponseAllOfCallbackLogInner.md +26 -0
  33. data/docs/GetUserTransactionById200ResponseAllOfInfractionInner.md +24 -0
  34. data/docs/GetUserTransactions200Response.md +22 -0
  35. data/docs/InfractionDetail.md +40 -0
  36. data/docs/InfractionDetailTransaction.md +30 -0
  37. data/docs/InfractionListResponse.md +20 -0
  38. data/docs/InfractionListResponsePagination.md +24 -0
  39. data/docs/InfractionsApi.md +413 -0
  40. data/docs/InternalTransferApi.md +153 -0
  41. data/docs/KeysAndDICTApi.md +217 -0
  42. data/docs/ListUserReports200Response.md +22 -0
  43. data/docs/PixKeyInfo.md +36 -0
  44. data/docs/PixOperationsApi.md +299 -0
  45. data/docs/PostInternalTransferRequest.md +30 -0
  46. data/docs/PostPixQrcodeReadRequest.md +18 -0
  47. data/docs/PostPixRequest.md +32 -0
  48. data/docs/PostUserReportRequest.md +24 -0
  49. data/docs/PostWithdrawQrcodeRequest.md +28 -0
  50. data/docs/PostWithdrawRequest.md +30 -0
  51. data/docs/ProofResponse.md +18 -0
  52. data/docs/QRCodeReadResponse.md +38 -0
  53. data/docs/Refund.md +34 -0
  54. data/docs/RefundRequest.md +22 -0
  55. data/docs/RefundsApi.md +79 -0
  56. data/docs/ReportJob.md +30 -0
  57. data/docs/ReportJobAccepted.md +30 -0
  58. data/docs/ReportJobDetail.md +30 -0
  59. data/docs/ReportsApi.md +881 -0
  60. data/docs/ResendUserCallbackSingle200Response.md +18 -0
  61. data/docs/ResendUserCallbacks200Response.md +20 -0
  62. data/docs/ResendUserCallbacksRequest.md +28 -0
  63. data/docs/ResendWebhookCallbacksRequest.md +30 -0
  64. data/docs/RotateCallbackSecretResponse.md +18 -0
  65. data/docs/RotateSecretResponse.md +18 -0
  66. data/docs/SentWebhookDetail.md +40 -0
  67. data/docs/SentWebhookDetailResponse.md +18 -0
  68. data/docs/SentWebhooksQuantity.md +18 -0
  69. data/docs/Summary.md +26 -0
  70. data/docs/SummaryBlock.md +24 -0
  71. data/docs/SummaryBlockGroupedInner.md +20 -0
  72. data/docs/SummaryBlockStatuses.md +26 -0
  73. data/docs/SummaryStatus.md +22 -0
  74. data/docs/Transaction.md +90 -0
  75. data/docs/TransactionWithRefunds.md +92 -0
  76. data/docs/Webhook.md +30 -0
  77. data/docs/WebhookCreateRequest.md +24 -0
  78. data/docs/WebhookEventType.md +15 -0
  79. data/docs/WebhookListResponse.md +18 -0
  80. data/docs/WebhookUpdateRequest.md +22 -0
  81. data/docs/WebhookWithSecret.md +32 -0
  82. data/docs/WebhooksApi.md +574 -0
  83. data/docs/WithdrawalsApi.md +299 -0
  84. data/git_push.sh +57 -0
  85. data/lib/payzu-pix/api/account_api.rb +136 -0
  86. data/lib/payzu-pix/api/callbacks_api.rb +577 -0
  87. data/lib/payzu-pix/api/infractions_api.rb +452 -0
  88. data/lib/payzu-pix/api/internal_transfer_api.rb +164 -0
  89. data/lib/payzu-pix/api/keys_and_dict_api.rb +234 -0
  90. data/lib/payzu-pix/api/pix_operations_api.rb +300 -0
  91. data/lib/payzu-pix/api/refunds_api.rb +96 -0
  92. data/lib/payzu-pix/api/reports_api.rb +968 -0
  93. data/lib/payzu-pix/api/webhooks_api.rb +542 -0
  94. data/lib/payzu-pix/api/withdrawals_api.rb +305 -0
  95. data/lib/payzu-pix/api_client.rb +441 -0
  96. data/lib/payzu-pix/api_error.rb +58 -0
  97. data/lib/payzu-pix/api_model_base.rb +88 -0
  98. data/lib/payzu-pix/configuration.rb +392 -0
  99. data/lib/payzu-pix/models/api_error_details_inner.rb +192 -0
  100. data/lib/payzu-pix/models/bank_statement.rb +296 -0
  101. data/lib/payzu-pix/models/bank_statement_list_response.rb +159 -0
  102. data/lib/payzu-pix/models/bank_statement_list_response_pagination.rb +169 -0
  103. data/lib/payzu-pix/models/callback_detail.rb +228 -0
  104. data/lib/payzu-pix/models/callback_list_response.rb +159 -0
  105. data/lib/payzu-pix/models/callback_list_response_pagination.rb +169 -0
  106. data/lib/payzu-pix/models/callback_secret_response.rb +158 -0
  107. data/lib/payzu-pix/models/defense.rb +234 -0
  108. data/lib/payzu-pix/models/defense_files_inner.rb +179 -0
  109. data/lib/payzu-pix/models/defense_history_entry.rb +225 -0
  110. data/lib/payzu-pix/models/defense_history_entry_files_inner.rb +168 -0
  111. data/lib/payzu-pix/models/deposit_pending.rb +407 -0
  112. data/lib/payzu-pix/models/deposit_pending_list_response.rb +180 -0
  113. data/lib/payzu-pix/models/dict_consult_response.rb +231 -0
  114. data/lib/payzu-pix/models/download_user_report200_response.rb +158 -0
  115. data/lib/payzu-pix/models/enqueued_callback.rb +147 -0
  116. data/lib/payzu-pix/models/enqueued_callback_enqueued.rb +170 -0
  117. data/lib/payzu-pix/models/enqueued_callback_item.rb +190 -0
  118. data/lib/payzu-pix/models/error_response.rb +336 -0
  119. data/lib/payzu-pix/models/get_user200_response.rb +334 -0
  120. data/lib/payzu-pix/models/get_user200_response_daily_withdraw_limit.rb +180 -0
  121. data/lib/payzu-pix/models/get_user200_response_service_fee.rb +199 -0
  122. data/lib/payzu-pix/models/get_user_balance200_response.rb +158 -0
  123. data/lib/payzu-pix/models/get_user_transaction_by_id200_response.rb +595 -0
  124. data/lib/payzu-pix/models/get_user_transaction_by_id200_response_all_of_callback_log_inner.rb +188 -0
  125. data/lib/payzu-pix/models/get_user_transaction_by_id200_response_all_of_infraction_inner.rb +202 -0
  126. data/lib/payzu-pix/models/get_user_transactions200_response.rb +170 -0
  127. data/lib/payzu-pix/models/infraction_detail.rb +293 -0
  128. data/lib/payzu-pix/models/infraction_detail_transaction.rb +213 -0
  129. data/lib/payzu-pix/models/infraction_list_response.rb +159 -0
  130. data/lib/payzu-pix/models/infraction_list_response_pagination.rb +179 -0
  131. data/lib/payzu-pix/models/list_user_reports200_response.rb +170 -0
  132. data/lib/payzu-pix/models/pix_key_info.rb +263 -0
  133. data/lib/payzu-pix/models/post_internal_transfer_request.rb +377 -0
  134. data/lib/payzu-pix/models/post_pix_qrcode_read_request.rb +174 -0
  135. data/lib/payzu-pix/models/post_pix_request.rb +382 -0
  136. data/lib/payzu-pix/models/post_user_report_request.rb +238 -0
  137. data/lib/payzu-pix/models/post_withdraw_qrcode_request.rb +302 -0
  138. data/lib/payzu-pix/models/post_withdraw_request.rb +350 -0
  139. data/lib/payzu-pix/models/proof_response.rb +148 -0
  140. data/lib/payzu-pix/models/qr_code_read_response.rb +283 -0
  141. data/lib/payzu-pix/models/refund.rb +257 -0
  142. data/lib/payzu-pix/models/refund_request.rb +215 -0
  143. data/lib/payzu-pix/models/report_job.rb +234 -0
  144. data/lib/payzu-pix/models/report_job_accepted.rb +237 -0
  145. data/lib/payzu-pix/models/report_job_detail.rb +237 -0
  146. data/lib/payzu-pix/models/resend_user_callback_single200_response.rb +148 -0
  147. data/lib/payzu-pix/models/resend_user_callbacks200_response.rb +158 -0
  148. data/lib/payzu-pix/models/resend_user_callbacks_request.rb +262 -0
  149. data/lib/payzu-pix/models/resend_webhook_callbacks_request.rb +274 -0
  150. data/lib/payzu-pix/models/rotate_callback_secret_response.rb +148 -0
  151. data/lib/payzu-pix/models/rotate_secret_response.rb +148 -0
  152. data/lib/payzu-pix/models/sent_webhook_detail.rb +261 -0
  153. data/lib/payzu-pix/models/sent_webhook_detail_response.rb +164 -0
  154. data/lib/payzu-pix/models/sent_webhooks_quantity.rb +148 -0
  155. data/lib/payzu-pix/models/summary.rb +188 -0
  156. data/lib/payzu-pix/models/summary_block.rb +179 -0
  157. data/lib/payzu-pix/models/summary_block_grouped_inner.rb +158 -0
  158. data/lib/payzu-pix/models/summary_block_statuses.rb +189 -0
  159. data/lib/payzu-pix/models/summary_status.rb +168 -0
  160. data/lib/payzu-pix/models/transaction.rb +588 -0
  161. data/lib/payzu-pix/models/transaction_with_refunds.rb +583 -0
  162. data/lib/payzu-pix/models/webhook.rb +210 -0
  163. data/lib/payzu-pix/models/webhook_create_request.rb +201 -0
  164. data/lib/payzu-pix/models/webhook_event_type.rb +47 -0
  165. data/lib/payzu-pix/models/webhook_list_response.rb +150 -0
  166. data/lib/payzu-pix/models/webhook_update_request.rb +171 -0
  167. data/lib/payzu-pix/models/webhook_with_secret.rb +220 -0
  168. data/lib/payzu-pix/version.rb +15 -0
  169. data/lib/payzu-pix.rb +119 -0
  170. data/payzu-pix.gemspec +41 -0
  171. data/spec/spec_helper.rb +111 -0
  172. metadata +283 -0
@@ -0,0 +1,413 @@
1
+ # PayZuPix::InfractionsApi
2
+
3
+ All URIs are relative to *https://api.payzu.processamento.com/v1*
4
+
5
+ | Method | HTTP request | Description |
6
+ | ------ | ------------ | ----------- |
7
+ | [**get_infractions**](InfractionsApi.md#get_infractions) | **GET** /user/infractions | List Infractions |
8
+ | [**get_infractions_by_id**](InfractionsApi.md#get_infractions_by_id) | **GET** /user/infractions/{id} | Get Infraction |
9
+ | [**get_infractions_defense_by_id**](InfractionsApi.md#get_infractions_defense_by_id) | **GET** /user/infractions/{infractionId}/defenses/{defenseId} | Get Defense |
10
+ | [**get_infractions_defenses**](InfractionsApi.md#get_infractions_defenses) | **GET** /user/infractions/{id}/defenses | List Defenses |
11
+ | [**post_infractions_defense**](InfractionsApi.md#post_infractions_defense) | **POST** /user/infractions/{id}/defenses | Create Defense |
12
+
13
+
14
+ ## get_infractions
15
+
16
+ > <InfractionListResponse> get_infractions(opts)
17
+
18
+ List Infractions
19
+
20
+ List all infractions for the authenticated user with pagination and filters.
21
+
22
+ ### Examples
23
+
24
+ ```ruby
25
+ require 'time'
26
+ require 'payzu-pix'
27
+ # setup authorization
28
+ PayZuPix.configure do |config|
29
+ # Configure Bearer authorization: BearerAuth
30
+ config.access_token = 'YOUR_BEARER_TOKEN'
31
+ end
32
+
33
+ api_instance = PayZuPix::InfractionsApi.new
34
+ opts = {
35
+ page: 56, # Integer | Page number.
36
+ limit: 56, # Integer | Items per page.
37
+ status: 'OPEN', # String | Comma-separated InfractionStatus (WAITING_PSP,CLOSED,OPEN,CANCELLED,ACKNOWLEDGED,DEFENDED,ANSWERED,WAITING_ADJUSTMENTS)
38
+ type: 'REFUND_REQUEST', # String | Comma-separated InfractionType (REFUND_REQUEST,FRAUD,REFUND_CANCELLED)
39
+ end_to_end_id: 'E00000000202508172159kZ8dQ2mNb1x', # String | End-to-end ID of the Pix.
40
+ transaction_id: 'PAYZU20260814T6NX1CV9MK000000', # String | Transaction ID.
41
+ amount_min: 10.9, # Float | Minimum amount.
42
+ amount_max: 500, # Float | Maximum amount.
43
+ analysis_result: 'AGREED', # String | Comma-separated AnalysisResult: AGREED, DISAGREED.
44
+ reported_by: 'DEBITED_PARTICIPANT', # String | Comma-separated ReportedType (DEBITED_PARTICIPANT,CREDITED_PARTICIPANT)
45
+ participant_document: '12345678901', # String | CPF or CNPJ of the participant.
46
+ participant_name: 'John Doe', # String | Name of the participant.
47
+ sort_by: 'createdAt', # String | Sort field.
48
+ sort_direction: 'asc', # String | Sort direction.
49
+ reported_at_from: Time.parse('2026-08-01'), # Time | Filter: reportedAt from.
50
+ reported_at_to: Time.parse('2026-08-31'), # Time | Filter: reportedAt up to.
51
+ created_at_from: Time.parse('2026-08-01'), # Time | Filter: createdAt from.
52
+ created_at_to: Time.parse('2026-08-31'), # Time | Filter: createdAt up to.
53
+ expires_at_from: Time.parse('2026-08-01'), # Time | Filter: expiresAt from.
54
+ expires_at_to: Time.parse('2026-08-31'), # Time | Filter: expiresAt up to.
55
+ updated_at_from: Time.parse('2026-08-01'), # Time | Filter: updatedAt from.
56
+ updated_at_to: Time.parse('2026-08-31'), # Time | Filter: updatedAt up to.
57
+ id: 'cm3w7n2p60002q8f2h7d3z5cf', # String | Filter by infraction ID.
58
+ protocol: '2f8b1c4a-9d33-4e57-b0aa-7c6d5e4f3210' # String | Filter by protocol.
59
+ }
60
+
61
+ begin
62
+ # List Infractions
63
+ result = api_instance.get_infractions(opts)
64
+ p result
65
+ rescue PayZuPix::ApiError => e
66
+ puts "Error when calling InfractionsApi->get_infractions: #{e}"
67
+ end
68
+ ```
69
+
70
+ #### Using the get_infractions_with_http_info variant
71
+
72
+ This returns an Array which contains the response data, status code and headers.
73
+
74
+ > <Array(<InfractionListResponse>, Integer, Hash)> get_infractions_with_http_info(opts)
75
+
76
+ ```ruby
77
+ begin
78
+ # List Infractions
79
+ data, status_code, headers = api_instance.get_infractions_with_http_info(opts)
80
+ p status_code # => 2xx
81
+ p headers # => { ... }
82
+ p data # => <InfractionListResponse>
83
+ rescue PayZuPix::ApiError => e
84
+ puts "Error when calling InfractionsApi->get_infractions_with_http_info: #{e}"
85
+ end
86
+ ```
87
+
88
+ ### Parameters
89
+
90
+ | Name | Type | Description | Notes |
91
+ | ---- | ---- | ----------- | ----- |
92
+ | **page** | **Integer** | Page number. | [optional][default to 1] |
93
+ | **limit** | **Integer** | Items per page. | [optional][default to 10] |
94
+ | **status** | **String** | Comma-separated InfractionStatus (WAITING_PSP,CLOSED,OPEN,CANCELLED,ACKNOWLEDGED,DEFENDED,ANSWERED,WAITING_ADJUSTMENTS) | [optional] |
95
+ | **type** | **String** | Comma-separated InfractionType (REFUND_REQUEST,FRAUD,REFUND_CANCELLED) | [optional] |
96
+ | **end_to_end_id** | **String** | End-to-end ID of the Pix. | [optional] |
97
+ | **transaction_id** | **String** | Transaction ID. | [optional] |
98
+ | **amount_min** | **Float** | Minimum amount. | [optional] |
99
+ | **amount_max** | **Float** | Maximum amount. | [optional] |
100
+ | **analysis_result** | **String** | Comma-separated AnalysisResult: AGREED, DISAGREED. | [optional] |
101
+ | **reported_by** | **String** | Comma-separated ReportedType (DEBITED_PARTICIPANT,CREDITED_PARTICIPANT) | [optional] |
102
+ | **participant_document** | **String** | CPF or CNPJ of the participant. | [optional] |
103
+ | **participant_name** | **String** | Name of the participant. | [optional] |
104
+ | **sort_by** | **String** | Sort field. | [optional][default to &#39;createdAt&#39;] |
105
+ | **sort_direction** | **String** | Sort direction. | [optional][default to &#39;desc&#39;] |
106
+ | **reported_at_from** | **Time** | Filter: reportedAt from. | [optional] |
107
+ | **reported_at_to** | **Time** | Filter: reportedAt up to. | [optional] |
108
+ | **created_at_from** | **Time** | Filter: createdAt from. | [optional] |
109
+ | **created_at_to** | **Time** | Filter: createdAt up to. | [optional] |
110
+ | **expires_at_from** | **Time** | Filter: expiresAt from. | [optional] |
111
+ | **expires_at_to** | **Time** | Filter: expiresAt up to. | [optional] |
112
+ | **updated_at_from** | **Time** | Filter: updatedAt from. | [optional] |
113
+ | **updated_at_to** | **Time** | Filter: updatedAt up to. | [optional] |
114
+ | **id** | **String** | Filter by infraction ID. | [optional] |
115
+ | **protocol** | **String** | Filter by protocol. | [optional] |
116
+
117
+ ### Return type
118
+
119
+ [**InfractionListResponse**](InfractionListResponse.md)
120
+
121
+ ### Authorization
122
+
123
+ [BearerAuth](../README.md#BearerAuth)
124
+
125
+ ### HTTP request headers
126
+
127
+ - **Content-Type**: Not defined
128
+ - **Accept**: application/json
129
+
130
+
131
+ ## get_infractions_by_id
132
+
133
+ > <InfractionDetail> get_infractions_by_id(id)
134
+
135
+ Get Infraction
136
+
137
+ Get a specific infraction by ID.
138
+
139
+ ### Examples
140
+
141
+ ```ruby
142
+ require 'time'
143
+ require 'payzu-pix'
144
+ # setup authorization
145
+ PayZuPix.configure do |config|
146
+ # Configure Bearer authorization: BearerAuth
147
+ config.access_token = 'YOUR_BEARER_TOKEN'
148
+ end
149
+
150
+ api_instance = PayZuPix::InfractionsApi.new
151
+ id = 'cm3w7n2p60002q8f2h7d3z5cf' # String | Infraction ID
152
+
153
+ begin
154
+ # Get Infraction
155
+ result = api_instance.get_infractions_by_id(id)
156
+ p result
157
+ rescue PayZuPix::ApiError => e
158
+ puts "Error when calling InfractionsApi->get_infractions_by_id: #{e}"
159
+ end
160
+ ```
161
+
162
+ #### Using the get_infractions_by_id_with_http_info variant
163
+
164
+ This returns an Array which contains the response data, status code and headers.
165
+
166
+ > <Array(<InfractionDetail>, Integer, Hash)> get_infractions_by_id_with_http_info(id)
167
+
168
+ ```ruby
169
+ begin
170
+ # Get Infraction
171
+ data, status_code, headers = api_instance.get_infractions_by_id_with_http_info(id)
172
+ p status_code # => 2xx
173
+ p headers # => { ... }
174
+ p data # => <InfractionDetail>
175
+ rescue PayZuPix::ApiError => e
176
+ puts "Error when calling InfractionsApi->get_infractions_by_id_with_http_info: #{e}"
177
+ end
178
+ ```
179
+
180
+ ### Parameters
181
+
182
+ | Name | Type | Description | Notes |
183
+ | ---- | ---- | ----------- | ----- |
184
+ | **id** | **String** | Infraction ID | |
185
+
186
+ ### Return type
187
+
188
+ [**InfractionDetail**](InfractionDetail.md)
189
+
190
+ ### Authorization
191
+
192
+ [BearerAuth](../README.md#BearerAuth)
193
+
194
+ ### HTTP request headers
195
+
196
+ - **Content-Type**: Not defined
197
+ - **Accept**: application/json
198
+
199
+
200
+ ## get_infractions_defense_by_id
201
+
202
+ > <Defense> get_infractions_defense_by_id(infraction_id, defense_id)
203
+
204
+ Get Defense
205
+
206
+ Get a specific defense for an infraction.
207
+
208
+ ### Examples
209
+
210
+ ```ruby
211
+ require 'time'
212
+ require 'payzu-pix'
213
+ # setup authorization
214
+ PayZuPix.configure do |config|
215
+ # Configure Bearer authorization: BearerAuth
216
+ config.access_token = 'YOUR_BEARER_TOKEN'
217
+ end
218
+
219
+ api_instance = PayZuPix::InfractionsApi.new
220
+ infraction_id = 'cm3w7n2p60002q8f2h7d3z5cf' # String | Infraction ID
221
+ defense_id = 'cm3w7p5r90003q8f2j8e4a6dg' # String | Defense ID
222
+
223
+ begin
224
+ # Get Defense
225
+ result = api_instance.get_infractions_defense_by_id(infraction_id, defense_id)
226
+ p result
227
+ rescue PayZuPix::ApiError => e
228
+ puts "Error when calling InfractionsApi->get_infractions_defense_by_id: #{e}"
229
+ end
230
+ ```
231
+
232
+ #### Using the get_infractions_defense_by_id_with_http_info variant
233
+
234
+ This returns an Array which contains the response data, status code and headers.
235
+
236
+ > <Array(<Defense>, Integer, Hash)> get_infractions_defense_by_id_with_http_info(infraction_id, defense_id)
237
+
238
+ ```ruby
239
+ begin
240
+ # Get Defense
241
+ data, status_code, headers = api_instance.get_infractions_defense_by_id_with_http_info(infraction_id, defense_id)
242
+ p status_code # => 2xx
243
+ p headers # => { ... }
244
+ p data # => <Defense>
245
+ rescue PayZuPix::ApiError => e
246
+ puts "Error when calling InfractionsApi->get_infractions_defense_by_id_with_http_info: #{e}"
247
+ end
248
+ ```
249
+
250
+ ### Parameters
251
+
252
+ | Name | Type | Description | Notes |
253
+ | ---- | ---- | ----------- | ----- |
254
+ | **infraction_id** | **String** | Infraction ID | |
255
+ | **defense_id** | **String** | Defense ID | |
256
+
257
+ ### Return type
258
+
259
+ [**Defense**](Defense.md)
260
+
261
+ ### Authorization
262
+
263
+ [BearerAuth](../README.md#BearerAuth)
264
+
265
+ ### HTTP request headers
266
+
267
+ - **Content-Type**: Not defined
268
+ - **Accept**: application/json
269
+
270
+
271
+ ## get_infractions_defenses
272
+
273
+ > <Array<Defense>> get_infractions_defenses(id)
274
+
275
+ List Defenses
276
+
277
+ List all defenses for a specific infraction.
278
+
279
+ ### Examples
280
+
281
+ ```ruby
282
+ require 'time'
283
+ require 'payzu-pix'
284
+ # setup authorization
285
+ PayZuPix.configure do |config|
286
+ # Configure Bearer authorization: BearerAuth
287
+ config.access_token = 'YOUR_BEARER_TOKEN'
288
+ end
289
+
290
+ api_instance = PayZuPix::InfractionsApi.new
291
+ id = 'cm3w7n2p60002q8f2h7d3z5cf' # String | Infraction ID
292
+
293
+ begin
294
+ # List Defenses
295
+ result = api_instance.get_infractions_defenses(id)
296
+ p result
297
+ rescue PayZuPix::ApiError => e
298
+ puts "Error when calling InfractionsApi->get_infractions_defenses: #{e}"
299
+ end
300
+ ```
301
+
302
+ #### Using the get_infractions_defenses_with_http_info variant
303
+
304
+ This returns an Array which contains the response data, status code and headers.
305
+
306
+ > <Array(<Array<Defense>>, Integer, Hash)> get_infractions_defenses_with_http_info(id)
307
+
308
+ ```ruby
309
+ begin
310
+ # List Defenses
311
+ data, status_code, headers = api_instance.get_infractions_defenses_with_http_info(id)
312
+ p status_code # => 2xx
313
+ p headers # => { ... }
314
+ p data # => <Array<Defense>>
315
+ rescue PayZuPix::ApiError => e
316
+ puts "Error when calling InfractionsApi->get_infractions_defenses_with_http_info: #{e}"
317
+ end
318
+ ```
319
+
320
+ ### Parameters
321
+
322
+ | Name | Type | Description | Notes |
323
+ | ---- | ---- | ----------- | ----- |
324
+ | **id** | **String** | Infraction ID | |
325
+
326
+ ### Return type
327
+
328
+ [**Array&lt;Defense&gt;**](Defense.md)
329
+
330
+ ### Authorization
331
+
332
+ [BearerAuth](../README.md#BearerAuth)
333
+
334
+ ### HTTP request headers
335
+
336
+ - **Content-Type**: Not defined
337
+ - **Accept**: application/json
338
+
339
+
340
+ ## post_infractions_defense
341
+
342
+ > <Defense> post_infractions_defense(id, defense, opts)
343
+
344
+ Create Defense
345
+
346
+ Create a defense for a specific infraction.
347
+
348
+ ### Examples
349
+
350
+ ```ruby
351
+ require 'time'
352
+ require 'payzu-pix'
353
+ # setup authorization
354
+ PayZuPix.configure do |config|
355
+ # Configure Bearer authorization: BearerAuth
356
+ config.access_token = 'YOUR_BEARER_TOKEN'
357
+ end
358
+
359
+ api_instance = PayZuPix::InfractionsApi.new
360
+ id = 'cm3w7n2p60002q8f2h7d3z5cf' # String | Infraction ID
361
+ defense = 'defense_example' # String | Defense text (max: 1000 characters)
362
+ opts = {
363
+ files: [File.new('/path/to/some/file')] # Array<File> | Evidence files: up to 5 files, 10 MB each and 10 MB in total. Files .exe, .msi, .bat, .sh and .cmd are rejected.
364
+ }
365
+
366
+ begin
367
+ # Create Defense
368
+ result = api_instance.post_infractions_defense(id, defense, opts)
369
+ p result
370
+ rescue PayZuPix::ApiError => e
371
+ puts "Error when calling InfractionsApi->post_infractions_defense: #{e}"
372
+ end
373
+ ```
374
+
375
+ #### Using the post_infractions_defense_with_http_info variant
376
+
377
+ This returns an Array which contains the response data, status code and headers.
378
+
379
+ > <Array(<Defense>, Integer, Hash)> post_infractions_defense_with_http_info(id, defense, opts)
380
+
381
+ ```ruby
382
+ begin
383
+ # Create Defense
384
+ data, status_code, headers = api_instance.post_infractions_defense_with_http_info(id, defense, opts)
385
+ p status_code # => 2xx
386
+ p headers # => { ... }
387
+ p data # => <Defense>
388
+ rescue PayZuPix::ApiError => e
389
+ puts "Error when calling InfractionsApi->post_infractions_defense_with_http_info: #{e}"
390
+ end
391
+ ```
392
+
393
+ ### Parameters
394
+
395
+ | Name | Type | Description | Notes |
396
+ | ---- | ---- | ----------- | ----- |
397
+ | **id** | **String** | Infraction ID | |
398
+ | **defense** | **String** | Defense text (max: 1000 characters) | |
399
+ | **files** | **Array&lt;File&gt;** | Evidence files: up to 5 files, 10 MB each and 10 MB in total. Files .exe, .msi, .bat, .sh and .cmd are rejected. | [optional] |
400
+
401
+ ### Return type
402
+
403
+ [**Defense**](Defense.md)
404
+
405
+ ### Authorization
406
+
407
+ [BearerAuth](../README.md#BearerAuth)
408
+
409
+ ### HTTP request headers
410
+
411
+ - **Content-Type**: multipart/form-data
412
+ - **Accept**: application/json
413
+
@@ -0,0 +1,153 @@
1
+ # PayZuPix::InternalTransferApi
2
+
3
+ All URIs are relative to *https://api.payzu.processamento.com/v1*
4
+
5
+ | Method | HTTP request | Description |
6
+ | ------ | ------------ | ----------- |
7
+ | [**get_internal_transfer**](InternalTransferApi.md#get_internal_transfer) | **GET** /internal-transfer | Get internal transfer |
8
+ | [**post_internal_transfer**](InternalTransferApi.md#post_internal_transfer) | **POST** /internal-transfer | Create internal transfer |
9
+
10
+
11
+ ## get_internal_transfer
12
+
13
+ > <Transaction> get_internal_transfer(opts)
14
+
15
+ Get internal transfer
16
+
17
+ Returns the details of an internal transfer. Provide at least one of `id` or `clientReference` (`virtualAccount` is also accepted). If more than one is provided, all are applied as filters (AND). Token permission: `WITHDRAW`.
18
+
19
+ ### Examples
20
+
21
+ ```ruby
22
+ require 'time'
23
+ require 'payzu-pix'
24
+ # setup authorization
25
+ PayZuPix.configure do |config|
26
+ # Configure Bearer authorization: BearerAuth
27
+ config.access_token = 'YOUR_BEARER_TOKEN'
28
+ end
29
+
30
+ api_instance = PayZuPix::InternalTransferApi.new
31
+ opts = {
32
+ id: 'PAYZU20260814T6NX1CV9MK000000', # String | Transaction ID
33
+ client_reference: 'order_12345', # String | External reference
34
+ virtual_account: 'loja-centro-01' # String | Virtual sub-account (up to 50 characters) used at creation. Accepted as an alternative lookup key.
35
+ }
36
+
37
+ begin
38
+ # Get internal transfer
39
+ result = api_instance.get_internal_transfer(opts)
40
+ p result
41
+ rescue PayZuPix::ApiError => e
42
+ puts "Error when calling InternalTransferApi->get_internal_transfer: #{e}"
43
+ end
44
+ ```
45
+
46
+ #### Using the get_internal_transfer_with_http_info variant
47
+
48
+ This returns an Array which contains the response data, status code and headers.
49
+
50
+ > <Array(<Transaction>, Integer, Hash)> get_internal_transfer_with_http_info(opts)
51
+
52
+ ```ruby
53
+ begin
54
+ # Get internal transfer
55
+ data, status_code, headers = api_instance.get_internal_transfer_with_http_info(opts)
56
+ p status_code # => 2xx
57
+ p headers # => { ... }
58
+ p data # => <Transaction>
59
+ rescue PayZuPix::ApiError => e
60
+ puts "Error when calling InternalTransferApi->get_internal_transfer_with_http_info: #{e}"
61
+ end
62
+ ```
63
+
64
+ ### Parameters
65
+
66
+ | Name | Type | Description | Notes |
67
+ | ---- | ---- | ----------- | ----- |
68
+ | **id** | **String** | Transaction ID | [optional] |
69
+ | **client_reference** | **String** | External reference | [optional] |
70
+ | **virtual_account** | **String** | Virtual sub-account (up to 50 characters) used at creation. Accepted as an alternative lookup key. | [optional] |
71
+
72
+ ### Return type
73
+
74
+ [**Transaction**](Transaction.md)
75
+
76
+ ### Authorization
77
+
78
+ [BearerAuth](../README.md#BearerAuth)
79
+
80
+ ### HTTP request headers
81
+
82
+ - **Content-Type**: Not defined
83
+ - **Accept**: application/json
84
+
85
+
86
+ ## post_internal_transfer
87
+
88
+ > <Transaction> post_internal_transfer(post_internal_transfer_request)
89
+
90
+ Create internal transfer
91
+
92
+ Send funds to another PayZu account using its 6-digit accountNumber. Settles instantly within PayZu. Token permission: `WITHDRAW`.
93
+
94
+ ### Examples
95
+
96
+ ```ruby
97
+ require 'time'
98
+ require 'payzu-pix'
99
+ # setup authorization
100
+ PayZuPix.configure do |config|
101
+ # Configure Bearer authorization: BearerAuth
102
+ config.access_token = 'YOUR_BEARER_TOKEN'
103
+ end
104
+
105
+ api_instance = PayZuPix::InternalTransferApi.new
106
+ post_internal_transfer_request = PayZuPix::PostInternalTransferRequest.new({payer_account_number: '000000', receiver_account_number: '987654', amount: 100.5}) # PostInternalTransferRequest |
107
+
108
+ begin
109
+ # Create internal transfer
110
+ result = api_instance.post_internal_transfer(post_internal_transfer_request)
111
+ p result
112
+ rescue PayZuPix::ApiError => e
113
+ puts "Error when calling InternalTransferApi->post_internal_transfer: #{e}"
114
+ end
115
+ ```
116
+
117
+ #### Using the post_internal_transfer_with_http_info variant
118
+
119
+ This returns an Array which contains the response data, status code and headers.
120
+
121
+ > <Array(<Transaction>, Integer, Hash)> post_internal_transfer_with_http_info(post_internal_transfer_request)
122
+
123
+ ```ruby
124
+ begin
125
+ # Create internal transfer
126
+ data, status_code, headers = api_instance.post_internal_transfer_with_http_info(post_internal_transfer_request)
127
+ p status_code # => 2xx
128
+ p headers # => { ... }
129
+ p data # => <Transaction>
130
+ rescue PayZuPix::ApiError => e
131
+ puts "Error when calling InternalTransferApi->post_internal_transfer_with_http_info: #{e}"
132
+ end
133
+ ```
134
+
135
+ ### Parameters
136
+
137
+ | Name | Type | Description | Notes |
138
+ | ---- | ---- | ----------- | ----- |
139
+ | **post_internal_transfer_request** | [**PostInternalTransferRequest**](PostInternalTransferRequest.md) | | |
140
+
141
+ ### Return type
142
+
143
+ [**Transaction**](Transaction.md)
144
+
145
+ ### Authorization
146
+
147
+ [BearerAuth](../README.md#BearerAuth)
148
+
149
+ ### HTTP request headers
150
+
151
+ - **Content-Type**: application/json
152
+ - **Accept**: application/json
153
+