Class: BancoBrasilPayments::BatchtransfersPaymentsList

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ BatchtransfersPaymentsList

Initializes the object

Parameters:

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

    Model attributes in the form of hash



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
143
144
145
146
147
148
149
150
151
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
# File 'lib/bb_payments/models/batchtransfers_payments_list.rb', line 116

def initialize(attributes = {})
  if (!attributes.is_a?(Hash))
    fail ArgumentError, "The input argument (attributes) must be a hash in `BancoBrasilPayments::BatchtransfersPaymentsList` 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::BatchtransfersPaymentsList`. 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?(:'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_digits_credit_current_account')
    self. = attributes[:'check_digits_credit_current_account']
  end

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

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

  if attributes.key?(:'corporate_taxpayer_registration')
    self.corporate_taxpayer_registration = attributes[:'corporate_taxpayer_registration']
  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?(:'debit_document')
    self.debit_document = attributes[:'debit_document']
  end

  if attributes.key?(:'credit_document')
    self.credit_document = attributes[:'credit_document']
  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?(:'payment_description')
    self.payment_description = attributes[:'payment_description']
  end
end

Instance Attribute Details

#check_digits_credit_current_accountObject

Dígito verificador da conta corrente para crédito.



29
30
31
# File 'lib/bb_payments/models/batchtransfers_payments_list.rb', line 29

def 
  @check_digits_credit_current_account
end

#clearinghouse_codeObject

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
18
19
# File 'lib/bb_payments/models/batchtransfers_payments_list.rb', line 17

def clearinghouse_code
  @clearinghouse_code
end

#corporate_taxpayer_registrationObject

Número do CNPJ junto à Receita Federal. Não informado quando diz respeito ao pagamento de contribuinte do tipo pessoa física.



38
39
40
# File 'lib/bb_payments/models/batchtransfers_payments_list.rb', line 38

def corporate_taxpayer_registration
  @corporate_taxpayer_registration
end

#credit_branch_officeObject

Código da agência para crédito.



23
24
25
# File 'lib/bb_payments/models/batchtransfers_payments_list.rb', line 23

def credit_branch_office
  @credit_branch_office
end

#credit_current_accountObject

Conta corrente para crédito.



26
27
28
# File 'lib/bb_payments/models/batchtransfers_payments_list.rb', line 26

def 
  @credit_current_account
end

#credit_documentObject

Número do documento de crédito exibido no extrato do favorecido - uso exclusivo para Crédito em conta corrente no BB.



50
51
52
# File 'lib/bb_payments/models/batchtransfers_payments_list.rb', line 50

def credit_document
  @credit_document
end

#credit_order_purpose_codeObject

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
54
55
# File 'lib/bb_payments/models/batchtransfers_payments_list.rb', line 53

def credit_order_purpose_code
  @credit_order_purpose_code
end

#credit_payment_accountObject

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
33
34
# File 'lib/bb_payments/models/batchtransfers_payments_list.rb', line 32

def 
  @credit_payment_account
end

#debit_documentObject

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
48
49
# File 'lib/bb_payments/models/batchtransfers_payments_list.rb', line 47

def debit_document
  @debit_document
end

#deposit_in_court_identifierObject

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
60
61
# File 'lib/bb_payments/models/batchtransfers_payments_list.rb', line 59

def deposit_in_court_identifier
  @deposit_in_court_identifier
end

#individual_taxpayer_registrationObject

Número do CPF junto à Receita Federal. Não informado quando diz respeito ao pagamento de contribuinte do tipo pessoa jurídica.



35
36
37
# File 'lib/bb_payments/models/batchtransfers_payments_list.rb', line 35

def individual_taxpayer_registration
  @individual_taxpayer_registration
end

#ispb_codeObject

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
21
22
# File 'lib/bb_payments/models/batchtransfers_payments_list.rb', line 20

def ispb_code
  @ispb_code
end

#payment_dateObject

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
42
43
# File 'lib/bb_payments/models/batchtransfers_payments_list.rb', line 41

def payment_date
  @payment_date
end

#payment_descriptionObject

Campo de uso livre pelo cliente conveniado - sem tratamento pelo Banco.



62
63
64
# File 'lib/bb_payments/models/batchtransfers_payments_list.rb', line 62

def payment_description
  @payment_description
end

#payment_valueObject

Valor do pagamento em reais (formato 0.00)



44
45
46
# File 'lib/bb_payments/models/batchtransfers_payments_list.rb', line 44

def payment_value
  @payment_value
end

#wire_transfer_purpose_codeObject

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
57
58
# File 'lib/bb_payments/models/batchtransfers_payments_list.rb', line 56

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.



65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
# File 'lib/bb_payments/models/batchtransfers_payments_list.rb', line 65

