bb_payments 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- 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,487 @@
|
|
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
|
+
# Representação dos campos de resposta de uma solicitação de detalhamento de pagamento de boleto.
|
16
|
+
class InlineResponse2003
|
17
|
+
# Numero identificador do pagamento consultado.
|
18
|
+
attr_accessor :id
|
19
|
+
|
20
|
+
# Descrição da situação do pagamento: Domínios: - Consistente (pagamento recebido pelo banco, cumprem as regras de preenchimento dos campos mas ainda irá para validação e processamento) - Inconsistente (pagamento não aceito pelo banco por dados de entrada inconsistentes - não cumpre as regras de preenchimento dos campos) - Pago (pagamento efetuado ao favorecido) - Pendente (pagamento validado - pendência de autorização do pagamento por parte do pagador) - Aguardando saldo (débito não efetivado e em verificação de saldo até o horário limite da teimosinha). - Agendado (pagamento autorizado, porém aguardando a data de efetivação do pagamento ou horário de processamento) - Rejeitado (dados do pagamento não passaram na validações físicas e/ou lógicas, precisam ser corrigidos e reenviados. Ex: agência e conta não existem, conta não pertence ao CPF informado) - Cancelado (pagamento cancelado pelo pagador antes da data de efetivação do crédito) - Bloqueado (Débito na conta do pagador não efetivado por ocorrência no convênio, inconsistência de data/float ou falta de saldo) - Devolvido (pagamento efetuado e posteriormente devolvido pelo favorecido ou instituição recebedora. O valor é devolvido para a conta corrente onde ocorreu o débito da requisição)\" - Debitado (pagamento debitado na conta do pagador e pendente de crédito ao favorecido)
|
21
|
+
attr_accessor :estado_pagamento
|
22
|
+
|
23
|
+
# Código do tipo de pagamento efetuado: DOMÍNIOS: 126=Pagamento a Fornecedores; 127=Pagamento de Salários; 128=Pagamentos Diversos
|
24
|
+
attr_accessor :tipo_pagamento
|
25
|
+
|
26
|
+
# Número da agência da Conta Corrente onde foi efetuado o débito para efetivação do pagamento consultado.
|
27
|
+
attr_accessor :agencia_debito
|
28
|
+
|
29
|
+
# Número da Conta Corrente onde foi efetuado o débito para efetivação do pagamento consultado.
|
30
|
+
attr_accessor :conta_debito
|
31
|
+
|
32
|
+
# Digito verificador da Conta corrente onde foi efetuado o débito para efetivação do pagamento consultado.
|
33
|
+
attr_accessor :digito_conta_debito
|
34
|
+
|
35
|
+
# Primeiros 4 numeros do cartao de credito do pagador, caso o debito tenha sido feito nele.
|
36
|
+
attr_accessor :numero_cartao_inicio
|
37
|
+
|
38
|
+
# Ultimos 4 numeros do cartao de credito do pagador, caso o debito tenha sido feito nele.
|
39
|
+
attr_accessor :numero_cartao_fim
|
40
|
+
|
41
|
+
# Numero sequencial da requisição que solicitou o pagamento do lançamento consultado. Nº único controlada pelo cliente conveniado.
|
42
|
+
attr_accessor :requisicao_pagamento
|
43
|
+
|
44
|
+
# Numero do arquivo que o cliente envia quando utilizado CNAB240.
|
45
|
+
attr_accessor :arquivo_pagamento
|
46
|
+
|
47
|
+
# Data efetiva do pagamento (formato ddmmaaaa)
|
48
|
+
attr_accessor :data_pagamento
|
49
|
+
|
50
|
+
# Valor total do pagamento (formato 0.00)
|
51
|
+
attr_accessor :valor_pagamento
|
52
|
+
|
53
|
+
# Numero do documento de debito exibido no extrato do pagador.
|
54
|
+
attr_accessor :numero_documento_debito
|
55
|
+
|
56
|
+
# Código da Forma de transmissão de envio do lançamento consultado. DOMÍNIOS: 1 - API 2 - Arquivo CNAB 3 - Pagamento Online via Gerenciador Financeiro 4 - Sistemas Internos 99 - Outros
|
57
|
+
attr_accessor :codigo_transmissao
|
58
|
+
|
59
|
+
# Campo livre informado pelo pagador quando do envio do lançamento consultado – sem tratamento pelo Banco.
|
60
|
+
attr_accessor :descricao_pagamento
|
61
|
+
|
62
|
+
# Código de autenticação do pagamento.
|
63
|
+
attr_accessor :autenticacao_pagamento
|
64
|
+
|
65
|
+
# Quantidade de ocorrências de devoluções.
|
66
|
+
attr_accessor :quantidade_ocorrencia_devolucao
|
67
|
+
|
68
|
+
# \"Quando valor = 1 indica que o identificador consultado é de boleto. Quando valor = 0 indica que o identificador consultado NÃO é de boleto. Para consulta ao detalhamento do identificador informado utilize o recurso de detalhamento do tipo de pagamento a ser consultado.\"
|
69
|
+
attr_accessor :ocorrencia_boleto
|
70
|
+
|
71
|
+
# Lista de devoluções.
|
72
|
+
attr_accessor :lista_devolucao
|
73
|
+
|
74
|
+
# Lista de boletos.
|
75
|
+
attr_accessor :lista_boleto
|
76
|
+
|
77
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
78
|
+
def self.attribute_map
|
79
|
+
{
|
80
|
+
:'id' => :'id',
|
81
|
+
:'estado_pagamento' => :'estadoPagamento',
|
82
|
+
:'tipo_pagamento' => :'tipoPagamento',
|
83
|
+
:'agencia_debito' => :'agenciaDebito',
|
84
|
+
:'conta_debito' => :'contaDebito',
|
85
|
+
:'digito_conta_debito' => :'digitoContaDebito',
|
86
|
+
:'numero_cartao_inicio' => :'numeroCartaoInicio',
|
87
|
+
:'numero_cartao_fim' => :'numeroCartaoFim',
|
88
|
+
:'requisicao_pagamento' => :'requisicaoPagamento',
|
89
|
+
:'arquivo_pagamento' => :'arquivoPagamento',
|
90
|
+
:'data_pagamento' => :'dataPagamento',
|
91
|
+
:'valor_pagamento' => :'valorPagamento',
|
92
|
+
:'numero_documento_debito' => :'numeroDocumentoDebito',
|
93
|
+
:'codigo_transmissao' => :'codigoTransmissao',
|
94
|
+
:'descricao_pagamento' => :'descricaoPagamento',
|
95
|
+
:'autenticacao_pagamento' => :'autenticacaoPagamento',
|
96
|
+
:'quantidade_ocorrencia_devolucao' => :'quantidadeOcorrenciaDevolucao',
|
97
|
+
:'ocorrencia_boleto' => :'ocorrenciaBoleto',
|
98
|
+
:'lista_devolucao' => :'listaDevolucao',
|
99
|
+
:'lista_boleto' => :'listaBoleto'
|
100
|
+
}
|
101
|
+
end
|
102
|
+
|
103
|
+
# Attribute type mapping.
|
104
|
+
def self.openapi_types
|
105
|
+
{
|
106
|
+
:'id' => :'Object',
|
107
|
+
:'estado_pagamento' => :'Object',
|
108
|
+
:'tipo_pagamento' => :'Object',
|
109
|
+
:'agencia_debito' => :'Object',
|
110
|
+
:'conta_debito' => :'Object',
|
111
|
+
:'digito_conta_debito' => :'Object',
|
112
|
+
:'numero_cartao_inicio' => :'Object',
|
113
|
+
:'numero_cartao_fim' => :'Object',
|
114
|
+
:'requisicao_pagamento' => :'Object',
|
115
|
+
:'arquivo_pagamento' => :'Object',
|
116
|
+
:'data_pagamento' => :'Object',
|
117
|
+
:'valor_pagamento' => :'Object',
|
118
|
+
:'numero_documento_debito' => :'Object',
|
119
|
+
:'codigo_transmissao' => :'Object',
|
120
|
+
:'descricao_pagamento' => :'Object',
|
121
|
+
:'autenticacao_pagamento' => :'Object',
|
122
|
+
:'quantidade_ocorrencia_devolucao' => :'Object',
|
123
|
+
:'ocorrencia_boleto' => :'Object',
|
124
|
+
:'lista_devolucao' => :'Object',
|
125
|
+
:'lista_boleto' => :'Object'
|
126
|
+
}
|
127
|
+
end
|
128
|
+
|
129
|
+
# List of attributes with nullable: true
|
130
|
+
def self.openapi_nullable
|
131
|
+
Set.new([
|
132
|
+
])
|
133
|
+
end
|
134
|
+
|
135
|
+
# Initializes the object
|
136
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
137
|
+
def initialize(attributes = {})
|
138
|
+
if (!attributes.is_a?(Hash))
|
139
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `BancoBrasilPayments::InlineResponse2003` initialize method"
|
140
|
+
end
|
141
|
+
|
142
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
143
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
144
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
145
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `BancoBrasilPayments::InlineResponse2003`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
146
|
+
end
|
147
|
+
h[k.to_sym] = v
|
148
|
+
}
|
149
|
+
|
150
|
+
if attributes.key?(:'id')
|
151
|
+
self.id = attributes[:'id']
|
152
|
+
end
|
153
|
+
|
154
|
+
if attributes.key?(:'estado_pagamento')
|
155
|
+
self.estado_pagamento = attributes[:'estado_pagamento']
|
156
|
+
end
|
157
|
+
|
158
|
+
if attributes.key?(:'tipo_pagamento')
|
159
|
+
self.tipo_pagamento = attributes[:'tipo_pagamento']
|
160
|
+
end
|
161
|
+
|
162
|
+
if attributes.key?(:'agencia_debito')
|
163
|
+
self.agencia_debito = attributes[:'agencia_debito']
|
164
|
+
end
|
165
|
+
|
166
|
+
if attributes.key?(:'conta_debito')
|
167
|
+
self.conta_debito = attributes[:'conta_debito']
|
168
|
+
end
|
169
|
+
|
170
|
+
if attributes.key?(:'digito_conta_debito')
|
171
|
+
self.digito_conta_debito = attributes[:'digito_conta_debito']
|
172
|
+
end
|
173
|
+
|
174
|
+
if attributes.key?(:'numero_cartao_inicio')
|
175
|
+
self.numero_cartao_inicio = attributes[:'numero_cartao_inicio']
|
176
|
+
end
|
177
|
+
|
178
|
+
if attributes.key?(:'numero_cartao_fim')
|
179
|
+
self.numero_cartao_fim = attributes[:'numero_cartao_fim']
|
180
|
+
end
|
181
|
+
|
182
|
+
if attributes.key?(:'requisicao_pagamento')
|
183
|
+
self.requisicao_pagamento = attributes[:'requisicao_pagamento']
|
184
|
+
end
|
185
|
+
|
186
|
+
if attributes.key?(:'arquivo_pagamento')
|
187
|
+
self.arquivo_pagamento = attributes[:'arquivo_pagamento']
|
188
|
+
end
|
189
|
+
|
190
|
+
if attributes.key?(:'data_pagamento')
|
191
|
+
self.data_pagamento = attributes[:'data_pagamento']
|
192
|
+
end
|
193
|
+
|
194
|
+
if attributes.key?(:'valor_pagamento')
|
195
|
+
self.valor_pagamento = attributes[:'valor_pagamento']
|
196
|
+
end
|
197
|
+
|
198
|
+
if attributes.key?(:'numero_documento_debito')
|
199
|
+
self.numero_documento_debito = attributes[:'numero_documento_debito']
|
200
|
+
end
|
201
|
+
|
202
|
+
if attributes.key?(:'codigo_transmissao')
|
203
|
+
self.codigo_transmissao = attributes[:'codigo_transmissao']
|
204
|
+
end
|
205
|
+
|
206
|
+
if attributes.key?(:'descricao_pagamento')
|
207
|
+
self.descricao_pagamento = attributes[:'descricao_pagamento']
|
208
|
+
end
|
209
|
+
|
210
|
+
if attributes.key?(:'autenticacao_pagamento')
|
211
|
+
self.autenticacao_pagamento = attributes[:'autenticacao_pagamento']
|
212
|
+
end
|
213
|
+
|
214
|
+
if attributes.key?(:'quantidade_ocorrencia_devolucao')
|
215
|
+
self.quantidade_ocorrencia_devolucao = attributes[:'quantidade_ocorrencia_devolucao']
|
216
|
+
end
|
217
|
+
|
218
|
+
if attributes.key?(:'ocorrencia_boleto')
|
219
|
+
self.ocorrencia_boleto = attributes[:'ocorrencia_boleto']
|
220
|
+
end
|
221
|
+
|
222
|
+
if attributes.key?(:'lista_devolucao')
|
223
|
+
if (value = attributes[:'lista_devolucao']).is_a?(Array)
|
224
|
+
self.lista_devolucao = value
|
225
|
+
end
|
226
|
+
end
|
227
|
+
|
228
|
+
if attributes.key?(:'lista_boleto')
|
229
|
+
if (value = attributes[:'lista_boleto']).is_a?(Array)
|
230
|
+
self.lista_boleto = value
|
231
|
+
end
|
232
|
+
end
|
233
|
+
end
|
234
|
+
|
235
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
236
|
+
# @return Array for valid properties with the reasons
|
237
|
+
def list_invalid_properties
|
238
|
+
invalid_properties = Array.new
|
239
|
+
if @id.nil?
|
240
|
+
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
241
|
+
end
|
242
|
+
|
243
|
+
if @estado_pagamento.nil?
|
244
|
+
invalid_properties.push('invalid value for "estado_pagamento", estado_pagamento cannot be nil.')
|
245
|
+
end
|
246
|
+
|
247
|
+
if @tipo_pagamento.nil?
|
248
|
+
invalid_properties.push('invalid value for "tipo_pagamento", tipo_pagamento cannot be nil.')
|
249
|
+
end
|
250
|
+
|
251
|
+
if @agencia_debito.nil?
|
252
|
+
invalid_properties.push('invalid value for "agencia_debito", agencia_debito cannot be nil.')
|
253
|
+
end
|
254
|
+
|
255
|
+
if @conta_debito.nil?
|
256
|
+
invalid_properties.push('invalid value for "conta_debito", conta_debito cannot be nil.')
|
257
|
+
end
|
258
|
+
|
259
|
+
if @digito_conta_debito.nil?
|
260
|
+
invalid_properties.push('invalid value for "digito_conta_debito", digito_conta_debito cannot be nil.')
|
261
|
+
end
|
262
|
+
|
263
|
+
if @numero_cartao_inicio.nil?
|
264
|
+
invalid_properties.push('invalid value for "numero_cartao_inicio", numero_cartao_inicio cannot be nil.')
|
265
|
+
end
|
266
|
+
|
267
|
+
if @numero_cartao_fim.nil?
|
268
|
+
invalid_properties.push('invalid value for "numero_cartao_fim", numero_cartao_fim cannot be nil.')
|
269
|
+
end
|
270
|
+
|
271
|
+
if @requisicao_pagamento.nil?
|
272
|
+
invalid_properties.push('invalid value for "requisicao_pagamento", requisicao_pagamento cannot be nil.')
|
273
|
+
end
|
274
|
+
|
275
|
+
if @arquivo_pagamento.nil?
|
276
|
+
invalid_properties.push('invalid value for "arquivo_pagamento", arquivo_pagamento cannot be nil.')
|
277
|
+
end
|
278
|
+
|
279
|
+
if @data_pagamento.nil?
|
280
|
+
invalid_properties.push('invalid value for "data_pagamento", data_pagamento cannot be nil.')
|
281
|
+
end
|
282
|
+
|
283
|
+
if @valor_pagamento.nil?
|
284
|
+
invalid_properties.push('invalid value for "valor_pagamento", valor_pagamento cannot be nil.')
|
285
|
+
end
|
286
|
+
|
287
|
+
if @numero_documento_debito.nil?
|
288
|
+
invalid_properties.push('invalid value for "numero_documento_debito", numero_documento_debito cannot be nil.')
|
289
|
+
end
|
290
|
+
|
291
|
+
if @codigo_transmissao.nil?
|
292
|
+
invalid_properties.push('invalid value for "codigo_transmissao", codigo_transmissao cannot be nil.')
|
293
|
+
end
|
294
|
+
|
295
|
+
if @descricao_pagamento.nil?
|
296
|
+
invalid_properties.push('invalid value for "descricao_pagamento", descricao_pagamento cannot be nil.')
|
297
|
+
end
|
298
|
+
|
299
|
+
if @autenticacao_pagamento.nil?
|
300
|
+
invalid_properties.push('invalid value for "autenticacao_pagamento", autenticacao_pagamento cannot be nil.')
|
301
|
+
end
|
302
|
+
|
303
|
+
if @quantidade_ocorrencia_devolucao.nil?
|
304
|
+
invalid_properties.push('invalid value for "quantidade_ocorrencia_devolucao", quantidade_ocorrencia_devolucao cannot be nil.')
|
305
|
+
end
|
306
|
+
|
307
|
+
invalid_properties
|
308
|
+
end
|
309
|
+
|
310
|
+
# Check to see if the all the properties in the model are valid
|
311
|
+
# @return true if the model is valid
|
312
|
+
def valid?
|
313
|
+
return false if @id.nil?
|
314
|
+
return false if @estado_pagamento.nil?
|
315
|
+
return false if @tipo_pagamento.nil?
|
316
|
+
return false if @agencia_debito.nil?
|
317
|
+
return false if @conta_debito.nil?
|
318
|
+
return false if @digito_conta_debito.nil?
|
319
|
+
return false if @numero_cartao_inicio.nil?
|
320
|
+
return false if @numero_cartao_fim.nil?
|
321
|
+
return false if @requisicao_pagamento.nil?
|
322
|
+
return false if @arquivo_pagamento.nil?
|
323
|
+
return false if @data_pagamento.nil?
|
324
|
+
return false if @valor_pagamento.nil?
|
325
|
+
return false if @numero_documento_debito.nil?
|
326
|
+
return false if @codigo_transmissao.nil?
|
327
|
+
return false if @descricao_pagamento.nil?
|
328
|
+
return false if @autenticacao_pagamento.nil?
|
329
|
+
return false if @quantidade_ocorrencia_devolucao.nil?
|
330
|
+
true
|
331
|
+
end
|
332
|
+
|
333
|
+
# Checks equality by comparing each attribute.
|
334
|
+
# @param [Object] Object to be compared
|
335
|
+
def ==(o)
|
336
|
+
return true if self.equal?(o)
|
337
|
+
self.class == o.class &&
|
338
|
+
id == o.id &&
|
339
|
+
estado_pagamento == o.estado_pagamento &&
|
340
|
+
tipo_pagamento == o.tipo_pagamento &&
|
341
|
+
agencia_debito == o.agencia_debito &&
|
342
|
+
conta_debito == o.conta_debito &&
|
343
|
+
digito_conta_debito == o.digito_conta_debito &&
|
344
|
+
numero_cartao_inicio == o.numero_cartao_inicio &&
|
345
|
+
numero_cartao_fim == o.numero_cartao_fim &&
|
346
|
+
requisicao_pagamento == o.requisicao_pagamento &&
|
347
|
+
arquivo_pagamento == o.arquivo_pagamento &&
|
348
|
+
data_pagamento == o.data_pagamento &&
|
349
|
+
valor_pagamento == o.valor_pagamento &&
|
350
|
+
numero_documento_debito == o.numero_documento_debito &&
|
351
|
+
codigo_transmissao == o.codigo_transmissao &&
|
352
|
+
descricao_pagamento == o.descricao_pagamento &&
|
353
|
+
autenticacao_pagamento == o.autenticacao_pagamento &&
|
354
|
+
quantidade_ocorrencia_devolucao == o.quantidade_ocorrencia_devolucao &&
|
355
|
+
ocorrencia_boleto == o.ocorrencia_boleto &&
|
356
|
+
lista_devolucao == o.lista_devolucao &&
|
357
|
+
lista_boleto == o.lista_boleto
|
358
|
+
end
|
359
|
+
|
360
|
+
# @see the `==` method
|
361
|
+
# @param [Object] Object to be compared
|
362
|
+
def eql?(o)
|
363
|
+
self == o
|
364
|
+
end
|
365
|
+
|
366
|
+
# Calculates hash code according to all attributes.
|
367
|
+
# @return [Integer] Hash code
|
368
|
+
def hash
|
369
|
+
[id, estado_pagamento, tipo_pagamento, agencia_debito, conta_debito, digito_conta_debito, numero_cartao_inicio, numero_cartao_fim, requisicao_pagamento, arquivo_pagamento, data_pagamento, valor_pagamento, numero_documento_debito, codigo_transmissao, descricao_pagamento, autenticacao_pagamento, quantidade_ocorrencia_devolucao, ocorrencia_boleto, lista_devolucao, lista_boleto].hash
|
370
|
+
end
|
371
|
+
|
372
|
+
# Builds the object from hash
|
373
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
374
|
+
# @return [Object] Returns the model itself
|
375
|
+
def self.build_from_hash(attributes)
|
376
|
+
new.build_from_hash(attributes)
|
377
|
+
end
|
378
|
+
|
379
|
+
# Builds the object from hash
|
380
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
381
|
+
# @return [Object] Returns the model itself
|
382
|
+
def build_from_hash(attributes)
|
383
|
+
return nil unless attributes.is_a?(Hash)
|
384
|
+
self.class.openapi_types.each_pair do |key, type|
|
385
|
+
if type =~ /\AArray<(.*)>/i
|
386
|
+
# check to ensure the input is an array given that the attribute
|
387
|
+
# is documented as an array but the input is not
|
388
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
389
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
390
|
+
end
|
391
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
392
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
393
|
+
elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
394
|
+
self.send("#{key}=", nil)
|
395
|
+
end
|
396
|
+
end
|
397
|
+
|
398
|
+
self
|
399
|
+
end
|
400
|
+
|
401
|
+
# Deserializes the data based on type
|
402
|
+
# @param string type Data type
|
403
|
+
# @param string value Value to be deserialized
|
404
|
+
# @return [Object] Deserialized data
|
405
|
+
def _deserialize(type, value)
|
406
|
+
case type.to_sym
|
407
|
+
when :DateTime
|
408
|
+
DateTime.parse(value)
|
409
|
+
when :Date
|
410
|
+
Date.parse(value)
|
411
|
+
when :String
|
412
|
+
value.to_s
|
413
|
+
when :Integer
|
414
|
+
value.to_i
|
415
|
+
when :Float
|
416
|
+
value.to_f
|
417
|
+
when :Boolean
|
418
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
419
|
+
true
|
420
|
+
else
|
421
|
+
false
|
422
|
+
end
|
423
|
+
when :Object
|
424
|
+
# generic object (usually a Hash), return directly
|
425
|
+
value
|
426
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
427
|
+
inner_type = Regexp.last_match[:inner_type]
|
428
|
+
value.map { |v| _deserialize(inner_type, v) }
|
429
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
430
|
+
k_type = Regexp.last_match[:k_type]
|
431
|
+
v_type = Regexp.last_match[:v_type]
|
432
|
+
{}.tap do |hash|
|
433
|
+
value.each do |k, v|
|
434
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
435
|
+
end
|
436
|
+
end
|
437
|
+
else # model
|
438
|
+
BancoBrasilPayments.const_get(type).build_from_hash(value)
|
439
|
+
end
|
440
|
+
end
|
441
|
+
|
442
|
+
# Returns the string representation of the object
|
443
|
+
# @return [String] String presentation of the object
|
444
|
+
def to_s
|
445
|
+
to_hash.to_s
|
446
|
+
end
|
447
|
+
|
448
|
+
# to_body is an alias to to_hash (backward compatibility)
|
449
|
+
# @return [Hash] Returns the object in the form of hash
|
450
|
+
def to_body
|
451
|
+
to_hash
|
452
|
+
end
|
453
|
+
|
454
|
+
# Returns the object in the form of hash
|
455
|
+
# @return [Hash] Returns the object in the form of hash
|
456
|
+
def to_hash
|
457
|
+
hash = {}
|
458
|
+
self.class.attribute_map.each_pair do |attr, param|
|
459
|
+
value = self.send(attr)
|
460
|
+
if value.nil?
|
461
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
462
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
463
|
+
end
|
464
|
+
|
465
|
+
hash[param] = _to_hash(value)
|
466
|
+
end
|
467
|
+
hash
|
468
|
+
end
|
469
|
+
|
470
|
+
# Outputs non-array value in the form of hash
|
471
|
+
# For object, use to_hash. Otherwise, just return the value
|
472
|
+
# @param [Object] value Any valid value
|
473
|
+
# @return [Hash] Returns the value in the form of hash
|
474
|
+
def _to_hash(value)
|
475
|
+
if value.is_a?(Array)
|
476
|
+
value.compact.map { |v| _to_hash(v) }
|
477
|
+
elsif value.is_a?(Hash)
|
478
|
+
{}.tap do |hash|
|
479
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
480
|
+
end
|
481
|
+
elsif value.respond_to? :to_hash
|
482
|
+
value.to_hash
|
483
|
+
else
|
484
|
+
value
|
485
|
+
end
|
486
|
+
end end
|
487
|
+
end
|