paypal-csv-reports 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/paypal/csv/reports/case_report.rb +7 -2
- data/lib/paypal/csv/reports/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 475114aca4bffce24a70a0600cbeb4016bc661d4
|
4
|
+
data.tar.gz: c0e7684d9bf36c40be3bdaf13b1864d78cb6d2a9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 21472a93cc87c187dd1ae3e66b3009a4efbeb228c0a4257edb0e9c71040bbb4690c9ca8142ca6cd909595df84bf212ee55a9914445b47527a5c6fddc11d8f64d
|
7
|
+
data.tar.gz: 57c71f5a0769b7cdbb7901cec5ca1e50023cbd19549b81e810eb84617776d7bb0059a925a1b68e1da572358b9c29f8a8aed062c519aad6ebb812c51eeedee265
|
@@ -8,8 +8,7 @@ module Paypal
|
|
8
8
|
new(File.open(file, 'r:bom|utf-8'))
|
9
9
|
end
|
10
10
|
|
11
|
-
attr_reader :header
|
12
|
-
attr_reader :entries
|
11
|
+
attr_reader :generated_at, :reporting_window, :account_id, :version, :header, :entries
|
13
12
|
|
14
13
|
def initialize(csv)
|
15
14
|
@entries = []
|
@@ -27,6 +26,8 @@ module Paypal
|
|
27
26
|
row_type = row.shift.to_s.strip
|
28
27
|
|
29
28
|
case row_type
|
29
|
+
when 'RH'
|
30
|
+
parse_report_header(row)
|
30
31
|
when 'CH'
|
31
32
|
@header = parse_header(row)
|
32
33
|
when 'SB'
|
@@ -34,6 +35,10 @@ module Paypal
|
|
34
35
|
end
|
35
36
|
end
|
36
37
|
|
38
|
+
def parse_report_header(row)
|
39
|
+
@generated_at, @reporting_window, @account_id, @version = row
|
40
|
+
end
|
41
|
+
|
37
42
|
def parse_header(row)
|
38
43
|
row.map { |v| v.downcase.gsub(' ', '_').to_sym }
|
39
44
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: paypal-csv-reports
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Laurynas Butkus
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-10-
|
11
|
+
date: 2015-10-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|