Class: BancoBrasilPayments::InlineResponse2001

Inherits:
Object
  • Object
show all
Defined in:
lib/bb_payments/models/inline_response_200_1.rb

Overview

Representação dos campos de resposta de uma recuperação de pagamento na transferência em lote.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ InlineResponse2001

Initializes the object

Parameters:

  • attributes (Hash) (defaults to: {})

    Model attributes in the form of hash



152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
# File 'lib/bb_payments/models/inline_response_200_1.rb', line 152

def initialize(attributes = {})
  if (!attributes.is_a?(Hash))
    fail ArgumentError, "The input argument (attributes) must be a hash in `BancoBrasilPayments::InlineResponse2001` initialize method"
  end

  # check to see if the attribute exists and convert string to symbol for hash key
  attributes = attributes.each_with_object({}) { |(k, v), h|
    if (!self.class.attribute_map.key?(k.to_sym))
      fail ArgumentError, "`#{k}` is not a valid attribute in `BancoBrasilPayments::InlineResponse2001`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
    end
    h[k.to_sym] = v
  }

  if attributes.key?(:'payment_status')
    self.payment_status = attributes[:'payment_status']
  end

  if attributes.key?(:'payment_type')
    self.payment_type = attributes[:'payment_type']
  end

  if attributes.key?(:'credit_type')
    self.credit_type = attributes[:'credit_type']
  end

  if attributes.key?(:'debit_branch_office')
    self.debit_branch_office = attributes[:'debit_branch_office']
  end

  if attributes.key?(:'debit_current_account')
    self. = attributes[:'debit_current_account']
  end

  if attributes.key?(:'check_digit_debit_current_account')
    self. = attributes[:'check_digit_debit_current_account']
  end

  if attributes.key?(:'payment_date')
    self.payment_date = attributes[:'payment_date']
  end

  if attributes.key?(:'payment_value')
    self.payment_value = attributes[:'payment_value']
  end

  if attributes.key?(:'clearinghouse_code')
    self.clearinghouse_code = attributes[:'clearinghouse_code']
  end

  if attributes.key?(:'ispb_code')
    self.ispb_code = attributes[:'ispb_code']
  end

  if attributes.key?(:'credit_branch_office')
    self.credit_branch_office = attributes[:'credit_branch_office']
  end

  if attributes.key?(:'credit_current_account')
    self. = attributes[:'credit_current_account']
  end

  if attributes.key?(:'check_digit_credit_current_account')
    self. = attributes[:'check_digit_credit_current_account']
  end

  if attributes.key?(:'taxpayer_type')
    self.taxpayer_type = attributes[:'taxpayer_type']
  end

  if attributes.key?(:'taxpayer_registration')
    self.taxpayer_registration = attributes[:'taxpayer_registration']
  end

  if attributes.key?(:'debit_document')
    self.debit_document = attributes[:'debit_document']
  end

  if attributes.key?(:'credit_document')
    self.credit_document = attributes[:'credit_document']
  end

  if attributes.key?(:'beneficiary_name')
    self.beneficiary_name = attributes[:'beneficiary_name']
  end

  if attributes.key?(:'payment_authentication_code')
    self.payment_authentication_code = attributes[:'payment_authentication_code']
  end

  if attributes.key?(:'credit_order_purpose_code')
    self.credit_order_purpose_code = attributes[:'credit_order_purpose_code']
  end

  if attributes.key?(:'wire_transfer_purpose_code')
    self.wire_transfer_purpose_code = attributes[:'wire_transfer_purpose_code']
  end

  if attributes.key?(:'deposit_in_court_identifier')
    self.deposit_in_court_identifier = attributes[:'deposit_in_court_identifier']
  end

  if attributes.key?(:'ocurrences_list')
    if (value = attributes[:'ocurrences_list']).is_a?(Array)
      self.ocurrences_list = value
    end
  end
end

Instance Attribute Details

#beneficiary_nameObject

Name of the person or corporate that will receive the payment; Nome da pessoa ou empresa beneficiária no pagamento.



69
70
71
# File 'lib/bb_payments/models/inline_response_200_1.rb', line 69

def beneficiary_name
  @beneficiary_name
end

#check_digit_credit_current_accountObject

Check digits of current account for credit; Dígito verificador da conta para crédito.