def self.attribute_map
  {
    :'clearinghouse_code' => :'clearinghouseCode',
    :'ispb_code' => :'ispbCode',
    :'credit_branch_office' => :'creditBranchOffice',
    :'credit_current_account' => :'creditCurrentAccount',
    :'check_digits_credit_current_account' => :'checkDigitsCreditCurrentAccount',
    :'credit_payment_account' => :'creditPaymentAccount',
    :'individual_taxpayer_registration' => :'individualTaxpayerRegistration',
    :'corporate_taxpayer_registration' => :'corporateTaxpayerRegistration',
    :'payment_date' => :'paymentDate',
    :'payment_value' => :'paymentValue',
    :'debit_document' => :'debitDocument',
    :'credit_document' => :'creditDocument',
    :'credit_order_purpose_code' => :'creditOrderPurposeCode',
    :'wire_transfer_purpose_code' => :'wireTransferPurposeCode',
    :'deposit_in_court_identifier' => :'depositInCourtIdentifier',
    :'payment_description' => :'paymentDescription'
  }
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



250
251
252
# File 'lib/bb_payments/models/batchtransfers_payments_list.rb', line 250

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

.openapi_nullableObject

List of attributes with nullable: true



109
110
111
112
# File 'lib/bb_payments/models/batchtransfers_payments_list.rb', line 109

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

.openapi_typesObject

Attribute type mapping.



87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
# File 'lib/bb_payments/models/batchtransfers_payments_list.rb', line 87

def self.openapi_types
  {
    :'clearinghouse_code' => :'Object',
    :'ispb_code' => :'Object',
    :'credit_branch_office' => :'Object',
    :'credit_current_account' => :'Object',
    :'check_digits_credit_current_account' => :'Object',
    :'credit_payment_account' => :'Object',
    :'individual_taxpayer_registration' => :'Object',
    :'corporate_taxpayer_registration' => :'Object',
    :'payment_date' => :'Object',
    :'payment_value' => :'Object',
    :'debit_document' => :'Object',
    :'credit_document' => :'Object',
    :'credit_order_purpose_code' => :'Object',
    :'wire_transfer_purpose_code' => :'Object',
    :'deposit_in_court_identifier' => :'Object',
    :'payment_description' => :'Object'
  }
end

Instance Method Details

#==(o) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • Object (Object)

    to be compared



214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
# File 'lib/bb_payments/models/batchtransfers_payments_list.rb', line 214

def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
      clearinghouse_code == o.clearinghouse_code &&
      ispb_code == o.ispb_code &&
      credit_branch_office == o.credit_branch_office &&
       == o. &&
       == o. &&
       == o. &&
      individual_taxpayer_registration == o.individual_taxpayer_registration &&
      corporate_taxpayer_registration == o.corporate_taxpayer_registration &&
      payment_date == o.payment_date &&
      payment_value == o.payment_value &&
      debit_document == o.debit_document &&
      credit_document == o.credit_document &&
      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 &&
      payment_description == o.payment_description
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



280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
# File 'lib/bb_payments/models/batchtransfers_payments_list.rb', line 280

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



349
350
351
352
353
354
355
356
357
358
359
360
361
# File 'lib/bb_payments/models/batchtransfers_payments_list.rb', line 349

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



257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
# File 'lib/bb_payments/models/batchtransfers_payments_list.rb', line 257

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


237
238
239
# File 'lib/bb_payments/models/batchtransfers_payments_list.rb', line 237

def eql?(o)
  self == o
end

#hashInteger

Calculates hash code according to all attributes.

Returns:

  • (Integer)

    Hash code



243
244
245
# File 'lib/bb_payments/models/batchtransfers_payments_list.rb', line 243

def hash
  [clearinghouse_code, ispb_code, credit_branch_office, , , , 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
end

#list_invalid_propertiesObject

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

Returns:

  • Array for valid properties with the reasons



196
197
198
199
200
201
202
203
# File 'lib/bb_payments/models/batchtransfers_payments_list.rb', line 196

def list_invalid_properties
  invalid_properties = Array.new
  if @payment_value.nil?
    invalid_properties.push('invalid value for "payment_value", payment_value cannot be nil.')
  end

  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



325
326
327
# File 'lib/bb_payments/models/batchtransfers_payments_list.rb', line 325

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



331
332
333
334
335
336
337
338
339
340
341
342
343
# File 'lib/bb_payments/models/batchtransfers_payments_list.rb', line 331

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



319
320
321
# File 'lib/bb_payments/models/batchtransfers_payments_list.rb', line 319

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



207
208
209
210
# File 'lib/bb_payments/models/batchtransfers_payments_list.rb', line 207

def valid?
  return false if @payment_value.nil?
  true
end