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,407 @@
|
|
|
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 DepositPending < ApiModelBase
|
|
18
|
+
# Identifier of the pending deposit.
|
|
19
|
+
attr_accessor :id
|
|
20
|
+
|
|
21
|
+
# Deposit status: PENDING, COMPLETED or REJECTED.
|
|
22
|
+
attr_accessor :status
|
|
23
|
+
|
|
24
|
+
# Amount received.
|
|
25
|
+
attr_accessor :amount
|
|
26
|
+
|
|
27
|
+
# CNPJ of the payer of the Pix.
|
|
28
|
+
attr_accessor :payer_document
|
|
29
|
+
|
|
30
|
+
# Name of the payer of the Pix.
|
|
31
|
+
attr_accessor :payer_name
|
|
32
|
+
|
|
33
|
+
# Account number of the payer inside the platform.
|
|
34
|
+
attr_accessor :payer_account_number
|
|
35
|
+
|
|
36
|
+
# ISPB code of the institution the Pix was sent from.
|
|
37
|
+
attr_accessor :payer_institution_ispb
|
|
38
|
+
|
|
39
|
+
# Name of the institution the Pix was sent from.
|
|
40
|
+
attr_accessor :payer_institution_name
|
|
41
|
+
|
|
42
|
+
# CPF or CNPJ of the account that received the Pix.
|
|
43
|
+
attr_accessor :receiver_document
|
|
44
|
+
|
|
45
|
+
# Name of the account that received the Pix.
|
|
46
|
+
attr_accessor :receiver_name
|
|
47
|
+
|
|
48
|
+
# Number of your PayZu account that receives the credit if the deposit is approved.
|
|
49
|
+
attr_accessor :receiver_account_number
|
|
50
|
+
|
|
51
|
+
# ISPB code of the institution that received the Pix.
|
|
52
|
+
attr_accessor :receiver_institution_ispb
|
|
53
|
+
|
|
54
|
+
# Name of the institution where the Pix was settled on the receiving side.
|
|
55
|
+
attr_accessor :receiver_institution_name
|
|
56
|
+
|
|
57
|
+
# End-to-end identifier of the Pix.
|
|
58
|
+
attr_accessor :end_to_end_id
|
|
59
|
+
|
|
60
|
+
# Date and time the Pix was settled.
|
|
61
|
+
attr_accessor :paid_at
|
|
62
|
+
|
|
63
|
+
attr_accessor :pix_key
|
|
64
|
+
|
|
65
|
+
# Free text that would accompany the Pix.
|
|
66
|
+
attr_accessor :description
|
|
67
|
+
|
|
68
|
+
# Date and time the deposit was approved.
|
|
69
|
+
attr_accessor :approved_at
|
|
70
|
+
|
|
71
|
+
# Date and time the deposit was rejected.
|
|
72
|
+
attr_accessor :rejected_at
|
|
73
|
+
|
|
74
|
+
# Reason the deposit was rejected.
|
|
75
|
+
attr_accessor :rejection_reason
|
|
76
|
+
|
|
77
|
+
# Deposit transaction created on approval.
|
|
78
|
+
attr_accessor :transaction_id
|
|
79
|
+
|
|
80
|
+
# Moment the received Pix was recorded, before the credit.
|
|
81
|
+
attr_accessor :created_at
|
|
82
|
+
|
|
83
|
+
# Moment of the last change to the record, which changes when the deposit is approved or rejected.
|
|
84
|
+
attr_accessor :updated_at
|
|
85
|
+
|
|
86
|
+
class EnumAttributeValidator
|
|
87
|
+
attr_reader :datatype
|
|
88
|
+
attr_reader :allowable_values
|
|
89
|
+
|
|
90
|
+
def initialize(datatype, allowable_values)
|
|
91
|
+
@allowable_values = allowable_values.map do |value|
|
|
92
|
+
case datatype.to_s
|
|
93
|
+
when /Integer/i
|
|
94
|
+
value.to_i
|
|
95
|
+
when /Float/i
|
|
96
|
+
value.to_f
|
|
97
|
+
else
|
|
98
|
+
value
|
|
99
|
+
end
|
|
100
|
+
end
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
def valid?(value)
|
|
104
|
+
!value || allowable_values.include?(value)
|
|
105
|
+
end
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
109
|
+
def self.attribute_map
|
|
110
|
+
{
|
|
111
|
+
:'id' => :'id',
|
|
112
|
+
:'status' => :'status',
|
|
113
|
+
:'amount' => :'amount',
|
|
114
|
+
:'payer_document' => :'payerDocument',
|
|
115
|
+
:'payer_name' => :'payerName',
|
|
116
|
+
:'payer_account_number' => :'payerAccountNumber',
|
|
117
|
+
:'payer_institution_ispb' => :'payerInstitutionIspb',
|
|
118
|
+
:'payer_institution_name' => :'payerInstitutionName',
|
|
119
|
+
:'receiver_document' => :'receiverDocument',
|
|
120
|
+
:'receiver_name' => :'receiverName',
|
|
121
|
+
:'receiver_account_number' => :'receiverAccountNumber',
|
|
122
|
+
:'receiver_institution_ispb' => :'receiverInstitutionIspb',
|
|
123
|
+
:'receiver_institution_name' => :'receiverInstitutionName',
|
|
124
|
+
:'end_to_end_id' => :'endToEndId',
|
|
125
|
+
:'paid_at' => :'paidAt',
|
|
126
|
+
:'pix_key' => :'pixKey',
|
|
127
|
+
:'description' => :'description',
|
|
128
|
+
:'approved_at' => :'approvedAt',
|
|
129
|
+
:'rejected_at' => :'rejectedAt',
|
|
130
|
+
:'rejection_reason' => :'rejectionReason',
|
|
131
|
+
:'transaction_id' => :'transactionId',
|
|
132
|
+
:'created_at' => :'createdAt',
|
|
133
|
+
:'updated_at' => :'updatedAt'
|
|
134
|
+
}
|
|
135
|
+
end
|
|
136
|
+
|
|
137
|
+
# Returns attribute mapping this model knows about
|
|
138
|
+
def self.acceptable_attribute_map
|
|
139
|
+
attribute_map
|
|
140
|
+
end
|
|
141
|
+
|
|
142
|
+
# Returns all the JSON keys this model knows about
|
|
143
|
+
def self.acceptable_attributes
|
|
144
|
+
acceptable_attribute_map.values
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
# Attribute type mapping.
|
|
148
|
+
def self.openapi_types
|
|
149
|
+
{
|
|
150
|
+
:'id' => :'String',
|
|
151
|
+
:'status' => :'String',
|
|
152
|
+
:'amount' => :'Float',
|
|
153
|
+
:'payer_document' => :'String',
|
|
154
|
+
:'payer_name' => :'String',
|
|
155
|
+
:'payer_account_number' => :'String',
|
|
156
|
+
:'payer_institution_ispb' => :'String',
|
|
157
|
+
:'payer_institution_name' => :'String',
|
|
158
|
+
:'receiver_document' => :'String',
|
|
159
|
+
:'receiver_name' => :'String',
|
|
160
|
+
:'receiver_account_number' => :'String',
|
|
161
|
+
:'receiver_institution_ispb' => :'String',
|
|
162
|
+
:'receiver_institution_name' => :'String',
|
|
163
|
+
:'end_to_end_id' => :'String',
|
|
164
|
+
:'paid_at' => :'Time',
|
|
165
|
+
:'pix_key' => :'String',
|
|
166
|
+
:'description' => :'String',
|
|
167
|
+
:'approved_at' => :'Time',
|
|
168
|
+
:'rejected_at' => :'Time',
|
|
169
|
+
:'rejection_reason' => :'String',
|
|
170
|
+
:'transaction_id' => :'String',
|
|
171
|
+
:'created_at' => :'Time',
|
|
172
|
+
:'updated_at' => :'Time'
|
|
173
|
+
}
|
|
174
|
+
end
|
|
175
|
+
|
|
176
|
+
# List of attributes with nullable: true
|
|
177
|
+
def self.openapi_nullable
|
|
178
|
+
Set.new([
|
|
179
|
+
:'payer_name',
|
|
180
|
+
:'payer_account_number',
|
|
181
|
+
:'payer_institution_ispb',
|
|
182
|
+
:'payer_institution_name',
|
|
183
|
+
:'receiver_document',
|
|
184
|
+
:'receiver_name',
|
|
185
|
+
:'receiver_account_number',
|
|
186
|
+
:'receiver_institution_ispb',
|
|
187
|
+
:'receiver_institution_name',
|
|
188
|
+
:'paid_at',
|
|
189
|
+
:'pix_key',
|
|
190
|
+
:'description',
|
|
191
|
+
:'approved_at',
|
|
192
|
+
:'rejected_at',
|
|
193
|
+
:'rejection_reason',
|
|
194
|
+
:'transaction_id',
|
|
195
|
+
])
|
|
196
|
+
end
|
|
197
|
+
|
|
198
|
+
# Initializes the object
|
|
199
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
200
|
+
def initialize(attributes = {})
|
|
201
|
+
if (!attributes.is_a?(Hash))
|
|
202
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `PayZuPix::DepositPending` initialize method"
|
|
203
|
+
end
|
|
204
|
+
|
|
205
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
206
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
207
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
208
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
209
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `PayZuPix::DepositPending`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
210
|
+
end
|
|
211
|
+
h[k.to_sym] = v
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
if attributes.key?(:'id')
|
|
215
|
+
self.id = attributes[:'id']
|
|
216
|
+
end
|
|
217
|
+
|
|
218
|
+
if attributes.key?(:'status')
|
|
219
|
+
self.status = attributes[:'status']
|
|
220
|
+
end
|
|
221
|
+
|
|
222
|
+
if attributes.key?(:'amount')
|
|
223
|
+
self.amount = attributes[:'amount']
|
|
224
|
+
end
|
|
225
|
+
|
|
226
|
+
if attributes.key?(:'payer_document')
|
|
227
|
+
self.payer_document = attributes[:'payer_document']
|
|
228
|
+
end
|
|
229
|
+
|
|
230
|
+
if attributes.key?(:'payer_name')
|
|
231
|
+
self.payer_name = attributes[:'payer_name']
|
|
232
|
+
end
|
|
233
|
+
|
|
234
|
+
if attributes.key?(:'payer_account_number')
|
|
235
|
+
self.payer_account_number = attributes[:'payer_account_number']
|
|
236
|
+
end
|
|
237
|
+
|
|
238
|
+
if attributes.key?(:'payer_institution_ispb')
|
|
239
|
+
self.payer_institution_ispb = attributes[:'payer_institution_ispb']
|
|
240
|
+
end
|
|
241
|
+
|
|
242
|
+
if attributes.key?(:'payer_institution_name')
|
|
243
|
+
self.payer_institution_name = attributes[:'payer_institution_name']
|
|
244
|
+
end
|
|
245
|
+
|
|
246
|
+
if attributes.key?(:'receiver_document')
|
|
247
|
+
self.receiver_document = attributes[:'receiver_document']
|
|
248
|
+
end
|
|
249
|
+
|
|
250
|
+
if attributes.key?(:'receiver_name')
|
|
251
|
+
self.receiver_name = attributes[:'receiver_name']
|
|
252
|
+
end
|
|
253
|
+
|
|
254
|
+
if attributes.key?(:'receiver_account_number')
|
|
255
|
+
self.receiver_account_number = attributes[:'receiver_account_number']
|
|
256
|
+
end
|
|
257
|
+
|
|
258
|
+
if attributes.key?(:'receiver_institution_ispb')
|
|
259
|
+
self.receiver_institution_ispb = attributes[:'receiver_institution_ispb']
|
|
260
|
+
end
|
|
261
|
+
|
|
262
|
+
if attributes.key?(:'receiver_institution_name')
|
|
263
|
+
self.receiver_institution_name = attributes[:'receiver_institution_name']
|
|
264
|
+
end
|
|
265
|
+
|
|
266
|
+
if attributes.key?(:'end_to_end_id')
|
|
267
|
+
self.end_to_end_id = attributes[:'end_to_end_id']
|
|
268
|
+
end
|
|
269
|
+
|
|
270
|
+
if attributes.key?(:'paid_at')
|
|
271
|
+
self.paid_at = attributes[:'paid_at']
|
|
272
|
+
end
|
|
273
|
+
|
|
274
|
+
if attributes.key?(:'pix_key')
|
|
275
|
+
self.pix_key = attributes[:'pix_key']
|
|
276
|
+
end
|
|
277
|
+
|
|
278
|
+
if attributes.key?(:'description')
|
|
279
|
+
self.description = attributes[:'description']
|
|
280
|
+
end
|
|
281
|
+
|
|
282
|
+
if attributes.key?(:'approved_at')
|
|
283
|
+
self.approved_at = attributes[:'approved_at']
|
|
284
|
+
end
|
|
285
|
+
|
|
286
|
+
if attributes.key?(:'rejected_at')
|
|
287
|
+
self.rejected_at = attributes[:'rejected_at']
|
|
288
|
+
end
|
|
289
|
+
|
|
290
|
+
if attributes.key?(:'rejection_reason')
|
|
291
|
+
self.rejection_reason = attributes[:'rejection_reason']
|
|
292
|
+
end
|
|
293
|
+
|
|
294
|
+
if attributes.key?(:'transaction_id')
|
|
295
|
+
self.transaction_id = attributes[:'transaction_id']
|
|
296
|
+
end
|
|
297
|
+
|
|
298
|
+
if attributes.key?(:'created_at')
|
|
299
|
+
self.created_at = attributes[:'created_at']
|
|
300
|
+
end
|
|
301
|
+
|
|
302
|
+
if attributes.key?(:'updated_at')
|
|
303
|
+
self.updated_at = attributes[:'updated_at']
|
|
304
|
+
end
|
|
305
|
+
end
|
|
306
|
+
|
|
307
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
308
|
+
# @return Array for valid properties with the reasons
|
|
309
|
+
def list_invalid_properties
|
|
310
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
311
|
+
invalid_properties = Array.new
|
|
312
|
+
invalid_properties
|
|
313
|
+
end
|
|
314
|
+
|
|
315
|
+
# Check to see if the all the properties in the model are valid
|
|
316
|
+
# @return true if the model is valid
|
|
317
|
+
def valid?
|
|
318
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
319
|
+
status_validator = EnumAttributeValidator.new('String', ["PENDING", "APPROVED", "REJECTED", "EXPIRED", "COMPLETED"])
|
|
320
|
+
return false unless status_validator.valid?(@status)
|
|
321
|
+
true
|
|
322
|
+
end
|
|
323
|
+
|
|
324
|
+
# Checks equality by comparing each attribute.
|
|
325
|
+
# @param [Object] Object to be compared
|
|
326
|
+
def ==(o)
|
|
327
|
+
return true if self.equal?(o)
|
|
328
|
+
self.class == o.class &&
|
|
329
|
+
id == o.id &&
|
|
330
|
+
status == o.status &&
|
|
331
|
+
amount == o.amount &&
|
|
332
|
+
payer_document == o.payer_document &&
|
|
333
|
+
payer_name == o.payer_name &&
|
|
334
|
+
payer_account_number == o.payer_account_number &&
|
|
335
|
+
payer_institution_ispb == o.payer_institution_ispb &&
|
|
336
|
+
payer_institution_name == o.payer_institution_name &&
|
|
337
|
+
receiver_document == o.receiver_document &&
|
|
338
|
+
receiver_name == o.receiver_name &&
|
|
339
|
+
receiver_account_number == o.receiver_account_number &&
|
|
340
|
+
receiver_institution_ispb == o.receiver_institution_ispb &&
|
|
341
|
+
receiver_institution_name == o.receiver_institution_name &&
|
|
342
|
+
end_to_end_id == o.end_to_end_id &&
|
|
343
|
+
paid_at == o.paid_at &&
|
|
344
|
+
pix_key == o.pix_key &&
|
|
345
|
+
description == o.description &&
|
|
346
|
+
approved_at == o.approved_at &&
|
|
347
|
+
rejected_at == o.rejected_at &&
|
|
348
|
+
rejection_reason == o.rejection_reason &&
|
|
349
|
+
transaction_id == o.transaction_id &&
|
|
350
|
+
created_at == o.created_at &&
|
|
351
|
+
updated_at == o.updated_at
|
|
352
|
+
end
|
|
353
|
+
|
|
354
|
+
# @see the `==` method
|
|
355
|
+
# @param [Object] Object to be compared
|
|
356
|
+
def eql?(o)
|
|
357
|
+
self == o
|
|
358
|
+
end
|
|
359
|
+
|
|
360
|
+
# Calculates hash code according to all attributes.
|
|
361
|
+
# @return [Integer] Hash code
|
|
362
|
+
def hash
|
|
363
|
+
[id, status, amount, payer_document, payer_name, payer_account_number, payer_institution_ispb, payer_institution_name, receiver_document, receiver_name, receiver_account_number, receiver_institution_ispb, receiver_institution_name, end_to_end_id, paid_at, pix_key, description, approved_at, rejected_at, rejection_reason, transaction_id, created_at, updated_at].hash
|
|
364
|
+
end
|
|
365
|
+
|
|
366
|
+
# Builds the object from hash
|
|
367
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
368
|
+
# @return [Object] Returns the model itself
|
|
369
|
+
def self.build_from_hash(attributes)
|
|
370
|
+
return nil unless attributes.is_a?(Hash)
|
|
371
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
372
|
+
transformed_hash = {}
|
|
373
|
+
openapi_types.each_pair do |key, type|
|
|
374
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
375
|
+
transformed_hash["#{key}"] = nil
|
|
376
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
377
|
+
# check to ensure the input is an array given that the attribute
|
|
378
|
+
# is documented as an array but the input is not
|
|
379
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
380
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
381
|
+
end
|
|
382
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
383
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
384
|
+
end
|
|
385
|
+
end
|
|
386
|
+
new(transformed_hash)
|
|
387
|
+
end
|
|
388
|
+
|
|
389
|
+
# Returns the object in the form of hash
|
|
390
|
+
# @return [Hash] Returns the object in the form of hash
|
|
391
|
+
def to_hash
|
|
392
|
+
hash = {}
|
|
393
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
394
|
+
value = self.send(attr)
|
|
395
|
+
if value.nil?
|
|
396
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
397
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
398
|
+
end
|
|
399
|
+
|
|
400
|
+
hash[param] = _to_hash(value)
|
|
401
|
+
end
|
|
402
|
+
hash
|
|
403
|
+
end
|
|
404
|
+
|
|
405
|
+
end
|
|
406
|
+
|
|
407
|
+
end
|
|
@@ -0,0 +1,180 @@
|
|
|
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 DepositPendingListResponse < ApiModelBase
|
|
18
|
+
# Page returned in this response.
|
|
19
|
+
attr_accessor :page
|
|
20
|
+
|
|
21
|
+
# Maximum number of records per page used in this query.
|
|
22
|
+
attr_accessor :limit
|
|
23
|
+
|
|
24
|
+
# Comes back true when there is still a record after this page.
|
|
25
|
+
attr_accessor :has_next_page
|
|
26
|
+
|
|
27
|
+
# Pending deposits of this page, ordered from the most recent creation to the oldest.
|
|
28
|
+
attr_accessor :data
|
|
29
|
+
|
|
30
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
31
|
+
def self.attribute_map
|
|
32
|
+
{
|
|
33
|
+
:'page' => :'page',
|
|
34
|
+
:'limit' => :'limit',
|
|
35
|
+
:'has_next_page' => :'hasNextPage',
|
|
36
|
+
:'data' => :'data'
|
|
37
|
+
}
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
# Returns attribute mapping this model knows about
|
|
41
|
+
def self.acceptable_attribute_map
|
|
42
|
+
attribute_map
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
# Returns all the JSON keys this model knows about
|
|
46
|
+
def self.acceptable_attributes
|
|
47
|
+
acceptable_attribute_map.values
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
# Attribute type mapping.
|
|
51
|
+
def self.openapi_types
|
|
52
|
+
{
|
|
53
|
+
:'page' => :'Integer',
|
|
54
|
+
:'limit' => :'Integer',
|
|
55
|
+
:'has_next_page' => :'Boolean',
|
|
56
|
+
:'data' => :'Array<DepositPending>'
|
|
57
|
+
}
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
# List of attributes with nullable: true
|
|
61
|
+
def self.openapi_nullable
|
|
62
|
+
Set.new([
|
|
63
|
+
])
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
# Initializes the object
|
|
67
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
68
|
+
def initialize(attributes = {})
|
|
69
|
+
if (!attributes.is_a?(Hash))
|
|
70
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `PayZuPix::DepositPendingListResponse` initialize method"
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
74
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
75
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
76
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
77
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `PayZuPix::DepositPendingListResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
78
|
+
end
|
|
79
|
+
h[k.to_sym] = v
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
if attributes.key?(:'page')
|
|
83
|
+
self.page = attributes[:'page']
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
if attributes.key?(:'limit')
|
|
87
|
+
self.limit = attributes[:'limit']
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
if attributes.key?(:'has_next_page')
|
|
91
|
+
self.has_next_page = attributes[:'has_next_page']
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
if attributes.key?(:'data')
|
|
95
|
+
if (value = attributes[:'data']).is_a?(Array)
|
|
96
|
+
self.data = value
|
|
97
|
+
end
|
|
98
|
+
end
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
102
|
+
# @return Array for valid properties with the reasons
|
|
103
|
+
def list_invalid_properties
|
|
104
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
105
|
+
invalid_properties = Array.new
|
|
106
|
+
invalid_properties
|
|
107
|
+
end
|
|
108
|
+
|
|
109
|
+
# Check to see if the all the properties in the model are valid
|
|
110
|
+
# @return true if the model is valid
|
|
111
|
+
def valid?
|
|
112
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
113
|
+
true
|
|
114
|
+
end
|
|
115
|
+
|
|
116
|
+
# Checks equality by comparing each attribute.
|
|
117
|
+
# @param [Object] Object to be compared
|
|
118
|
+
def ==(o)
|
|
119
|
+
return true if self.equal?(o)
|
|
120
|
+
self.class == o.class &&
|
|
121
|
+
page == o.page &&
|
|
122
|
+
limit == o.limit &&
|
|
123
|
+
has_next_page == o.has_next_page &&
|
|
124
|
+
data == o.data
|
|
125
|
+
end
|
|
126
|
+
|
|
127
|
+
# @see the `==` method
|
|
128
|
+
# @param [Object] Object to be compared
|
|
129
|
+
def eql?(o)
|
|
130
|
+
self == o
|
|
131
|
+
end
|
|
132
|
+
|
|
133
|
+
# Calculates hash code according to all attributes.
|
|
134
|
+
# @return [Integer] Hash code
|
|
135
|
+
def hash
|
|
136
|
+
[page, limit, has_next_page, data].hash
|
|
137
|
+
end
|
|
138
|
+
|
|
139
|
+
# Builds the object from hash
|
|
140
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
141
|
+
# @return [Object] Returns the model itself
|
|
142
|
+
def self.build_from_hash(attributes)
|
|
143
|
+
return nil unless attributes.is_a?(Hash)
|
|
144
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
145
|
+
transformed_hash = {}
|
|
146
|
+
openapi_types.each_pair do |key, type|
|
|
147
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
148
|
+
transformed_hash["#{key}"] = nil
|
|
149
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
150
|
+
# check to ensure the input is an array given that the attribute
|
|
151
|
+
# is documented as an array but the input is not
|
|
152
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
153
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
154
|
+
end
|
|
155
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
156
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
157
|
+
end
|
|
158
|
+
end
|
|
159
|
+
new(transformed_hash)
|
|
160
|
+
end
|
|
161
|
+
|
|
162
|
+
# Returns the object in the form of hash
|
|
163
|
+
# @return [Hash] Returns the object in the form of hash
|
|
164
|
+
def to_hash
|
|
165
|
+
hash = {}
|
|
166
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
167
|
+
value = self.send(attr)
|
|
168
|
+
if value.nil?
|
|
169
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
170
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
171
|
+
end
|
|
172
|
+
|
|
173
|
+
hash[param] = _to_hash(value)
|
|
174
|
+
end
|
|
175
|
+
hash
|
|
176
|
+
end
|
|
177
|
+
|
|
178
|
+
end
|
|
179
|
+
|
|
180
|
+
end
|