54
55
56
# File 'lib/bb_payments/models/inline_response_200_1.rb', line 54

def 
  @check_digit_credit_current_account
end

#check_digit_debit_current_accountObject

Check digits of current account for debit; Dígito verificador da conta para débito.



33
34
35
# File 'lib/bb_payments/models/inline_response_200_1.rb', line 33

def 
  @check_digit_debit_current_account
end

#clearinghouse_codeObject

Identification code of the institution for credit at clearinghouse (In Brazil, identified by the acronym COMPE). For example, value 1 for Banco do Brasil and value 104 for Caixa Econômica Federal. If value 0 informed then ispbCode field will be considered; Código ISPB que representa a instituição financeira. Por exemplo, 1 - Banco do Brasil, 104 - Caixa Econômica Federal.



42
43
44
# File 'lib/bb_payments/models/inline_response_200_1.rb', line 42

def clearinghouse_code
  @clearinghouse_code
end

#credit_branch_officeObject

Branch office for credit; Agência para crédito.



48
49
50
# File 'lib/bb_payments/models/inline_response_200_1.rb', line 48

def credit_branch_office
  @credit_branch_office
end

#credit_current_accountObject

Current account for credit; Conta Corrente para crédito.



51
52
53
# File 'lib/bb_payments/models/inline_response_200_1.rb', line 51

def 
  @credit_current_account
end

#credit_documentObject

Document of credit provided by payer; Número do documento informado pelo pagador para crédito.



66
67
68
# File 'lib/bb_payments/models/inline_response_200_1.rb', line 66

def credit_document
  @credit_document
end

#credit_order_purpose_codeObject

Purpose code informed when concerning to credit/money order. A list of allowed codes is obtained at Brazilian Federation of Banks (Identified by the acronym FEBRABAN). For example: 1 - Credit in Current Account, 11 - Credit/Money Order in Saving Account, 12 - Credit/Money Order in Deposit in Court; - Código da finalidade das ordens de pagamento. A lista de códigos pode ser obtida junto a FEBRABAN (Federação Brasileira de Bancos). Por exemplo: 1 - Crédito em Conta Corrente, 11 - Crédito/Ordem de Pagamento em Conta Poupança, 12 - Crédito/Ordem de pagamento de Depósitos Judiciais.



75
76
77
# File 'lib/bb_payments/models/inline_response_200_1.rb', line 75

def credit_order_purpose_code
  @credit_order_purpose_code
end

#credit_typeObject

The modality that represents the way the credit was given as follow: 1 - Credit in Current Account, 3 - Credit/Money Order or Wire Transfers (DOC/TED), 5 - Credit in Saving Account, 71 – Deposit in Court; - Modalidade que representa o modo como o crédito pago, sendo: 1 - Crédito em conta corrente, 3 - Crédito / Ordem de Pagamento ou Transferência Bancária (DOC / TED), 5 - Crédito em conta poupança, 71 – Depósito Judicial no BB.



24
25
26
# File 'lib/bb_payments/models/inline_response_200_1.rb', line 24

def credit_type
  @credit_type
end

#debit_branch_officeObject

Branch office for debit; Agência para débito.



27
28
29
# File 'lib/bb_payments/models/inline_response_200_1.rb', line 27

def debit_branch_office
  @debit_branch_office
end

#debit_current_accountObject

Current account for debit; Conta Corrente para débito.



30
31
32
# File 'lib/bb_payments/models/inline_response_200_1.rb', line 30

def 
  @debit_current_account
end

#debit_documentObject

Document of debit provided by payer; Número do documento informado pelo pagador para débito.



63
64
65
# File 'lib/bb_payments/models/inline_response_200_1.rb', line 63

def debit_document
  @debit_document
end

#deposit_in_court_identifierObject

Identifier of the deposit in court; Código identificador do depósito judicial.



81
82
83
# File 'lib/bb_payments/models/inline_response_200_1.rb', line 81

def deposit_in_court_identifier
  @deposit_in_court_identifier
end

#ispb_codeObject

Identifier code of the Brazilian Payment Sistem (Identified by the acronym ISPB) for credit. For example, value 0 for Banco do Brasil and value 360305 for Caixa Econômica Federal. Not considered when clearinghouseCode field is informed; Código identificador do Sistema de Pagamentos Brasileiro para crédito. Por exemplo, 0 - Banco do Brasil e 360305 - Caixa Econômica Federal. Se campo clearinghouseCode for informado, este campo será ignorado.



