payzu-pix 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (172) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +9 -0
  3. data/README.md +231 -0
  4. data/Rakefile +10 -0
  5. data/docs/AccountApi.md +141 -0
  6. data/docs/ApiErrorDetailsInner.md +20 -0
  7. data/docs/BankStatement.md +42 -0
  8. data/docs/BankStatementListResponse.md +20 -0
  9. data/docs/BankStatementListResponsePagination.md +22 -0
  10. data/docs/CallbackDetail.md +34 -0
  11. data/docs/CallbackListResponse.md +20 -0
  12. data/docs/CallbackListResponsePagination.md +22 -0
  13. data/docs/CallbackSecretResponse.md +20 -0
  14. data/docs/CallbacksApi.md +587 -0
  15. data/docs/Defense.md +30 -0
  16. data/docs/DefenseFilesInner.md +24 -0
  17. data/docs/DefenseHistoryEntry.md +28 -0
  18. data/docs/DefenseHistoryEntryFilesInner.md +22 -0
  19. data/docs/DepositPending.md +62 -0
  20. data/docs/DepositPendingListResponse.md +24 -0
  21. data/docs/DictConsultResponse.md +30 -0
  22. data/docs/DownloadUserReport200Response.md +20 -0
  23. data/docs/EnqueuedCallback.md +18 -0
  24. data/docs/EnqueuedCallbackEnqueued.md +22 -0
  25. data/docs/EnqueuedCallbackItem.md +22 -0
  26. data/docs/ErrorResponse.md +32 -0
  27. data/docs/GetUser200Response.md +46 -0
  28. data/docs/GetUser200ResponseDailyWithdrawLimit.md +24 -0
  29. data/docs/GetUser200ResponseServiceFee.md +28 -0
  30. data/docs/GetUserBalance200Response.md +20 -0
  31. data/docs/GetUserTransactionById200Response.md +94 -0
  32. data/docs/GetUserTransactionById200ResponseAllOfCallbackLogInner.md +26 -0
  33. data/docs/GetUserTransactionById200ResponseAllOfInfractionInner.md +24 -0
  34. data/docs/GetUserTransactions200Response.md +22 -0
  35. data/docs/InfractionDetail.md +40 -0
  36. data/docs/InfractionDetailTransaction.md +30 -0
  37. data/docs/InfractionListResponse.md +20 -0
  38. data/docs/InfractionListResponsePagination.md +24 -0
  39. data/docs/InfractionsApi.md +413 -0
  40. data/docs/InternalTransferApi.md +153 -0
  41. data/docs/KeysAndDICTApi.md +217 -0
  42. data/docs/ListUserReports200Response.md +22 -0
  43. data/docs/PixKeyInfo.md +36 -0
  44. data/docs/PixOperationsApi.md +299 -0
  45. data/docs/PostInternalTransferRequest.md +30 -0
  46. data/docs/PostPixQrcodeReadRequest.md +18 -0
  47. data/docs/PostPixRequest.md +32 -0
  48. data/docs/PostUserReportRequest.md +24 -0
  49. data/docs/PostWithdrawQrcodeRequest.md +28 -0
  50. data/docs/PostWithdrawRequest.md +30 -0
  51. data/docs/ProofResponse.md +18 -0
  52. data/docs/QRCodeReadResponse.md +38 -0
  53. data/docs/Refund.md +34 -0
  54. data/docs/RefundRequest.md +22 -0
  55. data/docs/RefundsApi.md +79 -0
  56. data/docs/ReportJob.md +30 -0
  57. data/docs/ReportJobAccepted.md +30 -0
  58. data/docs/ReportJobDetail.md +30 -0
  59. data/docs/ReportsApi.md +881 -0
  60. data/docs/ResendUserCallbackSingle200Response.md +18 -0
  61. data/docs/ResendUserCallbacks200Response.md +20 -0
  62. data/docs/ResendUserCallbacksRequest.md +28 -0
  63. data/docs/ResendWebhookCallbacksRequest.md +30 -0
  64. data/docs/RotateCallbackSecretResponse.md +18 -0
  65. data/docs/RotateSecretResponse.md +18 -0
  66. data/docs/SentWebhookDetail.md +40 -0
  67. data/docs/SentWebhookDetailResponse.md +18 -0
  68. data/docs/SentWebhooksQuantity.md +18 -0
  69. data/docs/Summary.md +26 -0
  70. data/docs/SummaryBlock.md +24 -0
  71. data/docs/SummaryBlockGroupedInner.md +20 -0
  72. data/docs/SummaryBlockStatuses.md +26 -0
  73. data/docs/SummaryStatus.md +22 -0
  74. data/docs/Transaction.md +90 -0
  75. data/docs/TransactionWithRefunds.md +92 -0
  76. data/docs/Webhook.md +30 -0
  77. data/docs/WebhookCreateRequest.md +24 -0
  78. data/docs/WebhookEventType.md +15 -0
  79. data/docs/WebhookListResponse.md +18 -0
  80. data/docs/WebhookUpdateRequest.md +22 -0
  81. data/docs/WebhookWithSecret.md +32 -0
  82. data/docs/WebhooksApi.md +574 -0
  83. data/docs/WithdrawalsApi.md +299 -0
  84. data/git_push.sh +57 -0
  85. data/lib/payzu-pix/api/account_api.rb +136 -0
  86. data/lib/payzu-pix/api/callbacks_api.rb +577 -0
  87. data/lib/payzu-pix/api/infractions_api.rb +452 -0
  88. data/lib/payzu-pix/api/internal_transfer_api.rb +164 -0
  89. data/lib/payzu-pix/api/keys_and_dict_api.rb +234 -0
  90. data/lib/payzu-pix/api/pix_operations_api.rb +300 -0
  91. data/lib/payzu-pix/api/refunds_api.rb +96 -0
  92. data/lib/payzu-pix/api/reports_api.rb +968 -0
  93. data/lib/payzu-pix/api/webhooks_api.rb +542 -0
  94. data/lib/payzu-pix/api/withdrawals_api.rb +305 -0
  95. data/lib/payzu-pix/api_client.rb +441 -0
  96. data/lib/payzu-pix/api_error.rb +58 -0
  97. data/lib/payzu-pix/api_model_base.rb +88 -0
  98. data/lib/payzu-pix/configuration.rb +392 -0
  99. data/lib/payzu-pix/models/api_error_details_inner.rb +192 -0
  100. data/lib/payzu-pix/models/bank_statement.rb +296 -0
  101. data/lib/payzu-pix/models/bank_statement_list_response.rb +159 -0
  102. data/lib/payzu-pix/models/bank_statement_list_response_pagination.rb +169 -0
  103. data/lib/payzu-pix/models/callback_detail.rb +228 -0
  104. data/lib/payzu-pix/models/callback_list_response.rb +159 -0
  105. data/lib/payzu-pix/models/callback_list_response_pagination.rb +169 -0
  106. data/lib/payzu-pix/models/callback_secret_response.rb +158 -0
  107. data/lib/payzu-pix/models/defense.rb +234 -0
  108. data/lib/payzu-pix/models/defense_files_inner.rb +179 -0
  109. data/lib/payzu-pix/models/defense_history_entry.rb +225 -0
  110. data/lib/payzu-pix/models/defense_history_entry_files_inner.rb +168 -0
  111. data/lib/payzu-pix/models/deposit_pending.rb +407 -0
  112. data/lib/payzu-pix/models/deposit_pending_list_response.rb +180 -0
  113. data/lib/payzu-pix/models/dict_consult_response.rb +231 -0
  114. data/lib/payzu-pix/models/download_user_report200_response.rb +158 -0
  115. data/lib/payzu-pix/models/enqueued_callback.rb +147 -0
  116. data/lib/payzu-pix/models/enqueued_callback_enqueued.rb +170 -0
  117. data/lib/payzu-pix/models/enqueued_callback_item.rb +190 -0
  118. data/lib/payzu-pix/models/error_response.rb +336 -0
  119. data/lib/payzu-pix/models/get_user200_response.rb +334 -0
  120. data/lib/payzu-pix/models/get_user200_response_daily_withdraw_limit.rb +180 -0
  121. data/lib/payzu-pix/models/get_user200_response_service_fee.rb +199 -0
  122. data/lib/payzu-pix/models/get_user_balance200_response.rb +158 -0
  123. data/lib/payzu-pix/models/get_user_transaction_by_id200_response.rb +595 -0
  124. data/lib/payzu-pix/models/get_user_transaction_by_id200_response_all_of_callback_log_inner.rb +188 -0
  125. data/lib/payzu-pix/models/get_user_transaction_by_id200_response_all_of_infraction_inner.rb +202 -0
  126. data/lib/payzu-pix/models/get_user_transactions200_response.rb +170 -0
  127. data/lib/payzu-pix/models/infraction_detail.rb +293 -0
  128. data/lib/payzu-pix/models/infraction_detail_transaction.rb +213 -0
  129. data/lib/payzu-pix/models/infraction_list_response.rb +159 -0
  130. data/lib/payzu-pix/models/infraction_list_response_pagination.rb +179 -0
  131. data/lib/payzu-pix/models/list_user_reports200_response.rb +170 -0
  132. data/lib/payzu-pix/models/pix_key_info.rb +263 -0
  133. data/lib/payzu-pix/models/post_internal_transfer_request.rb +377 -0
  134. data/lib/payzu-pix/models/post_pix_qrcode_read_request.rb +174 -0
  135. data/lib/payzu-pix/models/post_pix_request.rb +382 -0
  136. data/lib/payzu-pix/models/post_user_report_request.rb +238 -0
  137. data/lib/payzu-pix/models/post_withdraw_qrcode_request.rb +302 -0
  138. data/lib/payzu-pix/models/post_withdraw_request.rb +350 -0
  139. data/lib/payzu-pix/models/proof_response.rb +148 -0
  140. data/lib/payzu-pix/models/qr_code_read_response.rb +283 -0
  141. data/lib/payzu-pix/models/refund.rb +257 -0
  142. data/lib/payzu-pix/models/refund_request.rb +215 -0
  143. data/lib/payzu-pix/models/report_job.rb +234 -0
  144. data/lib/payzu-pix/models/report_job_accepted.rb +237 -0
  145. data/lib/payzu-pix/models/report_job_detail.rb +237 -0
  146. data/lib/payzu-pix/models/resend_user_callback_single200_response.rb +148 -0
  147. data/lib/payzu-pix/models/resend_user_callbacks200_response.rb +158 -0
  148. data/lib/payzu-pix/models/resend_user_callbacks_request.rb +262 -0
  149. data/lib/payzu-pix/models/resend_webhook_callbacks_request.rb +274 -0
  150. data/lib/payzu-pix/models/rotate_callback_secret_response.rb +148 -0
  151. data/lib/payzu-pix/models/rotate_secret_response.rb +148 -0
  152. data/lib/payzu-pix/models/sent_webhook_detail.rb +261 -0
  153. data/lib/payzu-pix/models/sent_webhook_detail_response.rb +164 -0
  154. data/lib/payzu-pix/models/sent_webhooks_quantity.rb +148 -0
  155. data/lib/payzu-pix/models/summary.rb +188 -0
  156. data/lib/payzu-pix/models/summary_block.rb +179 -0
  157. data/lib/payzu-pix/models/summary_block_grouped_inner.rb +158 -0
  158. data/lib/payzu-pix/models/summary_block_statuses.rb +189 -0
  159. data/lib/payzu-pix/models/summary_status.rb +168 -0
  160. data/lib/payzu-pix/models/transaction.rb +588 -0
  161. data/lib/payzu-pix/models/transaction_with_refunds.rb +583 -0
  162. data/lib/payzu-pix/models/webhook.rb +210 -0
  163. data/lib/payzu-pix/models/webhook_create_request.rb +201 -0
  164. data/lib/payzu-pix/models/webhook_event_type.rb +47 -0
  165. data/lib/payzu-pix/models/webhook_list_response.rb +150 -0
  166. data/lib/payzu-pix/models/webhook_update_request.rb +171 -0
  167. data/lib/payzu-pix/models/webhook_with_secret.rb +220 -0
  168. data/lib/payzu-pix/version.rb +15 -0
  169. data/lib/payzu-pix.rb +119 -0
  170. data/payzu-pix.gemspec +41 -0
  171. data/spec/spec_helper.rb +111 -0
  172. metadata +283 -0
