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,217 @@
1
+ # PayZuPix::KeysAndDICTApi
2
+
3
+ All URIs are relative to *https://api.payzu.processamento.com/v1*
4
+
5
+ | Method | HTTP request | Description |
6
+ | ------ | ------------ | ----------- |
7
+ | [**get_pix_key**](KeysAndDICTApi.md#get_pix_key) | **GET** /pix/key | Pix key lookup (DICT) |
8
+ | [**get_user_dict**](KeysAndDICTApi.md#get_user_dict) | **GET** /user/dict | Resolve DICT key |
9
+ | [**post_pix_qrcode_read**](KeysAndDICTApi.md#post_pix_qrcode_read) | **POST** /pix/qrcode/read | Read QR Code |
10
+
11
+
12
+ ## get_pix_key
13
+
14
+ > <PixKeyInfo> get_pix_key(pix_key)
15
+
16
+ Pix key lookup (DICT)
17
+
18
+ Query the DICT (Diretório de Identificadores de Contas Transacionais) to retrieve information about a Pix key before sending a payment. Returns the key owner's details and associated financial institution. Token permission: `DEPOSIT` or `WITHDRAW`.
19
+
20
+ ### Examples
21
+
22
+ ```ruby
23
+ require 'time'
24
+ require 'payzu-pix'
25
+ # setup authorization
26
+ PayZuPix.configure do |config|
27
+ # Configure Bearer authorization: BearerAuth
28
+ config.access_token = 'YOUR_BEARER_TOKEN'
29
+ end
30
+
31
+ api_instance = PayZuPix::KeysAndDICTApi.new
32
+ pix_key = 'example@payzu.com.br' # String | The Pix key to lookup (CPF, CNPJ, email, phone, or EVP).
33
+
34
+ begin
35
+ # Pix key lookup (DICT)
36
+ result = api_instance.get_pix_key(pix_key)
37
+ p result
38
+ rescue PayZuPix::ApiError => e
39
+ puts "Error when calling KeysAndDICTApi->get_pix_key: #{e}"
40
+ end
41
+ ```
42
+
43
+ #### Using the get_pix_key_with_http_info variant
44
+
45
+ This returns an Array which contains the response data, status code and headers.
46
+
47
+ > <Array(<PixKeyInfo>, Integer, Hash)> get_pix_key_with_http_info(pix_key)
48
+
49
+ ```ruby
50
+ begin
51
+ # Pix key lookup (DICT)
52
+ data, status_code, headers = api_instance.get_pix_key_with_http_info(pix_key)
53
+ p status_code # => 2xx
54
+ p headers # => { ... }
55
+ p data # => <PixKeyInfo>
56
+ rescue PayZuPix::ApiError => e
57
+ puts "Error when calling KeysAndDICTApi->get_pix_key_with_http_info: #{e}"
58
+ end
59
+ ```
60
+
61
+ ### Parameters
62
+
63
+ | Name | Type | Description | Notes |
64
+ | ---- | ---- | ----------- | ----- |
65
+ | **pix_key** | **String** | The Pix key to lookup (CPF, CNPJ, email, phone, or EVP). | |
66
+
67
+ ### Return type
68
+
69
+ [**PixKeyInfo**](PixKeyInfo.md)
70
+
71
+ ### Authorization
72
+
73
+ [BearerAuth](../README.md#BearerAuth)
74
+
75
+ ### HTTP request headers
76
+
77
+ - **Content-Type**: Not defined
78
+ - **Accept**: application/json
79
+
80
+
81
+ ## get_user_dict
82
+
83
+ > <DictConsultResponse> get_user_dict(key)
84
+
85
+ Resolve DICT key
86
+
87
+ Resolves a Pix key (DICT) to the holder details before paying. Requires WITHDRAW scope.
88
+
89
+ ### Examples
90
+
91
+ ```ruby
92
+ require 'time'
93
+ require 'payzu-pix'
94
+ # setup authorization
95
+ PayZuPix.configure do |config|
96
+ # Configure Bearer authorization: BearerAuth
97
+ config.access_token = 'YOUR_BEARER_TOKEN'
98
+ end
99
+
100
+ api_instance = PayZuPix::KeysAndDICTApi.new
101
+ key = 'john.doe@example.com' # String | Pix key to look up (CPF, CNPJ, email, phone or EVP).
102
+
103
+ begin
104
+ # Resolve DICT key
105
+ result = api_instance.get_user_dict(key)
106
+ p result
107
+ rescue PayZuPix::ApiError => e
108
+ puts "Error when calling KeysAndDICTApi->get_user_dict: #{e}"
109
+ end
110
+ ```
111
+
112
+ #### Using the get_user_dict_with_http_info variant
113
+
114
+ This returns an Array which contains the response data, status code and headers.
115
+
116
+ > <Array(<DictConsultResponse>, Integer, Hash)> get_user_dict_with_http_info(key)
117
+
118
+ ```ruby
119
+ begin
120
+ # Resolve DICT key
121
+ data, status_code, headers = api_instance.get_user_dict_with_http_info(key)
122
+ p status_code # => 2xx
123
+ p headers # => { ... }
124
+ p data # => <DictConsultResponse>
125
+ rescue PayZuPix::ApiError => e
126
+ puts "Error when calling KeysAndDICTApi->get_user_dict_with_http_info: #{e}"
127
+ end
128
+ ```
129
+
130
+ ### Parameters
131
+
132
+ | Name | Type | Description | Notes |
133
+ | ---- | ---- | ----------- | ----- |
134
+ | **key** | **String** | Pix key to look up (CPF, CNPJ, email, phone or EVP). | |
135
+
136
+ ### Return type
137
+
138
+ [**DictConsultResponse**](DictConsultResponse.md)
139
+
140
+ ### Authorization
141
+
142
+ [BearerAuth](../README.md#BearerAuth)
143
+
144
+ ### HTTP request headers
145
+
146
+ - **Content-Type**: Not defined
147
+ - **Accept**: application/json
148
+
149
+
150
+ ## post_pix_qrcode_read
151
+
152
+ > <QRCodeReadResponse> post_pix_qrcode_read(post_pix_qrcode_read_request)
153
+
154
+ Read QR Code
155
+
156
+ Decode and extract information from a Pix QR Code (EMV format) before making a payment. Returns the parsed data including receiver details, amount (if present), and other QR Code metadata. PayZu processes both dynamic and static QR Codes. Token permission: `DEPOSIT` or `WITHDRAW`.
157
+
158
+ ### Examples
159
+
160
+ ```ruby
161
+ require 'time'
162
+ require 'payzu-pix'
163
+ # setup authorization
164
+ PayZuPix.configure do |config|
165
+ # Configure Bearer authorization: BearerAuth
166
+ config.access_token = 'YOUR_BEARER_TOKEN'
167
+ end
168
+
169
+ api_instance = PayZuPix::KeysAndDICTApi.new
170
+ post_pix_qrcode_read_request = PayZuPix::PostPixQrcodeReadRequest.new({emv: '00020101021226770014br.gov.bcb.pix2555api.payzu/pix/qr/v2/013318d6-2d7d-479e-8bb3-b5c7b9da688c5204000053039865802BR5916PAYZU 6007SAOPAULO6217051320260118278956304EC55'}) # PostPixQrcodeReadRequest |
171
+
172
+ begin
173
+ # Read QR Code
174
+ result = api_instance.post_pix_qrcode_read(post_pix_qrcode_read_request)
175
+ p result
176
+ rescue PayZuPix::ApiError => e
177
+ puts "Error when calling KeysAndDICTApi->post_pix_qrcode_read: #{e}"
178
+ end
179
+ ```
180
+
181
+ #### Using the post_pix_qrcode_read_with_http_info variant
182
+
183
+ This returns an Array which contains the response data, status code and headers.
184
+
185
+ > <Array(<QRCodeReadResponse>, Integer, Hash)> post_pix_qrcode_read_with_http_info(post_pix_qrcode_read_request)
186
+
187
+ ```ruby
188
+ begin
189
+ # Read QR Code
190
+ data, status_code, headers = api_instance.post_pix_qrcode_read_with_http_info(post_pix_qrcode_read_request)
191
+ p status_code # => 2xx
192
+ p headers # => { ... }
193
+ p data # => <QRCodeReadResponse>
194
+ rescue PayZuPix::ApiError => e
195
+ puts "Error when calling KeysAndDICTApi->post_pix_qrcode_read_with_http_info: #{e}"
196
+ end
197
+ ```
198
+
199
+ ### Parameters
200
+
201
+ | Name | Type | Description | Notes |
202
+ | ---- | ---- | ----------- | ----- |
203
+ | **post_pix_qrcode_read_request** | [**PostPixQrcodeReadRequest**](PostPixQrcodeReadRequest.md) | | |
204
+
205
+ ### Return type
206
+
207
+ [**QRCodeReadResponse**](QRCodeReadResponse.md)
208
+
209
+ ### Authorization
210
+
211
+ [BearerAuth](../README.md#BearerAuth)
212
+
213
+ ### HTTP request headers
214
+
215
+ - **Content-Type**: application/json
216
+ - **Accept**: application/json
217
+
@@ -0,0 +1,22 @@
1
+ # PayZuPix::ListUserReports200Response
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **total** | **Integer** | Number of report requests of the user that match the filters. | [optional] |
8
+ | **pages** | **Integer** | Number of pages for the limit provided, computed from total rounded up. | [optional] |
9
+ | **reports** | [**Array&lt;ReportJob&gt;**](ReportJob.md) | Report requests of the requested page, with id, status and dates. | [optional] |
10
+
11
+ ## Example
12
+
13
+ ```ruby
14
+ require 'payzu-pix'
15
+
16
+ instance = PayZuPix::ListUserReports200Response.new(
17
+ total: null,
18
+ pages: null,
19
+ reports: null
20
+ )
21
+ ```
22
+
@@ -0,0 +1,36 @@
1
+ # PayZuPix::PixKeyInfo
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **pix_key** | **String** | The Pix key that was looked up. | [optional] |
8
+ | **document** | **String** | CPF or CNPJ of the owner (partially masked for privacy). | [optional] |
9
+ | **name** | **String** | Name of the Pix key owner. | [optional] |
10
+ | **branch** | **String** | Bank branch number (masked). | [optional] |
11
+ | **account_number** | **String** | Account number (masked). | [optional] |
12
+ | **person_type** | **String** | Type of person: PF, PJ, or empty when not informed. | [optional] |
13
+ | **account_type** | **String** | Account type returned by DICT, such as CACC, SVGS, TRAN or SLRY. | [optional] |
14
+ | **institution_ispb** | **String** | ISPB code of the financial institution. | [optional] |
15
+ | **institution_code** | **String** | COMPE code of the financial institution. | [optional] |
16
+ | **institution_name** | **String** | Name of the financial institution. | [optional] |
17
+
18
+ ## Example
19
+
20
+ ```ruby
21
+ require 'payzu-pix'
22
+
23
+ instance = PayZuPix::PixKeyInfo.new(
24
+ pix_key: null,
25
+ document: null,
26
+ name: null,
27
+ branch: null,
28
+ account_number: null,
29
+ person_type: null,
30
+ account_type: null,
31
+ institution_ispb: null,
32
+ institution_code: null,
33
+ institution_name: null
34
+ )
35
+ ```
36
+
@@ -0,0 +1,299 @@
1
+ # PayZuPix::PixOperationsApi
2
+
3
+ All URIs are relative to *https://api.payzu.processamento.com/v1*
4
+
5
+ | Method | HTTP request | Description |
6
+ | ------ | ------------ | ----------- |
7
+ | [**get_pix**](PixOperationsApi.md#get_pix) | **GET** /pix | Retrieve Charge |
8
+ | [**get_pix_qrcode**](PixOperationsApi.md#get_pix_qrcode) | **GET** /pix/qr-code/{transactionId} | Render Pix QR code (PNG) |
9
+ | [**get_proof**](PixOperationsApi.md#get_proof) | **GET** /proof/{id} | Get Transaction Receipt |
10
+ | [**post_pix**](PixOperationsApi.md#post_pix) | **POST** /pix | Create Charge (Pix deposit) |
11
+
12
+
13
+ ## get_pix
14
+
15
+ > <Transaction> get_pix(opts)
16
+
17
+ Retrieve Charge
18
+
19
+ Get the latest status and details of a transaction of the account. Provide at least one of `id`, `clientReference`, or `endToEndId` (`virtualAccount` is also accepted). When more than one parameter is provided, they are combined as filters (AND). Token permission: `DEPOSIT`.
20
+
21
+ ### Examples
22
+
23
+ ```ruby
24
+ require 'time'
25
+ require 'payzu-pix'
26
+ # setup authorization
27
+ PayZuPix.configure do |config|
28
+ # Configure Bearer authorization: BearerAuth
29
+ config.access_token = 'YOUR_BEARER_TOKEN'
30
+ end
31
+
32
+ api_instance = PayZuPix::PixOperationsApi.new
33
+ opts = {
34
+ id: 'PAYZU20260811R4TZ8WD1NC000000', # String | Transaction ID.
35
+ client_reference: 'order_12345', # String | External reference provided when creating the charge.
36
+ end_to_end_id: 'E00000000202508172159kZ8dQ2mNb1x', # String | Pix end-to-end ID.
37
+ virtual_account: 'loja-centro-01' # String | Virtual sub-account (up to 50 characters) used at creation. Accepted as an alternative lookup key.
38
+ }
39
+
40
+ begin
41
+ # Retrieve Charge
42
+ result = api_instance.get_pix(opts)
43
+ p result
44
+ rescue PayZuPix::ApiError => e
45
+ puts "Error when calling PixOperationsApi->get_pix: #{e}"
46
+ end
47
+ ```
48
+
49
+ #### Using the get_pix_with_http_info variant
50
+
51
+ This returns an Array which contains the response data, status code and headers.
52
+
53
+ > <Array(<Transaction>, Integer, Hash)> get_pix_with_http_info(opts)
54
+
55
+ ```ruby
56
+ begin
57
+ # Retrieve Charge
58
+ data, status_code, headers = api_instance.get_pix_with_http_info(opts)
59
+ p status_code # => 2xx
60
+ p headers # => { ... }
61
+ p data # => <Transaction>
62
+ rescue PayZuPix::ApiError => e
63
+ puts "Error when calling PixOperationsApi->get_pix_with_http_info: #{e}"
64
+ end
65
+ ```
66
+
67
+ ### Parameters
68
+
69
+ | Name | Type | Description | Notes |
70
+ | ---- | ---- | ----------- | ----- |
71
+ | **id** | **String** | Transaction ID. | [optional] |
72
+ | **client_reference** | **String** | External reference provided when creating the charge. | [optional] |
73
+ | **end_to_end_id** | **String** | Pix end-to-end ID. | [optional] |
74
+ | **virtual_account** | **String** | Virtual sub-account (up to 50 characters) used at creation. Accepted as an alternative lookup key. | [optional] |
75
+
76
+ ### Return type
77
+
78
+ [**Transaction**](Transaction.md)
79
+
80
+ ### Authorization
81
+
82
+ [BearerAuth](../README.md#BearerAuth)
83
+
84
+ ### HTTP request headers
85
+
86
+ - **Content-Type**: Not defined
87
+ - **Accept**: application/json
88
+
89
+
90
+ ## get_pix_qrcode
91
+
92
+ > File get_pix_qrcode(transaction_id)
93
+
94
+ Render Pix QR code (PNG)
95
+
96
+ Render the Pix QR Code of a deposit as a binary PNG image Token permission: `DEPOSIT`.
97
+
98
+ ### Examples
99
+
100
+ ```ruby
101
+ require 'time'
102
+ require 'payzu-pix'
103
+ # setup authorization
104
+ PayZuPix.configure do |config|
105
+ # Configure Bearer authorization: BearerAuth
106
+ config.access_token = 'YOUR_BEARER_TOKEN'
107
+ end
108
+
109
+ api_instance = PayZuPix::PixOperationsApi.new
110
+ transaction_id = 'PAYZU20260814T6NX1CV9MK000000' # String | Transaction ID.
111
+
112
+ begin
113
+ # Render Pix QR code (PNG)
114
+ result = api_instance.get_pix_qrcode(transaction_id)
115
+ p result
116
+ rescue PayZuPix::ApiError => e
117
+ puts "Error when calling PixOperationsApi->get_pix_qrcode: #{e}"
118
+ end
119
+ ```
120
+
121
+ #### Using the get_pix_qrcode_with_http_info variant
122
+
123
+ This returns an Array which contains the response data, status code and headers.
124
+
125
+ > <Array(File, Integer, Hash)> get_pix_qrcode_with_http_info(transaction_id)
126
+
127
+ ```ruby
128
+ begin
129
+ # Render Pix QR code (PNG)
130
+ data, status_code, headers = api_instance.get_pix_qrcode_with_http_info(transaction_id)
131
+ p status_code # => 2xx
132
+ p headers # => { ... }
133
+ p data # => File
134
+ rescue PayZuPix::ApiError => e
135
+ puts "Error when calling PixOperationsApi->get_pix_qrcode_with_http_info: #{e}"
136
+ end
137
+ ```
138
+
139
+ ### Parameters
140
+
141
+ | Name | Type | Description | Notes |
142
+ | ---- | ---- | ----------- | ----- |
143
+ | **transaction_id** | **String** | Transaction ID. | |
144
+
145
+ ### Return type
146
+
147
+ **File**
148
+
149
+ ### Authorization
150
+
151
+ [BearerAuth](../README.md#BearerAuth)
152
+
153
+ ### HTTP request headers
154
+
155
+ - **Content-Type**: Not defined
156
+ - **Accept**: image/png, application/json
157
+
158
+
159
+ ## get_proof
160
+
161
+ > <ProofResponse> get_proof(id, opts)
162
+
163
+ Get Transaction Receipt
164
+
165
+ Returns the transaction receipt. By default (`type=pdf`) the response is the PDF file; with `type=base64` it is JSON with the `base64` field, the PDF as a data URI.
166
+
167
+ ### Examples
168
+
169
+ ```ruby
170
+ require 'time'
171
+ require 'payzu-pix'
172
+ # setup authorization
173
+ PayZuPix.configure do |config|
174
+ # Configure Bearer authorization: BearerAuth
175
+ config.access_token = 'YOUR_BEARER_TOKEN'
176
+ end
177
+
178
+ api_instance = PayZuPix::PixOperationsApi.new
179
+ id = 'PAYZU20260814T6NX1CV9MK000000' # String | Transaction ID.
180
+ opts = {
181
+ type: 'pdf' # String | Return format.
182
+ }
183
+
184
+ begin
185
+ # Get Transaction Receipt
186
+ result = api_instance.get_proof(id, opts)
187
+ p result
188
+ rescue PayZuPix::ApiError => e
189
+ puts "Error when calling PixOperationsApi->get_proof: #{e}"
190
+ end
191
+ ```
192
+
193
+ #### Using the get_proof_with_http_info variant
194
+
195
+ This returns an Array which contains the response data, status code and headers.
196
+
197
+ > <Array(<ProofResponse>, Integer, Hash)> get_proof_with_http_info(id, opts)
198
+
199
+ ```ruby
200
+ begin
201
+ # Get Transaction Receipt
202
+ data, status_code, headers = api_instance.get_proof_with_http_info(id, opts)
203
+ p status_code # => 2xx
204
+ p headers # => { ... }
205
+ p data # => <ProofResponse>
206
+ rescue PayZuPix::ApiError => e
207
+ puts "Error when calling PixOperationsApi->get_proof_with_http_info: #{e}"
208
+ end
209
+ ```
210
+
211
+ ### Parameters
212
+
213
+ | Name | Type | Description | Notes |
214
+ | ---- | ---- | ----------- | ----- |
215
+ | **id** | **String** | Transaction ID. | |
216
+ | **type** | **String** | Return format. | [optional][default to &#39;pdf&#39;] |
217
+
218
+ ### Return type
219
+
220
+ [**ProofResponse**](ProofResponse.md)
221
+
222
+ ### Authorization
223
+
224
+ [BearerAuth](../README.md#BearerAuth)
225
+
226
+ ### HTTP request headers
227
+
228
+ - **Content-Type**: Not defined
229
+ - **Accept**: application/json, application/pdf
230
+
231
+
232
+ ## post_pix
233
+
234
+ > <Transaction> post_pix(post_pix_request)
235
+
236
+ Create Charge (Pix deposit)
237
+
238
+ Create a new Pix **deposit** (charge). Returns QR Code and transaction details. Token permission: `DEPOSIT`.
239
+
240
+ ### Examples
241
+
242
+ ```ruby
243
+ require 'time'
244
+ require 'payzu-pix'
245
+ # setup authorization
246
+ PayZuPix.configure do |config|
247
+ # Configure Bearer authorization: BearerAuth
248
+ config.access_token = 'YOUR_BEARER_TOKEN'
249
+ end
250
+
251
+ api_instance = PayZuPix::PixOperationsApi.new
252
+ post_pix_request = PayZuPix::PostPixRequest.new({amount: 10.9}) # PostPixRequest |
253
+
254
+ begin
255
+ # Create Charge (Pix deposit)
256
+ result = api_instance.post_pix(post_pix_request)
257
+ p result
258
+ rescue PayZuPix::ApiError => e
259
+ puts "Error when calling PixOperationsApi->post_pix: #{e}"
260
+ end
261
+ ```
262
+
263
+ #### Using the post_pix_with_http_info variant
264
+
265
+ This returns an Array which contains the response data, status code and headers.
266
+
267
+ > <Array(<Transaction>, Integer, Hash)> post_pix_with_http_info(post_pix_request)
268
+
269
+ ```ruby
270
+ begin
271
+ # Create Charge (Pix deposit)
272
+ data, status_code, headers = api_instance.post_pix_with_http_info(post_pix_request)
273
+ p status_code # => 2xx
274
+ p headers # => { ... }
275
+ p data # => <Transaction>
276
+ rescue PayZuPix::ApiError => e
277
+ puts "Error when calling PixOperationsApi->post_pix_with_http_info: #{e}"
278
+ end
279
+ ```
280
+
281
+ ### Parameters
282
+
283
+ | Name | Type | Description | Notes |
284
+ | ---- | ---- | ----------- | ----- |
285
+ | **post_pix_request** | [**PostPixRequest**](PostPixRequest.md) | | |
286
+
287
+ ### Return type
288
+
289
+ [**Transaction**](Transaction.md)
290
+
291
+ ### Authorization
292
+
293
+ [BearerAuth](../README.md#BearerAuth)
294
+
295
+ ### HTTP request headers
296
+
297
+ - **Content-Type**: application/json
298
+ - **Accept**: application/json
299
+
@@ -0,0 +1,30 @@
1
+ # PayZuPix::PostInternalTransferRequest
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **payer_account_number** | **String** | Payer account number (6 digits). Must match the authenticated user&#39;s accountNumber. | |
8
+ | **receiver_account_number** | **String** | Destination account number (6 digits). | |
9
+ | **amount** | **Float** | Transfer amount in BRL, with at most 2 decimal places. | |
10
+ | **description** | **String** | Optional transfer description. | [optional] |
11
+ | **callback_url** | **String** | URL for transaction notifications (http or https). | [optional] |
12
+ | **client_reference** | **String** | External reference for idempotency / reconciliation. | [optional] |
13
+ | **virtual_account** | **String** | Virtual sub-account (up to 50 characters) to correlate stores, branches, marketplaces. Returned in the callback. | [optional] |
14
+
15
+ ## Example
16
+
17
+ ```ruby
18
+ require 'payzu-pix'
19
+
20
+ instance = PayZuPix::PostInternalTransferRequest.new(
21
+ payer_account_number: 000000,
22
+ receiver_account_number: 987654,
23
+ amount: 100.5,
24
+ description: Pagamento referente a fatura #1234,
25
+ callback_url: https://webhook.cool/,
26
+ client_reference: transfer_abc_123,
27
+ virtual_account: loja-centro-01
28
+ )
29
+ ```
30
+
@@ -0,0 +1,18 @@
1
+ # PayZuPix::PostPixQrcodeReadRequest
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **emv** | **String** | The EMV payload string from the Pix QR Code. | |
8
+
9
+ ## Example
10
+
11
+ ```ruby
12
+ require 'payzu-pix'
13
+
14
+ instance = PayZuPix::PostPixQrcodeReadRequest.new(
15
+ emv: 00020101021226770014br.gov.bcb.pix2555api.payzu/pix/qr/v2/013318d6-2d7d-479e-8bb3-b5c7b9da688c5204000053039865802BR5916PAYZU 6007SAOPAULO6217051320260118278956304EC55
16
+ )
17
+ ```
18
+
@@ -0,0 +1,32 @@
1
+ # PayZuPix::PostPixRequest
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **amount** | **Float** | Amount in BRL. Must be &gt;&#x3D; 1. | |
8
+ | **callback_url** | **String** | URL for transaction notifications (http or https). | [optional] |
9
+ | **generated_name** | **String** | Payer full name. Letters and spaces only. | [optional] |
10
+ | **generated_email** | **String** | Payer email (optional). | [optional] |
11
+ | **generated_document** | **String** | Payer CPF (11 digits) or CNPJ (14 digits), no punctuation, with valid check digits. | [optional] |
12
+ | **expires_in** | **Float** | Seconds until the QR Code expires. | [optional] |
13
+ | **client_reference** | **String** | External reference (order, invoice, etc.). A clientReference already used returns the transaction created with it. | [optional] |
14
+ | **virtual_account** | **String** | Virtual sub-account (up to 50 characters) to correlate stores, branches, marketplaces. Returned in the callback. | [optional] |
15
+
16
+ ## Example
17
+
18
+ ```ruby
19
+ require 'payzu-pix'
20
+
21
+ instance = PayZuPix::PostPixRequest.new(
22
+ amount: 10.9,
23
+ callback_url: https://webhook.cool/,
24
+ generated_name: John Doe,
25
+ generated_email: john.doe@example.com,
26
+ generated_document: 12345678901,
27
+ expires_in: 600,
28
+ client_reference: order_12345,
29
+ virtual_account: loja-centro-01
30
+ )
31
+ ```
32
+
@@ -0,0 +1,24 @@
1
+ # PayZuPix::PostUserReportRequest
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **date_from** | **Time** | Start of the report period. | |
8
+ | **date_to** | **Time** | End of the report period. | |
9
+ | **status** | **Array&lt;String&gt;** | Transaction statuses included in the file. Empty or omitted: all. | [optional] |
10
+ | **type** | **Array&lt;String&gt;** | Transaction types included in the file. Empty or omitted: all. | [optional] |
11
+
12
+ ## Example
13
+
14
+ ```ruby
15
+ require 'payzu-pix'
16
+
17
+ instance = PayZuPix::PostUserReportRequest.new(
18
+ date_from: 2026-07-01T00:00:00Z,
19
+ date_to: 2026-07-31T23:59:59Z,
20
+ status: null,
21
+ type: null
22
+ )
23
+ ```
24
+