chartmogul-ruby 1.6.1 → 1.6.7
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/.travis.yml +1 -1
- data/README.md +1 -1
- data/changelog.md +3 -0
- data/chartmogul-ruby.gemspec +14 -13
- data/fixtures/vcr_cassettes/ChartMogul_Customer/API_Interactions/adds_custom_attributes.yml +2 -2
- data/fixtures/vcr_cassettes/ChartMogul_Customer/API_Interactions/updates_custom_attributes.yml +2 -2
- data/fixtures/vcr_cassettes/ChartMogul_Customer/API_Interactions/updates_customer_using_class_method.yml +53 -0
- data/fixtures/vcr_cassettes/ChartMogul_CustomerInvoices/API_Interactions/correctly_interracts_with_the_API.yml +148 -109
- data/fixtures/vcr_cassettes/ChartMogul_Plan/API_Interactions/updates_existing_plan_using_class_method.yml +164 -0
- data/fixtures/vcr_cassettes/ChartMogul_PlanGroup/API_interactions/updates_existing_plan_group_name_via_class_method.yml +297 -0
- data/lib/chartmogul.rb +2 -1
- data/lib/chartmogul/api/actions/create.rb +2 -2
- data/lib/chartmogul/api/actions/custom.rb +1 -1
- data/lib/chartmogul/api/actions/retrieve.rb +1 -1
- data/lib/chartmogul/api/actions/update.rb +22 -1
- data/lib/chartmogul/api_resource.rb +9 -4
- data/lib/chartmogul/configuration.rb +1 -0
- data/lib/chartmogul/customer.rb +1 -0
- data/lib/chartmogul/customer_invoices.rb +9 -0
- data/lib/chartmogul/utils/json_parser.rb +12 -2
- data/lib/chartmogul/version.rb +1 -1
- metadata +9 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7217ec585904be468d9fc18d74c84a783803ca3d0bcf5e3e2f6f916012131a4f
|
4
|
+
data.tar.gz: d28cf68e49a9f7da6bb39cb2d1cb1fa49c93d9337296d87e1f96a9aa1b5daecd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f0e1a312266b32b8a50309c92999f09047ad64f3de5539f7c468dd1b2d29ca47469322ef38ab1bcd19bd16c8aad175a018f0886129b1b64a2b2275ccfee79ca8
|
7
|
+
data.tar.gz: 66d4079794ddddba66de3236217fc432ccaeba90f338789e2d158d23c23e687f5cbd05f111498b977becde0497ade73d97a9659244bfc29ded921342fc27065e
|
data/.gitignore
CHANGED
data/.travis.yml
CHANGED
data/README.md
CHANGED
@@ -8,7 +8,7 @@
|
|
8
8
|
|
9
9
|
<p align="center">
|
10
10
|
<a href="https://badge.fury.io/rb/chartmogul-ruby"><img src="https://badge.fury.io/rb/chartmogul-ruby.svg" alt="Gem Version"></a>
|
11
|
-
<a href="https://travis-ci.org/chartmogul/chartmogul-ruby"><img src="https://travis-ci.org/chartmogul/chartmogul-ruby.svg?branch=
|
11
|
+
<a href="https://travis-ci.org/chartmogul/chartmogul-ruby"><img src="https://travis-ci.org/chartmogul/chartmogul-ruby.svg?branch=main" alt="Travis project"></a>
|
12
12
|
<a href="https://codeclimate.com/github/chartmogul/chartmogul-ruby/test_coverage"><img src="https://api.codeclimate.com/v1/badges/40e8bdff4d1dbf2451de/test_coverage" /></a>
|
13
13
|
</p>
|
14
14
|
|
data/changelog.md
CHANGED
data/chartmogul-ruby.gemspec
CHANGED
@@ -5,22 +5,23 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
5
5
|
require 'chartmogul/version'
|
6
6
|
|
7
7
|
Gem::Specification.new do |spec|
|
8
|
-
spec.name
|
9
|
-
spec.version
|
10
|
-
spec.authors
|
11
|
-
spec.email
|
8
|
+
spec.name = 'chartmogul-ruby'
|
9
|
+
spec.version = ChartMogul::VERSION
|
10
|
+
spec.authors = ['Petr Kopac']
|
11
|
+
spec.email = ['petr@chartmogul.com']
|
12
12
|
|
13
|
-
spec.summary
|
14
|
-
spec.description
|
15
|
-
spec.homepage
|
16
|
-
spec.license
|
13
|
+
spec.summary = 'Chartmogul API Ruby Client'
|
14
|
+
spec.description = 'Official Ruby client for ChartMogul\'s API'
|
15
|
+
spec.homepage = 'https://github.com/chartmogul/chartmogul-ruby'
|
16
|
+
spec.license = 'MIT'
|
17
|
+
spec.required_ruby_version = '>= 2.3'
|
17
18
|
|
18
|
-
spec.files
|
19
|
-
spec.bindir
|
20
|
-
spec.executables
|
21
|
-
spec.require_paths
|
19
|
+
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
20
|
+
spec.bindir = 'exe'
|
21
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
22
|
+
spec.require_paths = ['lib']
|
22
23
|
|
23
|
-
spec.add_dependency 'faraday', '~> 0.
|
24
|
+
spec.add_dependency 'faraday', '~> 1.0.0'
|
24
25
|
|
25
26
|
spec.add_development_dependency 'bundler', '~> 2'
|
26
27
|
spec.add_development_dependency 'pry', '~> 0.12.2'
|
@@ -44,7 +44,7 @@ http_interactions:
|
|
44
44
|
uri: https://api.chartmogul.com/v1/customers/cus_07393ece-aab1-4255-8bcd-0ef11e24b047/attributes/custom
|
45
45
|
body:
|
46
46
|
encoding: UTF-8
|
47
|
-
string: '{"custom":[{"type":"String","key":"
|
47
|
+
string: '{"custom":[{"type":"String","key":"StringKey","value":"String Value"},{"type":"Integer","key":"integer_key","value":1234},{"type":"Timestamp","key":"timestamp_key","value":"2016-01-31
|
48
48
|
00:00:00 UTC"},{"type":"Boolean","key":"boolean_key","value":true}]}'
|
49
49
|
headers:
|
50
50
|
User-Agent:
|
@@ -74,7 +74,7 @@ http_interactions:
|
|
74
74
|
- 'true'
|
75
75
|
body:
|
76
76
|
encoding: UTF-8
|
77
|
-
string: '{"custom":{"
|
77
|
+
string: '{"custom":{"StringKey":"String Value","integer_key":1234,"timestamp_key":"2016-01-31T00:00:00.000Z","boolean_key":true}}'
|
78
78
|
http_version:
|
79
79
|
recorded_at: Wed, 29 Jun 2016 12:47:09 GMT
|
80
80
|
recorded_with: VCR 3.0.3
|
data/fixtures/vcr_cassettes/ChartMogul_Customer/API_Interactions/updates_custom_attributes.yml
CHANGED
@@ -45,7 +45,7 @@ http_interactions:
|
|
45
45
|
uri: https://api.chartmogul.com/v1/customers/cus_07393ece-aab1-4255-8bcd-0ef11e24b047/attributes/custom
|
46
46
|
body:
|
47
47
|
encoding: UTF-8
|
48
|
-
string: '{"custom":{"
|
48
|
+
string: '{"custom":{"StringKey":"Another String Value","integer_key":5678,"timestamp_key":"2016-02-01
|
49
49
|
00:00:00 UTC","boolean_key":false}}'
|
50
50
|
headers:
|
51
51
|
User-Agent:
|
@@ -75,7 +75,7 @@ http_interactions:
|
|
75
75
|
- 'true'
|
76
76
|
body:
|
77
77
|
encoding: UTF-8
|
78
|
-
string: '{"custom":{"
|
78
|
+
string: '{"custom":{"StringKey":"Another String Value","integer_key":5678,"timestamp_key":"2016-02-01T00:00:00.000Z","boolean_key":false}}'
|
79
79
|
http_version:
|
80
80
|
recorded_at: Wed, 29 Jun 2016 12:47:09 GMT
|
81
81
|
recorded_with: VCR 3.0.3
|
@@ -0,0 +1,53 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: patch
|
5
|
+
uri: https://api.chartmogul.com/v1/customers/cus_a29bbcb6-43ed-11e9-9bff-a3a747d175b1
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '{"attributes":{"custom":{"company_size":"just me"},"tags":["foobar"]},"email":"curry@example.com","company":"Curry
|
9
|
+
42","country":"IN","state":"NY","city":"Berlin","free_trial_started_at":"2020-02-02
|
10
|
+
22:40:00 UTC"}'
|
11
|
+
headers:
|
12
|
+
User-Agent:
|
13
|
+
- Faraday v0.17.3
|
14
|
+
Content-Type:
|
15
|
+
- application/json
|
16
|
+
Authorization:
|
17
|
+
- Basic YjNjZTUxNTNkMDYyNmQwNjE3YWQ4OWQyMzQ2OTA1OTc6OGE0YTgyOTMwYTVhMjgzOTA3MDgwNGYzMTdmNTZjYjA=
|
18
|
+
Accept-Encoding:
|
19
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
20
|
+
Accept:
|
21
|
+
- "*/*"
|
22
|
+
response:
|
23
|
+
status:
|
24
|
+
code: 200
|
25
|
+
message: OK
|
26
|
+
headers:
|
27
|
+
Server:
|
28
|
+
- nginx/1.10.1
|
29
|
+
Date:
|
30
|
+
- Fri, 17 Jul 2020 12:10:11 GMT
|
31
|
+
Content-Type:
|
32
|
+
- application/json
|
33
|
+
Transfer-Encoding:
|
34
|
+
- chunked
|
35
|
+
Connection:
|
36
|
+
- keep-alive
|
37
|
+
Vary:
|
38
|
+
- Accept-Encoding
|
39
|
+
- Accept-Encoding
|
40
|
+
Status:
|
41
|
+
- 200 OK
|
42
|
+
Access-Control-Allow-Credentials:
|
43
|
+
- 'true'
|
44
|
+
body:
|
45
|
+
encoding: ASCII-8BIT
|
46
|
+
string: '{"id":33802170,"uuid":"cus_a29bbcb6-43ed-11e9-9bff-a3a747d175b1","external_id":"HngTohkREePdXBIx","name":"Currywurst","email":"curry@example.com","status":"Past
|
47
|
+
due","customer-since":"2018-12-29T00:00:00+00:00","attributes":{"custom":{"company_size":"just
|
48
|
+
me","Users":"1"},"clearbit":{},"stripe":{},"tags":["foobar"]},"data_source_uuid":"ds_b835f746-43eb-11e9-8169-9333ac374c59","data_source_uuids":["ds_b835f746-43eb-11e9-8169-9333ac374c59"],"external_ids":["HngTohkREePdXBIx"],"company":"Curry
|
49
|
+
42","country":"IN","state":"NY","city":"Berlin","zip":null,"lead_created_at":"2018-12-15T00:00:00.000Z","free_trial_started_at":"2020-02-02T22:40:00.000Z","address":{"country":"India","state":"New
|
50
|
+
York","city":"Berlin","address_zip":null},"mrr":4900,"arr":58800,"billing-system-url":"HngTohkREePdXBIx","chartmogul-url":"https://app.chartmogul.com/#customers/33802170-Currywurst","billing-system-type":"Chargebee","currency":"USD","currency-sign":"$"}'
|
51
|
+
http_version: null
|
52
|
+
recorded_at: Fri, 17 Jul 2020 12:10:11 GMT
|
53
|
+
recorded_with: VCR 5.1.0
|
@@ -8,291 +8,330 @@ http_interactions:
|
|
8
8
|
string: '{"name":"Customer Invoices Test Data Source"}'
|
9
9
|
headers:
|
10
10
|
User-Agent:
|
11
|
-
- Faraday
|
11
|
+
- Faraday v1.0.1
|
12
12
|
Content-Type:
|
13
13
|
- application/json
|
14
14
|
Authorization:
|
15
|
-
- Basic
|
15
|
+
- Basic YjNjZTUxNTNkMDYyNmQwNjE3YWQ4OWQyMzQ2OTA1OTc6OGE0YTgyOTMwYTVhMjgzOTA3MDgwNGYzMTdmNTZjYjA=
|
16
16
|
response:
|
17
17
|
status:
|
18
18
|
code: 201
|
19
|
-
message:
|
19
|
+
message: Created
|
20
20
|
headers:
|
21
21
|
server:
|
22
|
-
- nginx/1.
|
22
|
+
- nginx/1.10.1
|
23
23
|
date:
|
24
|
-
-
|
24
|
+
- Fri, 14 Aug 2020 08:21:40 GMT
|
25
25
|
content-type:
|
26
|
-
- application/json
|
26
|
+
- application/json
|
27
27
|
transfer-encoding:
|
28
28
|
- chunked
|
29
29
|
connection:
|
30
|
-
-
|
31
|
-
|
32
|
-
-
|
33
|
-
|
34
|
-
-
|
35
|
-
x-content-type-options:
|
36
|
-
- nosniff
|
37
|
-
etag:
|
38
|
-
- W/"60451ca489b1142994522bdcd2a78022"
|
39
|
-
cache-control:
|
40
|
-
- max-age=0, private, must-revalidate
|
41
|
-
x-request-id:
|
42
|
-
- 14e68eba-6131-4b04-8210-d9901cadd7ef
|
43
|
-
x-runtime:
|
44
|
-
- '0.536866'
|
45
|
-
strict-transport-security:
|
46
|
-
- max-age=15768000
|
30
|
+
- keep-alive
|
31
|
+
status:
|
32
|
+
- 201 Created
|
33
|
+
access-control-allow-credentials:
|
34
|
+
- 'true'
|
47
35
|
body:
|
48
36
|
encoding: UTF-8
|
49
|
-
string: '{"uuid":"
|
50
|
-
Invoices Test Data Source","created_at":"
|
37
|
+
string: '{"uuid":"ds_2db7bab6-de07-11ea-a4dd-7f82d51c3d05","name":"Customer
|
38
|
+
Invoices Test Data Source","system":"Import API","created_at":"2020-08-14T08:21:40.103Z","status":"idle"}'
|
51
39
|
http_version:
|
52
|
-
recorded_at:
|
40
|
+
recorded_at: Fri, 14 Aug 2020 08:21:40 GMT
|
53
41
|
- request:
|
54
42
|
method: post
|
55
43
|
uri: https://api.chartmogul.com/v1/customers
|
56
44
|
body:
|
57
45
|
encoding: UTF-8
|
58
|
-
string: '{"
|
59
|
-
Customer","email":"test@customer.com","company":null,"country":"DE","state":null,"city":"Berlin","zip":null}'
|
46
|
+
string: '{"external_id":"test_cus_ext_id","name":"Test Customer","email":"test@customer.com","country":"DE","city":"Berlin","data_source_uuid":"ds_2db7bab6-de07-11ea-a4dd-7f82d51c3d05"}'
|
60
47
|
headers:
|
61
48
|
User-Agent:
|
62
|
-
- Faraday
|
49
|
+
- Faraday v1.0.1
|
63
50
|
Content-Type:
|
64
51
|
- application/json
|
65
52
|
Authorization:
|
66
|
-
- Basic
|
53
|
+
- Basic YjNjZTUxNTNkMDYyNmQwNjE3YWQ4OWQyMzQ2OTA1OTc6OGE0YTgyOTMwYTVhMjgzOTA3MDgwNGYzMTdmNTZjYjA=
|
67
54
|
response:
|
68
55
|
status:
|
69
56
|
code: 201
|
70
|
-
message:
|
57
|
+
message: Created
|
71
58
|
headers:
|
72
59
|
server:
|
73
|
-
- nginx/1.
|
60
|
+
- nginx/1.10.1
|
74
61
|
date:
|
75
|
-
-
|
62
|
+
- Fri, 14 Aug 2020 08:21:40 GMT
|
76
63
|
content-type:
|
77
|
-
- application/json
|
64
|
+
- application/json
|
78
65
|
transfer-encoding:
|
79
66
|
- chunked
|
80
67
|
connection:
|
81
|
-
-
|
82
|
-
|
83
|
-
-
|
84
|
-
|
85
|
-
-
|
86
|
-
x-content-type-options:
|
87
|
-
- nosniff
|
88
|
-
etag:
|
89
|
-
- W/"b207f005123ccc7fbe07e3cf8d4ef474"
|
90
|
-
cache-control:
|
91
|
-
- max-age=0, private, must-revalidate
|
92
|
-
x-request-id:
|
93
|
-
- 8b32a149-5c4a-4b14-a82f-666adaf3897a
|
94
|
-
x-runtime:
|
95
|
-
- '0.221606'
|
96
|
-
strict-transport-security:
|
97
|
-
- max-age=15768000
|
68
|
+
- keep-alive
|
69
|
+
status:
|
70
|
+
- 201 Created
|
71
|
+
access-control-allow-credentials:
|
72
|
+
- 'true'
|
98
73
|
body:
|
99
74
|
encoding: UTF-8
|
100
|
-
string: '{"uuid":"
|
101
|
-
Customer","
|
75
|
+
string: '{"id":58654367,"uuid":"cus_2e010ebe-de07-11ea-a4dd-ff06789b4dcf","external_id":"test_cus_ext_id","name":"Test
|
76
|
+
Customer","email":"test@customer.com","status":"Lead","customer-since":null,"attributes":{"custom":{},"clearbit":{},"stripe":{},"tags":[]},"data_source_uuid":"ds_2db7bab6-de07-11ea-a4dd-7f82d51c3d05","data_source_uuids":["ds_2db7bab6-de07-11ea-a4dd-7f82d51c3d05"],"external_ids":["test_cus_ext_id"],"company":"","country":"DE","state":null,"city":"Berlin","zip":null,"lead_created_at":null,"free_trial_started_at":null,"address":{"country":"Germany","state":null,"city":"Berlin","address_zip":null},"mrr":0,"arr":0,"billing-system-url":null,"chartmogul-url":"https://app.chartmogul.com/#customers/58654367-Test_Customer","billing-system-type":"Import
|
77
|
+
API","currency":"USD","currency-sign":"$"}'
|
102
78
|
http_version:
|
103
|
-
recorded_at:
|
79
|
+
recorded_at: Fri, 14 Aug 2020 08:21:40 GMT
|
104
80
|
- request:
|
105
81
|
method: post
|
106
82
|
uri: https://api.chartmogul.com/v1/plans
|
107
83
|
body:
|
108
84
|
encoding: UTF-8
|
109
|
-
string: '{"data_source_uuid":"
|
110
|
-
Plan","interval_count":7,"interval_unit":"day","external_id":"test_cus_pl_ext_id"}'
|
85
|
+
string: '{"name":"Test Plan","interval_count":7,"interval_unit":"day","external_id":"test_cus_pl_ext_id","data_source_uuid":"ds_2db7bab6-de07-11ea-a4dd-7f82d51c3d05"}'
|
111
86
|
headers:
|
112
87
|
User-Agent:
|
113
|
-
- Faraday
|
88
|
+
- Faraday v1.0.1
|
114
89
|
Content-Type:
|
115
90
|
- application/json
|
116
91
|
Authorization:
|
117
|
-
- Basic
|
92
|
+
- Basic YjNjZTUxNTNkMDYyNmQwNjE3YWQ4OWQyMzQ2OTA1OTc6OGE0YTgyOTMwYTVhMjgzOTA3MDgwNGYzMTdmNTZjYjA=
|
118
93
|
response:
|
119
94
|
status:
|
120
95
|
code: 201
|
121
|
-
message:
|
96
|
+
message: Created
|
122
97
|
headers:
|
123
98
|
server:
|
124
|
-
- nginx/1.
|
99
|
+
- nginx/1.10.1
|
125
100
|
date:
|
126
|
-
-
|
101
|
+
- Fri, 14 Aug 2020 08:21:41 GMT
|
127
102
|
content-type:
|
128
103
|
- application/json; charset=utf-8
|
129
104
|
transfer-encoding:
|
130
105
|
- chunked
|
131
106
|
connection:
|
132
|
-
-
|
107
|
+
- keep-alive
|
108
|
+
status:
|
109
|
+
- 201 Created
|
133
110
|
x-frame-options:
|
134
111
|
- SAMEORIGIN
|
135
112
|
x-xss-protection:
|
136
113
|
- 1; mode=block
|
137
114
|
x-content-type-options:
|
138
115
|
- nosniff
|
116
|
+
x-download-options:
|
117
|
+
- noopen
|
118
|
+
x-permitted-cross-domain-policies:
|
119
|
+
- none
|
120
|
+
referrer-policy:
|
121
|
+
- strict-origin-when-cross-origin
|
139
122
|
etag:
|
140
|
-
- W/"
|
123
|
+
- W/"1d19bf324f0b6bf397ba8851cb55543c"
|
141
124
|
cache-control:
|
142
125
|
- max-age=0, private, must-revalidate
|
143
126
|
x-request-id:
|
144
|
-
-
|
127
|
+
- cbb7d1e3-f3a4-4ba2-b85c-7d3eed91922d
|
145
128
|
x-runtime:
|
146
|
-
- '0.
|
129
|
+
- '0.350185'
|
147
130
|
strict-transport-security:
|
148
131
|
- max-age=15768000
|
149
132
|
body:
|
150
133
|
encoding: UTF-8
|
151
|
-
string: '{"
|
152
|
-
Plan","interval_count":7,"interval_unit":"day","data_source_uuid":"ds_9fb17361-f24c-4c13-a25d-4c08fbc7132e"}'
|
134
|
+
string: '{"external_id":"test_cus_pl_ext_id","name":"Test Plan","interval_count":7,"interval_unit":"day","data_source_uuid":"ds_2db7bab6-de07-11ea-a4dd-7f82d51c3d05","uuid":"pl_2e010ebf-de07-11ea-a4dd-8bf0a8234993"}'
|
153
135
|
http_version:
|
154
|
-
recorded_at:
|
136
|
+
recorded_at: Fri, 14 Aug 2020 08:21:41 GMT
|
155
137
|
- request:
|
156
138
|
method: get
|
157
|
-
uri: https://api.chartmogul.com/v1/import/customers/
|
139
|
+
uri: https://api.chartmogul.com/v1/import/customers/cus_2e010ebe-de07-11ea-a4dd-ff06789b4dcf/invoices
|
158
140
|
body:
|
159
141
|
encoding: US-ASCII
|
160
142
|
string: ''
|
161
143
|
headers:
|
162
144
|
User-Agent:
|
163
|
-
- Faraday
|
145
|
+
- Faraday v1.0.1
|
164
146
|
Content-Type:
|
165
147
|
- application/json
|
166
148
|
Authorization:
|
167
|
-
- Basic
|
149
|
+
- Basic YjNjZTUxNTNkMDYyNmQwNjE3YWQ4OWQyMzQ2OTA1OTc6OGE0YTgyOTMwYTVhMjgzOTA3MDgwNGYzMTdmNTZjYjA=
|
168
150
|
response:
|
169
151
|
status:
|
170
152
|
code: 200
|
171
|
-
message:
|
153
|
+
message: OK
|
172
154
|
headers:
|
173
155
|
server:
|
174
|
-
- nginx/1.
|
156
|
+
- nginx/1.10.1
|
175
157
|
date:
|
176
|
-
-
|
158
|
+
- Fri, 14 Aug 2020 08:21:41 GMT
|
177
159
|
content-type:
|
178
160
|
- application/json; charset=utf-8
|
179
161
|
transfer-encoding:
|
180
162
|
- chunked
|
181
163
|
connection:
|
182
|
-
-
|
164
|
+
- keep-alive
|
165
|
+
vary:
|
166
|
+
- Accept-Encoding, Accept-Encoding
|
167
|
+
status:
|
168
|
+
- 200 OK
|
183
169
|
x-frame-options:
|
184
170
|
- SAMEORIGIN
|
185
171
|
x-xss-protection:
|
186
172
|
- 1; mode=block
|
187
173
|
x-content-type-options:
|
188
174
|
- nosniff
|
175
|
+
x-download-options:
|
176
|
+
- noopen
|
177
|
+
x-permitted-cross-domain-policies:
|
178
|
+
- none
|
179
|
+
referrer-policy:
|
180
|
+
- strict-origin-when-cross-origin
|
189
181
|
etag:
|
190
|
-
- W/"
|
182
|
+
- W/"aeef59b540af9e5982db384f237518a2"
|
191
183
|
cache-control:
|
192
184
|
- max-age=0, private, must-revalidate
|
193
185
|
x-request-id:
|
194
|
-
-
|
186
|
+
- 47e6129d-8195-4273-9c31-170905e27755
|
195
187
|
x-runtime:
|
196
|
-
- '0.
|
188
|
+
- '0.179805'
|
197
189
|
strict-transport-security:
|
198
190
|
- max-age=15768000
|
199
191
|
body:
|
200
|
-
encoding:
|
201
|
-
string: '{"customer_uuid":"
|
192
|
+
encoding: ASCII-8BIT
|
193
|
+
string: '{"customer_uuid":"cus_2e010ebe-de07-11ea-a4dd-ff06789b4dcf","invoices":[],"current_page":1,"total_pages":0}'
|
202
194
|
http_version:
|
203
|
-
recorded_at:
|
195
|
+
recorded_at: Fri, 14 Aug 2020 08:21:42 GMT
|
204
196
|
- request:
|
205
197
|
method: post
|
206
|
-
uri: https://api.chartmogul.com/v1/import/customers/
|
198
|
+
uri: https://api.chartmogul.com/v1/import/customers/cus_2e010ebe-de07-11ea-a4dd-ff06789b4dcf/invoices
|
207
199
|
body:
|
208
200
|
encoding: UTF-8
|
209
|
-
string: '{"invoices":[{"date":"2016-01-01 12:00:00
|
210
|
-
12:00:00
|
211
|
-
12:00:00
|
212
|
-
12:00:00
|
213
|
-
12:00:00
|
201
|
+
string: '{"invoices":[{"date":"2016-01-01 12:00:00 UTC","currency":"USD","line_items":[{"type":"subscription","subscription_external_id":"test_cus_sub_ext_id","service_period_start":"2016-01-01
|
202
|
+
12:00:00 UTC","service_period_end":"2016-02-01 12:00:00 UTC","amount_in_cents":1000,"cancelled_at":"2016-01-15
|
203
|
+
12:00:00 UTC","prorated":false,"quantity":5,"discount_amount_in_cents":1200,"discount_code":"DISCCODE","tax_amount_in_cents":200,"external_id":"test_cus_li_ext_id","plan_uuid":"pl_2e010ebf-de07-11ea-a4dd-8bf0a8234993"}],"transactions":[{"type":"payment","date":"2016-01-01
|
204
|
+
12:00:00 UTC","result":"successful","external_id":"test_cus_tr_ext_id"}],"external_id":"test_cus_inv_ext_id","customer_external_id":"test_cus_ext_id","due_date":"2016-01-07
|
205
|
+
12:00:00 UTC"}],"customer_uuid":"cus_2e010ebe-de07-11ea-a4dd-ff06789b4dcf"}'
|
214
206
|
headers:
|
215
207
|
User-Agent:
|
216
|
-
- Faraday
|
208
|
+
- Faraday v1.0.1
|
217
209
|
Content-Type:
|
218
210
|
- application/json
|
219
211
|
Authorization:
|
220
|
-
- Basic
|
212
|
+
- Basic YjNjZTUxNTNkMDYyNmQwNjE3YWQ4OWQyMzQ2OTA1OTc6OGE0YTgyOTMwYTVhMjgzOTA3MDgwNGYzMTdmNTZjYjA=
|
221
213
|
response:
|
222
214
|
status:
|
223
215
|
code: 201
|
224
|
-
message:
|
216
|
+
message: Created
|
225
217
|
headers:
|
226
218
|
server:
|
227
|
-
- nginx/1.
|
219
|
+
- nginx/1.10.1
|
228
220
|
date:
|
229
|
-
-
|
221
|
+
- Fri, 14 Aug 2020 08:21:43 GMT
|
230
222
|
content-type:
|
231
223
|
- application/json; charset=utf-8
|
232
224
|
transfer-encoding:
|
233
225
|
- chunked
|
234
226
|
connection:
|
235
|
-
-
|
227
|
+
- keep-alive
|
228
|
+
status:
|
229
|
+
- 201 Created
|
236
230
|
x-frame-options:
|
237
231
|
- SAMEORIGIN
|
238
232
|
x-xss-protection:
|
239
233
|
- 1; mode=block
|
240
234
|
x-content-type-options:
|
241
235
|
- nosniff
|
236
|
+
x-download-options:
|
237
|
+
- noopen
|
238
|
+
x-permitted-cross-domain-policies:
|
239
|
+
- none
|
240
|
+
referrer-policy:
|
241
|
+
- strict-origin-when-cross-origin
|
242
242
|
etag:
|
243
|
-
- W/"
|
243
|
+
- W/"2f2be4d16bccef7180e8df0515ebfd2f"
|
244
244
|
cache-control:
|
245
245
|
- max-age=0, private, must-revalidate
|
246
246
|
x-request-id:
|
247
|
-
-
|
247
|
+
- ccdcc2fb-0a04-4307-94c8-f8482ec6bd09
|
248
248
|
x-runtime:
|
249
|
-
- '
|
249
|
+
- '1.437992'
|
250
250
|
strict-transport-security:
|
251
251
|
- max-age=15768000
|
252
252
|
body:
|
253
253
|
encoding: UTF-8
|
254
|
-
string: '{"invoices":[{"uuid":"
|
254
|
+
string: '{"invoices":[{"uuid":"inv_deb98a20-3e71-49df-a49a-ac9d29c004be","date":"2016-01-01T12:00:00.000Z","due_date":"2016-01-07T12:00:00.000Z","external_id":"test_cus_inv_ext_id","currency":"USD","line_items":[{"uuid":"li_ffa7fad8-c393-45d2-aec4-2a869ece67c5","external_id":"test_cus_li_ext_id","type":"subscription","subscription_uuid":"sub_f3fa6a4e-8fc8-4843-95f2-062bc17826c6","subscription_external_id":"test_cus_sub_ext_id","prorated":false,"service_period_start":"2016-01-01T12:00:00.000Z","service_period_end":"2016-02-01T12:00:00.000Z","plan_uuid":"pl_2e010ebf-de07-11ea-a4dd-8bf0a8234993","amount_in_cents":1000,"quantity":5,"discount_code":"DISCCODE","discount_amount_in_cents":1200,"tax_amount_in_cents":200,"transaction_fees_in_cents":0,"account_code":""}],"transactions":[{"uuid":"tr_ff121f19-ef39-4bc8-824e-225d1b33e5da","external_id":"test_cus_tr_ext_id","type":"payment","date":"2016-01-01T12:00:00.000Z","result":"successful"}]}]}'
|
255
255
|
http_version:
|
256
|
-
recorded_at:
|
256
|
+
recorded_at: Fri, 14 Aug 2020 08:21:43 GMT
|
257
257
|
- request:
|
258
258
|
method: delete
|
259
|
-
uri: https://api.chartmogul.com/v1/data_sources/
|
259
|
+
uri: https://api.chartmogul.com/v1/data_sources/ds_2db7bab6-de07-11ea-a4dd-7f82d51c3d05/customers/cus_2e010ebe-de07-11ea-a4dd-ff06789b4dcf/invoices
|
260
260
|
body:
|
261
261
|
encoding: US-ASCII
|
262
262
|
string: ''
|
263
263
|
headers:
|
264
264
|
User-Agent:
|
265
|
-
- Faraday
|
265
|
+
- Faraday v1.0.1
|
266
266
|
Authorization:
|
267
|
-
- Basic
|
267
|
+
- Basic YjNjZTUxNTNkMDYyNmQwNjE3YWQ4OWQyMzQ2OTA1OTc6OGE0YTgyOTMwYTVhMjgzOTA3MDgwNGYzMTdmNTZjYjA=
|
268
268
|
response:
|
269
269
|
status:
|
270
270
|
code: 204
|
271
|
-
message:
|
271
|
+
message: No Content
|
272
272
|
headers:
|
273
273
|
server:
|
274
|
-
- nginx/1.
|
274
|
+
- nginx/1.10.1
|
275
275
|
date:
|
276
|
-
-
|
276
|
+
- Fri, 14 Aug 2020 08:21:44 GMT
|
277
277
|
connection:
|
278
|
-
-
|
278
|
+
- keep-alive
|
279
|
+
status:
|
280
|
+
- 204 No Content
|
279
281
|
x-frame-options:
|
280
282
|
- SAMEORIGIN
|
281
283
|
x-xss-protection:
|
282
284
|
- 1; mode=block
|
283
285
|
x-content-type-options:
|
284
286
|
- nosniff
|
287
|
+
x-download-options:
|
288
|
+
- noopen
|
289
|
+
x-permitted-cross-domain-policies:
|
290
|
+
- none
|
291
|
+
referrer-policy:
|
292
|
+
- strict-origin-when-cross-origin
|
285
293
|
cache-control:
|
286
294
|
- no-cache
|
287
295
|
x-request-id:
|
288
|
-
-
|
296
|
+
- c03bcf86-5a42-4655-b015-76ffc653ec91
|
289
297
|
x-runtime:
|
290
|
-
- '0.
|
298
|
+
- '0.353793'
|
291
299
|
strict-transport-security:
|
292
300
|
- max-age=15768000
|
293
301
|
body:
|
294
302
|
encoding: UTF-8
|
295
303
|
string: ''
|
296
304
|
http_version:
|
297
|
-
recorded_at:
|
298
|
-
|
305
|
+
recorded_at: Fri, 14 Aug 2020 08:21:44 GMT
|
306
|
+
- request:
|
307
|
+
method: delete
|
308
|
+
uri: https://api.chartmogul.com/v1/data_sources/ds_2db7bab6-de07-11ea-a4dd-7f82d51c3d05
|
309
|
+
body:
|
310
|
+
encoding: US-ASCII
|
311
|
+
string: ''
|
312
|
+
headers:
|
313
|
+
User-Agent:
|
314
|
+
- Faraday v1.0.1
|
315
|
+
Authorization:
|
316
|
+
- Basic YjNjZTUxNTNkMDYyNmQwNjE3YWQ4OWQyMzQ2OTA1OTc6OGE0YTgyOTMwYTVhMjgzOTA3MDgwNGYzMTdmNTZjYjA=
|
317
|
+
response:
|
318
|
+
status:
|
319
|
+
code: 204
|
320
|
+
message: No Content
|
321
|
+
headers:
|
322
|
+
server:
|
323
|
+
- nginx/1.10.1
|
324
|
+
date:
|
325
|
+
- Fri, 14 Aug 2020 08:21:44 GMT
|
326
|
+
connection:
|
327
|
+
- keep-alive
|
328
|
+
status:
|
329
|
+
- 204 No Content
|
330
|
+
access-control-allow-credentials:
|
331
|
+
- 'true'
|
332
|
+
body:
|
333
|
+
encoding: UTF-8
|
334
|
+
string: ''
|
335
|
+
http_version:
|
336
|
+
recorded_at: Fri, 14 Aug 2020 08:21:44 GMT
|
337
|
+
recorded_with: VCR 5.1.0
|