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
|
@@ -0,0 +1,595 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#PayZu Pix API
|
|
3
|
+
|
|
4
|
+
#REST API for Pix operations on the PayZu platform, deposits, withdrawals, internal transfers, infractions, reports, and callback inspection. All amounts are in BRL (reais) unless explicitly noted. Authentication uses a Bearer token issued during onboarding. ## SDKs oficiais - Node.js: `npm install payzu-pix` - Python: `pip install payzu-pix` - PHP: `composer require payzu/pix` - Ruby: `gem install payzu-pix` - Java: `br.com.payzu:payzu-pix` (Maven Central) - Go: `go get github.com/PayZuAI/payzu-sdks/go/v2` Repo: https://github.com/PayZuAI/payzu-sdks
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.8.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.22.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module PayZuPix
|
|
17
|
+
class GetUserTransactionById200Response < ApiModelBase
|
|
18
|
+
# Identifier of the transaction at PayZu.
|
|
19
|
+
attr_accessor :id
|
|
20
|
+
|
|
21
|
+
# PENDING, COMPLETED, CANCELED, WAITING_FOR_REFUND, REFUNDED, EXPIRED, ERROR
|
|
22
|
+
attr_accessor :status
|
|
23
|
+
|
|
24
|
+
# Amount of the transaction, before the fee.
|
|
25
|
+
attr_accessor :amount
|
|
26
|
+
|
|
27
|
+
# Transaction type: DEPOSIT, WITHDRAW, COMMISSION, LIQUIDATION or ADJUSTMENT.
|
|
28
|
+
attr_accessor :type
|
|
29
|
+
|
|
30
|
+
# Copy-and-paste Pix code.
|
|
31
|
+
attr_accessor :qr_code_text
|
|
32
|
+
|
|
33
|
+
# PNG image of the QR Code in base64, without the data: prefix.
|
|
34
|
+
attr_accessor :qr_code_base64
|
|
35
|
+
|
|
36
|
+
# Authenticated route that returns the PNG of the QR Code.
|
|
37
|
+
attr_accessor :qr_code_url
|
|
38
|
+
|
|
39
|
+
# Name used to build the charge.
|
|
40
|
+
attr_accessor :generated_name
|
|
41
|
+
|
|
42
|
+
# CPF or CNPJ used as the debtor of the charge.
|
|
43
|
+
attr_accessor :generated_document
|
|
44
|
+
|
|
45
|
+
# Email used to build the charge.
|
|
46
|
+
attr_accessor :generated_email
|
|
47
|
+
|
|
48
|
+
# Name of the holder of the account that sent the Pix, as reported by the originating institution.
|
|
49
|
+
attr_accessor :payer_name
|
|
50
|
+
|
|
51
|
+
# CPF or CNPJ of the payer of the Pix, reported by the originating institution.
|
|
52
|
+
attr_accessor :payer_document
|
|
53
|
+
|
|
54
|
+
# ISPB code of the institution the Pix was sent from.
|
|
55
|
+
attr_accessor :payer_institution_ispb
|
|
56
|
+
|
|
57
|
+
# Name of the institution the Pix was sent from.
|
|
58
|
+
attr_accessor :payer_institution_name
|
|
59
|
+
|
|
60
|
+
# Payer's PayZu account number (6 digits). Present on withdraw, internal-transfer and commission transactions.
|
|
61
|
+
attr_accessor :payer_account_number
|
|
62
|
+
|
|
63
|
+
# PayZu fee charged on the operation, in reais. It may carry more than two decimal places — do not round when reconciling.
|
|
64
|
+
attr_accessor :service_fee_charged
|
|
65
|
+
|
|
66
|
+
# Destination Pix key of the withdrawal, already normalized.
|
|
67
|
+
attr_accessor :withdraw_pix_key
|
|
68
|
+
|
|
69
|
+
# Type of the destination key of the withdrawal, with evp being the random key.
|
|
70
|
+
attr_accessor :withdraw_pix_type
|
|
71
|
+
|
|
72
|
+
# Name of the holder of the receiving account.
|
|
73
|
+
attr_accessor :receiver_name
|
|
74
|
+
|
|
75
|
+
# CPF or CNPJ of the receiver.
|
|
76
|
+
attr_accessor :receiver_document
|
|
77
|
+
|
|
78
|
+
# ISPB code of the institution that receives the Pix.
|
|
79
|
+
attr_accessor :receiver_institution_ispb
|
|
80
|
+
|
|
81
|
+
# Name of the institution that receives the Pix.
|
|
82
|
+
attr_accessor :receiver_institution_name
|
|
83
|
+
|
|
84
|
+
# Receiver's PayZu account number (6 digits). Present on deposit, internal-transfer and commission transactions.
|
|
85
|
+
attr_accessor :receiver_account_number
|
|
86
|
+
|
|
87
|
+
# Identifier of the Pix in the Bacen arrangement, used to track the settlement and request a return.
|
|
88
|
+
attr_accessor :end_to_end_id
|
|
89
|
+
|
|
90
|
+
# Date and time the transaction was recorded.
|
|
91
|
+
attr_accessor :created_at
|
|
92
|
+
|
|
93
|
+
# Date and time of the last change.
|
|
94
|
+
attr_accessor :updated_at
|
|
95
|
+
|
|
96
|
+
# Date and time the Pix was settled, reported by the institution.
|
|
97
|
+
attr_accessor :paid_at
|
|
98
|
+
|
|
99
|
+
# Your identifier of the transaction, returned in queries and callbacks.
|
|
100
|
+
attr_accessor :client_reference
|
|
101
|
+
|
|
102
|
+
# End-to-end ID of the refund transaction
|
|
103
|
+
attr_accessor :refund_end_to_end_id
|
|
104
|
+
|
|
105
|
+
# Amount refunded
|
|
106
|
+
attr_accessor :refund_amount
|
|
107
|
+
|
|
108
|
+
# Refund status: PENDING, COMPLETED or CANCELED.
|
|
109
|
+
attr_accessor :refund_status
|
|
110
|
+
|
|
111
|
+
# Reason for the refund
|
|
112
|
+
attr_accessor :refund_reason
|
|
113
|
+
|
|
114
|
+
# Description of the refund
|
|
115
|
+
attr_accessor :refund_description
|
|
116
|
+
|
|
117
|
+
# Date and time when the refund was processed
|
|
118
|
+
attr_accessor :refunded_at
|
|
119
|
+
|
|
120
|
+
# Reason for cancellation (if cancelled)
|
|
121
|
+
attr_accessor :cancellation_reason
|
|
122
|
+
|
|
123
|
+
# Virtual sub-account provided at creation.
|
|
124
|
+
attr_accessor :virtual_account
|
|
125
|
+
|
|
126
|
+
# Transaction method/rail.
|
|
127
|
+
attr_accessor :method
|
|
128
|
+
|
|
129
|
+
# Complete infraction history for this transaction.
|
|
130
|
+
attr_accessor :infraction
|
|
131
|
+
|
|
132
|
+
# Webhook delivery attempts for this transaction (most recent first)
|
|
133
|
+
attr_accessor :callback_log
|
|
134
|
+
|
|
135
|
+
class EnumAttributeValidator
|
|
136
|
+
attr_reader :datatype
|
|
137
|
+
attr_reader :allowable_values
|
|
138
|
+
|
|
139
|
+
def initialize(datatype, allowable_values)
|
|
140
|
+
@allowable_values = allowable_values.map do |value|
|
|
141
|
+
case datatype.to_s
|
|
142
|
+
when /Integer/i
|
|
143
|
+
value.to_i
|
|
144
|
+
when /Float/i
|
|
145
|
+
value.to_f
|
|
146
|
+
else
|
|
147
|
+
value
|
|
148
|
+
end
|
|
149
|
+
end
|
|
150
|
+
end
|
|
151
|
+
|
|
152
|
+
def valid?(value)
|
|
153
|
+
!value || allowable_values.include?(value)
|
|
154
|
+
end
|
|
155
|
+
end
|
|
156
|
+
|
|
157
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
158
|
+
def self.attribute_map
|
|
159
|
+
{
|
|
160
|
+
:'id' => :'id',
|
|
161
|
+
:'status' => :'status',
|
|
162
|
+
:'amount' => :'amount',
|
|
163
|
+
:'type' => :'type',
|
|
164
|
+
:'qr_code_text' => :'qrCodeText',
|
|
165
|
+
:'qr_code_base64' => :'qrCodeBase64',
|
|
166
|
+
:'qr_code_url' => :'qrCodeUrl',
|
|
167
|
+
:'generated_name' => :'generatedName',
|
|
168
|
+
:'generated_document' => :'generatedDocument',
|
|
169
|
+
:'generated_email' => :'generatedEmail',
|
|
170
|
+
:'payer_name' => :'payerName',
|
|
171
|
+
:'payer_document' => :'payerDocument',
|
|
172
|
+
:'payer_institution_ispb' => :'payerInstitutionIspb',
|
|
173
|
+
:'payer_institution_name' => :'payerInstitutionName',
|
|
174
|
+
:'payer_account_number' => :'payerAccountNumber',
|
|
175
|
+
:'service_fee_charged' => :'serviceFeeCharged',
|
|
176
|
+
:'withdraw_pix_key' => :'withdrawPixKey',
|
|
177
|
+
:'withdraw_pix_type' => :'withdrawPixType',
|
|
178
|
+
:'receiver_name' => :'receiverName',
|
|
179
|
+
:'receiver_document' => :'receiverDocument',
|
|
180
|
+
:'receiver_institution_ispb' => :'receiverInstitutionIspb',
|
|
181
|
+
:'receiver_institution_name' => :'receiverInstitutionName',
|
|
182
|
+
:'receiver_account_number' => :'receiverAccountNumber',
|
|
183
|
+
:'end_to_end_id' => :'endToEndId',
|
|
184
|
+
:'created_at' => :'createdAt',
|
|
185
|
+
:'updated_at' => :'updatedAt',
|
|
186
|
+
:'paid_at' => :'paidAt',
|
|
187
|
+
:'client_reference' => :'clientReference',
|
|
188
|
+
:'refund_end_to_end_id' => :'refundEndToEndId',
|
|
189
|
+
:'refund_amount' => :'refundAmount',
|
|
190
|
+
:'refund_status' => :'refundStatus',
|
|
191
|
+
:'refund_reason' => :'refundReason',
|
|
192
|
+
:'refund_description' => :'refundDescription',
|
|
193
|
+
:'refunded_at' => :'refundedAt',
|
|
194
|
+
:'cancellation_reason' => :'cancellationReason',
|
|
195
|
+
:'virtual_account' => :'virtualAccount',
|
|
196
|
+
:'method' => :'method',
|
|
197
|
+
:'infraction' => :'Infraction',
|
|
198
|
+
:'callback_log' => :'CallbackLog'
|
|
199
|
+
}
|
|
200
|
+
end
|
|
201
|
+
|
|
202
|
+
# Returns attribute mapping this model knows about
|
|
203
|
+
def self.acceptable_attribute_map
|
|
204
|
+
attribute_map
|
|
205
|
+
end
|
|
206
|
+
|
|
207
|
+
# Returns all the JSON keys this model knows about
|
|
208
|
+
def self.acceptable_attributes
|
|
209
|
+
acceptable_attribute_map.values
|
|
210
|
+
end
|
|
211
|
+
|
|
212
|
+
# Attribute type mapping.
|
|
213
|
+
def self.openapi_types
|
|
214
|
+
{
|
|
215
|
+
:'id' => :'String',
|
|
216
|
+
:'status' => :'String',
|
|
217
|
+
:'amount' => :'Float',
|
|
218
|
+
:'type' => :'String',
|
|
219
|
+
:'qr_code_text' => :'String',
|
|
220
|
+
:'qr_code_base64' => :'String',
|
|
221
|
+
:'qr_code_url' => :'String',
|
|
222
|
+
:'generated_name' => :'String',
|
|
223
|
+
:'generated_document' => :'String',
|
|
224
|
+
:'generated_email' => :'String',
|
|
225
|
+
:'payer_name' => :'String',
|
|
226
|
+
:'payer_document' => :'String',
|
|
227
|
+
:'payer_institution_ispb' => :'String',
|
|
228
|
+
:'payer_institution_name' => :'String',
|
|
229
|
+
:'payer_account_number' => :'String',
|
|
230
|
+
:'service_fee_charged' => :'Float',
|
|
231
|
+
:'withdraw_pix_key' => :'String',
|
|
232
|
+
:'withdraw_pix_type' => :'String',
|
|
233
|
+
:'receiver_name' => :'String',
|
|
234
|
+
:'receiver_document' => :'String',
|
|
235
|
+
:'receiver_institution_ispb' => :'String',
|
|
236
|
+
:'receiver_institution_name' => :'String',
|
|
237
|
+
:'receiver_account_number' => :'String',
|
|
238
|
+
:'end_to_end_id' => :'String',
|
|
239
|
+
:'created_at' => :'String',
|
|
240
|
+
:'updated_at' => :'String',
|
|
241
|
+
:'paid_at' => :'String',
|
|
242
|
+
:'client_reference' => :'String',
|
|
243
|
+
:'refund_end_to_end_id' => :'String',
|
|
244
|
+
:'refund_amount' => :'Float',
|
|
245
|
+
:'refund_status' => :'String',
|
|
246
|
+
:'refund_reason' => :'String',
|
|
247
|
+
:'refund_description' => :'String',
|
|
248
|
+
:'refunded_at' => :'String',
|
|
249
|
+
:'cancellation_reason' => :'String',
|
|
250
|
+
:'virtual_account' => :'String',
|
|
251
|
+
:'method' => :'String',
|
|
252
|
+
:'infraction' => :'Array<GetUserTransactionById200ResponseAllOfInfractionInner>',
|
|
253
|
+
:'callback_log' => :'Array<GetUserTransactionById200ResponseAllOfCallbackLogInner>'
|
|
254
|
+
}
|
|
255
|
+
end
|
|
256
|
+
|
|
257
|
+
# List of attributes with nullable: true
|
|
258
|
+
def self.openapi_nullable
|
|
259
|
+
Set.new([
|
|
260
|
+
:'withdraw_pix_type',
|
|
261
|
+
:'refund_status',
|
|
262
|
+
:'refund_reason',
|
|
263
|
+
])
|
|
264
|
+
end
|
|
265
|
+
|
|
266
|
+
# List of class defined in allOf (OpenAPI v3)
|
|
267
|
+
def self.openapi_all_of
|
|
268
|
+
[
|
|
269
|
+
:'Transaction'
|
|
270
|
+
]
|
|
271
|
+
end
|
|
272
|
+
|
|
273
|
+
# Initializes the object
|
|
274
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
275
|
+
def initialize(attributes = {})
|
|
276
|
+
if (!attributes.is_a?(Hash))
|
|
277
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `PayZuPix::GetUserTransactionById200Response` initialize method"
|
|
278
|
+
end
|
|
279
|
+
|
|
280
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
281
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
282
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
283
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
284
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `PayZuPix::GetUserTransactionById200Response`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
285
|
+
end
|
|
286
|
+
h[k.to_sym] = v
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
if attributes.key?(:'id')
|
|
290
|
+
self.id = attributes[:'id']
|
|
291
|
+
end
|
|
292
|
+
|
|
293
|
+
if attributes.key?(:'status')
|
|
294
|
+
self.status = attributes[:'status']
|
|
295
|
+
end
|
|
296
|
+
|
|
297
|
+
if attributes.key?(:'amount')
|
|
298
|
+
self.amount = attributes[:'amount']
|
|
299
|
+
end
|
|
300
|
+
|
|
301
|
+
if attributes.key?(:'type')
|
|
302
|
+
self.type = attributes[:'type']
|
|
303
|
+
end
|
|
304
|
+
|
|
305
|
+
if attributes.key?(:'qr_code_text')
|
|
306
|
+
self.qr_code_text = attributes[:'qr_code_text']
|
|
307
|
+
end
|
|
308
|
+
|
|
309
|
+
if attributes.key?(:'qr_code_base64')
|
|
310
|
+
self.qr_code_base64 = attributes[:'qr_code_base64']
|
|
311
|
+
end
|
|
312
|
+
|
|
313
|
+
if attributes.key?(:'qr_code_url')
|
|
314
|
+
self.qr_code_url = attributes[:'qr_code_url']
|
|
315
|
+
end
|
|
316
|
+
|
|
317
|
+
if attributes.key?(:'generated_name')
|
|
318
|
+
self.generated_name = attributes[:'generated_name']
|
|
319
|
+
end
|
|
320
|
+
|
|
321
|
+
if attributes.key?(:'generated_document')
|
|
322
|
+
self.generated_document = attributes[:'generated_document']
|
|
323
|
+
end
|
|
324
|
+
|
|
325
|
+
if attributes.key?(:'generated_email')
|
|
326
|
+
self.generated_email = attributes[:'generated_email']
|
|
327
|
+
end
|
|
328
|
+
|
|
329
|
+
if attributes.key?(:'payer_name')
|
|
330
|
+
self.payer_name = attributes[:'payer_name']
|
|
331
|
+
end
|
|
332
|
+
|
|
333
|
+
if attributes.key?(:'payer_document')
|
|
334
|
+
self.payer_document = attributes[:'payer_document']
|
|
335
|
+
end
|
|
336
|
+
|
|
337
|
+
if attributes.key?(:'payer_institution_ispb')
|
|
338
|
+
self.payer_institution_ispb = attributes[:'payer_institution_ispb']
|
|
339
|
+
end
|
|
340
|
+
|
|
341
|
+
if attributes.key?(:'payer_institution_name')
|
|
342
|
+
self.payer_institution_name = attributes[:'payer_institution_name']
|
|
343
|
+
end
|
|
344
|
+
|
|
345
|
+
if attributes.key?(:'payer_account_number')
|
|
346
|
+
self.payer_account_number = attributes[:'payer_account_number']
|
|
347
|
+
end
|
|
348
|
+
|
|
349
|
+
if attributes.key?(:'service_fee_charged')
|
|
350
|
+
self.service_fee_charged = attributes[:'service_fee_charged']
|
|
351
|
+
end
|
|
352
|
+
|
|
353
|
+
if attributes.key?(:'withdraw_pix_key')
|
|
354
|
+
self.withdraw_pix_key = attributes[:'withdraw_pix_key']
|
|
355
|
+
end
|
|
356
|
+
|
|
357
|
+
if attributes.key?(:'withdraw_pix_type')
|
|
358
|
+
self.withdraw_pix_type = attributes[:'withdraw_pix_type']
|
|
359
|
+
end
|
|
360
|
+
|
|
361
|
+
if attributes.key?(:'receiver_name')
|
|
362
|
+
self.receiver_name = attributes[:'receiver_name']
|
|
363
|
+
end
|
|
364
|
+
|
|
365
|
+
if attributes.key?(:'receiver_document')
|
|
366
|
+
self.receiver_document = attributes[:'receiver_document']
|
|
367
|
+
end
|
|
368
|
+
|
|
369
|
+
if attributes.key?(:'receiver_institution_ispb')
|
|
370
|
+
self.receiver_institution_ispb = attributes[:'receiver_institution_ispb']
|
|
371
|
+
end
|
|
372
|
+
|
|
373
|
+
if attributes.key?(:'receiver_institution_name')
|
|
374
|
+
self.receiver_institution_name = attributes[:'receiver_institution_name']
|
|
375
|
+
end
|
|
376
|
+
|
|
377
|
+
if attributes.key?(:'receiver_account_number')
|
|
378
|
+
self.receiver_account_number = attributes[:'receiver_account_number']
|
|
379
|
+
end
|
|
380
|
+
|
|
381
|
+
if attributes.key?(:'end_to_end_id')
|
|
382
|
+
self.end_to_end_id = attributes[:'end_to_end_id']
|
|
383
|
+
end
|
|
384
|
+
|
|
385
|
+
if attributes.key?(:'created_at')
|
|
386
|
+
self.created_at = attributes[:'created_at']
|
|
387
|
+
end
|
|
388
|
+
|
|
389
|
+
if attributes.key?(:'updated_at')
|
|
390
|
+
self.updated_at = attributes[:'updated_at']
|
|
391
|
+
end
|
|
392
|
+
|
|
393
|
+
if attributes.key?(:'paid_at')
|
|
394
|
+
self.paid_at = attributes[:'paid_at']
|
|
395
|
+
end
|
|
396
|
+
|
|
397
|
+
if attributes.key?(:'client_reference')
|
|
398
|
+
self.client_reference = attributes[:'client_reference']
|
|
399
|
+
end
|
|
400
|
+
|
|
401
|
+
if attributes.key?(:'refund_end_to_end_id')
|
|
402
|
+
self.refund_end_to_end_id = attributes[:'refund_end_to_end_id']
|
|
403
|
+
end
|
|
404
|
+
|
|
405
|
+
if attributes.key?(:'refund_amount')
|
|
406
|
+
self.refund_amount = attributes[:'refund_amount']
|
|
407
|
+
end
|
|
408
|
+
|
|
409
|
+
if attributes.key?(:'refund_status')
|
|
410
|
+
self.refund_status = attributes[:'refund_status']
|
|
411
|
+
end
|
|
412
|
+
|
|
413
|
+
if attributes.key?(:'refund_reason')
|
|
414
|
+
self.refund_reason = attributes[:'refund_reason']
|
|
415
|
+
end
|
|
416
|
+
|
|
417
|
+
if attributes.key?(:'refund_description')
|
|
418
|
+
self.refund_description = attributes[:'refund_description']
|
|
419
|
+
end
|
|
420
|
+
|
|
421
|
+
if attributes.key?(:'refunded_at')
|
|
422
|
+
self.refunded_at = attributes[:'refunded_at']
|
|
423
|
+
end
|
|
424
|
+
|
|
425
|
+
if attributes.key?(:'cancellation_reason')
|
|
426
|
+
self.cancellation_reason = attributes[:'cancellation_reason']
|
|
427
|
+
end
|
|
428
|
+
|
|
429
|
+
if attributes.key?(:'virtual_account')
|
|
430
|
+
self.virtual_account = attributes[:'virtual_account']
|
|
431
|
+
end
|
|
432
|
+
|
|
433
|
+
if attributes.key?(:'method')
|
|
434
|
+
self.method = attributes[:'method']
|
|
435
|
+
end
|
|
436
|
+
|
|
437
|
+
if attributes.key?(:'infraction')
|
|
438
|
+
if (value = attributes[:'infraction']).is_a?(Array)
|
|
439
|
+
self.infraction = value
|
|
440
|
+
end
|
|
441
|
+
end
|
|
442
|
+
|
|
443
|
+
if attributes.key?(:'callback_log')
|
|
444
|
+
if (value = attributes[:'callback_log']).is_a?(Array)
|
|
445
|
+
self.callback_log = value
|
|
446
|
+
end
|
|
447
|
+
end
|
|
448
|
+
end
|
|
449
|
+
|
|
450
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
451
|
+
# @return Array for valid properties with the reasons
|
|
452
|
+
def list_invalid_properties
|
|
453
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
454
|
+
invalid_properties = Array.new
|
|
455
|
+
if !@virtual_account.nil? && @virtual_account.to_s.length > 50
|
|
456
|
+
invalid_properties.push('invalid value for "virtual_account", the character length must be smaller than or equal to 50.')
|
|
457
|
+
end
|
|
458
|
+
|
|
459
|
+
invalid_properties
|
|
460
|
+
end
|
|
461
|
+
|
|
462
|
+
# Check to see if the all the properties in the model are valid
|
|
463
|
+
# @return true if the model is valid
|
|
464
|
+
def valid?
|
|
465
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
466
|
+
status_validator = EnumAttributeValidator.new('String', ["PENDING", "COMPLETED", "CANCELED", "WAITING_FOR_REFUND", "REFUNDED", "EXPIRED", "ERROR"])
|
|
467
|
+
return false unless status_validator.valid?(@status)
|
|
468
|
+
type_validator = EnumAttributeValidator.new('String', ["DEPOSIT", "WITHDRAW", "COMMISSION", "LIQUIDATION", "ADJUSTMENT"])
|
|
469
|
+
return false unless type_validator.valid?(@type)
|
|
470
|
+
withdraw_pix_type_validator = EnumAttributeValidator.new('String', ["cpf", "cnpj", "email", "phone", "evp"])
|
|
471
|
+
return false unless withdraw_pix_type_validator.valid?(@withdraw_pix_type)
|
|
472
|
+
refund_status_validator = EnumAttributeValidator.new('String', ["PENDING", "COMPLETED", "CANCELED"])
|
|
473
|
+
return false unless refund_status_validator.valid?(@refund_status)
|
|
474
|
+
refund_reason_validator = EnumAttributeValidator.new('String', ["CUSTOMER_REQUEST", "INFRACTION"])
|
|
475
|
+
return false unless refund_reason_validator.valid?(@refund_reason)
|
|
476
|
+
return false if !@virtual_account.nil? && @virtual_account.to_s.length > 50
|
|
477
|
+
method_validator = EnumAttributeValidator.new('String', ["PIX", "INTERNAL_TRANSFER"])
|
|
478
|
+
return false unless method_validator.valid?(@method)
|
|
479
|
+
true
|
|
480
|
+
end
|
|
481
|
+
|
|
482
|
+
# Custom attribute writer method with validation
|
|
483
|
+
# @param [Object] virtual_account Value to be assigned
|
|
484
|
+
def virtual_account=(virtual_account)
|
|
485
|
+
if virtual_account.nil?
|
|
486
|
+
fail ArgumentError, 'virtual_account cannot be nil'
|
|
487
|
+
end
|
|
488
|
+
|
|
489
|
+
if virtual_account.to_s.length > 50
|
|
490
|
+
fail ArgumentError, 'invalid value for "virtual_account", the character length must be smaller than or equal to 50.'
|
|
491
|
+
end
|
|
492
|
+
|
|
493
|
+
@virtual_account = virtual_account
|
|
494
|
+
end
|
|
495
|
+
|
|
496
|
+
# Checks equality by comparing each attribute.
|
|
497
|
+
# @param [Object] Object to be compared
|
|
498
|
+
def ==(o)
|
|
499
|
+
return true if self.equal?(o)
|
|
500
|
+
self.class == o.class &&
|
|
501
|
+
id == o.id &&
|
|
502
|
+
status == o.status &&
|
|
503
|
+
amount == o.amount &&
|
|
504
|
+
type == o.type &&
|
|
505
|
+
qr_code_text == o.qr_code_text &&
|
|
506
|
+
qr_code_base64 == o.qr_code_base64 &&
|
|
507
|
+
qr_code_url == o.qr_code_url &&
|
|
508
|
+
generated_name == o.generated_name &&
|
|
509
|
+
generated_document == o.generated_document &&
|
|
510
|
+
generated_email == o.generated_email &&
|
|
511
|
+
payer_name == o.payer_name &&
|
|
512
|
+
payer_document == o.payer_document &&
|
|
513
|
+
payer_institution_ispb == o.payer_institution_ispb &&
|
|
514
|
+
payer_institution_name == o.payer_institution_name &&
|
|
515
|
+
payer_account_number == o.payer_account_number &&
|
|
516
|
+
service_fee_charged == o.service_fee_charged &&
|
|
517
|
+
withdraw_pix_key == o.withdraw_pix_key &&
|
|
518
|
+
withdraw_pix_type == o.withdraw_pix_type &&
|
|
519
|
+
receiver_name == o.receiver_name &&
|
|
520
|
+
receiver_document == o.receiver_document &&
|
|
521
|
+
receiver_institution_ispb == o.receiver_institution_ispb &&
|
|
522
|
+
receiver_institution_name == o.receiver_institution_name &&
|
|
523
|
+
receiver_account_number == o.receiver_account_number &&
|
|
524
|
+
end_to_end_id == o.end_to_end_id &&
|
|
525
|
+
created_at == o.created_at &&
|
|
526
|
+
updated_at == o.updated_at &&
|
|
527
|
+
paid_at == o.paid_at &&
|
|
528
|
+
client_reference == o.client_reference &&
|
|
529
|
+
refund_end_to_end_id == o.refund_end_to_end_id &&
|
|
530
|
+
refund_amount == o.refund_amount &&
|
|
531
|
+
refund_status == o.refund_status &&
|
|
532
|
+
refund_reason == o.refund_reason &&
|
|
533
|
+
refund_description == o.refund_description &&
|
|
534
|
+
refunded_at == o.refunded_at &&
|
|
535
|
+
cancellation_reason == o.cancellation_reason &&
|
|
536
|
+
virtual_account == o.virtual_account &&
|
|
537
|
+
method == o.method &&
|
|
538
|
+
infraction == o.infraction &&
|
|
539
|
+
callback_log == o.callback_log
|
|
540
|
+
end
|
|
541
|
+
|
|
542
|
+
# @see the `==` method
|
|
543
|
+
# @param [Object] Object to be compared
|
|
544
|
+
def eql?(o)
|
|
545
|
+
self == o
|
|
546
|
+
end
|
|
547
|
+
|
|
548
|
+
# Calculates hash code according to all attributes.
|
|
549
|
+
# @return [Integer] Hash code
|
|
550
|
+
def hash
|
|
551
|
+
[id, status, amount, type, qr_code_text, qr_code_base64, qr_code_url, generated_name, generated_document, generated_email, payer_name, payer_document, payer_institution_ispb, payer_institution_name, payer_account_number, service_fee_charged, withdraw_pix_key, withdraw_pix_type, receiver_name, receiver_document, receiver_institution_ispb, receiver_institution_name, receiver_account_number, end_to_end_id, created_at, updated_at, paid_at, client_reference, refund_end_to_end_id, refund_amount, refund_status, refund_reason, refund_description, refunded_at, cancellation_reason, virtual_account, method, infraction, callback_log].hash
|
|
552
|
+
end
|
|
553
|
+
|
|
554
|
+
# Builds the object from hash
|
|
555
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
556
|
+
# @return [Object] Returns the model itself
|
|
557
|
+
def self.build_from_hash(attributes)
|
|
558
|
+
return nil unless attributes.is_a?(Hash)
|
|
559
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
560
|
+
transformed_hash = {}
|
|
561
|
+
openapi_types.each_pair do |key, type|
|
|
562
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
563
|
+
transformed_hash["#{key}"] = nil
|
|
564
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
565
|
+
# check to ensure the input is an array given that the attribute
|
|
566
|
+
# is documented as an array but the input is not
|
|
567
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
568
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
569
|
+
end
|
|
570
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
571
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
572
|
+
end
|
|
573
|
+
end
|
|
574
|
+
new(transformed_hash)
|
|
575
|
+
end
|
|
576
|
+
|
|
577
|
+
# Returns the object in the form of hash
|
|
578
|
+
# @return [Hash] Returns the object in the form of hash
|
|
579
|
+
def to_hash
|
|
580
|
+
hash = {}
|
|
581
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
582
|
+
value = self.send(attr)
|
|
583
|
+
if value.nil?
|
|
584
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
585
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
586
|
+
end
|
|
587
|
+
|
|
588
|
+
hash[param] = _to_hash(value)
|
|
589
|
+
end
|
|
590
|
+
hash
|
|
591
|
+
end
|
|
592
|
+
|
|
593
|
+
end
|
|
594
|
+
|
|
595
|
+
end
|