ci_power 0.0.12 → 0.0.13

Sign up to get free protection for your applications and to get access to all the features.
@@ -20,7 +20,7 @@ module CiPower
20
20
  :customer_specific_field_3,
21
21
  :customer_specific_field_4,
22
22
  :customer_specific_field_5,
23
- :reserve_field,
23
+ :customer_specific_field_6,
24
24
  :internal_note
25
25
 
26
26
  def initialize(attributes = {})
@@ -55,7 +55,7 @@ module CiPower
55
55
  :customer_specific_field_3 => 10,
56
56
  :customer_specific_field_4 => 32,
57
57
  :customer_specific_field_5 => 32,
58
- :reserve_field => 62,
58
+ :customer_specific_field_6 => 42,
59
59
  :internal_note => 1500
60
60
  }, with_line_terminator
61
61
  )
@@ -0,0 +1,40 @@
1
+ module CiPower
2
+ class DebtorData < Record
3
+ attr_accessor :birthyear,
4
+ :birthdate,
5
+ :birthplace,
6
+ :civil_status,
7
+ :occupation,
8
+ :commercial_register_entry,
9
+ :address_identification_debtor_representation,
10
+ :debtor_representation_by_law,
11
+ :nationality,
12
+ :notes
13
+
14
+ def initialize(attributes = {})
15
+ if attributes.is_a? Hash
16
+ attributes.merge! :record_type => '05'
17
+ attributes.each do |key, value|
18
+ self.send("#{key}=".to_sym, value) if self.respond_to?("#{key}=")
19
+ end
20
+ end
21
+ end
22
+
23
+ def to_cip(with_line_terminator = true)
24
+ cip_default_data << fill_up(
25
+ {
26
+ :birthdate => 10,
27
+ :birthyear => 4,
28
+ :birthplace => 32,
29
+ :civil_status => 10,
30
+ :occupation => 32,
31
+ :commercial_register_entry => 1,
32
+ :address_identification_debtor_representation => 25,
33
+ :debtor_representation_by_law => 1,
34
+ :nationality => 10,
35
+ :notes => 240
36
+ }
37
+ )
38
+ end
39
+ end
40
+ end
@@ -28,6 +28,10 @@ module CiPower
28
28
  record CiPower::Communication.new, attributes
29
29
  end
30
30
 
31
+ def debtor_data_record(attributes)
32
+ record CiPower::DebtorData.new, attributes
33
+ end
34
+
31
35
  def debt_claim_record(attributes)
32
36
  record CiPower::DebtClaim.new, attributes
33
37
  end
@@ -1,3 +1,3 @@
1
1
  module CiPower
2
- VERSION = "0.0.12"
2
+ VERSION = "0.0.13"
3
3
  end
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.12
4
+ version: 0.0.13
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-04-03 00:00:00.000000000 Z
12
+ date: 2012-04-11 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rspec
16
- requirement: &70258035691600 !ruby/object:Gem::Requirement
16
+ requirement: &70308769992660 !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: *70258035691600
24
+ version_requirements: *70308769992660
25
25
  description: Creates input files for CI-Power interface
26
26
  email:
27
27
  - md@impac.ch
@@ -33,6 +33,7 @@ files:
33
33
  - lib/ci_power/address.rb
34
34
  - lib/ci_power/communication.rb
35
35
  - lib/ci_power/debt_claim.rb
36
+ - lib/ci_power/debtor_data.rb
36
37
  - lib/ci_power/dossier_data.rb
37
38
  - lib/ci_power/export.rb
38
39
  - lib/ci_power/open_appointment.rb