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,362 @@
|
|
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 BatchtransfersPaymentsList
|
16
|
+
# Código de identificação da instituição para crédito na câmara de compensação (no Brasil, identificado pela sigla COMPE). Por exemplo, valor 1 para o Banco do Brasil e valor 104 para a Caixa Econômica Federal. Se o valor 0 for informado, o campo ispbCode será considerado.
|
17
|
+
attr_accessor :clearinghouse_code
|
18
|
+
|
19
|
+
# Código identificador do Sistema de Pagamento Brasileiro (Identificado pelo acrônimo ISPB) para crédito. Por exemplo, valor 0 para o Banco do Brasil e valor 360305 para a Caixa Econômica Federal. Não considerado quando o campo clearinghouse é informado.
|
20
|
+
attr_accessor :ispb_code
|
21
|
+
|
22
|
+
# Código da agência para crédito.
|
23
|
+
attr_accessor :credit_branch_office
|
24
|
+
|
25
|
+
# Conta corrente para crédito.
|
26
|
+
attr_accessor :credit_current_account
|
27
|
+
|
28
|
+
# Dígito verificador da conta corrente para crédito.
|
29
|
+
attr_accessor :check_digits_credit_current_account
|
30
|
+
|
31
|
+
# Conta de pagamento para crédito. Se esse campo estiver preenchido, os campos creditBranchOffice, creditCurrentAccount, checkDigitsCreditCurrentAccount e depositInCourtIdentifier não deverão ser inseridos.
|
32
|
+
attr_accessor :credit_payment_account
|
33
|
+
|
34
|
+
# Número do CPF junto à Receita Federal. Não informado quando diz respeito ao pagamento de contribuinte do tipo pessoa jurídica.
|
35
|
+
attr_accessor :individual_taxpayer_registration
|
36
|
+
|
37
|
+
# Número do CNPJ junto à Receita Federal. Não informado quando diz respeito ao pagamento de contribuinte do tipo pessoa física.
|
38
|
+
attr_accessor :corporate_taxpayer_registration
|
39
|
+
|
40
|
+
# Data do 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. Poderão ser efetuados agendamentos para até 180 dias
|
41
|
+
attr_accessor :payment_date
|
42
|
+
|
43
|
+
# Valor do pagamento em reais (formato 0.00)
|
44
|
+
attr_accessor :payment_value
|
45
|
+
|
46
|
+
# Documento de débito que será mostrado no extrato da conta do pagador. Por ser um campo opcional, se não inserido, a conta de débito terá um único lançamento no valor total de todos os lançamentos de créditos validados. De igual modo será se o mesmo número for informado para todos os lançamentos de crédito. Quando números diferentes forem informados para cada lançamento, os lançamentos de débitos serão individualizados.
|
47
|
+
attr_accessor :debit_document
|
48
|
+
|
49
|
+
# Número do documento de crédito exibido no extrato do favorecido - uso exclusivo para Crédito em conta corrente no BB.
|
50
|
+
attr_accessor :credit_document
|
51
|
+
|
52
|
+
# Código de finalidade informado quando se trata de DOC. Uma lista de códigos permitidos é obtida na Federação Brasileira de Bancos (identificada pela sigla FEBRABAN). Por exemplo, 1 para Crédito em Conta Corrente; 11 para DOC em Conta Poupança; 12 para DOC em Conta de Depósito Judicial.
|
53
|
+
attr_accessor :credit_order_purpose_code
|
54
|
+
|
55
|
+
# Código de finalidade informado quando se trata de TED. Uma lista de códigos permitidos é obtida no Banco Central do Brasil (Identificado pelo acrônimo BACEN).
|
56
|
+
attr_accessor :wire_transfer_purpose_code
|
57
|
+
|
58
|
+
# Identificador informado quando se trata de depósito judicial. Insira valor 1 para o campo COMPE ou valor 0 para o campo ISPB. Se esse campo estiver preenchido, os campos creditBranchOffice, creditCurrentAccount, checkDigitsCreditCurrentAccount e creditPaymentAccount não deverão ser inseridos.
|
59
|
+
attr_accessor :deposit_in_court_identifier
|
60
|
+
|
61
|
+
# Campo de uso livre pelo cliente conveniado - sem tratamento pelo Banco.
|
62
|
+
attr_accessor :payment_description
|
63
|
+
|
64
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
65
|
+
def self.attribute_map
|
66
|
+
{
|
67
|
+
:'clearinghouse_code' => :'clearinghouseCode',
|
68
|
+
:'ispb_code' => :'ispbCode',
|
69
|
+
:'credit_branch_office' => :'creditBranchOffice',
|
70
|
+
:'credit_current_account' => :'creditCurrentAccount',
|
71
|
+
:'check_digits_credit_current_account' => :'checkDigitsCreditCurrentAccount',
|
72
|
+
:'credit_payment_account' => :'creditPaymentAccount',
|
73
|
+
:'individual_taxpayer_registration' => :'individualTaxpayerRegistration',
|
74
|
+
:'corporate_taxpayer_registration' => :'corporateTaxpayerRegistration',
|
75
|
+
:'payment_date' => :'paymentDate',
|
76
|
+
:'payment_value' => :'paymentValue',
|
77
|
+
:'debit_document' => :'debitDocument',
|
78
|
+
:'credit_document' => :'creditDocument',
|
79
|
+
:'credit_order_purpose_code' => :'creditOrderPurposeCode',
|
80
|
+
:'wire_transfer_purpose_code' => :'wireTransferPurposeCode',
|
81
|
+
:'deposit_in_court_identifier' => :'depositInCourtIdentifier',
|
82
|
+
:'payment_description' => :'paymentDescription'
|
83
|
+
}
|
84
|
+
end
|
85
|
+
|
86
|
+
# Attribute type mapping.
|
87
|
+
def self.openapi_types
|
88
|
+
{
|
89
|
+
:'clearinghouse_code' => :'Object',
|
90
|
+
:'ispb_code' => :'Object',
|
91
|
+
:'credit_branch_office' => :'Object',
|
92
|
+
:'credit_current_account' => :'Object',
|
93
|
+
:'check_digits_credit_current_account' => :'Object',
|
94
|
+
:'credit_payment_account' => :'Object',
|
95
|
+
:'individual_taxpayer_registration' => :'Object',
|
96
|
+
:'corporate_taxpayer_registration' => :'Object',
|
97
|
+
:'payment_date' => :'Object',
|
98
|
+
:'payment_value' => :'Object',
|
99
|
+
:'debit_document' => :'Object',
|
100
|
+
:'credit_document' => :'Object',
|
101
|
+
:'credit_order_purpose_code' => :'Object',
|
102
|
+
:'wire_transfer_purpose_code' => :'Object',
|
103
|
+
:'deposit_in_court_identifier' => :'Object',
|
104
|
+
:'payment_description' => :'Object'
|
105
|
+
}
|
106
|
+
end
|
107
|
+
|
108
|
+
# List of attributes with nullable: true
|
109
|
+
def self.openapi_nullable
|
110
|
+
Set.new([
|
111
|
+
])
|
112
|
+
end
|
113
|
+
|
114
|
+
# Initializes the object
|
115
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
116
|
+
def initialize(attributes = {})
|
117
|
+
if (!attributes.is_a?(Hash))
|
118
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `BancoBrasilPayments::BatchtransfersPaymentsList` initialize method"
|
119
|
+
end
|
120
|
+
|
121
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
122
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
123
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
124
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `BancoBrasilPayments::BatchtransfersPaymentsList`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
125
|
+
end
|
126
|
+
h[k.to_sym] = v
|
127
|
+
}
|
128
|
+
|
129
|
+
if attributes.key?(:'clearinghouse_code')
|
130
|
+
self.clearinghouse_code = attributes[:'clearinghouse_code']
|
131
|
+
end
|
132
|
+
|
133
|
+
if attributes.key?(:'ispb_code')
|
134
|
+
self.ispb_code = attributes[:'ispb_code']
|
135
|
+
end
|
136
|
+
|
137
|
+
if attributes.key?(:'credit_branch_office')
|
138
|
+
self.credit_branch_office = attributes[:'credit_branch_office']
|
139
|
+
end
|
140
|
+
|
141
|
+
if attributes.key?(:'credit_current_account')
|
142
|
+
self.credit_current_account = attributes[:'credit_current_account']
|
143
|
+
end
|
144
|
+
|
145
|
+
if attributes.key?(:'check_digits_credit_current_account')
|
146
|
+
self.check_digits_credit_current_account = attributes[:'check_digits_credit_current_account']
|
147
|
+
end
|
148
|
+
|
149
|
+
if attributes.key?(:'credit_payment_account')
|
150
|
+
self.credit_payment_account = attributes[:'credit_payment_account']
|
151
|
+
end
|
152
|
+
|
153
|
+
if attributes.key?(:'individual_taxpayer_registration')
|
154
|
+
self.individual_taxpayer_registration = attributes[:'individual_taxpayer_registration']
|
155
|
+
end
|
156
|
+
|
157
|
+
if attributes.key?(:'corporate_taxpayer_registration')
|
158
|
+
self.corporate_taxpayer_registration = attributes[:'corporate_taxpayer_registration']
|
159
|
+
end
|
160
|
+
|
161
|
+
if attributes.key?(:'payment_date')
|
162
|
+
self.payment_date = attributes[:'payment_date']
|
163
|
+
end
|
164
|
+
|
165
|
+
if attributes.key?(:'payment_value')
|
166
|
+
self.payment_value = attributes[:'payment_value']
|
167
|
+
end
|
168
|
+
|
169
|
+
if attributes.key?(:'debit_document')
|
170
|
+
self.debit_document = attributes[:'debit_document']
|
171
|
+
end
|
172
|
+
|
173
|
+
if attributes.key?(:'credit_document')
|
174
|
+
self.credit_document = attributes[:'credit_document']
|
175
|
+
end
|
176
|
+
|
177
|
+
if attributes.key?(:'credit_order_purpose_code')
|
178
|
+
self.credit_order_purpose_code = attributes[:'credit_order_purpose_code']
|
179
|
+
end
|
180
|
+
|
181
|
+
if attributes.key?(:'wire_transfer_purpose_code')
|
182
|
+
self.wire_transfer_purpose_code = attributes[:'wire_transfer_purpose_code']
|
183
|
+
end
|
184
|
+
|
185
|
+
if attributes.key?(:'deposit_in_court_identifier')
|
186
|
+
self.deposit_in_court_identifier = attributes[:'deposit_in_court_identifier']
|
187
|
+
end
|
188
|
+
|
189
|
+
if attributes.key?(:'payment_description')
|
190
|
+
self.payment_description = attributes[:'payment_description']
|
191
|
+
end
|
192
|
+
end
|
193
|
+
|
194
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
195
|
+
# @return Array for valid properties with the reasons
|
196
|
+
def list_invalid_properties
|
197
|
+
invalid_properties = Array.new
|
198
|
+
if @payment_value.nil?
|
199
|
+
invalid_properties.push('invalid value for "payment_value", payment_value cannot be nil.')
|
200
|
+
end
|
201
|
+
|
202
|
+
invalid_properties
|
203
|
+
end
|
204
|
+
|
205
|
+
# Check to see if the all the properties in the model are valid
|
206
|
+
# @return true if the model is valid
|
207
|
+
def valid?
|
208
|
+
return false if @payment_value.nil?
|
209
|
+
true
|
210
|
+
end
|
211
|
+
|
212
|
+
# Checks equality by comparing each attribute.
|
213
|
+
# @param [Object] Object to be compared
|
214
|
+
def ==(o)
|
215
|
+
return true if self.equal?(o)
|
216
|
+
self.class == o.class &&
|
217
|
+
clearinghouse_code == o.clearinghouse_code &&
|
218
|
+
ispb_code == o.ispb_code &&
|
219
|
+
credit_branch_office == o.credit_branch_office &&
|
220
|
+
credit_current_account == o.credit_current_account &&
|
221
|
+
check_digits_credit_current_account == o.check_digits_credit_current_account &&
|
222
|
+
credit_payment_account == o.credit_payment_account &&
|
223
|
+
individual_taxpayer_registration == o.individual_taxpayer_registration &&
|
224
|
+
corporate_taxpayer_registration == o.corporate_taxpayer_registration &&
|
225
|
+
payment_date == o.payment_date &&
|
226
|
+
payment_value == o.payment_value &&
|
227
|
+
debit_document == o.debit_document &&
|
228
|
+
credit_document == o.credit_document &&
|
229
|
+
credit_order_purpose_code == o.credit_order_purpose_code &&
|
230
|
+
wire_transfer_purpose_code == o.wire_transfer_purpose_code &&
|
231
|
+
deposit_in_court_identifier == o.deposit_in_court_identifier &&
|
232
|
+
payment_description == o.payment_description
|
233
|
+
end
|
234
|
+
|
235
|
+
# @see the `==` method
|
236
|
+
# @param [Object] Object to be compared
|
237
|
+
def eql?(o)
|
238
|
+
self == o
|
239
|
+
end
|
240
|
+
|
241
|
+
# Calculates hash code according to all attributes.
|
242
|
+
# @return [Integer] Hash code
|
243
|
+
def hash
|
244
|
+
[clearinghouse_code, ispb_code, credit_branch_office, credit_current_account, check_digits_credit_current_account, credit_payment_account, individual_taxpayer_registration, corporate_taxpayer_registration, payment_date, payment_value, debit_document, credit_document, credit_order_purpose_code, wire_transfer_purpose_code, deposit_in_court_identifier, payment_description].hash
|
245
|
+
end
|
246
|
+
|
247
|
+
# Builds the object from hash
|
248
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
249
|
+
# @return [Object] Returns the model itself
|
250
|
+
def self.build_from_hash(attributes)
|
251
|
+
new.build_from_hash(attributes)
|
252
|
+
end
|
253
|
+
|
254
|
+
# Builds the object from hash
|
255
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
256
|
+
# @return [Object] Returns the model itself
|
257
|
+
def build_from_hash(attributes)
|
258
|
+
return nil unless attributes.is_a?(Hash)
|
259
|
+
self.class.openapi_types.each_pair do |key, type|
|
260
|
+
if type =~ /\AArray<(.*)>/i
|
261
|
+
# check to ensure the input is an array given that the attribute
|
262
|
+
# is documented as an array but the input is not
|
263
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
264
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
265
|
+
end
|
266
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
267
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
268
|
+
elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
269
|
+
self.send("#{key}=", nil)
|
270
|
+
end
|
271
|
+
end
|
272
|
+
|
273
|
+
self
|
274
|
+
end
|
275
|
+
|
276
|
+
# Deserializes the data based on type
|
277
|
+
# @param string type Data type
|
278
|
+
# @param string value Value to be deserialized
|
279
|
+
# @return [Object] Deserialized data
|
280
|
+
def _deserialize(type, value)
|
281
|
+
case type.to_sym
|
282
|
+
when :DateTime
|
283
|
+
DateTime.parse(value)
|
284
|
+
when :Date
|
285
|
+
Date.parse(value)
|
286
|
+
when :String
|
287
|
+
value.to_s
|
288
|
+
when :Integer
|
289
|
+
value.to_i
|
290
|
+
when :Float
|
291
|
+
value.to_f
|
292
|
+
when :Boolean
|
293
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
294
|
+
true
|
295
|
+
else
|
296
|
+
false
|
297
|
+
end
|
298
|
+
when :Object
|
299
|
+
# generic object (usually a Hash), return directly
|
300
|
+
value
|
301
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
302
|
+
inner_type = Regexp.last_match[:inner_type]
|
303
|
+
value.map { |v| _deserialize(inner_type, v) }
|
304
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
305
|
+
k_type = Regexp.last_match[:k_type]
|
306
|
+
v_type = Regexp.last_match[:v_type]
|
307
|
+
{}.tap do |hash|
|
308
|
+
value.each do |k, v|
|
309
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
310
|
+
end
|
311
|
+
end
|
312
|
+
else # model
|
313
|
+
BancoBrasilPayments.const_get(type).build_from_hash(value)
|
314
|
+
end
|
315
|
+
end
|
316
|
+
|
317
|
+
# Returns the string representation of the object
|
318
|
+
# @return [String] String presentation of the object
|
319
|
+
def to_s
|
320
|
+
to_hash.to_s
|
321
|
+
end
|
322
|
+
|
323
|
+
# to_body is an alias to to_hash (backward compatibility)
|
324
|
+
# @return [Hash] Returns the object in the form of hash
|
325
|
+
def to_body
|
326
|
+
to_hash
|
327
|
+
end
|
328
|
+
|
329
|
+
# Returns the object in the form of hash
|
330
|
+
# @return [Hash] Returns the object in the form of hash
|
331
|
+
def to_hash
|
332
|
+
hash = {}
|
333
|
+
self.class.attribute_map.each_pair do |attr, param|
|
334
|
+
value = self.send(attr)
|
335
|
+
if value.nil?
|
336
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
337
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
338
|
+
end
|
339
|
+
|
340
|
+
hash[param] = _to_hash(value)
|
341
|
+
end
|
342
|
+
hash
|
343
|
+
end
|
344
|
+
|
345
|
+
# Outputs non-array value in the form of hash
|
346
|
+
# For object, use to_hash. Otherwise, just return the value
|
347
|
+
# @param [Object] value Any valid value
|
348
|
+
# @return [Hash] Returns the value in the form of hash
|
349
|
+
def _to_hash(value)
|
350
|
+
if value.is_a?(Array)
|
351
|
+
value.compact.map { |v| _to_hash(v) }
|
352
|
+
elsif value.is_a?(Hash)
|
353
|
+
{}.tap do |hash|
|
354
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
355
|
+
end
|
356
|
+
elsif value.respond_to? :to_hash
|
357
|
+
value.to_hash
|
358
|
+
else
|
359
|
+
value
|
360
|
+
end
|
361
|
+
end end
|
362
|
+
end
|
@@ -0,0 +1,212 @@
|
|
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 BatchtransferscancelPaymentIds
|
16
|
+
# Identificação do pagamento. Representa o número do protocolo por meio do qual o beneficiário pode verificar a situação do crédito, se necessário.
|
17
|
+
attr_accessor :id
|
18
|
+
|
19
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
20
|
+
def self.attribute_map
|
21
|
+
{
|
22
|
+
:'id' => :'id'
|
23
|
+
}
|
24
|
+
end
|
25
|
+
|
26
|
+
# Attribute type mapping.
|
27
|
+
def self.openapi_types
|
28
|
+
{
|
29
|
+
:'id' => :'Object'
|
30
|
+
}
|
31
|
+
end
|
32
|
+
|
33
|
+
# List of attributes with nullable: true
|
34
|
+
def self.openapi_nullable
|
35
|
+
Set.new([
|
36
|
+
])
|
37
|
+
end
|
38
|
+
|
39
|
+
# Initializes the object
|
40
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
41
|
+
def initialize(attributes = {})
|
42
|
+
if (!attributes.is_a?(Hash))
|
43
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `BancoBrasilPayments::BatchtransferscancelPaymentIds` initialize method"
|
44
|
+
end
|
45
|
+
|
46
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
47
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
48
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
49
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `BancoBrasilPayments::BatchtransferscancelPaymentIds`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
50
|
+
end
|
51
|
+
h[k.to_sym] = v
|
52
|
+
}
|
53
|
+
|
54
|
+
if attributes.key?(:'id')
|
55
|
+
self.id = attributes[:'id']
|
56
|
+
end
|
57
|
+
end
|
58
|
+
|
59
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
60
|
+
# @return Array for valid properties with the reasons
|
61
|
+
def list_invalid_properties
|
62
|
+
invalid_properties = Array.new
|
63
|
+
if @id.nil?
|
64
|
+
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
65
|
+
end
|
66
|
+
|
67
|
+
invalid_properties
|
68
|
+
end
|
69
|
+
|
70
|
+
# Check to see if the all the properties in the model are valid
|
71
|
+
# @return true if the model is valid
|
72
|
+
def valid?
|
73
|
+
return false if @id.nil?
|
74
|
+
true
|
75
|
+
end
|
76
|
+
|
77
|
+
# Checks equality by comparing each attribute.
|
78
|
+
# @param [Object] Object to be compared
|
79
|
+
def ==(o)
|
80
|
+
return true if self.equal?(o)
|
81
|
+
self.class == o.class &&
|
82
|
+
id == o.id
|
83
|
+
end
|
84
|
+
|
85
|
+
# @see the `==` method
|
86
|
+
# @param [Object] Object to be compared
|
87
|
+
def eql?(o)
|
88
|
+
self == o
|
89
|
+
end
|
90
|
+
|
91
|
+
# Calculates hash code according to all attributes.
|
92
|
+
# @return [Integer] Hash code
|
93
|
+
def hash
|
94
|
+
[id].hash
|
95
|
+
end
|
96
|
+
|
97
|
+
# Builds the object from hash
|
98
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
99
|
+
# @return [Object] Returns the model itself
|
100
|
+
def self.build_from_hash(attributes)
|
101
|
+
new.build_from_hash(attributes)
|
102
|
+
end
|
103
|
+
|
104
|
+
# Builds the object from hash
|
105
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
106
|
+
# @return [Object] Returns the model itself
|
107
|
+
def build_from_hash(attributes)
|
108
|
+
return nil unless attributes.is_a?(Hash)
|
109
|
+
self.class.openapi_types.each_pair do |key, type|
|
110
|
+
if type =~ /\AArray<(.*)>/i
|
111
|
+
# check to ensure the input is an array given that the attribute
|
112
|
+
# is documented as an array but the input is not
|
113
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
114
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
115
|
+
end
|
116
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
117
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
118
|
+
elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
119
|
+
self.send("#{key}=", nil)
|
120
|
+
end
|
121
|
+
end
|
122
|
+
|
123
|
+
self
|
124
|
+
end
|
125
|
+
|
126
|
+
# Deserializes the data based on type
|
127
|
+
# @param string type Data type
|
128
|
+
# @param string value Value to be deserialized
|
129
|
+
# @return [Object] Deserialized data
|
130
|
+
def _deserialize(type, value)
|
131
|
+
case type.to_sym
|
132
|
+
when :DateTime
|
133
|
+
DateTime.parse(value)
|
134
|
+
when :Date
|
135
|
+
Date.parse(value)
|
136
|
+
when :String
|
137
|
+
value.to_s
|
138
|
+
when :Integer
|
139
|
+
value.to_i
|
140
|
+
when :Float
|
141
|
+
value.to_f
|
142
|
+
when :Boolean
|
143
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
144
|
+
true
|
145
|
+
else
|
146
|
+
false
|
147
|
+
end
|
148
|
+
when :Object
|
149
|
+
# generic object (usually a Hash), return directly
|
150
|
+
value
|
151
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
152
|
+
inner_type = Regexp.last_match[:inner_type]
|
153
|
+
value.map { |v| _deserialize(inner_type, v) }
|
154
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
155
|
+
k_type = Regexp.last_match[:k_type]
|
156
|
+
v_type = Regexp.last_match[:v_type]
|
157
|
+
{}.tap do |hash|
|
158
|
+
value.each do |k, v|
|
159
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
160
|
+
end
|
161
|
+
end
|
162
|
+
else # model
|
163
|
+
BancoBrasilPayments.const_get(type).build_from_hash(value)
|
164
|
+
end
|
165
|
+
end
|
166
|
+
|
167
|
+
# Returns the string representation of the object
|
168
|
+
# @return [String] String presentation of the object
|
169
|
+
def to_s
|
170
|
+
to_hash.to_s
|
171
|
+
end
|
172
|
+
|
173
|
+
# to_body is an alias to to_hash (backward compatibility)
|
174
|
+
# @return [Hash] Returns the object in the form of hash
|
175
|
+
def to_body
|
176
|
+
to_hash
|
177
|
+
end
|
178
|
+
|
179
|
+
# Returns the object in the form of hash
|
180
|
+
# @return [Hash] Returns the object in the form of hash
|
181
|
+
def to_hash
|
182
|
+
hash = {}
|
183
|
+
self.class.attribute_map.each_pair do |attr, param|
|
184
|
+
value = self.send(attr)
|
185
|
+
if value.nil?
|
186
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
187
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
188
|
+
end
|
189
|
+
|
190
|
+
hash[param] = _to_hash(value)
|
191
|
+
end
|
192
|
+
hash
|
193
|
+
end
|
194
|
+
|
195
|
+
# Outputs non-array value in the form of hash
|
196
|
+
# For object, use to_hash. Otherwise, just return the value
|
197
|
+
# @param [Object] value Any valid value
|
198
|
+
# @return [Hash] Returns the value in the form of hash
|
199
|
+
def _to_hash(value)
|
200
|
+
if value.is_a?(Array)
|
201
|
+
value.compact.map { |v| _to_hash(v) }
|
202
|
+
elsif value.is_a?(Hash)
|
203
|
+
{}.tap do |hash|
|
204
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
205
|
+
end
|
206
|
+
elsif value.respond_to? :to_hash
|
207
|
+
value.to_hash
|
208
|
+
else
|
209
|
+
value
|
210
|
+
end
|
211
|
+
end end
|
212
|
+
end
|