bb_payments 0.1.1
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 +11 -0
- data/Gemfile.lock +82 -0
- data/README.md +391 -0
- data/Rakefile +8 -0
- data/bb_payments.gemspec +30 -0
- data/docs/BankSlipsApi.md +178 -0
- data/docs/BarcodeCollectionFormsIDResponseObject.md +6 -0
- data/docs/BarcodeCollectionFormsIDResponseObjectListaGuiaCodigoBarra.md +10 -0
- data/docs/BarcodeCollectionFormsIDResponseObjectListaOcorrencia.md +9 -0
- data/docs/BarcodeCollectionFormsRequestObject.md +12 -0
- data/docs/BarcodecollectionformsCollectionFormDetailsList.md +12 -0
- data/docs/BatchtransfersPaymentsList.md +22 -0
- data/docs/BatchtransferscancelPaymentIds.md +7 -0
- data/docs/Body.md +13 -0
- data/docs/CancelApi.md +63 -0
- data/docs/CollectionFormsApi.md +184 -0
- data/docs/Error.md +7 -0
- data/docs/ErrorErrors.md +8 -0
- data/docs/ErrorOAuthUnauthorized.md +10 -0
- data/docs/ErrorOAuthUnauthorizedAttributes.md +7 -0
- data/docs/InlineResponse200.md +13 -0
- data/docs/InlineResponse2001.md +29 -0
- data/docs/InlineResponse2001OcurrencesList.md +9 -0
- data/docs/InlineResponse2002.md +12 -0
- data/docs/InlineResponse2002PaymentsList.md +26 -0
- data/docs/InlineResponse2003.md +26 -0
- data/docs/InlineResponse2003ListaBoleto.md +24 -0
- data/docs/InlineResponse2003ListaDevolucao.md +9 -0
- data/docs/InlineResponse200PaymentsList.md +15 -0
- data/docs/InlineResponse201.md +13 -0
- data/docs/InlineResponse2011.md +13 -0
- data/docs/InlineResponse2011PaymentsList.md +16 -0
- data/docs/InlineResponse201PaymentsList.md +26 -0
- data/docs/InlineResponse400.md +7 -0
- data/docs/InlineResponse401.md +10 -0
- data/docs/ReturnedsApi.md +78 -0
- data/docs/RootTypeForBankSlipList.md +29 -0
- data/docs/RootTypeForBankSlipsBatchPayment.md +12 -0
- data/docs/RootTypeForBankSlipsBatchPaymentResponseObject.md +12 -0
- data/docs/RootTypeForBatchTransferGETResponseObject.md +9 -0
- data/docs/RootTypeForBatchTransferPaymentsListGET.md +21 -0
- data/docs/RootTypeForBatchTransfersCancelPaymentsListObject.md +10 -0
- data/docs/RootTypeForBatchTransfersCancelRequestObject.md +12 -0
- data/docs/RootTypeForBatchTransfersCancelResponseObject.md +7 -0
- data/docs/RootTypeForReturnedPaymentsDetails.md +33 -0
- data/docs/RootTypeForReturnedPaymentsResponseObject.md +10 -0
- data/docs/RootTypeForSlipsDetailsObject.md +23 -0
- data/docs/TransfersApi.md +309 -0
- data/lib/bb_payments/api/base.rb +10 -0
- data/lib/bb_payments/api/base_api.rb +63 -0
- data/lib/bb_payments/api/batch_payments_api.rb +50 -0
- data/lib/bb_payments/api/payments.rb +114 -0
- data/lib/bb_payments/api/transfers.rb +33 -0
- data/lib/bb_payments/api/transfers_pix.rb +52 -0
- data/lib/bb_payments/api_client.rb +414 -0
- data/lib/bb_payments/api_error.rb +57 -0
- data/lib/bb_payments/configuration.rb +246 -0
- data/lib/bb_payments/models/base_model.rb +177 -0
- data/lib/bb_payments/models/batch_pix_body.rb +30 -0
- data/lib/bb_payments/models/batch_pix_response.rb +69 -0
- data/lib/bb_payments/models/batch_transfers_body.rb +30 -0
- data/lib/bb_payments/models/batch_transfers_response.rb +64 -0
- data/lib/bb_payments/models/batchtransfers_payments_list.rb +362 -0
- data/lib/bb_payments/models/batchtransferscancel_payment_ids.rb +212 -0
- data/lib/bb_payments/models/body.rb +274 -0
- data/lib/bb_payments/models/error.rb +210 -0
- data/lib/bb_payments/models/error_errors.rb +227 -0
- data/lib/bb_payments/models/error_o_auth_unauthorized.rb +257 -0
- data/lib/bb_payments/models/error_o_auth_unauthorized_attributes.rb +213 -0
- data/lib/bb_payments/models/find_batch_payment.rb +93 -0
- data/lib/bb_payments/models/find_batch_response.rb +71 -0
- data/lib/bb_payments/models/inline_response_200.rb +270 -0
- data/lib/bb_payments/models/inline_response_200_1.rb +430 -0
- data/lib/bb_payments/models/inline_response_200_1_ocurrences_list.rb +227 -0
- data/lib/bb_payments/models/inline_response_200_2.rb +260 -0
- data/lib/bb_payments/models/inline_response_200_2_payments_list.rb +399 -0
- data/lib/bb_payments/models/inline_response_200_3.rb +487 -0
- data/lib/bb_payments/models/inline_response_200_3_lista_boleto.rb +377 -0
- data/lib/bb_payments/models/inline_response_200_3_lista_devolucao.rb +227 -0
- data/lib/bb_payments/models/inline_response_200_payments_list.rb +289 -0
- data/lib/bb_payments/models/inline_response_201.rb +270 -0
- data/lib/bb_payments/models/inline_response_201_1.rb +270 -0
- data/lib/bb_payments/models/inline_response_201_1_payments_list.rb +299 -0
- data/lib/bb_payments/models/inline_response_201_payments_list.rb +399 -0
- data/lib/bb_payments/models/inline_response_400.rb +210 -0
- data/lib/bb_payments/models/inline_response_401.rb +257 -0
- data/lib/bb_payments/models/root_type_for_bank_slip_list.rb +430 -0
- data/lib/bb_payments/models/root_type_for_bank_slips_batch_payment.rb +270 -0
- data/lib/bb_payments/models/root_type_for_bank_slips_batch_payment_response_object.rb +260 -0
- data/lib/bb_payments/models/root_type_for_batch_transfer_get_response_object.rb +230 -0
- data/lib/bb_payments/models/root_type_for_batch_transfer_payments_list_get.rb +348 -0
- data/lib/bb_payments/models/root_type_for_batch_transfers_cancel_payments_list_object.rb +238 -0
- data/lib/bb_payments/models/root_type_for_batch_transfers_cancel_request_object.rb +275 -0
- data/lib/bb_payments/models/root_type_for_batch_transfers_cancel_response_object.rb +210 -0
- data/lib/bb_payments/models/root_type_for_returned_payments_details.rb +468 -0
- data/lib/bb_payments/models/root_type_for_returned_payments_response_object.rb +240 -0
- data/lib/bb_payments/models/root_type_for_slips_details_object.rb +408 -0
- data/lib/bb_payments/models/transfer_base.rb +128 -0
- data/lib/bb_payments/models/transfer_pix.rb +34 -0
- data/lib/bb_payments/models/transfer_pix_base.rb +146 -0
- data/lib/bb_payments/version.rb +3 -0
- data/lib/bb_payments.rb +85 -0
- data/spec/api/batch_payments_api_spec.rb +113 -0
- data/spec/api_client_spec.rb +225 -0
- data/spec/base_object_spec.rb +109 -0
- data/spec/configuration_spec.rb +41 -0
- data/spec/models/body_spec.rb +76 -0
- data/spec/models/error_errors_spec.rb +46 -0
- data/spec/models/error_o_auth_unauthorized_attributes_spec.rb +40 -0
- data/spec/models/error_o_auth_unauthorized_spec.rb +58 -0
- data/spec/models/error_spec.rb +40 -0
- data/spec/models/inline_response_200_1_ocurrences_list_spec.rb +52 -0
- data/spec/models/inline_response_200_1_spec.rb +172 -0
- data/spec/models/inline_response_200_2_payments_list_spec.rb +154 -0
- data/spec/models/inline_response_200_2_spec.rb +70 -0
- data/spec/models/inline_response_200_3_lista_boleto_spec.rb +142 -0
- data/spec/models/inline_response_200_3_lista_devolucao_spec.rb +52 -0
- data/spec/models/inline_response_200_3_spec.rb +154 -0
- data/spec/models/inline_response_200_payments_list_spec.rb +88 -0
- data/spec/models/inline_response_200_spec.rb +76 -0
- data/spec/models/inline_response_201_1_payments_list_spec.rb +94 -0
- data/spec/models/inline_response_201_1_spec.rb +76 -0
- data/spec/models/inline_response_201_payments_list_spec.rb +154 -0
- data/spec/models/inline_response_201_spec.rb +76 -0
- data/spec/models/inline_response_400_spec.rb +40 -0
- data/spec/models/inline_response_401_spec.rb +58 -0
- data/spec/models/root_type_for_bank_slip_list_spec.rb +172 -0
- data/spec/models/root_type_for_bank_slips_batch_payment_response_object_spec.rb +70 -0
- data/spec/models/root_type_for_bank_slips_batch_payment_spec.rb +70 -0
- data/spec/models/root_type_for_batch_transfer_get_response_object_spec.rb +52 -0
- data/spec/models/root_type_for_batch_transfer_payments_list_get_spec.rb +124 -0
- data/spec/models/root_type_for_batch_transfers_cancel_payments_list_object_spec.rb +58 -0
- data/spec/models/root_type_for_batch_transfers_cancel_request_object_spec.rb +70 -0
- data/spec/models/root_type_for_batch_transfers_cancel_response_object_spec.rb +40 -0
- data/spec/models/root_type_for_returned_payments_details_spec.rb +196 -0
- data/spec/models/root_type_for_returned_payments_response_object_spec.rb +58 -0
- data/spec/models/root_type_for_slips_details_object_spec.rb +136 -0
- data/spec/spec_helper.rb +110 -0
- metadata +292 -0
|
@@ -0,0 +1,377 @@
|
|
|
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
|
+
class InlineResponse2003ListaBoleto
|
|
16
|
+
# \"Código de barras do boleto consultado. Não é a linha digitável do boleto.\"
|
|
17
|
+
attr_accessor :codigo_barras
|
|
18
|
+
|
|
19
|
+
# Exibe o Nosso Número quando informado na solicitação de pagamento. Não validado pelo Banco.
|
|
20
|
+
attr_accessor :nosso_documento
|
|
21
|
+
|
|
22
|
+
# Exibe o Seu Número quando informado na solicitação de pagamento. Não validado pelo Banco.
|
|
23
|
+
attr_accessor :seu_documento
|
|
24
|
+
|
|
25
|
+
# Determina se é um Nº CPF ou um Nº de CNPJ no campo Número Inscrição Beneficiário do Boleto DOMÍNIOS: 1 - CPF 2 – CNPJ
|
|
26
|
+
attr_accessor :tipo_pessoa_beneficiario
|
|
27
|
+
|
|
28
|
+
# Nº CPF ou um Nº de CNPJ do Beneficiário do Boleto informado na solicitação de pagamento.
|
|
29
|
+
attr_accessor :documento_beneficiario
|
|
30
|
+
|
|
31
|
+
# Nome do Beneficiário - dado retornado pelo Banco
|
|
32
|
+
attr_accessor :nome_beneficiario
|
|
33
|
+
|
|
34
|
+
# Determina se é um Nº CPF ou um Nº de CNPJ no campo Número Inscrição Pagador do Boleto. DOMÍNIOS: 1 - CPF 2 – CNPJ
|
|
35
|
+
attr_accessor :tipo_pessoa_pagador
|
|
36
|
+
|
|
37
|
+
# Nº CPF ou um Nº de CNPJ do Pagador do boleto informado na solicitação de pagamento.
|
|
38
|
+
attr_accessor :documento_pagador
|
|
39
|
+
|
|
40
|
+
# Nome do Pagador - dado retornado pelo Banco.
|
|
41
|
+
attr_accessor :nome_pagador
|
|
42
|
+
|
|
43
|
+
# Determina se é um Nº CPF ou um Nº de CNPJ no campo Número Inscrição Avalista do Boleto. DOMÍNIOS: 1 - CPF 2 – CNPJ
|
|
44
|
+
attr_accessor :tipo_pessoa_avalista
|
|
45
|
+
|
|
46
|
+
# Nº CPF ou um Nº de CNPJ do Avalista do boleto informado na solicitação de pagamento.
|
|
47
|
+
attr_accessor :documento_avalista
|
|
48
|
+
|
|
49
|
+
# Nome do Avalista - dado retornado pelo Banco
|
|
50
|
+
attr_accessor :nome_avalista
|
|
51
|
+
|
|
52
|
+
# Data de vencimento do boleto informado na solicitação de pagamento (formato ddmmaaaa)
|
|
53
|
+
attr_accessor :data_vencimento
|
|
54
|
+
|
|
55
|
+
# Data do pagamento informado na solicitação de pagamento (formato ddmmaaaa)
|
|
56
|
+
attr_accessor :data_agendamento
|
|
57
|
+
|
|
58
|
+
# Valor do boleto registrado pelo Beneficiário do Boleto e informado na solicitação de pagamento (formato 0.00)
|
|
59
|
+
attr_accessor :valor_nominal
|
|
60
|
+
|
|
61
|
+
# Valor do juros mora e multa informado na solicitação de pagamento (formato 0.00)
|
|
62
|
+
attr_accessor :valor_mora_multa
|
|
63
|
+
|
|
64
|
+
# Valor do desconto/abatimento informado na solicitação de pagamento (formato 0.00)
|
|
65
|
+
attr_accessor :valor_desconto
|
|
66
|
+
|
|
67
|
+
# Campo livre informado pelo pagador quando do envio do lançamento consultado – sem tratamento pelo Banco.
|
|
68
|
+
attr_accessor :texto
|
|
69
|
+
|
|
70
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
71
|
+
def self.attribute_map
|
|
72
|
+
{
|
|
73
|
+
:'codigo_barras' => :'codigoBarras',
|
|
74
|
+
:'nosso_documento' => :'nossoDocumento',
|
|
75
|
+
:'seu_documento' => :'seuDocumento',
|
|
76
|
+
:'tipo_pessoa_beneficiario' => :'tipoPessoaBeneficiario',
|
|
77
|
+
:'documento_beneficiario' => :'documentoBeneficiario',
|
|
78
|
+
:'nome_beneficiario' => :'nomeBeneficiario',
|
|
79
|
+
:'tipo_pessoa_pagador' => :'tipoPessoaPagador',
|
|
80
|
+
:'documento_pagador' => :'documentoPagador',
|
|
81
|
+
:'nome_pagador' => :'nomePagador',
|
|
82
|
+
:'tipo_pessoa_avalista' => :'tipoPessoaAvalista',
|
|
83
|
+
:'documento_avalista' => :'documentoAvalista',
|
|
84
|
+
:'nome_avalista' => :'nomeAvalista',
|
|
85
|
+
:'data_vencimento' => :'dataVencimento',
|
|
86
|
+
:'data_agendamento' => :'dataAgendamento',
|
|
87
|
+
:'valor_nominal' => :'valorNominal',
|
|
88
|
+
:'valor_mora_multa' => :'valorMoraMulta',
|
|
89
|
+
:'valor_desconto' => :'valorDesconto',
|
|
90
|
+
:'texto' => :'texto'
|
|
91
|
+
}
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
# Attribute type mapping.
|
|
95
|
+
def self.openapi_types
|
|
96
|
+
{
|
|
97
|
+
:'codigo_barras' => :'Object',
|
|
98
|
+
:'nosso_documento' => :'Object',
|
|
99
|
+
:'seu_documento' => :'Object',
|
|
100
|
+
:'tipo_pessoa_beneficiario' => :'Object',
|
|
101
|
+
:'documento_beneficiario' => :'Object',
|
|
102
|
+
:'nome_beneficiario' => :'Object',
|
|
103
|
+
:'tipo_pessoa_pagador' => :'Object',
|
|
104
|
+
:'documento_pagador' => :'Object',
|
|
105
|
+
:'nome_pagador' => :'Object',
|
|
106
|
+
:'tipo_pessoa_avalista' => :'Object',
|
|
107
|
+
:'documento_avalista' => :'Object',
|
|
108
|
+
:'nome_avalista' => :'Object',
|
|
109
|
+
:'data_vencimento' => :'Object',
|
|
110
|
+
:'data_agendamento' => :'Object',
|
|
111
|
+
:'valor_nominal' => :'Object',
|
|
112
|
+
:'valor_mora_multa' => :'Object',
|
|
113
|
+
:'valor_desconto' => :'Object',
|
|
114
|
+
:'texto' => :'Object'
|
|
115
|
+
}
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
# List of attributes with nullable: true
|
|
119
|
+
def self.openapi_nullable
|
|
120
|
+
Set.new([
|
|
121
|
+
])
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
# Initializes the object
|
|
125
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
126
|
+
def initialize(attributes = {})
|
|
127
|
+
if (!attributes.is_a?(Hash))
|
|
128
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `BancoBrasilPayments::InlineResponse2003ListaBoleto` initialize method"
|
|
129
|
+
end
|
|
130
|
+
|
|
131
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
132
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
133
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
134
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `BancoBrasilPayments::InlineResponse2003ListaBoleto`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
135
|
+
end
|
|
136
|
+
h[k.to_sym] = v
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
if attributes.key?(:'codigo_barras')
|
|
140
|
+
self.codigo_barras = attributes[:'codigo_barras']
|
|
141
|
+
end
|
|
142
|
+
|
|
143
|
+
if attributes.key?(:'nosso_documento')
|
|
144
|
+
self.nosso_documento = attributes[:'nosso_documento']
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
if attributes.key?(:'seu_documento')
|
|
148
|
+
self.seu_documento = attributes[:'seu_documento']
|
|
149
|
+
end
|
|
150
|
+
|
|
151
|
+
if attributes.key?(:'tipo_pessoa_beneficiario')
|
|
152
|
+
self.tipo_pessoa_beneficiario = attributes[:'tipo_pessoa_beneficiario']
|
|
153
|
+
end
|
|
154
|
+
|
|
155
|
+
if attributes.key?(:'documento_beneficiario')
|
|
156
|
+
self.documento_beneficiario = attributes[:'documento_beneficiario']
|
|
157
|
+
end
|
|
158
|
+
|
|
159
|
+
if attributes.key?(:'nome_beneficiario')
|
|
160
|
+
self.nome_beneficiario = attributes[:'nome_beneficiario']
|
|
161
|
+
end
|
|
162
|
+
|
|
163
|
+
if attributes.key?(:'tipo_pessoa_pagador')
|
|
164
|
+
self.tipo_pessoa_pagador = attributes[:'tipo_pessoa_pagador']
|
|
165
|
+
end
|
|
166
|
+
|
|
167
|
+
if attributes.key?(:'documento_pagador')
|
|
168
|
+
self.documento_pagador = attributes[:'documento_pagador']
|
|
169
|
+
end
|
|
170
|
+
|
|
171
|
+
if attributes.key?(:'nome_pagador')
|
|
172
|
+
self.nome_pagador = attributes[:'nome_pagador']
|
|
173
|
+
end
|
|
174
|
+
|
|
175
|
+
if attributes.key?(:'tipo_pessoa_avalista')
|
|
176
|
+
self.tipo_pessoa_avalista = attributes[:'tipo_pessoa_avalista']
|
|
177
|
+
end
|
|
178
|
+
|
|
179
|
+
if attributes.key?(:'documento_avalista')
|
|
180
|
+
self.documento_avalista = attributes[:'documento_avalista']
|
|
181
|
+
end
|
|
182
|
+
|
|
183
|
+
if attributes.key?(:'nome_avalista')
|
|
184
|
+
self.nome_avalista = attributes[:'nome_avalista']
|
|
185
|
+
end
|
|
186
|
+
|
|
187
|
+
if attributes.key?(:'data_vencimento')
|
|
188
|
+
self.data_vencimento = attributes[:'data_vencimento']
|
|
189
|
+
end
|
|
190
|
+
|
|
191
|
+
if attributes.key?(:'data_agendamento')
|
|
192
|
+
self.data_agendamento = attributes[:'data_agendamento']
|
|
193
|
+
end
|
|
194
|
+
|
|
195
|
+
if attributes.key?(:'valor_nominal')
|
|
196
|
+
self.valor_nominal = attributes[:'valor_nominal']
|
|
197
|
+
end
|
|
198
|
+
|
|
199
|
+
if attributes.key?(:'valor_mora_multa')
|
|
200
|
+
self.valor_mora_multa = attributes[:'valor_mora_multa']
|
|
201
|
+
end
|
|
202
|
+
|
|
203
|
+
if attributes.key?(:'valor_desconto')
|
|
204
|
+
self.valor_desconto = attributes[:'valor_desconto']
|
|
205
|
+
end
|
|
206
|
+
|
|
207
|
+
if attributes.key?(:'texto')
|
|
208
|
+
self.texto = attributes[:'texto']
|
|
209
|
+
end
|
|
210
|
+
end
|
|
211
|
+
|
|
212
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
213
|
+
# @return Array for valid properties with the reasons
|
|
214
|
+
def list_invalid_properties
|
|
215
|
+
invalid_properties = Array.new
|
|
216
|
+
invalid_properties
|
|
217
|
+
end
|
|
218
|
+
|
|
219
|
+
# Check to see if the all the properties in the model are valid
|
|
220
|
+
# @return true if the model is valid
|
|
221
|
+
def valid?
|
|
222
|
+
true
|
|
223
|
+
end
|
|
224
|
+
|
|
225
|
+
# Checks equality by comparing each attribute.
|
|
226
|
+
# @param [Object] Object to be compared
|
|
227
|
+
def ==(o)
|
|
228
|
+
return true if self.equal?(o)
|
|
229
|
+
self.class == o.class &&
|
|
230
|
+
codigo_barras == o.codigo_barras &&
|
|
231
|
+
nosso_documento == o.nosso_documento &&
|
|
232
|
+
seu_documento == o.seu_documento &&
|
|
233
|
+
tipo_pessoa_beneficiario == o.tipo_pessoa_beneficiario &&
|
|
234
|
+
documento_beneficiario == o.documento_beneficiario &&
|
|
235
|
+
nome_beneficiario == o.nome_beneficiario &&
|
|
236
|
+
tipo_pessoa_pagador == o.tipo_pessoa_pagador &&
|
|
237
|
+
documento_pagador == o.documento_pagador &&
|
|
238
|
+
nome_pagador == o.nome_pagador &&
|
|
239
|
+
tipo_pessoa_avalista == o.tipo_pessoa_avalista &&
|
|
240
|
+
documento_avalista == o.documento_avalista &&
|
|
241
|
+
nome_avalista == o.nome_avalista &&
|
|
242
|
+
data_vencimento == o.data_vencimento &&
|
|
243
|
+
data_agendamento == o.data_agendamento &&
|
|
244
|
+
valor_nominal == o.valor_nominal &&
|
|
245
|
+
valor_mora_multa == o.valor_mora_multa &&
|
|
246
|
+
valor_desconto == o.valor_desconto &&
|
|
247
|
+
texto == o.texto
|
|
248
|
+
end
|
|
249
|
+
|
|
250
|
+
# @see the `==` method
|
|
251
|
+
# @param [Object] Object to be compared
|
|
252
|
+
def eql?(o)
|
|
253
|
+
self == o
|
|
254
|
+
end
|
|
255
|
+
|
|
256
|
+
# Calculates hash code according to all attributes.
|
|
257
|
+
# @return [Integer] Hash code
|
|
258
|
+
def hash
|
|
259
|
+
[codigo_barras, nosso_documento, seu_documento, tipo_pessoa_beneficiario, documento_beneficiario, nome_beneficiario, tipo_pessoa_pagador, documento_pagador, nome_pagador, tipo_pessoa_avalista, documento_avalista, nome_avalista, data_vencimento, data_agendamento, valor_nominal, valor_mora_multa, valor_desconto, texto].hash
|
|
260
|
+
end
|
|
261
|
+
|
|
262
|
+
# Builds the object from hash
|
|
263
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
264
|
+
# @return [Object] Returns the model itself
|
|
265
|
+
def self.build_from_hash(attributes)
|
|
266
|
+
new.build_from_hash(attributes)
|
|
267
|
+
end
|
|
268
|
+
|
|
269
|
+
# Builds the object from hash
|
|
270
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
271
|
+
# @return [Object] Returns the model itself
|
|
272
|
+
def build_from_hash(attributes)
|
|
273
|
+
return nil unless attributes.is_a?(Hash)
|
|
274
|
+
self.class.openapi_types.each_pair do |key, type|
|
|
275
|
+
if type =~ /\AArray<(.*)>/i
|
|
276
|
+
# check to ensure the input is an array given that the attribute
|
|
277
|
+
# is documented as an array but the input is not
|
|
278
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
279
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
280
|
+
end
|
|
281
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
282
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
283
|
+
elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
|
284
|
+
self.send("#{key}=", nil)
|
|
285
|
+
end
|
|
286
|
+
end
|
|
287
|
+
|
|
288
|
+
self
|
|
289
|
+
end
|
|
290
|
+
|
|
291
|
+
# Deserializes the data based on type
|
|
292
|
+
# @param string type Data type
|
|
293
|
+
# @param string value Value to be deserialized
|
|
294
|
+
# @return [Object] Deserialized data
|
|
295
|
+
def _deserialize(type, value)
|
|
296
|
+
case type.to_sym
|
|
297
|
+
when :DateTime
|
|
298
|
+
DateTime.parse(value)
|
|
299
|
+
when :Date
|
|
300
|
+
Date.parse(value)
|
|
301
|
+
when :String
|
|
302
|
+
value.to_s
|
|
303
|
+
when :Integer
|
|
304
|
+
value.to_i
|
|
305
|
+
when :Float
|
|
306
|
+
value.to_f
|
|
307
|
+
when :Boolean
|
|
308
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
309
|
+
true
|
|
310
|
+
else
|
|
311
|
+
false
|
|
312
|
+
end
|
|
313
|
+
when :Object
|
|
314
|
+
# generic object (usually a Hash), return directly
|
|
315
|
+
value
|
|
316
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
317
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
318
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
319
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
320
|
+
k_type = Regexp.last_match[:k_type]
|
|
321
|
+
v_type = Regexp.last_match[:v_type]
|
|
322
|
+
{}.tap do |hash|
|
|
323
|
+
value.each do |k, v|
|
|
324
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
325
|
+
end
|
|
326
|
+
end
|
|
327
|
+
else # model
|
|
328
|
+
BancoBrasilPayments.const_get(type).build_from_hash(value)
|
|
329
|
+
end
|
|
330
|
+
end
|
|
331
|
+
|
|
332
|
+
# Returns the string representation of the object
|
|
333
|
+
# @return [String] String presentation of the object
|
|
334
|
+
def to_s
|
|
335
|
+
to_hash.to_s
|
|
336
|
+
end
|
|
337
|
+
|
|
338
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
339
|
+
# @return [Hash] Returns the object in the form of hash
|
|
340
|
+
def to_body
|
|
341
|
+
to_hash
|
|
342
|
+
end
|
|
343
|
+
|
|
344
|
+
# Returns the object in the form of hash
|
|
345
|
+
# @return [Hash] Returns the object in the form of hash
|
|
346
|
+
def to_hash
|
|
347
|
+
hash = {}
|
|
348
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
349
|
+
value = self.send(attr)
|
|
350
|
+
if value.nil?
|
|
351
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
352
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
353
|
+
end
|
|
354
|
+
|
|
355
|
+
hash[param] = _to_hash(value)
|
|
356
|
+
end
|
|
357
|
+
hash
|
|
358
|
+
end
|
|
359
|
+
|
|
360
|
+
# Outputs non-array value in the form of hash
|
|
361
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
362
|
+
# @param [Object] value Any valid value
|
|
363
|
+
# @return [Hash] Returns the value in the form of hash
|
|
364
|
+
def _to_hash(value)
|
|
365
|
+
if value.is_a?(Array)
|
|
366
|
+
value.compact.map { |v| _to_hash(v) }
|
|
367
|
+
elsif value.is_a?(Hash)
|
|
368
|
+
{}.tap do |hash|
|
|
369
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
370
|
+
end
|
|
371
|
+
elsif value.respond_to? :to_hash
|
|
372
|
+
value.to_hash
|
|
373
|
+
else
|
|
374
|
+
value
|
|
375
|
+
end
|
|
376
|
+
end end
|
|
377
|
+
end
|
|
@@ -0,0 +1,227 @@
|
|
|
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
|
+
class InlineResponse2003ListaDevolucao
|
|
16
|
+
# \"Quando o pagamento estiver na situação: Inconsistente ou Rejeitado - Detalha os motivos da rejeição do lançamento. Devolvido - Detalha os motivos da devolução informada pelo Beneficiario do pagamento devolvido.\"
|
|
17
|
+
attr_accessor :ocorrencia
|
|
18
|
+
|
|
19
|
+
# Data que o beneficiário do pagamento enviou a devolução dos recursos.
|
|
20
|
+
attr_accessor :data
|
|
21
|
+
|
|
22
|
+
# Valor devolvido pelo beneficiário do pagamento. Pode ser parcial.
|
|
23
|
+
attr_accessor :valor
|
|
24
|
+
|
|
25
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
26
|
+
def self.attribute_map
|
|
27
|
+
{
|
|
28
|
+
:'ocorrencia' => :'ocorrencia',
|
|
29
|
+
:'data' => :'data',
|
|
30
|
+
:'valor' => :'valor'
|
|
31
|
+
}
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
# Attribute type mapping.
|
|
35
|
+
def self.openapi_types
|
|
36
|
+
{
|
|
37
|
+
:'ocorrencia' => :'Object',
|
|
38
|
+
:'data' => :'Object',
|
|
39
|
+
:'valor' => :'Object'
|
|
40
|
+
}
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
# List of attributes with nullable: true
|
|
44
|
+
def self.openapi_nullable
|
|
45
|
+
Set.new([
|
|
46
|
+
])
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
# Initializes the object
|
|
50
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
51
|
+
def initialize(attributes = {})
|
|
52
|
+
if (!attributes.is_a?(Hash))
|
|
53
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `BancoBrasilPayments::InlineResponse2003ListaDevolucao` initialize method"
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
57
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
58
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
59
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `BancoBrasilPayments::InlineResponse2003ListaDevolucao`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
60
|
+
end
|
|
61
|
+
h[k.to_sym] = v
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
if attributes.key?(:'ocorrencia')
|
|
65
|
+
self.ocorrencia = attributes[:'ocorrencia']
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
if attributes.key?(:'data')
|
|
69
|
+
self.data = attributes[:'data']
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
if attributes.key?(:'valor')
|
|
73
|
+
self.valor = attributes[:'valor']
|
|
74
|
+
end
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
78
|
+
# @return Array for valid properties with the reasons
|
|
79
|
+
def list_invalid_properties
|
|
80
|
+
invalid_properties = Array.new
|
|
81
|
+
invalid_properties
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
# Check to see if the all the properties in the model are valid
|
|
85
|
+
# @return true if the model is valid
|
|
86
|
+
def valid?
|
|
87
|
+
true
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
# Checks equality by comparing each attribute.
|
|
91
|
+
# @param [Object] Object to be compared
|
|
92
|
+
def ==(o)
|
|
93
|
+
return true if self.equal?(o)
|
|
94
|
+
self.class == o.class &&
|
|
95
|
+
ocorrencia == o.ocorrencia &&
|
|
96
|
+
data == o.data &&
|
|
97
|
+
valor == o.valor
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
# @see the `==` method
|
|
101
|
+
# @param [Object] Object to be compared
|
|
102
|
+
def eql?(o)
|
|
103
|
+
self == o
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
# Calculates hash code according to all attributes.
|
|
107
|
+
# @return [Integer] Hash code
|
|
108
|
+
def hash
|
|
109
|
+
[ocorrencia, data, valor].hash
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
# Builds the object from hash
|
|
113
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
114
|
+
# @return [Object] Returns the model itself
|
|
115
|
+
def self.build_from_hash(attributes)
|
|
116
|
+
new.build_from_hash(attributes)
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
# Builds the object from hash
|
|
120
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
121
|
+
# @return [Object] Returns the model itself
|
|
122
|
+
def build_from_hash(attributes)
|
|
123
|
+
return nil unless attributes.is_a?(Hash)
|
|
124
|
+
self.class.openapi_types.each_pair do |key, type|
|
|
125
|
+
if type =~ /\AArray<(.*)>/i
|
|
126
|
+
# check to ensure the input is an array given that the attribute
|
|
127
|
+
# is documented as an array but the input is not
|
|
128
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
129
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
130
|
+
end
|
|
131
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
132
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
133
|
+
elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
|
134
|
+
self.send("#{key}=", nil)
|
|
135
|
+
end
|
|
136
|
+
end
|
|
137
|
+
|
|
138
|
+
self
|
|
139
|
+
end
|
|
140
|
+
|
|
141
|
+
# Deserializes the data based on type
|
|
142
|
+
# @param string type Data type
|
|
143
|
+
# @param string value Value to be deserialized
|
|
144
|
+
# @return [Object] Deserialized data
|
|
145
|
+
def _deserialize(type, value)
|
|
146
|
+
case type.to_sym
|
|
147
|
+
when :DateTime
|
|
148
|
+
DateTime.parse(value)
|
|
149
|
+
when :Date
|
|
150
|
+
Date.parse(value)
|
|
151
|
+
when :String
|
|
152
|
+
value.to_s
|
|
153
|
+
when :Integer
|
|
154
|
+
value.to_i
|
|
155
|
+
when :Float
|
|
156
|
+
value.to_f
|
|
157
|
+
when :Boolean
|
|
158
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
159
|
+
true
|
|
160
|
+
else
|
|
161
|
+
false
|
|
162
|
+
end
|
|
163
|
+
when :Object
|
|
164
|
+
# generic object (usually a Hash), return directly
|
|
165
|
+
value
|
|
166
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
167
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
168
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
169
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
170
|
+
k_type = Regexp.last_match[:k_type]
|
|
171
|
+
v_type = Regexp.last_match[:v_type]
|
|
172
|
+
{}.tap do |hash|
|
|
173
|
+
value.each do |k, v|
|
|
174
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
175
|
+
end
|
|
176
|
+
end
|
|
177
|
+
else # model
|
|
178
|
+
BancoBrasilPayments.const_get(type).build_from_hash(value)
|
|
179
|
+
end
|
|
180
|
+
end
|
|
181
|
+
|
|
182
|
+
# Returns the string representation of the object
|
|
183
|
+
# @return [String] String presentation of the object
|
|
184
|
+
def to_s
|
|
185
|
+
to_hash.to_s
|
|
186
|
+
end
|
|
187
|
+
|
|
188
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
189
|
+
# @return [Hash] Returns the object in the form of hash
|
|
190
|
+
def to_body
|
|
191
|
+
to_hash
|
|
192
|
+
end
|
|
193
|
+
|
|
194
|
+
# Returns the object in the form of hash
|
|
195
|
+
# @return [Hash] Returns the object in the form of hash
|
|
196
|
+
def to_hash
|
|
197
|
+
hash = {}
|
|
198
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
199
|
+
value = self.send(attr)
|
|
200
|
+
if value.nil?
|
|
201
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
202
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
203
|
+
end
|
|
204
|
+
|
|
205
|
+
hash[param] = _to_hash(value)
|
|
206
|
+
end
|
|
207
|
+
hash
|
|
208
|
+
end
|
|
209
|
+
|
|
210
|
+
# Outputs non-array value in the form of hash
|
|
211
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
212
|
+
# @param [Object] value Any valid value
|
|
213
|
+
# @return [Hash] Returns the value in the form of hash
|
|
214
|
+
def _to_hash(value)
|
|
215
|
+
if value.is_a?(Array)
|
|
216
|
+
value.compact.map { |v| _to_hash(v) }
|
|
217
|
+
elsif value.is_a?(Hash)
|
|
218
|
+
{}.tap do |hash|
|
|
219
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
220
|
+
end
|
|
221
|
+
elsif value.respond_to? :to_hash
|
|
222
|
+
value.to_hash
|
|
223
|
+
else
|
|
224
|
+
value
|
|
225
|
+
end
|
|
226
|
+
end end
|
|
227
|
+
end
|