stripe_invoice 1.1.8 → 1.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
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 616409311934824c8ede7f580156e2664912d91b
|
|
4
|
+
data.tar.gz: 07f34f1bd53246444d85163bf1c5ba19f93c8d5d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c32185a9fc1ddc25c155504c138a3f3c6840e44b95c698fcca1db34d6d027c76450c86c2b937d4b57313f7a168ee790b443f819d132ac23e1f1a3ef17407e270
|
|
7
|
+
data.tar.gz: 960abd42e30e338ef6f5aa4481a505235291f3d36bc85b114c3530bfcfcd46f692a735e3683102428854a7154f6d86e0112c8bf4d532756b08feedecf33fb88a
|
|
@@ -20,10 +20,8 @@ module StripeInvoice
|
|
|
20
20
|
|
|
21
21
|
next unless owner # skip if we don't have an owner
|
|
22
22
|
|
|
23
|
-
country =
|
|
24
|
-
|
|
25
|
-
country ||= 'Unknown Country'
|
|
26
|
-
|
|
23
|
+
country = get_country charge
|
|
24
|
+
|
|
27
25
|
data = {
|
|
28
26
|
charge: charge,
|
|
29
27
|
country: country,
|
|
@@ -59,7 +57,6 @@ module StripeInvoice
|
|
|
59
57
|
InvoiceMailer.tax_report(res).deliver! #unless ::Rails.env.development?
|
|
60
58
|
end
|
|
61
59
|
|
|
62
|
-
|
|
63
60
|
private
|
|
64
61
|
def date_to_epoch(date)
|
|
65
62
|
Date.strptime(date,"%Y-%m-%d").to_datetime.utc.to_i
|
|
@@ -99,5 +96,10 @@ module StripeInvoice
|
|
|
99
96
|
|
|
100
97
|
result.with_indifferent_access
|
|
101
98
|
end
|
|
99
|
+
|
|
100
|
+
def get_country(charge)
|
|
101
|
+
Country[charge.country] ? charge.country :
|
|
102
|
+
((country = Country.find_country_by_name(charge.country)) ? country.alpha2 : 'Unkown Country')
|
|
103
|
+
end
|
|
102
104
|
end
|
|
103
105
|
end
|