chartmogul-ruby 1.6.4 → 1.6.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/lib/chartmogul/customer.rb +0 -8
- data/lib/chartmogul/customer_invoices.rb +9 -0
- data/lib/chartmogul/utils/json_parser.rb +9 -1
- data/lib/chartmogul/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 48f89ffb09ae87641ce72a86933370c44a34f9bdfc3007e3cd0757e7e3ab86fc
|
4
|
+
data.tar.gz: 195daeabc4de7495673bf7a8066ac777743f2e52fe0c4d9a53e2e9562fec3c29
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c64c9287441ba417ddb56276eb2b7e993dc0cc41ad7448960dbe6bc9c852d64bd7d022f41fe702cafc0493d02e7f3f72f0c63b6b3c5391921bc86333acb78000
|
7
|
+
data.tar.gz: 16ef7f3cc9120ba2934979e4d3aa99b0b36ccfd42dc1d2018a3d2e650993cce5726706543200b718d7bfce233bbdf894be4ed67040859123d1dcae29df59fbba
|
data/.gitignore
CHANGED
data/lib/chartmogul/customer.rb
CHANGED
@@ -64,14 +64,6 @@ module ChartMogul
|
|
64
64
|
@invoices = ChartMogul::CustomerInvoices.new(customer_uuid: uuid, invoices: invoices_array)
|
65
65
|
end
|
66
66
|
|
67
|
-
def delete_all_invoices!
|
68
|
-
path = ChartMogul::ResourcePath.new('v1/data_sources/:data_source_uuid/customers/:customer_uuid/invoices')
|
69
|
-
handling_errors do
|
70
|
-
connection.delete(path.apply(data_source_uuid: data_source_uuid, customer_uuid: uuid))
|
71
|
-
end
|
72
|
-
self.invoices = []
|
73
|
-
end
|
74
|
-
|
75
67
|
# Enrichment
|
76
68
|
def tags
|
77
69
|
@attributes[:tags]
|
@@ -26,6 +26,15 @@ module ChartMogul
|
|
26
26
|
super(options.merge(customer_uuid: customer_uuid))
|
27
27
|
end
|
28
28
|
|
29
|
+
def self.destroy_all!(data_source_uuid, customer_uuid)
|
30
|
+
path = ChartMogul::ResourcePath.new('v1/data_sources/:data_source_uuid/customers/:customer_uuid/invoices')
|
31
|
+
handling_errors do
|
32
|
+
connection.delete(path.apply(data_source_uuid: data_source_uuid, customer_uuid: customer_uuid))
|
33
|
+
end
|
34
|
+
true
|
35
|
+
end
|
36
|
+
|
37
|
+
|
29
38
|
def_delegators :invoices, :each, :[], :<<, :size, :length, :empty?, :first
|
30
39
|
|
31
40
|
private
|
@@ -20,7 +20,15 @@ module ChartMogul
|
|
20
20
|
def opt_string_to_time(value)
|
21
21
|
return value unless value.instance_of?(String)
|
22
22
|
|
23
|
-
|
23
|
+
parse_timestamp(value)
|
24
|
+
rescue ArgumentError
|
25
|
+
value
|
26
|
+
end
|
27
|
+
|
28
|
+
def parse_timestamp(value)
|
29
|
+
Time.iso8601(value)
|
30
|
+
rescue ArgumentError
|
31
|
+
Time.rfc2822(value)
|
24
32
|
end
|
25
33
|
end
|
26
34
|
end
|
data/lib/chartmogul/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: chartmogul-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.6.
|
4
|
+
version: 1.6.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Petr Kopac
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-08-
|
11
|
+
date: 2020-08-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -334,7 +334,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
334
334
|
- !ruby/object:Gem::Version
|
335
335
|
version: '0'
|
336
336
|
requirements: []
|
337
|
-
rubygems_version: 3.
|
337
|
+
rubygems_version: 3.1.4
|
338
338
|
signing_key:
|
339
339
|
specification_version: 4
|
340
340
|
summary: Chartmogul API Ruby Client
|