ci_power 0.0.11 → 0.0.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -36,6 +36,10 @@ module CiPower
36
36
  record CiPower::Action.new, attributes
37
37
  end
38
38
 
39
+ def open_appointment_record(attributes)
40
+ record CiPower::OpenAppointment.new, attributes
41
+ end
42
+
39
43
  def export_customer(records)
40
44
  records.each do |record|
41
45
  raise "Export class must be sub class of CiPower::Record" unless record.kind_of? CiPower::Record
@@ -0,0 +1,22 @@
1
+ module CiPower
2
+ class OpenAppointment < Record
3
+ attr_accessor :action
4
+
5
+ def initialize(attributes = {})
6
+ if attributes.is_a? Hash
7
+ attributes.merge! :record_type => '18'
8
+ attributes.each do |key, value|
9
+ self.send("#{key}=".to_sym, value) if self.respond_to?("#{key}=")
10
+ end
11
+ end
12
+ end
13
+
14
+ def to_cip(with_line_terminator = true)
15
+ cip_default_data << fill_up(
16
+ {
17
+ :action => 10
18
+ }, with_line_terminator
19
+ )
20
+ end
21
+ end
22
+ end
@@ -1,3 +1,3 @@
1
1
  module CiPower
2
- VERSION = "0.0.11"
2
+ VERSION = "0.0.12"
3
3
  end
data/lib/ci_power.rb CHANGED
@@ -8,3 +8,4 @@ require "ci_power/address"
8
8
  require "ci_power/communication"
9
9
  require "ci_power/debt_claim"
10
10
  require "ci_power/action"
11
+ require "ci_power/open_appointment"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ci_power
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.11
4
+ version: 0.0.12
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-03-26 00:00:00.000000000 Z
12
+ date: 2012-04-03 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rspec
16
- requirement: &70133070598180 !ruby/object:Gem::Requirement
16
+ requirement: &70258035691600 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,7 +21,7 @@ dependencies:
21
21
  version: '0'
22
22
  type: :development
23
23
  prerelease: false
24
- version_requirements: *70133070598180
24
+ version_requirements: *70258035691600
25
25
  description: Creates input files for CI-Power interface
26
26
  email:
27
27
  - md@impac.ch
@@ -35,6 +35,7 @@ files:
35
35
  - lib/ci_power/debt_claim.rb
36
36
  - lib/ci_power/dossier_data.rb
37
37
  - lib/ci_power/export.rb
38
+ - lib/ci_power/open_appointment.rb
38
39
  - lib/ci_power/record.rb
39
40
  - lib/ci_power/version.rb
40
41
  - lib/ci_power.rb