Class: CiPower::Address
Instance Attribute Summary collapse
-
#account_no ⇒ Object
Returns the value of attribute account_no.
-
#address ⇒ Object
Returns the value of attribute address.
-
#address_type_company ⇒ Object
Returns the value of attribute address_type_company.
-
#city ⇒ Object
Returns the value of attribute city.
-
#commercial_register_no ⇒ Object
Returns the value of attribute commercial_register_no.
-
#contact_firstname ⇒ Object
Returns the value of attribute contact_firstname.
-
#contact_lastname ⇒ Object
Returns the value of attribute contact_lastname.
-
#contact_salutation ⇒ Object
Returns the value of attribute contact_salutation.
-
#country ⇒ Object
Returns the value of attribute country.
-
#customer_specific_field_1 ⇒ Object
Returns the value of attribute customer_specific_field_1.
-
#customer_specific_field_10 ⇒ Object
Returns the value of attribute customer_specific_field_10.
-
#customer_specific_field_11 ⇒ Object
Returns the value of attribute customer_specific_field_11.
-
#customer_specific_field_12 ⇒ Object
Returns the value of attribute customer_specific_field_12.
-
#customer_specific_field_13 ⇒ Object
Returns the value of attribute customer_specific_field_13.
-
#customer_specific_field_14 ⇒ Object
Returns the value of attribute customer_specific_field_14.
-
#customer_specific_field_15 ⇒ Object
Returns the value of attribute customer_specific_field_15.
-
#customer_specific_field_16 ⇒ Object
Returns the value of attribute customer_specific_field_16.
-
#customer_specific_field_2 ⇒ Object
Returns the value of attribute customer_specific_field_2.
-
#customer_specific_field_3 ⇒ Object
Returns the value of attribute customer_specific_field_3.
-
#customer_specific_field_4 ⇒ Object
Returns the value of attribute customer_specific_field_4.
-
#customer_specific_field_5 ⇒ Object
Returns the value of attribute customer_specific_field_5.
-
#customer_specific_field_6 ⇒ Object
Returns the value of attribute customer_specific_field_6.
-
#customer_specific_field_7 ⇒ Object
Returns the value of attribute customer_specific_field_7.
-
#customer_specific_field_8 ⇒ Object
Returns the value of attribute customer_specific_field_8.
-
#customer_specific_field_9 ⇒ Object
Returns the value of attribute customer_specific_field_9.
-
#firstname ⇒ Object
Returns the value of attribute firstname.
-
#industry ⇒ Object
Returns the value of attribute industry.
-
#language ⇒ Object
Returns the value of attribute language.
-
#lastname ⇒ Object
Returns the value of attribute lastname.
-
#method_of_payment ⇒ Object
Returns the value of attribute method_of_payment.
-
#name_affix ⇒ Object
Returns the value of attribute name_affix.
-
#new_order_id ⇒ Object
Returns the value of attribute new_order_id.
-
#po_box ⇒ Object
Returns the value of attribute po_box.
-
#postal_code ⇒ Object
Returns the value of attribute postal_code.
-
#region ⇒ Object
Returns the value of attribute region.
-
#reserve_field ⇒ Object
Returns the value of attribute reserve_field.
-
#salutation ⇒ Object
Returns the value of attribute salutation.
-
#title ⇒ Object
Returns the value of attribute title.
-
#vat_no ⇒ Object
Returns the value of attribute vat_no.
Attributes inherited from Record
#address_identification_debtee, #address_identification_debtor, #group_no, #record_type
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ Address
constructor
A new instance of Address.
- #to_cip(with_line_terminator = true) ⇒ Object
Methods inherited from Record
#cip_default_data, #fill_up, #line_terminator
Constructor Details
#initialize(attributes = {}) ⇒ Address
Returns a new instance of Address.
43 44 45 46 47 48 49 50 |
# File 'lib/ci_power/address.rb', line 43 def initialize(attributes = {}) if attributes.is_a? Hash attributes.merge! :record_type => '01' attributes.each do |key, value| self.send("#{key}=".to_sym, value) if self.respond_to?("#{key}=") end end end |
Instance Attribute Details
#account_no ⇒ Object
Returns the value of attribute account_no.
3 4 5 |
# File 'lib/ci_power/address.rb', line 3 def account_no @account_no end |
#address ⇒ Object
Returns the value of attribute address.
3 4 5 |
# File 'lib/ci_power/address.rb', line 3 def address @address end |
#address_type_company ⇒ Object
Returns the value of attribute address_type_company.
3 4 5 |
# File 'lib/ci_power/address.rb', line 3 def address_type_company @address_type_company end |
#city ⇒ Object
Returns the value of attribute city.
3 4 5 |
# File 'lib/ci_power/address.rb', line 3 def city @city end |
#commercial_register_no ⇒ Object
Returns the value of attribute commercial_register_no.
3 4 5 |
# File 'lib/ci_power/address.rb', line 3 def commercial_register_no @commercial_register_no end |
#contact_firstname ⇒ Object
Returns the value of attribute contact_firstname.
3 4 5 |
# File 'lib/ci_power/address.rb', line 3 def contact_firstname @contact_firstname end |
#contact_lastname ⇒ Object
Returns the value of attribute contact_lastname.
3 4 5 |
# File 'lib/ci_power/address.rb', line 3 def contact_lastname @contact_lastname end |
#contact_salutation ⇒ Object
Returns the value of attribute contact_salutation.
3 4 5 |
# File 'lib/ci_power/address.rb', line 3 def contact_salutation @contact_salutation end |
#country ⇒ Object
Returns the value of attribute country.
3 4 5 |
# File 'lib/ci_power/address.rb', line 3 def country @country end |
#customer_specific_field_1 ⇒ Object
Returns the value of attribute customer_specific_field_1.
3 4 5 |
# File 'lib/ci_power/address.rb', line 3 def customer_specific_field_1 @customer_specific_field_1 end |
#customer_specific_field_10 ⇒ Object
Returns the value of attribute customer_specific_field_10.
3 4 5 |
# File 'lib/ci_power/address.rb', line 3 def customer_specific_field_10 @customer_specific_field_10 end |
#customer_specific_field_11 ⇒ Object
Returns the value of attribute customer_specific_field_11.
3 4 5 |
# File 'lib/ci_power/address.rb', line 3 def customer_specific_field_11 @customer_specific_field_11 end |
#customer_specific_field_12 ⇒ Object
Returns the value of attribute customer_specific_field_12.
3 4 5 |
# File 'lib/ci_power/address.rb', line 3 def customer_specific_field_12 @customer_specific_field_12 end |
#customer_specific_field_13 ⇒ Object
Returns the value of attribute customer_specific_field_13.
3 4 5 |
# File 'lib/ci_power/address.rb', line 3 def customer_specific_field_13 @customer_specific_field_13 end |
#customer_specific_field_14 ⇒ Object
Returns the value of attribute customer_specific_field_14.
3 4 5 |
# File 'lib/ci_power/address.rb', line 3 def customer_specific_field_14 @customer_specific_field_14 end |
#customer_specific_field_15 ⇒ Object
Returns the value of attribute customer_specific_field_15.
3 4 5 |
# File 'lib/ci_power/address.rb', line 3 def customer_specific_field_15 @customer_specific_field_15 end |
#customer_specific_field_16 ⇒ Object
Returns the value of attribute customer_specific_field_16.
3 4 5 |
# File 'lib/ci_power/address.rb', line 3 def customer_specific_field_16 @customer_specific_field_16 end |
#customer_specific_field_2 ⇒ Object
Returns the value of attribute customer_specific_field_2.
3 4 5 |
# File 'lib/ci_power/address.rb', line 3 def customer_specific_field_2 @customer_specific_field_2 end |
#customer_specific_field_3 ⇒ Object
Returns the value of attribute customer_specific_field_3.
3 4 5 |
# File 'lib/ci_power/address.rb', line 3 def customer_specific_field_3 @customer_specific_field_3 end |
#customer_specific_field_4 ⇒ Object
Returns the value of attribute customer_specific_field_4.
3 4 5 |
# File 'lib/ci_power/address.rb', line 3 def customer_specific_field_4 @customer_specific_field_4 end |
#customer_specific_field_5 ⇒ Object
Returns the value of attribute customer_specific_field_5.
3 4 5 |
# File 'lib/ci_power/address.rb', line 3 def customer_specific_field_5 @customer_specific_field_5 end |
#customer_specific_field_6 ⇒ Object
Returns the value of attribute customer_specific_field_6.
3 4 5 |
# File 'lib/ci_power/address.rb', line 3 def customer_specific_field_6 @customer_specific_field_6 end |
#customer_specific_field_7 ⇒ Object
Returns the value of attribute customer_specific_field_7.
3 4 5 |
# File 'lib/ci_power/address.rb', line 3 def customer_specific_field_7 @customer_specific_field_7 end |
#customer_specific_field_8 ⇒ Object
Returns the value of attribute customer_specific_field_8.
3 4 5 |
# File 'lib/ci_power/address.rb', line 3 def customer_specific_field_8 @customer_specific_field_8 end |
#customer_specific_field_9 ⇒ Object
Returns the value of attribute customer_specific_field_9.
3 4 5 |
# File 'lib/ci_power/address.rb', line 3 def customer_specific_field_9 @customer_specific_field_9 end |
#firstname ⇒ Object
Returns the value of attribute firstname.
3 4 5 |
# File 'lib/ci_power/address.rb', line 3 def firstname @firstname end |
#industry ⇒ Object
Returns the value of attribute industry.
3 4 5 |
# File 'lib/ci_power/address.rb', line 3 def industry @industry end |
#language ⇒ Object
Returns the value of attribute language.
3 4 5 |
# File 'lib/ci_power/address.rb', line 3 def language @language end |
#lastname ⇒ Object
Returns the value of attribute lastname.
3 4 5 |
# File 'lib/ci_power/address.rb', line 3 def lastname @lastname end |
#method_of_payment ⇒ Object
Returns the value of attribute method_of_payment.
3 4 5 |
# File 'lib/ci_power/address.rb', line 3 def method_of_payment @method_of_payment end |
#name_affix ⇒ Object
Returns the value of attribute name_affix.
3 4 5 |
# File 'lib/ci_power/address.rb', line 3 def name_affix @name_affix end |
#new_order_id ⇒ Object
Returns the value of attribute new_order_id.
3 4 5 |
# File 'lib/ci_power/address.rb', line 3 def new_order_id @new_order_id end |
#po_box ⇒ Object
Returns the value of attribute po_box.
3 4 5 |
# File 'lib/ci_power/address.rb', line 3 def po_box @po_box end |
#postal_code ⇒ Object
Returns the value of attribute postal_code.
3 4 5 |
# File 'lib/ci_power/address.rb', line 3 def postal_code @postal_code end |
#region ⇒ Object
Returns the value of attribute region.
3 4 5 |
# File 'lib/ci_power/address.rb', line 3 def region @region end |
#reserve_field ⇒ Object
Returns the value of attribute reserve_field.
3 4 5 |
# File 'lib/ci_power/address.rb', line 3 def reserve_field @reserve_field end |
#salutation ⇒ Object
Returns the value of attribute salutation.
3 4 5 |
# File 'lib/ci_power/address.rb', line 3 def salutation @salutation end |
#title ⇒ Object
Returns the value of attribute title.
3 4 5 |
# File 'lib/ci_power/address.rb', line 3 def title @title end |
#vat_no ⇒ Object
Returns the value of attribute vat_no.
3 4 5 |
# File 'lib/ci_power/address.rb', line 3 def vat_no @vat_no end |
Instance Method Details
#to_cip(with_line_terminator = true) ⇒ Object
52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 |
# File 'lib/ci_power/address.rb', line 52 def to_cip(with_line_terminator = true) cip_default_data << fill_up( { :address_type_company => 1, :title => 32, :salutation => 10, :lastname => 32, :firstname => 32, :name_affix => 32, :address => 32, :po_box => 32, :postal_code => 10, :city => 32, :country => 10, :contact_salutation => 10, :contact_lastname => 32, :contact_firstname => 32, :language => 10, :method_of_payment => 10, :account_no => 32, :commercial_register_no => 15, :vat_no => 15, :industry => 10, :region => 10, :reserve_field => 10, :customer_specific_field_1 => 10, :customer_specific_field_2 => 10, :customer_specific_field_3 => 10, :customer_specific_field_4 => 32, :customer_specific_field_5 => 32, :customer_specific_field_6 => 64, :customer_specific_field_7 => 64, :customer_specific_field_8 => 64, :customer_specific_field_9 => 64, :customer_specific_field_10 => 64, :customer_specific_field_11 => 64, :customer_specific_field_12 => 64, :customer_specific_field_13 => 64, :customer_specific_field_14 => 64, :customer_specific_field_15 => 64, :customer_specific_field_16 => 64 }, with_line_terminator ) end |