45
46
47
# File 'lib/bb_payments/models/inline_response_200_1.rb', line 45

def ispb_code
  @ispb_code
end

#ocurrences_listObject

Lista de devoluções



84
85
86
# File 'lib/bb_payments/models/inline_response_200_1.rb', line 84

def ocurrences_list
  @ocurrences_list
end

#payment_authentication_codeObject

Authentication Code of the payment if paid already; Código de autenticação do pagamento, caso já tenha sido efetivado.



72
73
74
# File 'lib/bb_payments/models/inline_response_200_1.rb', line 72

def payment_authentication_code
  @payment_authentication_code
end

#payment_dateObject

Date of payment (payments request for non-business days will be paid in the next business day, excepting transfers between Banco do Brasil accounts); Data do pagamento (Solicitações de pagamentos para dias não úteis serão pagas no próximo dia útil, com exceção de transferências entre contas do Banco do Brasil).



36
37
38
# File 'lib/bb_payments/models/inline_response_200_1.rb', line 36

def payment_date
  @payment_date
end

#payment_statusObject

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)



18
19
20
# File 'lib/bb_payments/models/inline_response_200_1.rb', line 18

def payment_status
  @payment_status
end

#payment_typeObject

Identifies the type of payment, such as: 126 - Payment to suppliers, 127 - Payment of salaries, 128 - Other payments; Identifica o tipo de pagamento, como: 126 - Pagamento de fornecedores, 127 - Pagamento de salários, 128 - Pagamentos Diversos.



21
22
23
# File 'lib/bb_payments/models/inline_response_200_1.rb', line 21

def payment_type
  @payment_type
end

#payment_valueObject

Value of payment. The two ending numbers of the value represents the decimal places (cents). For example, value 10000 means 100.00 (One hundred) reais; Valor do pagamento. Os dois números finais do valor representam o valor das casas decimais (centavos). Por exemplo, o valor 10000 significa 100,00 (cem) reais.



39
40
41
# File 'lib/bb_payments/models/inline_response_200_1.rb', line 39

def payment_value
  @payment_value
end

#taxpayer_registrationObject

Identification of Individual or Corporate Taxpayer Registration with the Federal Revenue Service; CPF ou CNPJ do beneficiário no pagamento.



60
61
62
# File 'lib/bb_payments/models/inline_response_200_1.rb', line 60

def taxpayer_registration
  @taxpayer_registration
end

#taxpayer_typeObject

Identifies the type of the taxpayer as: 1 - Individual taxpayer 2 - Corporate taxpayer; - Identifica o tipo de pessoa, como: 1 - Pessoa física 2 - Pessoa Jurídica.



57
58
59
# File 'lib/bb_payments/models/inline_response_200_1.rb', line 57

def taxpayer_type
  @taxpayer_type
end

#wire_transfer_purpose_codeObject

Purpose code informed when concerning to wire transfer adopted by Central Bank of Brazil (Identified by the acronym BACEN); Código da finalidade da transferência de acordo com o BACEN (Banco Central).



78
79
80
# File 'lib/bb_payments/models/inline_response_200_1.rb', line 78

def wire_transfer_purpose_code
  @wire_transfer_purpose_code
end

Class Method Details

.attribute_mapObject

Attribute mapping from ruby-style variable name to JSON key.



87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
# File 'lib/bb_payments/models/inline_response_200_1.rb', line 87

def self.attribute_map
  {
    :'payment_status' => :'paymentStatus',
    :'payment_type' => :'paymentType',
    :'credit_type' => :'creditType',
    :'debit_branch_office' => :'debitBranchOffice',
    :'debit_current_account' => :'debitCurrentAccount',
    :'check_digit_debit_current_account' => :'checkDigitDebitCurrentAccount',
    :'payment_date' => :'paymentDate',
    :'payment_value' => :'paymentValue',
    :'clearinghouse_code' => :'clearinghouseCode',
    :'ispb_code' => :'ispbCode',
    :'credit_branch_office' => :'creditBranchOffice',
    :'credit_current_account' => :'creditCurrentAccount',
    :'check_digit_credit_current_account' => :'checkDigitCreditCurrentAccount',
    :'taxpayer_type' => :'taxpayerType',
    :'taxpayer_registration' => :'taxpayerRegistration',
    :'debit_document' => :'debitDocument',
    :'credit_document' => :'creditDocument',
    :'beneficiary_name' => :'beneficiaryName',
    :'payment_authentication_code' => :'paymentAuthenticationCode',
    :'credit_order_purpose_code' => :'creditOrderPurposeCode',
    :'wire_transfer_purpose_code' => :'wireTransferPurposeCode',
    :'deposit_in_court_identifier' => :'depositInCourtIdentifier',
    :'ocurrences_list' => :'ocurrencesList'
  }
