stripe_invoice 1.3.0 → 1.3.1
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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 58497c0c2b4f31c6ccc71c26123fd1fece4169a0
|
4
|
+
data.tar.gz: 7b7bcdc36f4c3c19addf45ae0ede10b9dedd9506
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1ece442b6a15b3319b55407d3fa097b794ff8cd1b8b229bcad0ed5305510873e8fb4794db401d29d10e215f9ad0801fb61779707830e4c59738d4478d3fd0f82
|
7
|
+
data.tar.gz: 0b3a450a42739c43a61ba0e4eed906acad2f1f6b2792086cd77858a47533ca6a6b4730ee88215269e7715c6b837cd5a9d41c223302713bc2e5dae04027f9cd22
|
@@ -84,7 +84,7 @@ module StripeInvoice
|
|
84
84
|
next if key.blank?
|
85
85
|
|
86
86
|
result << {
|
87
|
-
amount: charges[key].sum{|char| char
|
87
|
+
amount: charges[key].sum{|char| char.total_less_refunds},
|
88
88
|
currency: charges[key].first[:currency],
|
89
89
|
tax_number: key
|
90
90
|
}
|
@@ -41,6 +41,10 @@ module StripeInvoice
|
|
41
41
|
refunds.inject(0){ |total,refund| total + refund[:amount]}
|
42
42
|
end
|
43
43
|
|
44
|
+
def total_less_refunds
|
45
|
+
total - total_refund
|
46
|
+
end
|
47
|
+
|
44
48
|
# builds the invoice from the stripe CHARGE object
|
45
49
|
# OR updates the existing invoice if an invoice for that id exists
|
46
50
|
def self.create_from_stripe(stripe_charge)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: stripe_invoice
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Christoph Engelhardt
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-07-
|
11
|
+
date: 2016-07-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|