ci_power 0.0.2 → 0.0.3

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.
@@ -0,0 +1,62 @@
1
+ module CiPower
2
+ class Action < Record
3
+ attr_accessor :action_date,
4
+ :action,
5
+ :mkz,
6
+ :amount,
7
+ :currency,
8
+ :exchange_rate,
9
+ :value_date,
10
+ :comment_1,
11
+ :comment_2,
12
+ :op_no,
13
+ :op_membership,
14
+ :cip_dossier_no,
15
+ :external_dossier_no,
16
+ :cip_identification,
17
+ :debt_claim_group,
18
+ :customer_specific_field_1,
19
+ :customer_specific_field_2,
20
+ :customer_specific_field_3,
21
+ :customer_specific_field_4,
22
+ :customer_specific_field_5,
23
+ :reserve_field,
24
+ :internal_note
25
+
26
+ def initialize(attributes = {})
27
+ if attributes.is_a? Hash
28
+ attributes.merge! :record_type => '17', :mkz => 'AUTO'
29
+ attributes.each do |key, value|
30
+ self.send("#{key}=".to_sym, value) if self.respond_to?("#{key}=")
31
+ end
32
+ end
33
+ end
34
+
35
+ def to_cip
36
+ cip_default_data << fill_up(
37
+ action_date => 10,
38
+ action => 10,
39
+ mkz => 10,
40
+ amount => 15,
41
+ currency => 10,
42
+ exchange_rate => 15,
43
+ value_date => 10,
44
+ comment_1 => 32,
45
+ comment_2 => 32,
46
+ op_no => 32,
47
+ op_membership => 32,
48
+ cip_dossier_no => 25,
49
+ external_dossier_no => 32,
50
+ cip_identification => 7,
51
+ debt_claim_group => 32,
52
+ customer_specific_field_1 => 10,
53
+ customer_specific_field_2 => 10,
54
+ customer_specific_field_3 => 10,
55
+ customer_specific_field_4 => 32,
56
+ customer_specific_field_5 => 32,
57
+ reserve_field => 62,
58
+ internal_note => 1500
59
+ )
60
+ end
61
+ end
62
+ end
@@ -32,6 +32,10 @@ module CiPower
32
32
  record CiPower::DebtClaim.new, attributes
33
33
  end
34
34
 
35
+ def action_record(attributes)
36
+ record CiPower::Action.new, attributes
37
+ end
38
+
35
39
  def export_customer(records)
36
40
  records.each do |record|
37
41
  raise "Export class must be sub class of CiPower::Record" unless record.kind_of? CiPower::Record
@@ -1,3 +1,3 @@
1
1
  module CiPower
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
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.2
5
+ version: 0.0.3
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: 2011-12-02 00:00:00 +01:00
13
+ date: 2012-01-13 00:00:00 +01:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
@@ -35,6 +35,7 @@ extra_rdoc_files: []
35
35
 
36
36
  files:
37
37
  - lib/ci_power.rb
38
+ - lib/ci_power/action.rb
38
39
  - lib/ci_power/address.rb
39
40
  - lib/ci_power/communication.rb
40
41
  - lib/ci_power/debt_claim.rb