parseitc 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/parseitc/parser.rb +1 -1
- data/lib/parseitc/transaction.rb +6 -1
- metadata +2 -2
data/lib/parseitc/parser.rb
CHANGED
data/lib/parseitc/transaction.rb
CHANGED
@@ -30,6 +30,7 @@ module ParseITC
|
|
30
30
|
@product = array[6]
|
31
31
|
@vendor_identifier = array[2]
|
32
32
|
@date = Date.parse(array[11])
|
33
|
+
@product_type_id = array[8] # 1 = new, 7 = update
|
33
34
|
@units = array[9]
|
34
35
|
@royalty_price = array[10]
|
35
36
|
@royalty_currency = array[15]
|
@@ -48,7 +49,11 @@ module ParseITC
|
|
48
49
|
def price_tier
|
49
50
|
@price_tier ||= begin
|
50
51
|
prices = ApplePricing[@royalty_currency.downcase.to_sym]
|
51
|
-
|
52
|
+
if @customer_price.to_f == 0
|
53
|
+
0
|
54
|
+
else
|
55
|
+
prices.find_index(@royalty_price.to_f)
|
56
|
+
end
|
52
57
|
rescue
|
53
58
|
nil
|
54
59
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: parseitc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- HJ Choi
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2010-
|
12
|
+
date: 2010-03-27 00:00:00 -07:00
|
13
13
|
default_executable:
|
14
14
|
dependencies: []
|
15
15
|
|