coda_standard 0.1.8 → 0.1.9
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.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/coda_standard/parser.rb +1 -1
- data/lib/coda_standard/version.rb +1 -1
- data/spec/parser_spec.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dda9c638d689bcea9637bbac5a47a1a2158b6e89
|
4
|
+
data.tar.gz: ca9292bdbab414c7bb4592a1a4cbf2d25f104064
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 193f1a011ec3fd8aedea410340d7de00e34f04c07a2f9479d63c783b2cd1b9a8b0ce82efe0fbf8569d94946db53b35f339519c98b6aba375b23deec62ecde12c
|
7
|
+
data.tar.gz: ac36c1f4530a2e2c125e8c7914be1d07f3b09b13cddf1e2759d12a36499ce86db6bc277e5cf709c7e8306466677d03fd2edf847cb8a202e7274ce8a58a40fa0c
|
data/README.md
CHANGED
@@ -42,7 +42,7 @@ CodaStandard::Parser.new(filename).parse.first.find_by_structured_communication(
|
|
42
42
|
```
|
43
43
|
The available getters for each TransactionList are: `old_balance`, `current_account`, `current_account_type`, `current_bic`
|
44
44
|
|
45
|
-
The available getters for each Transaction are: `name`, `currency`, `bic`, `address`, `postcode`, `city`, `country`, `amount`, `account`, `entry_date
|
45
|
+
The available getters for each Transaction are: `name`, `currency`, `bic`, `address`, `postcode`, `city`, `country`, `amount`, `account`, `entry_date` (returns a Date), `reference_number` and `structured_communication`.
|
46
46
|
|
47
47
|
You can get the amount in cents: `amount_cents` => 50086
|
48
48
|
|
data/lib/coda_standard/parser.rb
CHANGED
@@ -55,7 +55,7 @@ module CodaStandard
|
|
55
55
|
end
|
56
56
|
|
57
57
|
def extract_data_movement1(record)
|
58
|
-
@current_transaction.entry_date = record.entry_date
|
58
|
+
@current_transaction.entry_date = Date.strptime(record.entry_date, '%d%m%y')
|
59
59
|
@current_transaction.reference_number = record.reference_number
|
60
60
|
@current_transaction.amount = record.amount
|
61
61
|
@current_transaction.structured_communication = record.structured_communication
|
data/spec/parser_spec.rb
CHANGED
@@ -62,7 +62,7 @@ describe CodaStandard::Parser do
|
|
62
62
|
|
63
63
|
describe "show" do
|
64
64
|
it "shows the info from the transactions" do
|
65
|
-
expect{ parser.show }.to output("**--Transaction List 1--**\n\nAccount: 539007547034 Account type: bban_be_account BIC: GEBABEBB\nOld balance: 57900.000 \n\n-- Transaction n.1 - number 100000834941 - in date
|
65
|
+
expect{ parser.show }.to output("**--Transaction List 1--**\n\nAccount: 539007547034 Account type: bban_be_account BIC: GEBABEBB\nOld balance: 57900.000 \n\n-- Transaction n.1 - number 100000834941 - in date 2015-03-31-- \n\n RN: 0001500000103 Account: BE53900754703405 BIC: GKCCBEBB\n Amount: 500,86 EUR\n Name: LASTNM PERSON\n Address: CHAUSSEE DE BIERE 10 1978 SOMECITY \n\n-- Transaction n.2 - number 100000835749 - in date 2015-03-31-- \n\n RN: 0001500000104 Account: LU539007547034898400 BIC: BILLLULL\n Amount: 200,00 EUR\n Name: M.JOHN DOE\n Address: 5 STREET 3654 CITY BELGIQUE \n\n").to_stdout
|
66
66
|
end
|
67
67
|
end
|
68
68
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: coda_standard
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alvaro Leal
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-05-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -106,3 +106,4 @@ test_files:
|
|
106
106
|
- spec/record_spec.rb
|
107
107
|
- spec/spec_helper.rb
|
108
108
|
- spec/transaction_list_spec.rb
|
109
|
+
has_rdoc:
|