ci_power 0.0.20 → 0.0.21
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/ci_power/dossier_data.rb +6 -3
- data/lib/ci_power/export.rb +20 -0
- data/lib/ci_power/version.rb +1 -1
- metadata +13 -2
@@ -33,6 +33,9 @@ module CiPower
|
|
33
33
|
:customer_specific_field_19,
|
34
34
|
:customer_specific_field_20
|
35
35
|
|
36
|
+
# placeholder attributes
|
37
|
+
attr_reader :fill_up1, :fill_up2, :fill_up3
|
38
|
+
|
36
39
|
def initialize(attributes = {})
|
37
40
|
if attributes.is_a? Hash
|
38
41
|
attributes.merge! :record_type => '10'
|
@@ -48,15 +51,15 @@ module CiPower
|
|
48
51
|
:record_type => 2,
|
49
52
|
:group_no => 7,
|
50
53
|
:address_identification_debtee => 25,
|
51
|
-
|
54
|
+
:fill_up1 => 25,
|
52
55
|
:address_identification_debtor => 25,
|
53
56
|
:debt_claim_reason => 64,
|
54
57
|
:reference_1 => 32,
|
55
58
|
:ikv => 10,
|
56
59
|
:feature_1 => 10,
|
57
|
-
|
60
|
+
:fill_up2 => 22,
|
58
61
|
:feature_2 => 10,
|
59
|
-
|
62
|
+
:fill_up3 => 22,
|
60
63
|
:interest_rate => 10,
|
61
64
|
:currency => 10,
|
62
65
|
:notes => 240,
|
data/lib/ci_power/export.rb
CHANGED
@@ -20,38 +20,56 @@ module CiPower
|
|
20
20
|
@date_format = date_format
|
21
21
|
end
|
22
22
|
|
23
|
+
##
|
24
|
+
# Creates a new dossier data record described by the +attributes+ hash
|
23
25
|
def dossier_data_record(attributes)
|
24
26
|
record CiPower::DossierData.new, attributes
|
25
27
|
end
|
26
28
|
|
29
|
+
##
|
30
|
+
# Creates a new address record described by the +attributes+ hash
|
27
31
|
def address_record(attributes)
|
28
32
|
record CiPower::Address.new, attributes
|
29
33
|
end
|
30
34
|
|
35
|
+
##
|
36
|
+
# Creates a new communication record described by the +attributes+ hash
|
31
37
|
def communication_record(attributes)
|
32
38
|
record CiPower::Communication.new, attributes
|
33
39
|
end
|
34
40
|
|
41
|
+
##
|
42
|
+
# Creates a debtor data address record described by the +attributes+ hash
|
35
43
|
def debtor_data_record(attributes)
|
36
44
|
record CiPower::DebtorData.new, attributes
|
37
45
|
end
|
38
46
|
|
47
|
+
##
|
48
|
+
# Creates a new debt claim record described by the +attributes+ hash
|
39
49
|
def debt_claim_record(attributes)
|
40
50
|
record CiPower::DebtClaim.new, attributes
|
41
51
|
end
|
42
52
|
|
53
|
+
##
|
54
|
+
# Creates a new action record described by the +attributes+ hash
|
43
55
|
def action_record(attributes)
|
44
56
|
record CiPower::Action.new, attributes
|
45
57
|
end
|
46
58
|
|
59
|
+
##
|
60
|
+
# Creates a new open appointment record described by the +attributes+ hash
|
47
61
|
def open_appointment_record(attributes)
|
48
62
|
record CiPower::OpenAppointment.new, attributes
|
49
63
|
end
|
50
64
|
|
65
|
+
##
|
66
|
+
# Creates a new installment plan record described by the +attributes+ hash
|
51
67
|
def installment_plan_record(attributes)
|
52
68
|
record CiPower::InstallmentPlan.new, attributes
|
53
69
|
end
|
54
70
|
|
71
|
+
##
|
72
|
+
# Adds a single record or an array of records to the output and increments the group number
|
55
73
|
def export_customer(records)
|
56
74
|
if records.is_a?(Array)
|
57
75
|
records.each do |record|
|
@@ -64,6 +82,8 @@ module CiPower
|
|
64
82
|
records
|
65
83
|
end
|
66
84
|
|
85
|
+
##
|
86
|
+
# Converts a date or time into a string with the defined date_format
|
67
87
|
def convert_date(date)
|
68
88
|
date.strftime(date_format) if date.respond_to?(:strftime)
|
69
89
|
end
|
data/lib/ci_power/version.rb
CHANGED
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: ci_power
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.0.
|
5
|
+
version: 0.0.21
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Maik Duff
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2012-08-
|
13
|
+
date: 2012-08-16 00:00:00 +02:00
|
14
14
|
default_executable:
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
@@ -24,6 +24,17 @@ dependencies:
|
|
24
24
|
version: "0"
|
25
25
|
type: :development
|
26
26
|
version_requirements: *id001
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rdoc
|
29
|
+
prerelease: false
|
30
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
31
|
+
none: false
|
32
|
+
requirements:
|
33
|
+
- - ">="
|
34
|
+
- !ruby/object:Gem::Version
|
35
|
+
version: "0"
|
36
|
+
type: :development
|
37
|
+
version_requirements: *id002
|
27
38
|
description: Creates input files for CI-Power interface
|
28
39
|
email:
|
29
40
|
- md@impac.ch
|