Class: CiPower::DebtorData

Inherits:
Record
  • Object
show all
Defined in:
lib/ci_power/debtor_data.rb

Instance Attribute Summary collapse

Attributes inherited from Record

#address_identification_debtee, #address_identification_debtor, #group_no, #record_type

Instance Method Summary collapse

Methods inherited from Record

#cip_default_data, #fill_up, #line_terminator

Constructor Details

#initialize(attributes = {}) ⇒ DebtorData

Returns a new instance of DebtorData.



27
28
29
30
31
32
33
34
# File 'lib/ci_power/debtor_data.rb', line 27

def initialize(attributes = {})
  if attributes.is_a? Hash
    attributes.merge! :record_type => '05'
    attributes.each do |key, value|
      self.send("#{key}=".to_sym, value) if self.respond_to?("#{key}=")
    end
  end
end

Instance Attribute Details

#address_identification_debtor_representationObject

Returns the value of attribute address_identification_debtor_representation.



3
4
5
# File 'lib/ci_power/debtor_data.rb', line 3

def address_identification_debtor_representation
  @address_identification_debtor_representation
end

#birthdateObject

Returns the value of attribute birthdate.



3
4
5
# File 'lib/ci_power/debtor_data.rb', line 3

def birthdate
  @birthdate
end

#birthplaceObject

Returns the value of attribute birthplace.



3
4
5
# File 'lib/ci_power/debtor_data.rb', line 3

def birthplace
  @birthplace
end

#birthyearObject

Returns the value of attribute birthyear.



3
4
5
# File 'lib/ci_power/debtor_data.rb', line 3

def birthyear
  @birthyear
end

#civil_statusObject

Returns the value of attribute civil_status.



3
4
5
# File 'lib/ci_power/debtor_data.rb', line 3

def civil_status
  @civil_status
end

#commercial_register_entryObject

Returns the value of attribute commercial_register_entry.



3
4
5
# File 'lib/ci_power/debtor_data.rb', line 3

def commercial_register_entry
  @commercial_register_entry
end

#customer_specific_field_1Object

Returns the value of attribute customer_specific_field_1.



3
4
5
# File 'lib/ci_power/debtor_data.rb', line 3

def customer_specific_field_1
  @customer_specific_field_1
end

#customer_specific_field_10Object

Returns the value of attribute customer_specific_field_10.



3
4
5
# File 'lib/ci_power/debtor_data.rb', line 3

def customer_specific_field_10
  @customer_specific_field_10
end

#customer_specific_field_2Object

Returns the value of attribute customer_specific_field_2.



3
4
5
# File 'lib/ci_power/debtor_data.rb', line 3

def customer_specific_field_2
  @customer_specific_field_2
end

#customer_specific_field_3Object

Returns the value of attribute customer_specific_field_3.



3
4
5
# File 'lib/ci_power/debtor_data.rb', line 3

def customer_specific_field_3
  @customer_specific_field_3
end

#customer_specific_field_4Object

Returns the value of attribute customer_specific_field_4.



3
4
5
# File 'lib/ci_power/debtor_data.rb', line 3

def customer_specific_field_4
  @customer_specific_field_4
end

#customer_specific_field_5Object

Returns the value of attribute customer_specific_field_5.



3
4
5
# File 'lib/ci_power/debtor_data.rb', line 3

def customer_specific_field_5
  @customer_specific_field_5
end

#customer_specific_field_6Object

Returns the value of attribute customer_specific_field_6.



3
4
5
# File 'lib/ci_power/debtor_data.rb', line 3

def customer_specific_field_6
  @customer_specific_field_6
end

#customer_specific_field_7Object

Returns the value of attribute customer_specific_field_7.



3
4
5
# File 'lib/ci_power/debtor_data.rb', line 3

def customer_specific_field_7
  @customer_specific_field_7
end

#customer_specific_field_8Object

Returns the value of attribute customer_specific_field_8.



3
4
5
# File 'lib/ci_power/debtor_data.rb', line 3

def customer_specific_field_8
  @customer_specific_field_8
end

#customer_specific_field_9Object

Returns the value of attribute customer_specific_field_9.



3
4
5
# File 'lib/ci_power/debtor_data.rb', line 3

def customer_specific_field_9
  @customer_specific_field_9
end

#debtor_attribute_1Object

Returns the value of attribute debtor_attribute_1.



3
4
5
# File 'lib/ci_power/debtor_data.rb', line 3

def debtor_attribute_1
  @debtor_attribute_1
end

#debtor_attribute_2Object

Returns the value of attribute debtor_attribute_2.



3
4
5
# File 'lib/ci_power/debtor_data.rb', line 3

def debtor_attribute_2
  @debtor_attribute_2
end

#debtor_attribute_3Object

Returns the value of attribute debtor_attribute_3.



3
4
5
# File 'lib/ci_power/debtor_data.rb', line 3

def debtor_attribute_3
  @debtor_attribute_3
end

#debtor_representation_by_lawObject

Returns the value of attribute debtor_representation_by_law.



3
4
5
# File 'lib/ci_power/debtor_data.rb', line 3

def debtor_representation_by_law
  @debtor_representation_by_law
end

#nationalityObject

Returns the value of attribute nationality.



3
4
5
# File 'lib/ci_power/debtor_data.rb', line 3

def nationality
  @nationality
end

#notesObject

Returns the value of attribute notes.



3
4
5
# File 'lib/ci_power/debtor_data.rb', line 3

def notes
  @notes
end

#occupationObject

Returns the value of attribute occupation.



3
4
5
# File 'lib/ci_power/debtor_data.rb', line 3

def occupation
  @occupation
end

Instance Method Details

#to_cip(with_line_terminator = true) ⇒ Object



36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# File 'lib/ci_power/debtor_data.rb', line 36

def to_cip(with_line_terminator = true)
  cip_default_data << fill_up(
    {
      :birthdate => 10,
      :birthyear => 4,
      :birthplace => 32,
      :civil_status => 10,
      :occupation => 32,
      :commercial_register_entry => 1,
      :address_identification_debtor_representation => 25,
      :debtor_representation_by_law => 1,
      :nationality => 10,
      :notes => 240,
      :debtor_attribute_1 => 32,
      :debtor_attribute_2 => 32,
      :debtor_attribute_3 => 32,
      :customer_specific_field_1 => 32,
      :customer_specific_field_2 => 32,
      :customer_specific_field_3 => 32,
      :customer_specific_field_4 => 32,
      :customer_specific_field_5 => 32,
      :customer_specific_field_6 => 32,
      :customer_specific_field_7 => 32,
      :customer_specific_field_8 => 32,
      :customer_specific_field_9 => 32,
      :customer_specific_field_10 => 32
    }, with_line_terminator
  )
end