end

.build_from_hash(attributes) ⇒ Object

Builds the object from hash

Parameters:

  • attributes (Hash)

    Model attributes in the form of hash

Returns:

  • (Object)

    Returns the model itself



318
319
320
# File 'lib/bb_payments/models/inline_response_200_1.rb', line 318

def self.build_from_hash(attributes)
  new.build_from_hash(attributes)
end

.openapi_nullableObject

List of attributes with nullable: true



145
146
147
148
# File 'lib/bb_payments/models/inline_response_200_1.rb', line 145

def self.openapi_nullable
  Set.new([
  ])
end

.openapi_typesObject

Attribute type mapping.



116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
# File 'lib/bb_payments/models/inline_response_200_1.rb', line 116

def self.openapi_types
  {
    :'payment_status' => :'Object',
    :'payment_type' => :'Object',
    :'credit_type' => :'Object',
    :'debit_branch_office' => :'Object',
    :'debit_current_account' => :'Object',
    :'check_digit_debit_current_account' => :'Object',
    :'payment_date' => :'Object',
    :'payment_value' => :'Object',
    :'clearinghouse_code' => :'Object',
    :'ispb_code' => :'Object',
    :'credit_branch_office' => :'Object',
    :'credit_current_account' => :'Object',
    :'check_digit_credit_current_account' => :'Object',
    :'taxpayer_type' => :'Object',
    :'taxpayer_registration' => :'Object',
    :'debit_document' => :'Object',
    :'credit_document' => :'Object',
    :'beneficiary_name' => :'Object',
    :'payment_authentication_code' => :'Object',
    :'credit_order_purpose_code' => :'Object',
    :'wire_transfer_purpose_code' => :'Object',
    :'deposit_in_court_identifier' => :'Object',
    :'ocurrences_list' => :'Object'
  }
end

Instance Method Details

#==(o) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • Object (Object)

    to be compared



275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
# File 'lib/bb_payments/models/inline_response_200_1.rb', line 275

def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
      payment_status == o.payment_status &&
      payment_type == o.payment_type &&
      credit_type == o.credit_type &&
      debit_branch_office == o.debit_branch_office &&
       == o. &&
       == o. &&
      payment_date == o.payment_date &&
      payment_value == o.payment_value &&
      clearinghouse_code == o.clearinghouse_code &&
      ispb_code == o.ispb_code &&
      credit_branch_office == o.credit_branch_office &&
       == o. &&
       == o. &&
      taxpayer_type == o.taxpayer_type &&
      taxpayer_registration == o.taxpayer_registration &&
      debit_document == o.debit_document &&
      credit_document == o.credit_document &&
      beneficiary_name == o.beneficiary_name &&
      payment_authentication_code == o.payment_authentication_code &&
      credit_order_purpose_code == o.credit_order_purpose_code &&
      wire_transfer_purpose_code == o.wire_transfer_purpose_code &&
      deposit_in_court_identifier == o.deposit_in_court_identifier &&
      ocurrences_list == o.ocurrences_list
end

#_deserialize(type, value) ⇒ Object

Deserializes the data based on type

Parameters:

  • string

    type Data type

  • string

    value Value to be deserialized

Returns:

  • (Object)

    Deserialized data



348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
# File 'lib/bb_payments/models/inline_response_200_1.rb', line 348

