bb_payments 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (140) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +11 -0
  3. data/Gemfile.lock +82 -0
  4. data/README.md +391 -0
  5. data/Rakefile +8 -0
  6. data/bb_payments.gemspec +30 -0
  7. data/docs/BankSlipsApi.md +178 -0
  8. data/docs/BarcodeCollectionFormsIDResponseObject.md +6 -0
  9. data/docs/BarcodeCollectionFormsIDResponseObjectListaGuiaCodigoBarra.md +10 -0
  10. data/docs/BarcodeCollectionFormsIDResponseObjectListaOcorrencia.md +9 -0
  11. data/docs/BarcodeCollectionFormsRequestObject.md +12 -0
  12. data/docs/BarcodecollectionformsCollectionFormDetailsList.md +12 -0
  13. data/docs/BatchtransfersPaymentsList.md +22 -0
  14. data/docs/BatchtransferscancelPaymentIds.md +7 -0
  15. data/docs/Body.md +13 -0
  16. data/docs/CancelApi.md +63 -0
  17. data/docs/CollectionFormsApi.md +184 -0
  18. data/docs/Error.md +7 -0
  19. data/docs/ErrorErrors.md +8 -0
  20. data/docs/ErrorOAuthUnauthorized.md +10 -0
  21. data/docs/ErrorOAuthUnauthorizedAttributes.md +7 -0
  22. data/docs/InlineResponse200.md +13 -0
  23. data/docs/InlineResponse2001.md +29 -0
  24. data/docs/InlineResponse2001OcurrencesList.md +9 -0
  25. data/docs/InlineResponse2002.md +12 -0
  26. data/docs/InlineResponse2002PaymentsList.md +26 -0
  27. data/docs/InlineResponse2003.md +26 -0
  28. data/docs/InlineResponse2003ListaBoleto.md +24 -0
  29. data/docs/InlineResponse2003ListaDevolucao.md +9 -0
  30. data/docs/InlineResponse200PaymentsList.md +15 -0
  31. data/docs/InlineResponse201.md +13 -0
  32. data/docs/InlineResponse2011.md +13 -0
  33. data/docs/InlineResponse2011PaymentsList.md +16 -0
  34. data/docs/InlineResponse201PaymentsList.md +26 -0
  35. data/docs/InlineResponse400.md +7 -0
  36. data/docs/InlineResponse401.md +10 -0
  37. data/docs/ReturnedsApi.md +78 -0
  38. data/docs/RootTypeForBankSlipList.md +29 -0
  39. data/docs/RootTypeForBankSlipsBatchPayment.md +12 -0
  40. data/docs/RootTypeForBankSlipsBatchPaymentResponseObject.md +12 -0
  41. data/docs/RootTypeForBatchTransferGETResponseObject.md +9 -0
  42. data/docs/RootTypeForBatchTransferPaymentsListGET.md +21 -0
  43. data/docs/RootTypeForBatchTransfersCancelPaymentsListObject.md +10 -0
  44. data/docs/RootTypeForBatchTransfersCancelRequestObject.md +12 -0
  45. data/docs/RootTypeForBatchTransfersCancelResponseObject.md +7 -0
  46. data/docs/RootTypeForReturnedPaymentsDetails.md +33 -0
  47. data/docs/RootTypeForReturnedPaymentsResponseObject.md +10 -0
  48. data/docs/RootTypeForSlipsDetailsObject.md +23 -0
  49. data/docs/TransfersApi.md +309 -0
  50. data/lib/bb_payments/api/base.rb +10 -0
  51. data/lib/bb_payments/api/base_api.rb +63 -0
  52. data/lib/bb_payments/api/batch_payments_api.rb +50 -0
  53. data/lib/bb_payments/api/payments.rb +114 -0
  54. data/lib/bb_payments/api/transfers.rb +33 -0
  55. data/lib/bb_payments/api/transfers_pix.rb +52 -0
  56. data/lib/bb_payments/api_client.rb +414 -0
  57. data/lib/bb_payments/api_error.rb +57 -0
  58. data/lib/bb_payments/configuration.rb +246 -0
  59. data/lib/bb_payments/models/base_model.rb +177 -0
  60. data/lib/bb_payments/models/batch_pix_body.rb +30 -0
  61. data/lib/bb_payments/models/batch_pix_response.rb +69 -0
  62. data/lib/bb_payments/models/batch_transfers_body.rb +30 -0
  63. data/lib/bb_payments/models/batch_transfers_response.rb +64 -0
  64. data/lib/bb_payments/models/batchtransfers_payments_list.rb +362 -0
  65. data/lib/bb_payments/models/batchtransferscancel_payment_ids.rb +212 -0
  66. data/lib/bb_payments/models/body.rb +274 -0
  67. data/lib/bb_payments/models/error.rb +210 -0
  68. data/lib/bb_payments/models/error_errors.rb +227 -0
  69. data/lib/bb_payments/models/error_o_auth_unauthorized.rb +257 -0
  70. data/lib/bb_payments/models/error_o_auth_unauthorized_attributes.rb +213 -0
  71. data/lib/bb_payments/models/find_batch_payment.rb +93 -0
  72. data/lib/bb_payments/models/find_batch_response.rb +71 -0
  73. data/lib/bb_payments/models/inline_response_200.rb +270 -0
  74. data/lib/bb_payments/models/inline_response_200_1.rb +430 -0
  75. data/lib/bb_payments/models/inline_response_200_1_ocurrences_list.rb +227 -0
  76. data/lib/bb_payments/models/inline_response_200_2.rb +260 -0
  77. data/lib/bb_payments/models/inline_response_200_2_payments_list.rb +399 -0
  78. data/lib/bb_payments/models/inline_response_200_3.rb +487 -0
  79. data/lib/bb_payments/models/inline_response_200_3_lista_boleto.rb +377 -0
  80. data/lib/bb_payments/models/inline_response_200_3_lista_devolucao.rb +227 -0
  81. data/lib/bb_payments/models/inline_response_200_payments_list.rb +289 -0
  82. data/lib/bb_payments/models/inline_response_201.rb +270 -0
  83. data/lib/bb_payments/models/inline_response_201_1.rb +270 -0
  84. data/lib/bb_payments/models/inline_response_201_1_payments_list.rb +299 -0
  85. data/lib/bb_payments/models/inline_response_201_payments_list.rb +399 -0
  86. data/lib/bb_payments/models/inline_response_400.rb +210 -0
  87. data/lib/bb_payments/models/inline_response_401.rb +257 -0
  88. data/lib/bb_payments/models/root_type_for_bank_slip_list.rb +430 -0
  89. data/lib/bb_payments/models/root_type_for_bank_slips_batch_payment.rb +270 -0
  90. data/lib/bb_payments/models/root_type_for_bank_slips_batch_payment_response_object.rb +260 -0
  91. data/lib/bb_payments/models/root_type_for_batch_transfer_get_response_object.rb +230 -0
  92. data/lib/bb_payments/models/root_type_for_batch_transfer_payments_list_get.rb +348 -0
  93. data/lib/bb_payments/models/root_type_for_batch_transfers_cancel_payments_list_object.rb +238 -0
  94. data/lib/bb_payments/models/root_type_for_batch_transfers_cancel_request_object.rb +275 -0
  95. data/lib/bb_payments/models/root_type_for_batch_transfers_cancel_response_object.rb +210 -0
  96. data/lib/bb_payments/models/root_type_for_returned_payments_details.rb +468 -0
  97. data/lib/bb_payments/models/root_type_for_returned_payments_response_object.rb +240 -0
  98. data/lib/bb_payments/models/root_type_for_slips_details_object.rb +408 -0
  99. data/lib/bb_payments/models/transfer_base.rb +128 -0
  100. data/lib/bb_payments/models/transfer_pix.rb +34 -0
  101. data/lib/bb_payments/models/transfer_pix_base.rb +146 -0
  102. data/lib/bb_payments/version.rb +3 -0
  103. data/lib/bb_payments.rb +85 -0
  104. data/spec/api/batch_payments_api_spec.rb +113 -0
  105. data/spec/api_client_spec.rb +225 -0
  106. data/spec/base_object_spec.rb +109 -0
  107. data/spec/configuration_spec.rb +41 -0
  108. data/spec/models/body_spec.rb +76 -0
  109. data/spec/models/error_errors_spec.rb +46 -0
  110. data/spec/models/error_o_auth_unauthorized_attributes_spec.rb +40 -0
  111. data/spec/models/error_o_auth_unauthorized_spec.rb +58 -0
  112. data/spec/models/error_spec.rb +40 -0
  113. data/spec/models/inline_response_200_1_ocurrences_list_spec.rb +52 -0
  114. data/spec/models/inline_response_200_1_spec.rb +172 -0
  115. data/spec/models/inline_response_200_2_payments_list_spec.rb +154 -0
  116. data/spec/models/inline_response_200_2_spec.rb +70 -0
  117. data/spec/models/inline_response_200_3_lista_boleto_spec.rb +142 -0
  118. data/spec/models/inline_response_200_3_lista_devolucao_spec.rb +52 -0
  119. data/spec/models/inline_response_200_3_spec.rb +154 -0
  120. data/spec/models/inline_response_200_payments_list_spec.rb +88 -0
  121. data/spec/models/inline_response_200_spec.rb +76 -0
  122. data/spec/models/inline_response_201_1_payments_list_spec.rb +94 -0
  123. data/spec/models/inline_response_201_1_spec.rb +76 -0
  124. data/spec/models/inline_response_201_payments_list_spec.rb +154 -0
  125. data/spec/models/inline_response_201_spec.rb +76 -0
  126. data/spec/models/inline_response_400_spec.rb +40 -0
  127. data/spec/models/inline_response_401_spec.rb +58 -0
  128. data/spec/models/root_type_for_bank_slip_list_spec.rb +172 -0
  129. data/spec/models/root_type_for_bank_slips_batch_payment_response_object_spec.rb +70 -0
  130. data/spec/models/root_type_for_bank_slips_batch_payment_spec.rb +70 -0
  131. data/spec/models/root_type_for_batch_transfer_get_response_object_spec.rb +52 -0
  132. data/spec/models/root_type_for_batch_transfer_payments_list_get_spec.rb +124 -0
  133. data/spec/models/root_type_for_batch_transfers_cancel_payments_list_object_spec.rb +58 -0
  134. data/spec/models/root_type_for_batch_transfers_cancel_request_object_spec.rb +70 -0
  135. data/spec/models/root_type_for_batch_transfers_cancel_response_object_spec.rb +40 -0
  136. data/spec/models/root_type_for_returned_payments_details_spec.rb +196 -0
  137. data/spec/models/root_type_for_returned_payments_response_object_spec.rb +58 -0
  138. data/spec/models/root_type_for_slips_details_object_spec.rb +136 -0
  139. data/spec/spec_helper.rb +110 -0
  140. metadata +292 -0