@@ -0,0 +1,231 @@
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 DictConsultResponse < ApiModelBase
18
+ # Normalized Pix key.
19
+ attr_accessor :pix_key
20
+
21
+ # Name of the key holder as returned by the institution queried.
22
+ attr_accessor :name
23
+
24
+ # Masked CPF/CNPJ of the key holder.
25
+ attr_accessor :document
26
+
27
+ # Type of person: PF, PJ, or empty when not informed.
28
+ attr_accessor :person_type
29
+
30
+ attr_accessor :account_type
31
+
32
+ # ISPB code of the account institution.
33
+ attr_accessor :institution_ispb
34
+
35
+ # Name of the institution where the holder account is registered, as the lookup returns it.
36
+ attr_accessor :institution_name
37
+
38
+ class EnumAttributeValidator
39
+ attr_reader :datatype
40
+ attr_reader :allowable_values
41
+
42
+ def initialize(datatype, allowable_values)
43
+ @allowable_values = allowable_values.map do |value|
44
+ case datatype.to_s
45
+ when /Integer/i
46
+ value.to_i
47
+ when /Float/i
48
+ value.to_f
49
+ else
50
+ value
51
+ end
52
+ end
53
+ end
54
+
55
+ def valid?(value)
56
+ !value || allowable_values.include?(value)
57
+ end
58
+ end
59
+
60
+ # Attribute mapping from ruby-style variable name to JSON key.
61
+ def self.attribute_map
62
+ {
63
+ :'pix_key' => :'pixKey',
64
+ :'name' => :'name',
65
+ :'document' => :'document',
66
+ :'person_type' => :'personType',
67
+ :'account_type' => :'accountType',
68
+ :'institution_ispb' => :'institutionIspb',
69
+ :'institution_name' => :'institutionName'
70
+ }
71
+ end
72
+
73
+ # Returns attribute mapping this model knows about
74
+ def self.acceptable_attribute_map
75
+ attribute_map
76
+ end
77
+
78
+ # Returns all the JSON keys this model knows about
79
+ def self.acceptable_attributes
80
+ acceptable_attribute_map.values
81
+ end
82
+
83
+ # Attribute type mapping.
84
+ def self.openapi_types
85
+ {
86
+ :'pix_key' => :'String',
87
+ :'name' => :'String',
88
+ :'document' => :'String',
89
+ :'person_type' => :'String',
90
+ :'account_type' => :'String',
91
+ :'institution_ispb' => :'String',
92
+ :'institution_name' => :'String'
93
+ }
94
+ end
95
+
96
+ # List of attributes with nullable: true
97
+ def self.openapi_nullable
98
+ Set.new([
99
+ ])
100
+ end
101
+
102
+ # Initializes the object
103
+ # @param [Hash] attributes Model attributes in the form of hash
104
+ def initialize(attributes = {})
105
+ if (!attributes.is_a?(Hash))
106
+ fail ArgumentError, "The input argument (attributes) must be a hash in `PayZuPix::DictConsultResponse` initialize method"
107
+ end
108
+
109
+ # check to see if the attribute exists and convert string to symbol for hash key
110
+ acceptable_attribute_map = self.class.acceptable_attribute_map
111
+ attributes = attributes.each_with_object({}) { |(k, v), h|
112
+ if (!acceptable_attribute_map.key?(k.to_sym))
113
+ fail ArgumentError, "`#{k}` is not a valid attribute in `PayZuPix::DictConsultResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
114
+ end
115
+ h[k.to_sym] = v
116
+ }
117
+
118
+ if attributes.key?(:'pix_key')
119
+ self.pix_key = attributes[:'pix_key']
120
+ end
121
+
122
+ if attributes.key?(:'name')
123
+ self.name = attributes[:'name']
124
+ end
125
+
126
+ if attributes.key?(:'document')
127
+ self.document = attributes[:'document']
128
+ end
129
+
130
+ if attributes.key?(:'person_type')
131
+ self.person_type = attributes[:'person_type']
132
+ end
133
+
134
+ if attributes.key?(:'account_type')
135
+ self.account_type = attributes[:'account_type']
136
+ end
137
+
138
+ if attributes.key?(:'institution_ispb')
139
+ self.institution_ispb = attributes[:'institution_ispb']
140
+ end
141
+
142
+ if attributes.key?(:'institution_name')
143
+ self.institution_name = attributes[:'institution_name']
144
+ end
145
+ end
146
+
147
+ # Show invalid properties with the reasons. Usually used together with valid?
148
+ # @return Array for valid properties with the reasons
149
+ def list_invalid_properties
150
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
151
+ invalid_properties = Array.new
152
+ invalid_properties
153
+ end
154
+
155
+ # Check to see if the all the properties in the model are valid
156
+ # @return true if the model is valid
157
+ def valid?
158
+ warn '[DEPRECATED] the `valid?` method is obsolete'
159
+ person_type_validator = EnumAttributeValidator.new('String', ["PF", "PJ", ""])
160
+ return false unless person_type_validator.valid?(@person_type)
161
+ true
162
+ end
163
+
164
+ # Checks equality by comparing each attribute.
165
+ # @param [Object] Object to be compared
166
+ def ==(o)
167
+ return true if self.equal?(o)
168
+ self.class == o.class &&
169
+ pix_key == o.pix_key &&
170
+ name == o.name &&
171
+ document == o.document &&
172
+ person_type == o.person_type &&
173
+ account_type == o.account_type &&
174
+ institution_ispb == o.institution_ispb &&
175
+ institution_name == o.institution_name
176
+ end
177
+
178
+ # @see the `==` method
179
+ # @param [Object] Object to be compared
180
+ def eql?(o)
181
+ self == o
182
+ end
183
+
184
+ # Calculates hash code according to all attributes.
185
+ # @return [Integer] Hash code
186
+ def hash
187
+ [pix_key, name, document, person_type, account_type, institution_ispb, institution_name].hash
188
+ end
189
+
190
+ # Builds the object from hash
191
+ # @param [Hash] attributes Model attributes in the form of hash
192
+ # @return [Object] Returns the model itself
193
+ def self.build_from_hash(attributes)
194
+ return nil unless attributes.is_a?(Hash)
195
+ attributes = attributes.transform_keys(&:to_sym)
196
+ transformed_hash = {}
197
+ openapi_types.each_pair do |key, type|
198
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
199
+ transformed_hash["#{key}"] = nil
200
+ elsif type =~ /\AArray<(.*)>/i
201
+ # check to ensure the input is an array given that the attribute
202
+ # is documented as an array but the input is not
203
+ if attributes[attribute_map[key]].is_a?(Array)
204
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
205
+ end
206
+ elsif !attributes[attribute_map[key]].nil?
207
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
208
+ end
209
+ end
210
+ new(transformed_hash)
211
+ end
212
+
213
+ # Returns the object in the form of hash
214
+ # @return [Hash] Returns the object in the form of hash
215
+ def to_hash
216
+ hash = {}
217
+ self.class.attribute_map.each_pair do |attr, param|
218
+ value = self.send(attr)
219
+ if value.nil?
220
+ is_nullable = self.class.openapi_nullable.include?(attr)
221
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
222
+ end
223
+
224
+ hash[param] = _to_hash(value)
225
+ end
226
+ hash
227
+ end
228
+
229
+ end
230
+
231
+ end
@@ -0,0 +1,158 @@
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 DownloadUserReport200Response < ApiModelBase
18
+ # Short-lived signed URL to download the CSV (5 min validity)
19
+ attr_accessor :url
20
+
21
+ # When the signed URL expires
22
+ attr_accessor :expires_at
23
+
24
+ # Attribute mapping from ruby-style variable name to JSON key.
25
+ def self.attribute_map
26
+ {
27
+ :'url' => :'url',
28
+ :'expires_at' => :'expiresAt'
29
+ }
30
+ end
31
+
32
+ # Returns attribute mapping this model knows about
33
+ def self.acceptable_attribute_map
34
+ attribute_map
35
+ end
36
+
37
+ # Returns all the JSON keys this model knows about
38
+ def self.acceptable_attributes
39
+ acceptable_attribute_map.values
40
+ end
41
+
42
+ # Attribute type mapping.
43
+ def self.openapi_types
44
+ {
45
+ :'url' => :'String',
46
+ :'expires_at' => :'Time'
47
+ }
48
+ end
49
+
50
+ # List of attributes with nullable: true
51
+ def self.openapi_nullable
52
+ Set.new([
53
+ ])
54
+ end
55
+
56
+ # Initializes the object
57
+ # @param [Hash] attributes Model attributes in the form of hash
58
+ def initialize(attributes = {})
59
+ if (!attributes.is_a?(Hash))
60
+ fail ArgumentError, "The input argument (attributes) must be a hash in `PayZuPix::DownloadUserReport200Response` initialize method"
61
+ end
62
+
63
+ # check to see if the attribute exists and convert string to symbol for hash key
64
+ acceptable_attribute_map = self.class.acceptable_attribute_map
65
+ attributes = attributes.each_with_object({}) { |(k, v), h|
66
+ if (!acceptable_attribute_map.key?(k.to_sym))
67
+ fail ArgumentError, "`#{k}` is not a valid attribute in `PayZuPix::DownloadUserReport200Response`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
68
+ end
69
+ h[k.to_sym] = v
70
+ }
71
+
72
+ if attributes.key?(:'url')
73
+ self.url = attributes[:'url']
74
+ end
75
+
76
+ if attributes.key?(:'expires_at')
77
+ self.expires_at = attributes[:'expires_at']
78
+ end
79
+ end
80
+
81
+ # Show invalid properties with the reasons. Usually used together with valid?
82
+ # @return Array for valid properties with the reasons
83
+ def list_invalid_properties
84
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
85
+ invalid_properties = Array.new
86
+ invalid_properties
87
+ end
88
+
89
+ # Check to see if the all the properties in the model are valid
90
+ # @return true if the model is valid
91
+ def valid?
92
+ warn '[DEPRECATED] the `valid?` method is obsolete'
93
+ true
94
+ end
95
+
96
+ # Checks equality by comparing each attribute.
97
+ # @param [Object] Object to be compared
98
+ def ==(o)
99
+ return true if self.equal?(o)
100
+ self.class == o.class &&
101
+ url == o.url &&
102
+ expires_at == o.expires_at
103
+ end
104
+
105
+ # @see the `==` method
106
+ # @param [Object] Object to be compared
107
+ def eql?(o)
108
+ self == o
109
+ end
110
+
111
+ # Calculates hash code according to all attributes.
112
+ # @return [Integer] Hash code
113
+ def hash
114
+ [url, expires_at].hash
115
+ end
116
+
117
+ # Builds the object from hash
118
+ # @param [Hash] attributes Model attributes in the form of hash
119
+ # @return [Object] Returns the model itself
120
+ def self.build_from_hash(attributes)
121
+ return nil unless attributes.is_a?(Hash)
122
+ attributes = attributes.transform_keys(&:to_sym)
123
+ transformed_hash = {}
124
+ openapi_types.each_pair do |key, type|
125
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
126
+ transformed_hash["#{key}"] = nil
127
+ elsif type =~ /\AArray<(.*)>/i
128
+ # check to ensure the input is an array given that the attribute
129
+ # is documented as an array but the input is not
130
+ if attributes[attribute_map[key]].is_a?(Array)
131
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
132
+ end
133
+ elsif !attributes[attribute_map[key]].nil?
134
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
135
+ end
136
+ end
137
+ new(transformed_hash)
138
+ end
139
+
140
+ # Returns the object in the form of hash
141
+ # @return [Hash] Returns the object in the form of hash
142
+ def to_hash
143
+ hash = {}
144
+ self.class.attribute_map.each_pair do |attr, param|
145
+ value = self.send(attr)
146
+ if value.nil?
147
+ is_nullable = self.class.openapi_nullable.include?(attr)
148
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
149
+ end
150
+
151
+ hash[param] = _to_hash(value)
152
+ end
153
+ hash
154
+ end
155
+
156
+ end
157
+
158
+ end
@@ -0,0 +1,147 @@
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 EnqueuedCallback < ApiModelBase
18
+ attr_accessor :enqueued
19
+
20
+ # Attribute mapping from ruby-style variable name to JSON key.
21
+ def self.attribute_map
22
+ {
23
+ :'enqueued' => :'enqueued'
24
+ }
25
+ end
26
+
27
+ # Returns attribute mapping this model knows about
28
+ def self.acceptable_attribute_map
29
+ attribute_map
30
+ end
31
+
32
+ # Returns all the JSON keys this model knows about
33
+ def self.acceptable_attributes
34
+ acceptable_attribute_map.values
35
+ end
36
+
37
+ # Attribute type mapping.
38
+ def self.openapi_types
39
+ {
40
+ :'enqueued' => :'EnqueuedCallbackEnqueued'
41
+ }
42
+ end
43
+
44
+ # List of attributes with nullable: true
45
+ def self.openapi_nullable
46
+ Set.new([
47
+ ])
48
+ end
49
+
50
+ # Initializes the object
51
+ # @param [Hash] attributes Model attributes in the form of hash
52
+ def initialize(attributes = {})
53
+ if (!attributes.is_a?(Hash))
54
+ fail ArgumentError, "The input argument (attributes) must be a hash in `PayZuPix::EnqueuedCallback` initialize method"
55
+ end
56
+
57
+ # check to see if the attribute exists and convert string to symbol for hash key
58
+ acceptable_attribute_map = self.class.acceptable_attribute_map
59
+ attributes = attributes.each_with_object({}) { |(k, v), h|
60
+ if (!acceptable_attribute_map.key?(k.to_sym))
61
+ fail ArgumentError, "`#{k}` is not a valid attribute in `PayZuPix::EnqueuedCallback`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
62
+ end
63
+ h[k.to_sym] = v
64
+ }
65
+
66
+ if attributes.key?(:'enqueued')
67
+ self.enqueued = attributes[:'enqueued']
68
+ end
69
+ end
70
+
71
+ # Show invalid properties with the reasons. Usually used together with valid?
72
+ # @return Array for valid properties with the reasons
73
+ def list_invalid_properties
74
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
75
+ invalid_properties = Array.new
76
+ invalid_properties
77
+ end
78
+
79
+ # Check to see if the all the properties in the model are valid
80
+ # @return true if the model is valid
81
+ def valid?
82
+ warn '[DEPRECATED] the `valid?` method is obsolete'
83
+ true
84
+ end
85
+
86
+ # Checks equality by comparing each attribute.
87
+ # @param [Object] Object to be compared
88
+ def ==(o)
89
+ return true if self.equal?(o)
90
+ self.class == o.class &&
91
+ enqueued == o.enqueued
92
+ end
93
+
94
+ # @see the `==` method
95
+ # @param [Object] Object to be compared
96
+ def eql?(o)
97
+ self == o
98
+ end
99
+
100
+ # Calculates hash code according to all attributes.
101
+ # @return [Integer] Hash code
102
+ def hash
103
+ [enqueued].hash
104
+ end
105
+
106
+ # Builds the object from hash
107
+ # @param [Hash] attributes Model attributes in the form of hash
108
+ # @return [Object] Returns the model itself
109
+ def self.build_from_hash(attributes)
110
+ return nil unless attributes.is_a?(Hash)
111
+ attributes = attributes.transform_keys(&:to_sym)
112
+ transformed_hash = {}
113
+ openapi_types.each_pair do |key, type|
114
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
115
+ transformed_hash["#{key}"] = nil
116
+ elsif type =~ /\AArray<(.*)>/i
117
+ # check to ensure the input is an array given that the attribute
118
+ # is documented as an array but the input is not
119
+ if attributes[attribute_map[key]].is_a?(Array)
120
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
121
+ end
122
+ elsif !attributes[attribute_map[key]].nil?
123
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
124
+ end
125
+ end
126
+ new(transformed_hash)
127
+ end
128
+
129
+ # Returns the object in the form of hash
130
+ # @return [Hash] Returns the object in the form of hash
131
+ def to_hash
132
+ hash = {}
133
+ self.class.attribute_map.each_pair do |attr, param|
134
+ value = self.send(attr)
135
+ if value.nil?
136
+ is_nullable = self.class.openapi_nullable.include?(attr)
137
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
138
+ end
139
+
140
+ hash[param] = _to_hash(value)
141
+ end
142
+ hash
143
+ end
144
+
145
+ end
146
+
147
+ end
@@ -0,0 +1,170 @@
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 EnqueuedCallbackEnqueued < ApiModelBase
18
+ # Total number of callbacks sent for queueing. Not limited by the size of items.
19
+ attr_accessor :count
20
+
21
+ # True when items lists only part of the callbacks. The resend still covers all of them.
22
+ attr_accessor :truncated
23
+
24
+ # Queued callbacks, capped at 500 entries.
25
+ attr_accessor :items
26
+
27
+ # Attribute mapping from ruby-style variable name to JSON key.
28
+ def self.attribute_map
29
+ {
30
+ :'count' => :'count',
31
+ :'truncated' => :'truncated',
32
+ :'items' => :'items'
33
+ }
34
+ end
35
+
36
+ # Returns attribute mapping this model knows about
37
+ def self.acceptable_attribute_map
38
+ attribute_map
39
+ end
40
+
41
+ # Returns all the JSON keys this model knows about
42
+ def self.acceptable_attributes
43
+ acceptable_attribute_map.values
44
+ end
45
+
46
+ # Attribute type mapping.
47
+ def self.openapi_types
48
+ {
49
+ :'count' => :'Integer',
50
+ :'truncated' => :'Boolean',
51
+ :'items' => :'Array<EnqueuedCallbackItem>'
52
+ }
53
+ end
54
+
55
+ # List of attributes with nullable: true
56
+ def self.openapi_nullable
57
+ Set.new([
58
+ ])
59
+ end
60
+
61
+ # Initializes the object
62
+ # @param [Hash] attributes Model attributes in the form of hash
63
+ def initialize(attributes = {})
64
+ if (!attributes.is_a?(Hash))
65
+ fail ArgumentError, "The input argument (attributes) must be a hash in `PayZuPix::EnqueuedCallbackEnqueued` initialize method"
66
+ end
67
+
68
+ # check to see if the attribute exists and convert string to symbol for hash key
69
+ acceptable_attribute_map = self.class.acceptable_attribute_map
70
+ attributes = attributes.each_with_object({}) { |(k, v), h|
71
+ if (!acceptable_attribute_map.key?(k.to_sym))
72
+ fail ArgumentError, "`#{k}` is not a valid attribute in `PayZuPix::EnqueuedCallbackEnqueued`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
73
+ end
74
+ h[k.to_sym] = v
75
+ }
76
+
77
+ if attributes.key?(:'count')
78
+ self.count = attributes[:'count']
79
+ end
80
+
81
+ if attributes.key?(:'truncated')
82
+ self.truncated = attributes[:'truncated']
83
+ end
84
+
85
+ if attributes.key?(:'items')
86
+ if (value = attributes[:'items']).is_a?(Array)
87
+ self.items = value
88
+ end
89
+ end
90
+ end
91
+
92
+ # Show invalid properties with the reasons. Usually used together with valid?
93
+ # @return Array for valid properties with the reasons
94
+ def list_invalid_properties
95
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
96
+ invalid_properties = Array.new
97
+ invalid_properties
98
+ end
99
+
100
+ # Check to see if the all the properties in the model are valid
101
+ # @return true if the model is valid
102
+ def valid?
103
+ warn '[DEPRECATED] the `valid?` method is obsolete'
104
+ true
105
+ end
106
+
107
+ # Checks equality by comparing each attribute.
108
+ # @param [Object] Object to be compared
109
+ def ==(o)
110
+ return true if self.equal?(o)
111
+ self.class == o.class &&
112
+ count == o.count &&
113
+ truncated == o.truncated &&
114
+ items == o.items
115
+ end
116
+
117
+ # @see the `==` method
118
+ # @param [Object] Object to be compared
119
+ def eql?(o)
120
+ self == o
121
+ end
122
+
123
+ # Calculates hash code according to all attributes.
124
+ # @return [Integer] Hash code
125
+ def hash
126
+ [count, truncated, items].hash
127
+ end
128
+
129
+ # Builds the object from hash
130
+ # @param [Hash] attributes Model attributes in the form of hash
131
+ # @return [Object] Returns the model itself
132
+ def self.build_from_hash(attributes)
133
+ return nil unless attributes.is_a?(Hash)
134
+ attributes = attributes.transform_keys(&:to_sym)
135
+ transformed_hash = {}
136
+ openapi_types.each_pair do |key, type|
137
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
138
+ transformed_hash["#{key}"] = nil
139
+ elsif type =~ /\AArray<(.*)>/i
140
+ # check to ensure the input is an array given that the attribute
141
+ # is documented as an array but the input is not
142
+ if attributes[attribute_map[key]].is_a?(Array)
143
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
144
+ end
145
+ elsif !attributes[attribute_map[key]].nil?
146
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
147
+ end
148
+ end
149
+ new(transformed_hash)
150
+ end
151
+
152
+ # Returns the object in the form of hash
153
+ # @return [Hash] Returns the object in the form of hash
154
+ def to_hash
155
+ hash = {}
156
+ self.class.attribute_map.each_pair do |attr, param|
157
+ value = self.send(attr)
158
+ if value.nil?
159
+ is_nullable = self.class.openapi_nullable.include?(attr)
160
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
161
+ end
162
+
163
+ hash[param] = _to_hash(value)
164
+ end
165
+ hash
166
+ end
167
+
168
+ end
169
+
170
+ end