def _deserialize(type, value)
  case type.to_sym
  when :DateTime
    DateTime.parse(value)
  when :Date
    Date.parse(value)
  when :String
    value.to_s
  when :Integer
    value.to_i
  when :Float
    value.to_f
  when :Boolean
    if value.to_s =~ /\A(true|t|yes|y|1)\z/i
      true
    else
      false
    end
  when :Object
    # generic object (usually a Hash), return directly
    value
  when /\AArray<(?<inner_type>.+)>\z/
    inner_type = Regexp.last_match[:inner_type]
    value.map { |v| _deserialize(inner_type, v) }
  when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
    k_type = Regexp.last_match[:k_type]
    v_type = Regexp.last_match[:v_type]
    {}.tap do |hash|
      value.each do |k, v|
        hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
      end
    end
  else # model
    BancoBrasilPayments.const_get(type).build_from_hash(value)
  end
end

#_to_hash(value) ⇒ Hash

Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value

Parameters:

  • value (Object)

    Any valid value

Returns:

  • (Hash)

    Returns the value in the form of hash



417
418
419
420
421
422
423
424
425
426
427
428
429
# File 'lib/bb_payments/models/inline_response_200_1.rb', line 417

def _to_hash(value)
  if value.is_a?(Array)
    value.compact.map { |v| _to_hash(v) }
  elsif value.is_a?(Hash)
    {}.tap do |hash|
      value.each { |k, v| hash[k] = _to_hash(v) }
    end
  elsif value.respond_to? :to_hash
    value.to_hash
  else
    value
  end
end

#build_from_hash(attributes) ⇒ Object

Builds the object from hash

Parameters:

  • attributes (Hash)

    Model attributes in the form of hash

Returns:

  • (Object)

    Returns the model itself



325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
# File 'lib/bb_payments/models/inline_response_200_1.rb', line 325

def build_from_hash(attributes)
  return nil unless attributes.is_a?(Hash)
  self.class.openapi_types.each_pair do |key, type|
    if type =~ /\AArray<(.*)>/i
      # check to ensure the input is an array given that the attribute
      # is documented as an array but the input is not
      if attributes[self.class.attribute_map[key]].is_a?(Array)
        self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
      end
    elsif !attributes[self.class.attribute_map[key]].nil?
      self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
    elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
      self.send("#{key}=", nil)
    end
  end

  self
end

#eql?(o) ⇒ Boolean

Parameters:

  • Object (Object)

    to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


305
306
307
# File 'lib/bb_payments/models/inline_response_200_1.rb', line 305

def eql?(o)
  self == o
end

#hashInteger

Calculates hash code according to all attributes.

Returns:

  • (Integer)

    Hash code



311
312
313
# File 'lib/bb_payments/models/inline_response_200_1.rb', line 311

def hash
  [payment_status, payment_type, credit_type, debit_branch_office, , , payment_date, payment_value, clearinghouse_code, ispb_code, credit_branch_office, , , taxpayer_type, taxpayer_registration, debit_document, credit_document, beneficiary_name, payment_authentication_code, credit_order_purpose_code, wire_transfer_purpose_code, deposit_in_court_identifier, ocurrences_list].hash
end

#list_invalid_propertiesObject

Show invalid properties with the reasons. Usually used together with valid?

Returns:

  • Array for valid properties with the reasons



262
263
264
265
# File 'lib/bb_payments/models/inline_response_200_1.rb', line 262

def list_invalid_properties
  invalid_properties = Array.new
  invalid_properties
end

#to_bodyHash

to_body is an alias to to_hash (backward compatibility)

Returns:

  • (Hash)

    Returns the object in the form of hash



393
394
395
# File 'lib/bb_payments/models/inline_response_200_1.rb', line 393

def to_body
  to_hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



399
400
401
402
403
404
405
406
407
408
409
410
411
# File 'lib/bb_payments/models/inline_response_200_1.rb', line 399

def to_hash
  hash = {}
  self.class.attribute_map.each_pair do |attr, param|
    value = self.send(attr)
    if value.nil?
      is_nullable = self.class.openapi_nullable.include?(attr)
      next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
    end

    hash[param] = _to_hash(value)
  end
  hash
end

#to_sString

Returns the string representation of the object

Returns:

  • (String)

    String presentation of the object



387
388
389
# File 'lib/bb_payments/models/inline_response_200_1.rb', line 387

def to_s
  to_hash.to_s
end

#valid?Boolean

Check to see if the all the properties in the model are valid

Returns:

  • (Boolean)

    true if the model is valid



269
270
271
# File 'lib/bb_payments/models/inline_response_200_1.rb', line 269

def valid?
  true
end