Class: CiPower::OpenAppointment

Inherits:
Record
  • Object
show all
Defined in:
lib/ci_power/open_appointment.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 = {}) ⇒ OpenAppointment

Returns a new instance of OpenAppointment.



17
18
19
20
21
22
23
24
# File 'lib/ci_power/open_appointment.rb', line 17

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

Instance Attribute Details

#actionObject

Returns the value of attribute action.



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

def action
  @action
end

#cip_dossier_noObject

Returns the value of attribute cip_dossier_no.



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

def cip_dossier_no
  @cip_dossier_no
end

#commentObject

Returns the value of attribute comment.



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

def comment
  @comment
end

#customer_specific_field_1Object

Returns the value of attribute customer_specific_field_1.



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

def customer_specific_field_1
  @customer_specific_field_1
end

#customer_specific_field_2Object

Returns the value of attribute customer_specific_field_2.



3
4
5
# File 'lib/ci_power/open_appointment.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/open_appointment.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/open_appointment.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/open_appointment.rb', line 3

def customer_specific_field_5
  @customer_specific_field_5
end

#execute_dateObject

Returns the value of attribute execute_date.



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

def execute_date
  @execute_date
end

#execute_mkz_dateObject

Returns the value of attribute execute_mkz_date.



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

def execute_mkz_date
  @execute_mkz_date
end

#mutableObject

Returns the value of attribute mutable.



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

def mutable
  @mutable
end

#planned_dateObject

Returns the value of attribute planned_date.



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

def planned_date
  @planned_date
end

#planned_mkz_dateObject

Returns the value of attribute planned_mkz_date.



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

def planned_mkz_date
  @planned_mkz_date
end

Instance Method Details

#to_cip(with_line_terminator = true) ⇒ Object



26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# File 'lib/ci_power/open_appointment.rb', line 26

def to_cip(with_line_terminator = true)
  cip_default_data << fill_up(
    {
      :action => 10,
      :execute_date => 10,
      :execute_mkz_date => 10,
      :planned_date => 10,
      :planned_mkz_date => 10,
      :mutable => 1,
      :comment => 240,
      :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,
      :cip_dossier_no => 9
    }, with_line_terminator
  )
end