@@ -0,0 +1,230 @@
1
+ =begin
2
+ #Payments-VPN
3
+
4
+ #Esta API fornece os serviços de pagamento do Banco do Brasil.
5
+
6
+ OpenAPI spec version: 3.5
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 3.0.24
10
+ =end
11
+
12
+ require 'date'
13
+
14
+ module BancoBrasilPayments
15
+ # Objeto de resposta do recurso GET Batch Transfers
16
+ class RootTypeForBatchTransferGETResponseObject
17
+ # Posição do índice. Cada resposta tem um limite de 300 ocorrências na lista paymentsList, iniciada a partir do valor do índice fornecido. Para todas as ocorrências, itere sobre esse recurso usando o valor do campo nextIndex da resposta.
18
+ attr_accessor :index
19
+
20
+ # Quantidade de pagamentos
21
+ attr_accessor :payments_quantity
22
+
23
+ # List of payments to be processed in batch. Not allowed more than 500 records. pt-BR: Lista de pagamentos a serem processados em lote. Não permitido mais de 500 registros.
24
+ attr_accessor :payments_list
25
+
26
+ # Attribute mapping from ruby-style variable name to JSON key.
27
+ def self.attribute_map
28
+ {
29
+ :'index' => :'index',
30
+ :'payments_quantity' => :'paymentsQuantity',
31
+ :'payments_list' => :'paymentsList'
32
+ }
33
+ end
34
+
35
+ # Attribute type mapping.
36
+ def self.openapi_types
37
+ {
38
+ :'index' => :'Object',
39
+ :'payments_quantity' => :'Object',
40
+ :'payments_list' => :'Object'
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 `BancoBrasilPayments::RootTypeForBatchTransferGETResponseObject` initialize method"
55
+ end
56
+
57
+ # check to see if the attribute exists and convert string to symbol for hash key
58
+ attributes = attributes.each_with_object({}) { |(k, v), h|
59
+ if (!self.class.attribute_map.key?(k.to_sym))
60
+ fail ArgumentError, "`#{k}` is not a valid attribute in `BancoBrasilPayments::RootTypeForBatchTransferGETResponseObject`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
61
+ end
62
+ h[k.to_sym] = v
63
+ }
64
+
65
+ if attributes.key?(:'index')
66
+ self.index = attributes[:'index']
67
+ end
68
+
69
+ if attributes.key?(:'payments_quantity')
70
+ self.payments_quantity = attributes[:'payments_quantity']
71
+ end
72
+
73
+ if attributes.key?(:'payments_list')
74
+ if (value = attributes[:'payments_list']).is_a?(Array)
75
+ self.payments_list = value
76
+ end
77
+ end
78
+ end
79
+
80
+ # Show invalid properties with the reasons. Usually used together with valid?
81
+ # @return Array for valid properties with the reasons
82
+ def list_invalid_properties
83
+ invalid_properties = Array.new
84
+ invalid_properties
85
+ end
86
+
87
+ # Check to see if the all the properties in the model are valid
88
+ # @return true if the model is valid
89
+ def valid?
90
+ true
91
+ end
92
+
93
+ # Checks equality by comparing each attribute.
94
+ # @param [Object] Object to be compared
95
+ def ==(o)
96
+ return true if self.equal?(o)
97
+ self.class == o.class &&
98
+ index == o.index &&
99
+ payments_quantity == o.payments_quantity &&
100
+ payments_list == o.payments_list
101
+ end
102
+
103
+ # @see the `==` method
104
+ # @param [Object] Object to be compared
105
+ def eql?(o)
106
+ self == o
107
+ end
108
+
109
+ # Calculates hash code according to all attributes.
110
+ # @return [Integer] Hash code
111
+ def hash
112
+ [index, payments_quantity, payments_list].hash
113
+ end
114
+
115
+ # Builds the object from hash
116
+ # @param [Hash] attributes Model attributes in the form of hash
117
+ # @return [Object] Returns the model itself
118
+ def self.build_from_hash(attributes)
119
+ new.build_from_hash(attributes)
120
+ end
121
+
122
+ # Builds the object from hash
123
+ # @param [Hash] attributes Model attributes in the form of hash
124
+ # @return [Object] Returns the model itself
125
+ def build_from_hash(attributes)
126
+ return nil unless attributes.is_a?(Hash)
127
+ self.class.openapi_types.each_pair do |key, type|
128
+ if type =~ /\AArray<(.*)>/i
129
+ # check to ensure the input is an array given that the attribute
130
+ # is documented as an array but the input is not
131
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
132
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
133
+ end
134
+ elsif !attributes[self.class.attribute_map[key]].nil?
135
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
136
+ elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
137
+ self.send("#{key}=", nil)
138
+ end
139
+ end
140
+
141
+ self
142
+ end
143
+
144
+ # Deserializes the data based on type
145
+ # @param string type Data type
146
+ # @param string value Value to be deserialized
147
+ # @return [Object] Deserialized data
148
+ def _deserialize(type, value)
149
+ case type.to_sym
150
+ when :DateTime
151
+ DateTime.parse(value)
152
+ when :Date
153
+ Date.parse(value)
154
+ when :String
155
+ value.to_s
156
+ when :Integer
157
+ value.to_i
158
+ when :Float
159
+ value.to_f
160
+ when :Boolean
161
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
162
+ true
163
+ else
164
+ false
165
+ end
166
+ when :Object
167
+ # generic object (usually a Hash), return directly
168
+ value
169
+ when /\AArray<(?<inner_type>.+)>\z/
170
+ inner_type = Regexp.last_match[:inner_type]
171
+ value.map { |v| _deserialize(inner_type, v) }
172
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
173
+ k_type = Regexp.last_match[:k_type]
174
+ v_type = Regexp.last_match[:v_type]
175
+ {}.tap do |hash|
176
+ value.each do |k, v|
177
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
178
+ end
179
+ end
180
+ else # model
181
+ BancoBrasilPayments.const_get(type).build_from_hash(value)
182
+ end
183
+ end
184
+
185
+ # Returns the string representation of the object
186
+ # @return [String] String presentation of the object
187
+ def to_s
188
+ to_hash.to_s
189
+ end
190
+
191
+ # to_body is an alias to to_hash (backward compatibility)
192
+ # @return [Hash] Returns the object in the form of hash
193
+ def to_body
194
+ to_hash
195
+ end
196
+
197
+ # Returns the object in the form of hash
198
+ # @return [Hash] Returns the object in the form of hash
199
+ def to_hash
200
+ hash = {}
201
+ self.class.attribute_map.each_pair do |attr, param|
202
+ value = self.send(attr)
203
+ if value.nil?
204
+ is_nullable = self.class.openapi_nullable.include?(attr)
205
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
206
+ end
207
+
208
+ hash[param] = _to_hash(value)
209
+ end
210
+ hash
211
+ end
212
+
213
+ # Outputs non-array value in the form of hash
214
+ # For object, use to_hash. Otherwise, just return the value
215
+ # @param [Object] value Any valid value
216
+ # @return [Hash] Returns the value in the form of hash
217
+ def _to_hash(value)
218
+ if value.is_a?(Array)
219
+ value.compact.map { |v| _to_hash(v) }
220
+ elsif value.is_a?(Hash)
221
+ {}.tap do |hash|
222
+ value.each { |k, v| hash[k] = _to_hash(v) }
223
+ end
224
+ elsif value.respond_to? :to_hash
225
+ value.to_hash
226
+ else
227
+ value
228
+ end
229
+ end end
230
+ end
@@ -0,0 +1,348 @@
1
+ =begin
2
+ #Payments-VPN
3
+
4
+ #Esta API fornece os serviços de pagamento do Banco do Brasil.
5
+
6
+ OpenAPI spec version: 3.5
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 3.0.24
10
+ =end
11
+
12
+ require 'date'
13
+
14
+ module BancoBrasilPayments
15
+ # Lista de pagamentos para recurso GET Batch Transfers
16
+ class RootTypeForBatchTransferPaymentsListGET
17
+ # ID sequencial da requisição
18
+ attr_accessor :sequential_request_id
19
+
20
+ # Texto de uso livre do cliente.
21
+ attr_accessor :request_payment_message
22
+
23
+ # Código do estado da requisição a ser pesquisada: 1 - Requisição com todos os lançamentos com dados consistentes; 2 - Requisição com ao menos um dos lançamentos com dados inconsistentes; 3 - Requisição com todos os lançamentos com dados inconsistentes; 4 - Requisição pendente de ação pelo Conveniado - falta autorizar o pagamento; 5 - Requisição em processamento pelo Banco; 6 - Requisição Processada; 7 - Requisição Rejeitada, 8 - Preparando remessa não liberada, 9 - Requisição liberada via API, 10 - Preparando remessa liberada. As situações 1, 2 e 8 são transitórias e não requerem qualquer ação do Cliente Conveniado. situação 3 sempre será migrada para situação 7. A situação 4 Significa que, ao menos um lançamento, depende de ação do Cliente Conveniado, seja liberando ou cancelando os pagamentos. As situações 5, 6, 7, 9 e 10 não requerem qualquer ação do Cliente Conveniado. A situação 5 significa que, ao menos um lançamento, está agendado. As situações 6 e 7 são definitivas não havendo alteração posterior da situação da requisição.
24
+ attr_accessor :request_status
25
+
26
+ # Código da agência para débito.
27
+ attr_accessor :debit_branch_office
28
+
29
+ # Conta corrente de débito.
30
+ attr_accessor :debit_current_account
31
+
32
+ # Dígito do verificador da conta corrente para débito.
33
+ attr_accessor :check_digits_debit_current_account
34
+
35
+ # Data em que o cliente enviou ao banco a requisição de pagamento (formato ddmmaaaa). Solicitações de pagamentos para dias não úteis ou após o horário limite de processamento serão pagas no próximo dia útil, com exceção de transferências entre contas do Banco do Brasil
36
+ attr_accessor :request_date
37
+
38
+ # Hora do envio da requisição do envio do lote
39
+ attr_accessor :request_sent_hour
40
+
41
+ # Modalidade que representa o tipo de pagamento, sendo: 126 pagamento de fornecedores; 127 pagamento de salário e 128 pagamentos diversos
42
+ attr_accessor :payment_type
43
+
44
+ # Identificação do usuário que enviou a requisição
45
+ attr_accessor :user_id
46
+
47
+ # Nome do responsável pelo envio do lote. (para casos de login e explícito)
48
+ attr_accessor :user_name
49
+
50
+ # Quantidade total de boletos
51
+ attr_accessor :bankpayment_quantity
52
+
53
+ # Valor do pagamento em reais (formato 0.00)
54
+ attr_accessor :bankpayment_amount
55
+
56
+ # Quantidade total de todos os pagamentos pretendidos válidos a serem processados em lote
57
+ attr_accessor :valid_bankpayment_quantity
58
+
59
+ # Valor total de todos os pagamentos pretendidos válidos a serem processados em lote (formato 0.00)
60
+ attr_accessor :valid_bankpayment_amount
61
+
62
+ # Attribute mapping from ruby-style variable name to JSON key.
63
+ def self.attribute_map
64
+ {
65
+ :'sequential_request_id' => :'sequentialRequestID',
66
+ :'request_payment_message' => :'requestPaymentMessage',
67
+ :'request_status' => :'requestStatus',
68
+ :'debit_branch_office' => :'debitBranchOffice',
69
+ :'debit_current_account' => :'debitCurrentAccount',
70
+ :'check_digits_debit_current_account' => :'checkDigitsDebitCurrentAccount',
71
+ :'request_date' => :'requestDate',
72
+ :'request_sent_hour' => :'requestSentHour',
73
+ :'payment_type' => :'paymentType',
74
+ :'user_id' => :'userID',
75
+ :'user_name' => :'userName',
76
+ :'bankpayment_quantity' => :'bankpaymentQuantity',
77
+ :'bankpayment_amount' => :'bankpaymentAmount',
78
+ :'valid_bankpayment_quantity' => :'validBankpaymentQuantity',
79
+ :'valid_bankpayment_amount' => :'validBankpaymentAmount'
80
+ }
81
+ end
82
+
83
+ # Attribute type mapping.
84
+ def self.openapi_types
85
+ {
86
+ :'sequential_request_id' => :'Object',
87
+ :'request_payment_message' => :'Object',
88
+ :'request_status' => :'Object',
89
+ :'debit_branch_office' => :'Object',
90
+ :'debit_current_account' => :'Object',
91
+ :'check_digits_debit_current_account' => :'Object',
92
+ :'request_date' => :'Object',
93
+ :'request_sent_hour' => :'Object',
94
+ :'payment_type' => :'Object',
95
+ :'user_id' => :'Object',
96
+ :'user_name' => :'Object',
97
+ :'bankpayment_quantity' => :'Object',
98
+ :'bankpayment_amount' => :'Object',
99
+ :'valid_bankpayment_quantity' => :'Object',
100
+ :'valid_bankpayment_amount' => :'Object'
101
+ }
102
+ end
103
+
104
+ # List of attributes with nullable: true
105
+ def self.openapi_nullable
106
+ Set.new([
107
+ ])
108
+ end
109
+
110
+ # Initializes the object
111
+ # @param [Hash] attributes Model attributes in the form of hash
112
+ def initialize(attributes = {})
113
+ if (!attributes.is_a?(Hash))
114
+ fail ArgumentError, "The input argument (attributes) must be a hash in `BancoBrasilPayments::RootTypeForBatchTransferPaymentsListGET` initialize method"
115
+ end
116
+
117
+ # check to see if the attribute exists and convert string to symbol for hash key
118
+ attributes = attributes.each_with_object({}) { |(k, v), h|
119
+ if (!self.class.attribute_map.key?(k.to_sym))
120
+ fail ArgumentError, "`#{k}` is not a valid attribute in `BancoBrasilPayments::RootTypeForBatchTransferPaymentsListGET`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
121
+ end
122
+ h[k.to_sym] = v
123
+ }
124
+
125
+ if attributes.key?(:'sequential_request_id')
126
+ self.sequential_request_id = attributes[:'sequential_request_id']
127
+ end
128
+
129
+ if attributes.key?(:'request_payment_message')
130
+ self.request_payment_message = attributes[:'request_payment_message']
131
+ end
132
+
133
+ if attributes.key?(:'request_status')
134
+ self.request_status = attributes[:'request_status']
135
+ end
136
+
137
+ if attributes.key?(:'debit_branch_office')
138
+ self.debit_branch_office = attributes[:'debit_branch_office']
139
+ end
140
+
141
+ if attributes.key?(:'debit_current_account')
142
+ self.debit_current_account = attributes[:'debit_current_account']
143
+ end
144
+
145
+ if attributes.key?(:'check_digits_debit_current_account')
146
+ self.check_digits_debit_current_account = attributes[:'check_digits_debit_current_account']
147
+ end
148
+
149
+ if attributes.key?(:'request_date')
150
+ self.request_date = attributes[:'request_date']
151
+ end
152
+
153
+ if attributes.key?(:'request_sent_hour')
154
+ self.request_sent_hour = attributes[:'request_sent_hour']
155
+ end
156
+
157
+ if attributes.key?(:'payment_type')
158
+ self.payment_type = attributes[:'payment_type']
159
+ end
160
+
161
+ if attributes.key?(:'user_id')
162
+ self.user_id = attributes[:'user_id']
163
+ end
164
+
165
+ if attributes.key?(:'user_name')
166
+ self.user_name = attributes[:'user_name']
167
+ end
168
+
169
+ if attributes.key?(:'bankpayment_quantity')
170
+ self.bankpayment_quantity = attributes[:'bankpayment_quantity']
171
+ end
172
+
173
+ if attributes.key?(:'bankpayment_amount')
174
+ self.bankpayment_amount = attributes[:'bankpayment_amount']
175
+ end
176
+
177
+ if attributes.key?(:'valid_bankpayment_quantity')
178
+ self.valid_bankpayment_quantity = attributes[:'valid_bankpayment_quantity']
179
+ end
180
+
181
+ if attributes.key?(:'valid_bankpayment_amount')
182
+ self.valid_bankpayment_amount = attributes[:'valid_bankpayment_amount']
183
+ end
184
+ end
185
+
186
+ # Show invalid properties with the reasons. Usually used together with valid?
187
+ # @return Array for valid properties with the reasons
188
+ def list_invalid_properties
189
+ invalid_properties = Array.new
190
+ invalid_properties
191
+ end
192
+
193
+ # Check to see if the all the properties in the model are valid
194
+ # @return true if the model is valid
195
+ def valid?
196
+ true
197
+ end
198
+
199
+ # Checks equality by comparing each attribute.
200
+ # @param [Object] Object to be compared
201
+ def ==(o)
202
+ return true if self.equal?(o)
203
+ self.class == o.class &&
204
+ sequential_request_id == o.sequential_request_id &&
205
+ request_payment_message == o.request_payment_message &&
206
+ request_status == o.request_status &&
207
+ debit_branch_office == o.debit_branch_office &&
208
+ debit_current_account == o.debit_current_account &&
209
+ check_digits_debit_current_account == o.check_digits_debit_current_account &&
210
+ request_date == o.request_date &&
211
+ request_sent_hour == o.request_sent_hour &&
212
+ payment_type == o.payment_type &&
213
+ user_id == o.user_id &&
214
+ user_name == o.user_name &&
215
+ bankpayment_quantity == o.bankpayment_quantity &&
216
+ bankpayment_amount == o.bankpayment_amount &&
217
+ valid_bankpayment_quantity == o.valid_bankpayment_quantity &&
218
+ valid_bankpayment_amount == o.valid_bankpayment_amount
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
+ [sequential_request_id, request_payment_message, request_status, debit_branch_office, debit_current_account, check_digits_debit_current_account, request_date, request_sent_hour, payment_type, user_id, user_name, bankpayment_quantity, bankpayment_amount, valid_bankpayment_quantity, valid_bankpayment_amount].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
+ new.build_from_hash(attributes)
238
+ end
239
+
240
+ # Builds the object from hash
241
+ # @param [Hash] attributes Model attributes in the form of hash
242
+ # @return [Object] Returns the model itself
243
+ def build_from_hash(attributes)
244
+ return nil unless attributes.is_a?(Hash)
245
+ self.class.openapi_types.each_pair do |key, type|
246
+ if type =~ /\AArray<(.*)>/i
247
+ # check to ensure the input is an array given that the attribute
248
+ # is documented as an array but the input is not
249
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
250
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
251
+ end
252
+ elsif !attributes[self.class.attribute_map[key]].nil?
253
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
254
+ elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
255
+ self.send("#{key}=", nil)
256
+ end
257
+ end
258
+
259
+ self
260
+ end
261
+
262
+ # Deserializes the data based on type
263
+ # @param string type Data type
264
+ # @param string value Value to be deserialized
265
+ # @return [Object] Deserialized data
266
+ def _deserialize(type, value)
267
+ case type.to_sym
268
+ when :DateTime
269
+ DateTime.parse(value)
270
+ when :Date
271
+ Date.parse(value)
272
+ when :String
273
+ value.to_s
274
+ when :Integer
275
+ value.to_i
276
+ when :Float
277
+ value.to_f
278
+ when :Boolean
279
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
280
+ true
281
+ else
282
+ false
283
+ end
284
+ when :Object
285
+ # generic object (usually a Hash), return directly
286
+ value
287
+ when /\AArray<(?<inner_type>.+)>\z/
288
+ inner_type = Regexp.last_match[:inner_type]
289
+ value.map { |v| _deserialize(inner_type, v) }
290
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
291
+ k_type = Regexp.last_match[:k_type]
292
+ v_type = Regexp.last_match[:v_type]
293
+ {}.tap do |hash|
294
+ value.each do |k, v|
295
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
296
+ end
297
+ end
298
+ else # model
299
+ BancoBrasilPayments.const_get(type).build_from_hash(value)
300
+ end
301
+ end
302
+
303
+ # Returns the string representation of the object
304
+ # @return [String] String presentation of the object
305
+ def to_s
306
+ to_hash.to_s
307
+ end
308
+
309
+ # to_body is an alias to to_hash (backward compatibility)
310
+ # @return [Hash] Returns the object in the form of hash
311
+ def to_body
312
+ to_hash
313
+ end
314
+
315
+ # Returns the object in the form of hash
316
+ # @return [Hash] Returns the object in the form of hash
317
+ def to_hash
318
+ hash = {}
319
+ self.class.attribute_map.each_pair do |attr, param|
320
+ value = self.send(attr)
321
+ if value.nil?
322
+ is_nullable = self.class.openapi_nullable.include?(attr)
323
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
324
+ end
325
+
326
+ hash[param] = _to_hash(value)
327
+ end
328
+ hash
329
+ end
330
+
331
+ # Outputs non-array value in the form of hash
332
+ # For object, use to_hash. Otherwise, just return the value
333
+ # @param [Object] value Any valid value
334
+ # @return [Hash] Returns the value in the form of hash
335
+ def _to_hash(value)
336
+ if value.is_a?(Array)
337
+ value.compact.map { |v| _to_hash(v) }
338
+ elsif value.is_a?(Hash)
339
+ {}.tap do |hash|
340
+ value.each { |k, v| hash[k] = _to_hash(v) }
341
+ end
342
+ elsif value.respond_to? :to_hash
343
+ value.to_hash
344
+ else
345
+ value
346
+ end
347
+ end end
348
+ end