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,334 @@
|
|
|
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 GetUser200Response < ApiModelBase
|
|
18
|
+
# Public account identifier (6 digits, unique). Used as destination for internal transfers.
|
|
19
|
+
attr_accessor :account_number
|
|
20
|
+
|
|
21
|
+
# Branch number (4 digits).
|
|
22
|
+
attr_accessor :branch
|
|
23
|
+
|
|
24
|
+
# Registered name of the account.
|
|
25
|
+
attr_accessor :name
|
|
26
|
+
|
|
27
|
+
# Account role.
|
|
28
|
+
attr_accessor :role
|
|
29
|
+
|
|
30
|
+
# Balance free for withdrawals and transfers, in reais.
|
|
31
|
+
attr_accessor :balance_available
|
|
32
|
+
|
|
33
|
+
# Part of the balance held, in reais.
|
|
34
|
+
attr_accessor :balance_blocked
|
|
35
|
+
|
|
36
|
+
# Account status.
|
|
37
|
+
attr_accessor :status
|
|
38
|
+
|
|
39
|
+
# When false, creating withdrawals is refused for lack of permission (PZS200).
|
|
40
|
+
attr_accessor :allow_withdraw
|
|
41
|
+
|
|
42
|
+
# When false, creating inbound Pix charges is refused for lack of permission (PZD200).
|
|
43
|
+
attr_accessor :allow_deposit
|
|
44
|
+
|
|
45
|
+
# Minimum amount accepted in each inbound charge, in reais; below the floor the creation is refused.
|
|
46
|
+
attr_accessor :cash_in_ticket_min
|
|
47
|
+
|
|
48
|
+
# Maximum amount accepted in each inbound charge, in reais; above the cap the creation is refused.
|
|
49
|
+
attr_accessor :cash_in_ticket_max
|
|
50
|
+
|
|
51
|
+
# Minimum amount per withdrawal or internal transfer, in reais; below the floor the request is refused.
|
|
52
|
+
attr_accessor :cash_out_ticket_min
|
|
53
|
+
|
|
54
|
+
# Maximum amount per withdrawal or internal transfer, in reais; above the cap the request is refused.
|
|
55
|
+
attr_accessor :cash_out_ticket_max
|
|
56
|
+
|
|
57
|
+
attr_accessor :service_fee
|
|
58
|
+
|
|
59
|
+
attr_accessor :daily_withdraw_limit
|
|
60
|
+
|
|
61
|
+
class EnumAttributeValidator
|
|
62
|
+
attr_reader :datatype
|
|
63
|
+
attr_reader :allowable_values
|
|
64
|
+
|
|
65
|
+
def initialize(datatype, allowable_values)
|
|
66
|
+
@allowable_values = allowable_values.map do |value|
|
|
67
|
+
case datatype.to_s
|
|
68
|
+
when /Integer/i
|
|
69
|
+
value.to_i
|
|
70
|
+
when /Float/i
|
|
71
|
+
value.to_f
|
|
72
|
+
else
|
|
73
|
+
value
|
|
74
|
+
end
|
|
75
|
+
end
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
def valid?(value)
|
|
79
|
+
!value || allowable_values.include?(value)
|
|
80
|
+
end
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
84
|
+
def self.attribute_map
|
|
85
|
+
{
|
|
86
|
+
:'account_number' => :'accountNumber',
|
|
87
|
+
:'branch' => :'branch',
|
|
88
|
+
:'name' => :'name',
|
|
89
|
+
:'role' => :'role',
|
|
90
|
+
:'balance_available' => :'balanceAvailable',
|
|
91
|
+
:'balance_blocked' => :'balanceBlocked',
|
|
92
|
+
:'status' => :'status',
|
|
93
|
+
:'allow_withdraw' => :'allowWithdraw',
|
|
94
|
+
:'allow_deposit' => :'allowDeposit',
|
|
95
|
+
:'cash_in_ticket_min' => :'cashInTicketMin',
|
|
96
|
+
:'cash_in_ticket_max' => :'cashInTicketMax',
|
|
97
|
+
:'cash_out_ticket_min' => :'cashOutTicketMin',
|
|
98
|
+
:'cash_out_ticket_max' => :'cashOutTicketMax',
|
|
99
|
+
:'service_fee' => :'ServiceFee',
|
|
100
|
+
:'daily_withdraw_limit' => :'DailyWithdrawLimit'
|
|
101
|
+
}
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
# Returns attribute mapping this model knows about
|
|
105
|
+
def self.acceptable_attribute_map
|
|
106
|
+
attribute_map
|
|
107
|
+
end
|
|
108
|
+
|
|
109
|
+
# Returns all the JSON keys this model knows about
|
|
110
|
+
def self.acceptable_attributes
|
|
111
|
+
acceptable_attribute_map.values
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
# Attribute type mapping.
|
|
115
|
+
def self.openapi_types
|
|
116
|
+
{
|
|
117
|
+
:'account_number' => :'String',
|
|
118
|
+
:'branch' => :'String',
|
|
119
|
+
:'name' => :'String',
|
|
120
|
+
:'role' => :'String',
|
|
121
|
+
:'balance_available' => :'Float',
|
|
122
|
+
:'balance_blocked' => :'Float',
|
|
123
|
+
:'status' => :'String',
|
|
124
|
+
:'allow_withdraw' => :'Boolean',
|
|
125
|
+
:'allow_deposit' => :'Boolean',
|
|
126
|
+
:'cash_in_ticket_min' => :'Float',
|
|
127
|
+
:'cash_in_ticket_max' => :'Float',
|
|
128
|
+
:'cash_out_ticket_min' => :'Float',
|
|
129
|
+
:'cash_out_ticket_max' => :'Float',
|
|
130
|
+
:'service_fee' => :'GetUser200ResponseServiceFee',
|
|
131
|
+
:'daily_withdraw_limit' => :'GetUser200ResponseDailyWithdrawLimit'
|
|
132
|
+
}
|
|
133
|
+
end
|
|
134
|
+
|
|
135
|
+
# List of attributes with nullable: true
|
|
136
|
+
def self.openapi_nullable
|
|
137
|
+
Set.new([
|
|
138
|
+
:'account_number',
|
|
139
|
+
])
|
|
140
|
+
end
|
|
141
|
+
|
|
142
|
+
# Initializes the object
|
|
143
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
144
|
+
def initialize(attributes = {})
|
|
145
|
+
if (!attributes.is_a?(Hash))
|
|
146
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `PayZuPix::GetUser200Response` initialize method"
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
150
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
151
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
152
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
153
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `PayZuPix::GetUser200Response`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
154
|
+
end
|
|
155
|
+
h[k.to_sym] = v
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
if attributes.key?(:'account_number')
|
|
159
|
+
self.account_number = attributes[:'account_number']
|
|
160
|
+
end
|
|
161
|
+
|
|
162
|
+
if attributes.key?(:'branch')
|
|
163
|
+
self.branch = attributes[:'branch']
|
|
164
|
+
end
|
|
165
|
+
|
|
166
|
+
if attributes.key?(:'name')
|
|
167
|
+
self.name = attributes[:'name']
|
|
168
|
+
end
|
|
169
|
+
|
|
170
|
+
if attributes.key?(:'role')
|
|
171
|
+
self.role = attributes[:'role']
|
|
172
|
+
end
|
|
173
|
+
|
|
174
|
+
if attributes.key?(:'balance_available')
|
|
175
|
+
self.balance_available = attributes[:'balance_available']
|
|
176
|
+
end
|
|
177
|
+
|
|
178
|
+
if attributes.key?(:'balance_blocked')
|
|
179
|
+
self.balance_blocked = attributes[:'balance_blocked']
|
|
180
|
+
end
|
|
181
|
+
|
|
182
|
+
if attributes.key?(:'status')
|
|
183
|
+
self.status = attributes[:'status']
|
|
184
|
+
end
|
|
185
|
+
|
|
186
|
+
if attributes.key?(:'allow_withdraw')
|
|
187
|
+
self.allow_withdraw = attributes[:'allow_withdraw']
|
|
188
|
+
end
|
|
189
|
+
|
|
190
|
+
if attributes.key?(:'allow_deposit')
|
|
191
|
+
self.allow_deposit = attributes[:'allow_deposit']
|
|
192
|
+
end
|
|
193
|
+
|
|
194
|
+
if attributes.key?(:'cash_in_ticket_min')
|
|
195
|
+
self.cash_in_ticket_min = attributes[:'cash_in_ticket_min']
|
|
196
|
+
end
|
|
197
|
+
|
|
198
|
+
if attributes.key?(:'cash_in_ticket_max')
|
|
199
|
+
self.cash_in_ticket_max = attributes[:'cash_in_ticket_max']
|
|
200
|
+
end
|
|
201
|
+
|
|
202
|
+
if attributes.key?(:'cash_out_ticket_min')
|
|
203
|
+
self.cash_out_ticket_min = attributes[:'cash_out_ticket_min']
|
|
204
|
+
end
|
|
205
|
+
|
|
206
|
+
if attributes.key?(:'cash_out_ticket_max')
|
|
207
|
+
self.cash_out_ticket_max = attributes[:'cash_out_ticket_max']
|
|
208
|
+
end
|
|
209
|
+
|
|
210
|
+
if attributes.key?(:'service_fee')
|
|
211
|
+
self.service_fee = attributes[:'service_fee']
|
|
212
|
+
end
|
|
213
|
+
|
|
214
|
+
if attributes.key?(:'daily_withdraw_limit')
|
|
215
|
+
self.daily_withdraw_limit = attributes[:'daily_withdraw_limit']
|
|
216
|
+
end
|
|
217
|
+
end
|
|
218
|
+
|
|
219
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
220
|
+
# @return Array for valid properties with the reasons
|
|
221
|
+
def list_invalid_properties
|
|
222
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
223
|
+
invalid_properties = Array.new
|
|
224
|
+
pattern = Regexp.new(/^[0-9]{4}$/)
|
|
225
|
+
if !@branch.nil? && @branch !~ pattern
|
|
226
|
+
invalid_properties.push("invalid value for \"branch\", must conform to the pattern #{pattern}.")
|
|
227
|
+
end
|
|
228
|
+
|
|
229
|
+
invalid_properties
|
|
230
|
+
end
|
|
231
|
+
|
|
232
|
+
# Check to see if the all the properties in the model are valid
|
|
233
|
+
# @return true if the model is valid
|
|
234
|
+
def valid?
|
|
235
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
236
|
+
return false if !@branch.nil? && @branch !~ Regexp.new(/^[0-9]{4}$/)
|
|
237
|
+
role_validator = EnumAttributeValidator.new('String', ["USER"])
|
|
238
|
+
return false unless role_validator.valid?(@role)
|
|
239
|
+
status_validator = EnumAttributeValidator.new('String', ["ACTIVE"])
|
|
240
|
+
return false unless status_validator.valid?(@status)
|
|
241
|
+
true
|
|
242
|
+
end
|
|
243
|
+
|
|
244
|
+
# Custom attribute writer method with validation
|
|
245
|
+
# @param [Object] branch Value to be assigned
|
|
246
|
+
def branch=(branch)
|
|
247
|
+
if branch.nil?
|
|
248
|
+
fail ArgumentError, 'branch cannot be nil'
|
|
249
|
+
end
|
|
250
|
+
|
|
251
|
+
pattern = Regexp.new(/^[0-9]{4}$/)
|
|
252
|
+
if branch !~ pattern
|
|
253
|
+
fail ArgumentError, "invalid value for \"branch\", must conform to the pattern #{pattern}."
|
|
254
|
+
end
|
|
255
|
+
|
|
256
|
+
@branch = branch
|
|
257
|
+
end
|
|
258
|
+
|
|
259
|
+
# Checks equality by comparing each attribute.
|
|
260
|
+
# @param [Object] Object to be compared
|
|
261
|
+
def ==(o)
|
|
262
|
+
return true if self.equal?(o)
|
|
263
|
+
self.class == o.class &&
|
|
264
|
+
account_number == o.account_number &&
|
|
265
|
+
branch == o.branch &&
|
|
266
|
+
name == o.name &&
|
|
267
|
+
role == o.role &&
|
|
268
|
+
balance_available == o.balance_available &&
|
|
269
|
+
balance_blocked == o.balance_blocked &&
|
|
270
|
+
status == o.status &&
|
|
271
|
+
allow_withdraw == o.allow_withdraw &&
|
|
272
|
+
allow_deposit == o.allow_deposit &&
|
|
273
|
+
cash_in_ticket_min == o.cash_in_ticket_min &&
|
|
274
|
+
cash_in_ticket_max == o.cash_in_ticket_max &&
|
|
275
|
+
cash_out_ticket_min == o.cash_out_ticket_min &&
|
|
276
|
+
cash_out_ticket_max == o.cash_out_ticket_max &&
|
|
277
|
+
service_fee == o.service_fee &&
|
|
278
|
+
daily_withdraw_limit == o.daily_withdraw_limit
|
|
279
|
+
end
|
|
280
|
+
|
|
281
|
+
# @see the `==` method
|
|
282
|
+
# @param [Object] Object to be compared
|
|
283
|
+
def eql?(o)
|
|
284
|
+
self == o
|
|
285
|
+
end
|
|
286
|
+
|
|
287
|
+
# Calculates hash code according to all attributes.
|
|
288
|
+
# @return [Integer] Hash code
|
|
289
|
+
def hash
|
|
290
|
+
[account_number, branch, name, role, balance_available, balance_blocked, status, allow_withdraw, allow_deposit, cash_in_ticket_min, cash_in_ticket_max, cash_out_ticket_min, cash_out_ticket_max, service_fee, daily_withdraw_limit].hash
|
|
291
|
+
end
|
|
292
|
+
|
|
293
|
+
# Builds the object from hash
|
|
294
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
295
|
+
# @return [Object] Returns the model itself
|
|
296
|
+
def self.build_from_hash(attributes)
|
|
297
|
+
return nil unless attributes.is_a?(Hash)
|
|
298
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
299
|
+
transformed_hash = {}
|
|
300
|
+
openapi_types.each_pair do |key, type|
|
|
301
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
302
|
+
transformed_hash["#{key}"] = nil
|
|
303
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
304
|
+
# check to ensure the input is an array given that the attribute
|
|
305
|
+
# is documented as an array but the input is not
|
|
306
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
307
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
308
|
+
end
|
|
309
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
310
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
311
|
+
end
|
|
312
|
+
end
|
|
313
|
+
new(transformed_hash)
|
|
314
|
+
end
|
|
315
|
+
|
|
316
|
+
# Returns the object in the form of hash
|
|
317
|
+
# @return [Hash] Returns the object in the form of hash
|
|
318
|
+
def to_hash
|
|
319
|
+
hash = {}
|
|
320
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
321
|
+
value = self.send(attr)
|
|
322
|
+
if value.nil?
|
|
323
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
324
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
325
|
+
end
|
|
326
|
+
|
|
327
|
+
hash[param] = _to_hash(value)
|
|
328
|
+
end
|
|
329
|
+
hash
|
|
330
|
+
end
|
|
331
|
+
|
|
332
|
+
end
|
|
333
|
+
|
|
334
|
+
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
|
+
# Control of the daily outbound cap.
|
|
18
|
+
class GetUser200ResponseDailyWithdrawLimit < ApiModelBase
|
|
19
|
+
# Daily outbound cap, in reais, summing withdrawals and internal transfers.
|
|
20
|
+
attr_accessor :limit
|
|
21
|
+
|
|
22
|
+
# Total of the cap consumed in the day, in reais, by withdrawals and internal transfers.
|
|
23
|
+
attr_accessor :used
|
|
24
|
+
|
|
25
|
+
# Date and time of the last change to the daily limit.
|
|
26
|
+
attr_accessor :updated_at
|
|
27
|
+
|
|
28
|
+
# Moment of the last reset of the daily usage.
|
|
29
|
+
attr_accessor :last_reset
|
|
30
|
+
|
|
31
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
32
|
+
def self.attribute_map
|
|
33
|
+
{
|
|
34
|
+
:'limit' => :'limit',
|
|
35
|
+
:'used' => :'used',
|
|
36
|
+
:'updated_at' => :'updatedAt',
|
|
37
|
+
:'last_reset' => :'lastReset'
|
|
38
|
+
}
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
# Returns attribute mapping this model knows about
|
|
42
|
+
def self.acceptable_attribute_map
|
|
43
|
+
attribute_map
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
# Returns all the JSON keys this model knows about
|
|
47
|
+
def self.acceptable_attributes
|
|
48
|
+
acceptable_attribute_map.values
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
# Attribute type mapping.
|
|
52
|
+
def self.openapi_types
|
|
53
|
+
{
|
|
54
|
+
:'limit' => :'Float',
|
|
55
|
+
:'used' => :'Float',
|
|
56
|
+
:'updated_at' => :'Time',
|
|
57
|
+
:'last_reset' => :'Time'
|
|
58
|
+
}
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
# List of attributes with nullable: true
|
|
62
|
+
def self.openapi_nullable
|
|
63
|
+
Set.new([
|
|
64
|
+
:'last_reset'
|
|
65
|
+
])
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
# Initializes the object
|
|
69
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
70
|
+
def initialize(attributes = {})
|
|
71
|
+
if (!attributes.is_a?(Hash))
|
|
72
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `PayZuPix::GetUser200ResponseDailyWithdrawLimit` initialize method"
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
76
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
77
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
78
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
79
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `PayZuPix::GetUser200ResponseDailyWithdrawLimit`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
80
|
+
end
|
|
81
|
+
h[k.to_sym] = v
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
if attributes.key?(:'limit')
|
|
85
|
+
self.limit = attributes[:'limit']
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
if attributes.key?(:'used')
|
|
89
|
+
self.used = attributes[:'used']
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
if attributes.key?(:'updated_at')
|
|
93
|
+
self.updated_at = attributes[:'updated_at']
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
if attributes.key?(:'last_reset')
|
|
97
|
+
self.last_reset = attributes[:'last_reset']
|
|
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
|
+
limit == o.limit &&
|
|
122
|
+
used == o.used &&
|
|
123
|
+
updated_at == o.updated_at &&
|
|
124
|
+
last_reset == o.last_reset
|
|
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
|
+
[limit, used, updated_at, last_reset].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
|