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,262 @@
|
|
|
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 ResendUserCallbacksRequest < ApiModelBase
|
|
18
|
+
# Start of the period. At most 30 days ago.
|
|
19
|
+
attr_accessor :created_at_from
|
|
20
|
+
|
|
21
|
+
# End of the period, on or after createdAtFrom. The window between start and end cannot exceed 7 days.
|
|
22
|
+
attr_accessor :created_at_to
|
|
23
|
+
|
|
24
|
+
# Restrict to specific transaction IDs
|
|
25
|
+
attr_accessor :transaction_ids
|
|
26
|
+
|
|
27
|
+
# Filter by transaction type
|
|
28
|
+
attr_accessor :transaction_types
|
|
29
|
+
|
|
30
|
+
# Filter by transaction status
|
|
31
|
+
attr_accessor :transaction_status
|
|
32
|
+
|
|
33
|
+
# Restrict to specific Pix end-to-end IDs
|
|
34
|
+
attr_accessor :transaction_end_to_end_ids
|
|
35
|
+
|
|
36
|
+
class EnumAttributeValidator
|
|
37
|
+
attr_reader :datatype
|
|
38
|
+
attr_reader :allowable_values
|
|
39
|
+
|
|
40
|
+
def initialize(datatype, allowable_values)
|
|
41
|
+
@allowable_values = allowable_values.map do |value|
|
|
42
|
+
case datatype.to_s
|
|
43
|
+
when /Integer/i
|
|
44
|
+
value.to_i
|
|
45
|
+
when /Float/i
|
|
46
|
+
value.to_f
|
|
47
|
+
else
|
|
48
|
+
value
|
|
49
|
+
end
|
|
50
|
+
end
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
def valid?(value)
|
|
54
|
+
!value || allowable_values.include?(value)
|
|
55
|
+
end
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
59
|
+
def self.attribute_map
|
|
60
|
+
{
|
|
61
|
+
:'created_at_from' => :'createdAtFrom',
|
|
62
|
+
:'created_at_to' => :'createdAtTo',
|
|
63
|
+
:'transaction_ids' => :'transactionIds',
|
|
64
|
+
:'transaction_types' => :'transactionTypes',
|
|
65
|
+
:'transaction_status' => :'transactionStatus',
|
|
66
|
+
:'transaction_end_to_end_ids' => :'transactionEndToEndIds'
|
|
67
|
+
}
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
# Returns attribute mapping this model knows about
|
|
71
|
+
def self.acceptable_attribute_map
|
|
72
|
+
attribute_map
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
# Returns all the JSON keys this model knows about
|
|
76
|
+
def self.acceptable_attributes
|
|
77
|
+
acceptable_attribute_map.values
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
# Attribute type mapping.
|
|
81
|
+
def self.openapi_types
|
|
82
|
+
{
|
|
83
|
+
:'created_at_from' => :'Time',
|
|
84
|
+
:'created_at_to' => :'Time',
|
|
85
|
+
:'transaction_ids' => :'Array<String>',
|
|
86
|
+
:'transaction_types' => :'Array<String>',
|
|
87
|
+
:'transaction_status' => :'Array<String>',
|
|
88
|
+
:'transaction_end_to_end_ids' => :'Array<String>'
|
|
89
|
+
}
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
# List of attributes with nullable: true
|
|
93
|
+
def self.openapi_nullable
|
|
94
|
+
Set.new([
|
|
95
|
+
])
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
# Initializes the object
|
|
99
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
100
|
+
def initialize(attributes = {})
|
|
101
|
+
if (!attributes.is_a?(Hash))
|
|
102
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `PayZuPix::ResendUserCallbacksRequest` initialize method"
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
106
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
107
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
108
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
109
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `PayZuPix::ResendUserCallbacksRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
110
|
+
end
|
|
111
|
+
h[k.to_sym] = v
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
if attributes.key?(:'created_at_from')
|
|
115
|
+
self.created_at_from = attributes[:'created_at_from']
|
|
116
|
+
else
|
|
117
|
+
self.created_at_from = nil
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
if attributes.key?(:'created_at_to')
|
|
121
|
+
self.created_at_to = attributes[:'created_at_to']
|
|
122
|
+
else
|
|
123
|
+
self.created_at_to = nil
|
|
124
|
+
end
|
|
125
|
+
|
|
126
|
+
if attributes.key?(:'transaction_ids')
|
|
127
|
+
if (value = attributes[:'transaction_ids']).is_a?(Array)
|
|
128
|
+
self.transaction_ids = value
|
|
129
|
+
end
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
if attributes.key?(:'transaction_types')
|
|
133
|
+
if (value = attributes[:'transaction_types']).is_a?(Array)
|
|
134
|
+
self.transaction_types = value
|
|
135
|
+
end
|
|
136
|
+
end
|
|
137
|
+
|
|
138
|
+
if attributes.key?(:'transaction_status')
|
|
139
|
+
if (value = attributes[:'transaction_status']).is_a?(Array)
|
|
140
|
+
self.transaction_status = value
|
|
141
|
+
end
|
|
142
|
+
end
|
|
143
|
+
|
|
144
|
+
if attributes.key?(:'transaction_end_to_end_ids')
|
|
145
|
+
if (value = attributes[:'transaction_end_to_end_ids']).is_a?(Array)
|
|
146
|
+
self.transaction_end_to_end_ids = value
|
|
147
|
+
end
|
|
148
|
+
end
|
|
149
|
+
end
|
|
150
|
+
|
|
151
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
152
|
+
# @return Array for valid properties with the reasons
|
|
153
|
+
def list_invalid_properties
|
|
154
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
155
|
+
invalid_properties = Array.new
|
|
156
|
+
if @created_at_from.nil?
|
|
157
|
+
invalid_properties.push('invalid value for "created_at_from", created_at_from cannot be nil.')
|
|
158
|
+
end
|
|
159
|
+
|
|
160
|
+
if @created_at_to.nil?
|
|
161
|
+
invalid_properties.push('invalid value for "created_at_to", created_at_to cannot be nil.')
|
|
162
|
+
end
|
|
163
|
+
|
|
164
|
+
invalid_properties
|
|
165
|
+
end
|
|
166
|
+
|
|
167
|
+
# Check to see if the all the properties in the model are valid
|
|
168
|
+
# @return true if the model is valid
|
|
169
|
+
def valid?
|
|
170
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
171
|
+
return false if @created_at_from.nil?
|
|
172
|
+
return false if @created_at_to.nil?
|
|
173
|
+
true
|
|
174
|
+
end
|
|
175
|
+
|
|
176
|
+
# Custom attribute writer method with validation
|
|
177
|
+
# @param [Object] created_at_from Value to be assigned
|
|
178
|
+
def created_at_from=(created_at_from)
|
|
179
|
+
if created_at_from.nil?
|
|
180
|
+
fail ArgumentError, 'created_at_from cannot be nil'
|
|
181
|
+
end
|
|
182
|
+
|
|
183
|
+
@created_at_from = created_at_from
|
|
184
|
+
end
|
|
185
|
+
|
|
186
|
+
# Custom attribute writer method with validation
|
|
187
|
+
# @param [Object] created_at_to Value to be assigned
|
|
188
|
+
def created_at_to=(created_at_to)
|
|
189
|
+
if created_at_to.nil?
|
|
190
|
+
fail ArgumentError, 'created_at_to cannot be nil'
|
|
191
|
+
end
|
|
192
|
+
|
|
193
|
+
@created_at_to = created_at_to
|
|
194
|
+
end
|
|
195
|
+
|
|
196
|
+
# Checks equality by comparing each attribute.
|
|
197
|
+
# @param [Object] Object to be compared
|
|
198
|
+
def ==(o)
|
|
199
|
+
return true if self.equal?(o)
|
|
200
|
+
self.class == o.class &&
|
|
201
|
+
created_at_from == o.created_at_from &&
|
|
202
|
+
created_at_to == o.created_at_to &&
|
|
203
|
+
transaction_ids == o.transaction_ids &&
|
|
204
|
+
transaction_types == o.transaction_types &&
|
|
205
|
+
transaction_status == o.transaction_status &&
|
|
206
|
+
transaction_end_to_end_ids == o.transaction_end_to_end_ids
|
|
207
|
+
end
|
|
208
|
+
|
|
209
|
+
# @see the `==` method
|
|
210
|
+
# @param [Object] Object to be compared
|
|
211
|
+
def eql?(o)
|
|
212
|
+
self == o
|
|
213
|
+
end
|
|
214
|
+
|
|
215
|
+
# Calculates hash code according to all attributes.
|
|
216
|
+
# @return [Integer] Hash code
|
|
217
|
+
def hash
|
|
218
|
+
[created_at_from, created_at_to, transaction_ids, transaction_types, transaction_status, transaction_end_to_end_ids].hash
|
|
219
|
+
end
|
|
220
|
+
|
|
221
|
+
# Builds the object from hash
|
|
222
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
223
|
+
# @return [Object] Returns the model itself
|
|
224
|
+
def self.build_from_hash(attributes)
|
|
225
|
+
return nil unless attributes.is_a?(Hash)
|
|
226
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
227
|
+
transformed_hash = {}
|
|
228
|
+
openapi_types.each_pair do |key, type|
|
|
229
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
230
|
+
transformed_hash["#{key}"] = nil
|
|
231
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
232
|
+
# check to ensure the input is an array given that the attribute
|
|
233
|
+
# is documented as an array but the input is not
|
|
234
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
235
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
236
|
+
end
|
|
237
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
238
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
239
|
+
end
|
|
240
|
+
end
|
|
241
|
+
new(transformed_hash)
|
|
242
|
+
end
|
|
243
|
+
|
|
244
|
+
# Returns the object in the form of hash
|
|
245
|
+
# @return [Hash] Returns the object in the form of hash
|
|
246
|
+
def to_hash
|
|
247
|
+
hash = {}
|
|
248
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
249
|
+
value = self.send(attr)
|
|
250
|
+
if value.nil?
|
|
251
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
252
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
253
|
+
end
|
|
254
|
+
|
|
255
|
+
hash[param] = _to_hash(value)
|
|
256
|
+
end
|
|
257
|
+
hash
|
|
258
|
+
end
|
|
259
|
+
|
|
260
|
+
end
|
|
261
|
+
|
|
262
|
+
end
|
|
@@ -0,0 +1,274 @@
|
|
|
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 ResendWebhookCallbacksRequest < ApiModelBase
|
|
18
|
+
# Start of the delivery period. At most 30 days ago.
|
|
19
|
+
attr_accessor :created_at_from
|
|
20
|
+
|
|
21
|
+
# End of the delivery period, on or after createdAtFrom. The window cannot exceed 7 days.
|
|
22
|
+
attr_accessor :created_at_to
|
|
23
|
+
|
|
24
|
+
# Webhooks to resend. Omitted: all active webhooks of the account.
|
|
25
|
+
attr_accessor :webhook_ids
|
|
26
|
+
|
|
27
|
+
# Restrict to specific transaction IDs.
|
|
28
|
+
attr_accessor :transaction_ids
|
|
29
|
+
|
|
30
|
+
# Filter by transaction type.
|
|
31
|
+
attr_accessor :transaction_types
|
|
32
|
+
|
|
33
|
+
# Filter by the current transaction status.
|
|
34
|
+
attr_accessor :transaction_status
|
|
35
|
+
|
|
36
|
+
# Restrict to specific end-to-end IDs.
|
|
37
|
+
attr_accessor :transaction_end_to_end_ids
|
|
38
|
+
|
|
39
|
+
class EnumAttributeValidator
|
|
40
|
+
attr_reader :datatype
|
|
41
|
+
attr_reader :allowable_values
|
|
42
|
+
|
|
43
|
+
def initialize(datatype, allowable_values)
|
|
44
|
+
@allowable_values = allowable_values.map do |value|
|
|
45
|
+
case datatype.to_s
|
|
46
|
+
when /Integer/i
|
|
47
|
+
value.to_i
|
|
48
|
+
when /Float/i
|
|
49
|
+
value.to_f
|
|
50
|
+
else
|
|
51
|
+
value
|
|
52
|
+
end
|
|
53
|
+
end
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
def valid?(value)
|
|
57
|
+
!value || allowable_values.include?(value)
|
|
58
|
+
end
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
62
|
+
def self.attribute_map
|
|
63
|
+
{
|
|
64
|
+
:'created_at_from' => :'createdAtFrom',
|
|
65
|
+
:'created_at_to' => :'createdAtTo',
|
|
66
|
+
:'webhook_ids' => :'webhookIds',
|
|
67
|
+
:'transaction_ids' => :'transactionIds',
|
|
68
|
+
:'transaction_types' => :'transactionTypes',
|
|
69
|
+
:'transaction_status' => :'transactionStatus',
|
|
70
|
+
:'transaction_end_to_end_ids' => :'transactionEndToEndIds'
|
|
71
|
+
}
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
# Returns attribute mapping this model knows about
|
|
75
|
+
def self.acceptable_attribute_map
|
|
76
|
+
attribute_map
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
# Returns all the JSON keys this model knows about
|
|
80
|
+
def self.acceptable_attributes
|
|
81
|
+
acceptable_attribute_map.values
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
# Attribute type mapping.
|
|
85
|
+
def self.openapi_types
|
|
86
|
+
{
|
|
87
|
+
:'created_at_from' => :'Time',
|
|
88
|
+
:'created_at_to' => :'Time',
|
|
89
|
+
:'webhook_ids' => :'Array<String>',
|
|
90
|
+
:'transaction_ids' => :'Array<String>',
|
|
91
|
+
:'transaction_types' => :'Array<String>',
|
|
92
|
+
:'transaction_status' => :'Array<String>',
|
|
93
|
+
:'transaction_end_to_end_ids' => :'Array<String>'
|
|
94
|
+
}
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
# List of attributes with nullable: true
|
|
98
|
+
def self.openapi_nullable
|
|
99
|
+
Set.new([
|
|
100
|
+
])
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
# Initializes the object
|
|
104
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
105
|
+
def initialize(attributes = {})
|
|
106
|
+
if (!attributes.is_a?(Hash))
|
|
107
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `PayZuPix::ResendWebhookCallbacksRequest` initialize method"
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
111
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
112
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
113
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
114
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `PayZuPix::ResendWebhookCallbacksRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
115
|
+
end
|
|
116
|
+
h[k.to_sym] = v
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
if attributes.key?(:'created_at_from')
|
|
120
|
+
self.created_at_from = attributes[:'created_at_from']
|
|
121
|
+
else
|
|
122
|
+
self.created_at_from = nil
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
if attributes.key?(:'created_at_to')
|
|
126
|
+
self.created_at_to = attributes[:'created_at_to']
|
|
127
|
+
else
|
|
128
|
+
self.created_at_to = nil
|
|
129
|
+
end
|
|
130
|
+
|
|
131
|
+
if attributes.key?(:'webhook_ids')
|
|
132
|
+
if (value = attributes[:'webhook_ids']).is_a?(Array)
|
|
133
|
+
self.webhook_ids = value
|
|
134
|
+
end
|
|
135
|
+
end
|
|
136
|
+
|
|
137
|
+
if attributes.key?(:'transaction_ids')
|
|
138
|
+
if (value = attributes[:'transaction_ids']).is_a?(Array)
|
|
139
|
+
self.transaction_ids = value
|
|
140
|
+
end
|
|
141
|
+
end
|
|
142
|
+
|
|
143
|
+
if attributes.key?(:'transaction_types')
|
|
144
|
+
if (value = attributes[:'transaction_types']).is_a?(Array)
|
|
145
|
+
self.transaction_types = value
|
|
146
|
+
end
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
if attributes.key?(:'transaction_status')
|
|
150
|
+
if (value = attributes[:'transaction_status']).is_a?(Array)
|
|
151
|
+
self.transaction_status = value
|
|
152
|
+
end
|
|
153
|
+
end
|
|
154
|
+
|
|
155
|
+
if attributes.key?(:'transaction_end_to_end_ids')
|
|
156
|
+
if (value = attributes[:'transaction_end_to_end_ids']).is_a?(Array)
|
|
157
|
+
self.transaction_end_to_end_ids = value
|
|
158
|
+
end
|
|
159
|
+
end
|
|
160
|
+
end
|
|
161
|
+
|
|
162
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
163
|
+
# @return Array for valid properties with the reasons
|
|
164
|
+
def list_invalid_properties
|
|
165
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
166
|
+
invalid_properties = Array.new
|
|
167
|
+
if @created_at_from.nil?
|
|
168
|
+
invalid_properties.push('invalid value for "created_at_from", created_at_from cannot be nil.')
|
|
169
|
+
end
|
|
170
|
+
|
|
171
|
+
if @created_at_to.nil?
|
|
172
|
+
invalid_properties.push('invalid value for "created_at_to", created_at_to cannot be nil.')
|
|
173
|
+
end
|
|
174
|
+
|
|
175
|
+
invalid_properties
|
|
176
|
+
end
|
|
177
|
+
|
|
178
|
+
# Check to see if the all the properties in the model are valid
|
|
179
|
+
# @return true if the model is valid
|
|
180
|
+
def valid?
|
|
181
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
182
|
+
return false if @created_at_from.nil?
|
|
183
|
+
return false if @created_at_to.nil?
|
|
184
|
+
true
|
|
185
|
+
end
|
|
186
|
+
|
|
187
|
+
# Custom attribute writer method with validation
|
|
188
|
+
# @param [Object] created_at_from Value to be assigned
|
|
189
|
+
def created_at_from=(created_at_from)
|
|
190
|
+
if created_at_from.nil?
|
|
191
|
+
fail ArgumentError, 'created_at_from cannot be nil'
|
|
192
|
+
end
|
|
193
|
+
|
|
194
|
+
@created_at_from = created_at_from
|
|
195
|
+
end
|
|
196
|
+
|
|
197
|
+
# Custom attribute writer method with validation
|
|
198
|
+
# @param [Object] created_at_to Value to be assigned
|
|
199
|
+
def created_at_to=(created_at_to)
|
|
200
|
+
if created_at_to.nil?
|
|
201
|
+
fail ArgumentError, 'created_at_to cannot be nil'
|
|
202
|
+
end
|
|
203
|
+
|
|
204
|
+
@created_at_to = created_at_to
|
|
205
|
+
end
|
|
206
|
+
|
|
207
|
+
# Checks equality by comparing each attribute.
|
|
208
|
+
# @param [Object] Object to be compared
|
|
209
|
+
def ==(o)
|
|
210
|
+
return true if self.equal?(o)
|
|
211
|
+
self.class == o.class &&
|
|
212
|
+
created_at_from == o.created_at_from &&
|
|
213
|
+
created_at_to == o.created_at_to &&
|
|
214
|
+
webhook_ids == o.webhook_ids &&
|
|
215
|
+
transaction_ids == o.transaction_ids &&
|
|
216
|
+
transaction_types == o.transaction_types &&
|
|
217
|
+
transaction_status == o.transaction_status &&
|
|
218
|
+
transaction_end_to_end_ids == o.transaction_end_to_end_ids
|
|
219
|
+
end
|
|
220
|
+
|
|
221
|
+
# @see the `==` method
|
|
222
|
+
# @param [Object] Object to be compared
|
|
223
|
+
def eql?(o)
|
|
224
|
+
self == o
|
|
225
|
+
end
|
|
226
|
+
|
|
227
|
+
# Calculates hash code according to all attributes.
|
|
228
|
+
# @return [Integer] Hash code
|
|
229
|
+
def hash
|
|
230
|
+
[created_at_from, created_at_to, webhook_ids, transaction_ids, transaction_types, transaction_status, transaction_end_to_end_ids].hash
|
|
231
|
+
end
|
|
232
|
+
|
|
233
|
+
# Builds the object from hash
|
|
234
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
235
|
+
# @return [Object] Returns the model itself
|
|
236
|
+
def self.build_from_hash(attributes)
|
|
237
|
+
return nil unless attributes.is_a?(Hash)
|
|
238
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
239
|
+
transformed_hash = {}
|
|
240
|
+
openapi_types.each_pair do |key, type|
|
|
241
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
242
|
+
transformed_hash["#{key}"] = nil
|
|
243
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
244
|
+
# check to ensure the input is an array given that the attribute
|
|
245
|
+
# is documented as an array but the input is not
|
|
246
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
247
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
248
|
+
end
|
|
249
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
250
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
251
|
+
end
|
|
252
|
+
end
|
|
253
|
+
new(transformed_hash)
|
|
254
|
+
end
|
|
255
|
+
|
|
256
|
+
# Returns the object in the form of hash
|
|
257
|
+
# @return [Hash] Returns the object in the form of hash
|
|
258
|
+
def to_hash
|
|
259
|
+
hash = {}
|
|
260
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
261
|
+
value = self.send(attr)
|
|
262
|
+
if value.nil?
|
|
263
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
264
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
265
|
+
end
|
|
266
|
+
|
|
267
|
+
hash[param] = _to_hash(value)
|
|
268
|
+
end
|
|
269
|
+
hash
|
|
270
|
+
end
|
|
271
|
+
|
|
272
|
+
end
|
|
273
|
+
|
|
274
|
+
end
|
|
@@ -0,0 +1,148 @@
|
|
|
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 RotateCallbackSecretResponse < ApiModelBase
|
|
18
|
+
# Callback secret, 43 base64url characters. Store it: there is no route to read it again.
|
|
19
|
+
attr_accessor :secret
|
|
20
|
+
|
|
21
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
22
|
+
def self.attribute_map
|
|
23
|
+
{
|
|
24
|
+
:'secret' => :'secret'
|
|
25
|
+
}
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
# Returns attribute mapping this model knows about
|
|
29
|
+
def self.acceptable_attribute_map
|
|
30
|
+
attribute_map
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# Returns all the JSON keys this model knows about
|
|
34
|
+
def self.acceptable_attributes
|
|
35
|
+
acceptable_attribute_map.values
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
# Attribute type mapping.
|
|
39
|
+
def self.openapi_types
|
|
40
|
+
{
|
|
41
|
+
:'secret' => :'String'
|
|
42
|
+
}
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
# List of attributes with nullable: true
|
|
46
|
+
def self.openapi_nullable
|
|
47
|
+
Set.new([
|
|
48
|
+
])
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
# Initializes the object
|
|
52
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
53
|
+
def initialize(attributes = {})
|
|
54
|
+
if (!attributes.is_a?(Hash))
|
|
55
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `PayZuPix::RotateCallbackSecretResponse` initialize method"
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
59
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
60
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
61
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
62
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `PayZuPix::RotateCallbackSecretResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
63
|
+
end
|
|
64
|
+
h[k.to_sym] = v
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
if attributes.key?(:'secret')
|
|
68
|
+
self.secret = attributes[:'secret']
|
|
69
|
+
end
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
73
|
+
# @return Array for valid properties with the reasons
|
|
74
|
+
def list_invalid_properties
|
|
75
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
76
|
+
invalid_properties = Array.new
|
|
77
|
+
invalid_properties
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
# Check to see if the all the properties in the model are valid
|
|
81
|
+
# @return true if the model is valid
|
|
82
|
+
def valid?
|
|
83
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
84
|
+
true
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
# Checks equality by comparing each attribute.
|
|
88
|
+
# @param [Object] Object to be compared
|
|
89
|
+
def ==(o)
|
|
90
|
+
return true if self.equal?(o)
|
|
91
|
+
self.class == o.class &&
|
|
92
|
+
secret == o.secret
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
# @see the `==` method
|
|
96
|
+
# @param [Object] Object to be compared
|
|
97
|
+
def eql?(o)
|
|
98
|
+
self == o
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
# Calculates hash code according to all attributes.
|
|
102
|
+
# @return [Integer] Hash code
|
|
103
|
+
def hash
|
|
104
|
+
[secret].hash
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
# Builds the object from hash
|
|
108
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
109
|
+
# @return [Object] Returns the model itself
|
|
110
|
+
def self.build_from_hash(attributes)
|
|
111
|
+
return nil unless attributes.is_a?(Hash)
|
|
112
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
113
|
+
transformed_hash = {}
|
|
114
|
+
openapi_types.each_pair do |key, type|
|
|
115
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
116
|
+
transformed_hash["#{key}"] = nil
|
|
117
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
118
|
+
# check to ensure the input is an array given that the attribute
|
|
119
|
+
# is documented as an array but the input is not
|
|
120
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
121
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
122
|
+
end
|
|
123
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
124
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
125
|
+
end
|
|
126
|
+
end
|
|
127
|
+
new(transformed_hash)
|
|
128
|
+
end
|
|
129
|
+
|
|
130
|
+
# Returns the object in the form of hash
|
|
131
|
+
# @return [Hash] Returns the object in the form of hash
|
|
132
|
+
def to_hash
|
|
133
|
+
hash = {}
|
|
134
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
135
|
+
value = self.send(attr)
|
|
136
|
+
if value.nil?
|
|
137
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
138
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
139
|
+
end
|
|
140
|
+
|
|
141
|
+
hash[param] = _to_hash(value)
|
|
142
|
+
end
|
|
143
|
+
hash
|
|
144
|
+
end
|
|
145
|
+
|
|
146
|
+
end
|
|
147
|
+
|
|
148
|
+
end
|