madebyrocket-mousetrap 0.5.3.7 → 0.5.3.8
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/mousetrap/invoice.rb +1 -1
- data/mousetrap.gemspec +1 -1
- metadata +2 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.5.3.
|
1
|
+
0.5.3.8
|
data/lib/mousetrap/invoice.rb
CHANGED
@@ -37,7 +37,7 @@ module Mousetrap
|
|
37
37
|
:number => attributes['number'],
|
38
38
|
:billing_date => attributes['billingDatetime'],
|
39
39
|
:created_at => attributes['createdDatetime'],
|
40
|
-
:amount => attributes['charges']['charge'].inject(0.0) {|sum, c| sum.to_f + c['eachAmount'].to_f}
|
40
|
+
:amount => attributes['charges']['charge'].class == Array ? attributes['charges']['charge'].inject(0.0) {|sum, c| sum.to_f + (c['eachAmount'].to_f * c['quantity'].to_i)} : attributes['charges']['charge']['eachAmount'].to_f * attributes['charges']['charge']['quantity'].to_i
|
41
41
|
}
|
42
42
|
end
|
43
43
|
end
|
data/mousetrap.gemspec
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{madebyrocket-mousetrap}
|
8
|
-
s.version = "0.5.3.
|
8
|
+
s.version = "0.5.3.8"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Jon Larkowski", "Sandro Turriate", "Wolfram Arnold", "Corey Grusden"]
|