chartmogul-ruby 0.1.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 +7 -0
- data/.gitignore +9 -0
- data/.rspec +2 -0
- data/.travis.yml +4 -0
- data/ChartMogul_Metrics_MRRChurnRate/behaves_like_Metrics_API_resource/behaves_like_Summary/should_have_summary.yml +40 -0
- data/ChartMogul_Metrics_MRRChurnRate/behaves_like_Metrics_API_resource/should_have_entries.yml +40 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +21 -0
- data/README.md +82 -0
- data/Rakefile +6 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/changelog.md +8 -0
- data/chartmogul-ruby.gemspec +29 -0
- data/fixtures/vcr_cassettes/ChartMogul_DataSource/API_Interactions/correctly_interracts_with_the_API.yml +189 -0
- data/fixtures/vcr_cassettes/ChartMogul_DataSource/API_Interactions/correctly_raises_errors_on_404.yml +46 -0
- data/fixtures/vcr_cassettes/ChartMogul_DataSource/API_Interactions/correctly_raises_errors_on_422.yml +48 -0
- data/fixtures/vcr_cassettes/ChartMogul_Enrichment_Customer/API_Interactions/adds_custom_attributes.yml +80 -0
- data/fixtures/vcr_cassettes/ChartMogul_Enrichment_Customer/API_Interactions/adds_required_tags.yml +79 -0
- data/fixtures/vcr_cassettes/ChartMogul_Enrichment_Customer/API_Interactions/raises_404_if_no_customers_found.yml +38 -0
- data/fixtures/vcr_cassettes/ChartMogul_Enrichment_Customer/API_Interactions/removes_custom_attributes.yml +80 -0
- data/fixtures/vcr_cassettes/ChartMogul_Enrichment_Customer/API_Interactions/removes_tags.yml +80 -0
- data/fixtures/vcr_cassettes/ChartMogul_Enrichment_Customer/API_Interactions/returns_all_customers_through_list_all_endpoint.yml +47 -0
- data/fixtures/vcr_cassettes/ChartMogul_Enrichment_Customer/API_Interactions/returns_customer_through_retrieve_endpoint.yml +42 -0
- data/fixtures/vcr_cassettes/ChartMogul_Enrichment_Customer/API_Interactions/returns_right_customers_through_search_endpoint.yml +43 -0
- data/fixtures/vcr_cassettes/ChartMogul_Enrichment_Customer/API_Interactions/updates_custom_attributes.yml +82 -0
- data/fixtures/vcr_cassettes/ChartMogul_Import_Customer/API_Interactions/correctly_handles_a_422_response.yml +50 -0
- data/fixtures/vcr_cassettes/ChartMogul_Import_Customer/API_Interactions/correctly_interracts_with_the_API.yml +240 -0
- data/fixtures/vcr_cassettes/ChartMogul_Import_CustomerInvoices/API_Interactions/correctly_interracts_with_the_API.yml +298 -0
- data/fixtures/vcr_cassettes/ChartMogul_Import_DataSource/API_Interactions/correctly_interracts_with_the_API.yml +189 -0
- data/fixtures/vcr_cassettes/ChartMogul_Import_DataSource/API_Interactions/correctly_raises_errors_on_404.yml +46 -0
- data/fixtures/vcr_cassettes/ChartMogul_Import_DataSource/API_Interactions/correctly_raises_errors_on_422.yml +48 -0
- data/fixtures/vcr_cassettes/ChartMogul_Import_Plan/API_Interractions/correctly_handles_a_422_error.yml +51 -0
- data/fixtures/vcr_cassettes/ChartMogul_Import_Plan/API_Interractions/correctly_interracts_with_the_API.yml +152 -0
- data/fixtures/vcr_cassettes/ChartMogul_Import_Subscription/API_Interactions/correctly_interracts_with_the_API.yml +340 -0
- data/fixtures/vcr_cassettes/ChartMogul_Import_Transactions_Payment/API_Interactions/correctly_interracts_with_the_API.yml +243 -0
- data/fixtures/vcr_cassettes/ChartMogul_Metrics_ARPA/behaves_like_Metrics_API_resource/behaves_like_Summary/should_have_summary.yml +42 -0
- data/fixtures/vcr_cassettes/ChartMogul_Metrics_ARPA/behaves_like_Metrics_API_resource/should_have_entries.yml +42 -0
- data/fixtures/vcr_cassettes/ChartMogul_Metrics_ARR/behaves_like_Metrics_API_resource/behaves_like_Summary/should_have_summary.yml +42 -0
- data/fixtures/vcr_cassettes/ChartMogul_Metrics_ARR/behaves_like_Metrics_API_resource/should_have_entries.yml +42 -0
- data/fixtures/vcr_cassettes/ChartMogul_Metrics_ASP/behaves_like_Metrics_API_resource/behaves_like_Summary/should_have_summary.yml +40 -0
- data/fixtures/vcr_cassettes/ChartMogul_Metrics_ASP/behaves_like_Metrics_API_resource/should_have_entries.yml +40 -0
- data/fixtures/vcr_cassettes/ChartMogul_Metrics_Activity/behaves_like_Pageable/should_be_pageable.yml +41 -0
- data/fixtures/vcr_cassettes/ChartMogul_Metrics_Activity/should_have_Activity_entries.yml +41 -0
- data/fixtures/vcr_cassettes/ChartMogul_Metrics_AllKeyMetric/should_have_entries.yml +42 -0
- data/fixtures/vcr_cassettes/ChartMogul_Metrics_CustomerChurnRate/behaves_like_Metrics_API_resource/behaves_like_Summary/should_have_summary.yml +40 -0
- data/fixtures/vcr_cassettes/ChartMogul_Metrics_CustomerChurnRate/behaves_like_Metrics_API_resource/should_have_entries.yml +40 -0
- data/fixtures/vcr_cassettes/ChartMogul_Metrics_CustomerCount/behaves_like_Metrics_API_resource/behaves_like_Summary/should_have_summary.yml +42 -0
- data/fixtures/vcr_cassettes/ChartMogul_Metrics_CustomerCount/behaves_like_Metrics_API_resource/should_have_entries.yml +42 -0
- data/fixtures/vcr_cassettes/ChartMogul_Metrics_LTV/behaves_like_Metrics_API_resource/behaves_like_Summary/should_have_summary.yml +40 -0
- data/fixtures/vcr_cassettes/ChartMogul_Metrics_LTV/behaves_like_Metrics_API_resource/should_have_entries.yml +40 -0
- data/fixtures/vcr_cassettes/ChartMogul_Metrics_MRR/behaves_like_Summary/should_have_summary.yml +42 -0
- data/fixtures/vcr_cassettes/ChartMogul_Metrics_MRR/should_have_entries.yml +42 -0
- data/fixtures/vcr_cassettes/ChartMogul_Metrics_MRRChurnRate/behaves_like_Metrics_API_resource/behaves_like_Summary/should_have_summary.yml +40 -0
- data/fixtures/vcr_cassettes/ChartMogul_Metrics_MRRChurnRate/behaves_like_Metrics_API_resource/should_have_entries.yml +40 -0
- data/fixtures/vcr_cassettes/ChartMogul_Metrics_Subscription/behaves_like_Pageable/should_be_pageable.yml +40 -0
- data/fixtures/vcr_cassettes/ChartMogul_Metrics_Subscription/should_have_Subscription_entries.yml +40 -0
- data/lib/chartmogul.rb +77 -0
- data/lib/chartmogul/api/actions/all.rb +28 -0
- data/lib/chartmogul/api/actions/create.rb +39 -0
- data/lib/chartmogul/api/actions/custom.rb +42 -0
- data/lib/chartmogul/api/actions/destroy.rb +14 -0
- data/lib/chartmogul/api/actions/update.rb +19 -0
- data/lib/chartmogul/api_resource.rb +57 -0
- data/lib/chartmogul/concerns/entries.rb +37 -0
- data/lib/chartmogul/concerns/pageable.rb +14 -0
- data/lib/chartmogul/concerns/summary.rb +20 -0
- data/lib/chartmogul/config_attributes.rb +15 -0
- data/lib/chartmogul/configuration.rb +6 -0
- data/lib/chartmogul/enrichment/customer.rb +114 -0
- data/lib/chartmogul/errors/chartmogul_error.rb +19 -0
- data/lib/chartmogul/errors/configuration_error.rb +4 -0
- data/lib/chartmogul/errors/forbidden_error.rb +4 -0
- data/lib/chartmogul/errors/not_found_error.rb +4 -0
- data/lib/chartmogul/errors/resource_invalid_error.rb +4 -0
- data/lib/chartmogul/errors/schema_invalid_error.rb +4 -0
- data/lib/chartmogul/import/customer.rb +38 -0
- data/lib/chartmogul/import/customer_invoices.rb +40 -0
- data/lib/chartmogul/import/data_source.rb +19 -0
- data/lib/chartmogul/import/invoice.rb +64 -0
- data/lib/chartmogul/import/line_items/one_time.rb +25 -0
- data/lib/chartmogul/import/line_items/subscription.rb +31 -0
- data/lib/chartmogul/import/plan.rb +21 -0
- data/lib/chartmogul/import/subscription.rb +30 -0
- data/lib/chartmogul/import/transactions/payment.rb +26 -0
- data/lib/chartmogul/import/transactions/refund.rb +26 -0
- data/lib/chartmogul/metrics/activity.rb +32 -0
- data/lib/chartmogul/metrics/all_key_metrics.rb +25 -0
- data/lib/chartmogul/metrics/arpa.rb +19 -0
- data/lib/chartmogul/metrics/arr.rb +19 -0
- data/lib/chartmogul/metrics/asp.rb +19 -0
- data/lib/chartmogul/metrics/base.rb +56 -0
- data/lib/chartmogul/metrics/customer_churn_rate.rb +19 -0
- data/lib/chartmogul/metrics/customer_count.rb +19 -0
- data/lib/chartmogul/metrics/ltv.rb +19 -0
- data/lib/chartmogul/metrics/mrr.rb +26 -0
- data/lib/chartmogul/metrics/mrr_churn_rate.rb +19 -0
- data/lib/chartmogul/metrics/subscription.rb +35 -0
- data/lib/chartmogul/object.rb +119 -0
- data/lib/chartmogul/resource_path.rb +42 -0
- data/lib/chartmogul/summary.rb +7 -0
- data/lib/chartmogul/utils/hash_snake_caser.rb +50 -0
- data/lib/chartmogul/utils/json_parser.rb +11 -0
- data/lib/chartmogul/version.rb +3 -0
- metadata +232 -0
|
@@ -0,0 +1,298 @@
|
|
|
1
|
+
---
|
|
2
|
+
http_interactions:
|
|
3
|
+
- request:
|
|
4
|
+
method: post
|
|
5
|
+
uri: https://api.chartmogul.com/v1/import/data_sources
|
|
6
|
+
body:
|
|
7
|
+
encoding: UTF-8
|
|
8
|
+
string: '{"name":"Customer Invoices Test Data Source"}'
|
|
9
|
+
headers:
|
|
10
|
+
User-Agent:
|
|
11
|
+
- Faraday v0.9.2
|
|
12
|
+
Content-Type:
|
|
13
|
+
- application/json
|
|
14
|
+
Authorization:
|
|
15
|
+
- Basic YmIzN2I0Njk5NjNlMjhlYjY2MjA1ZWYzZmU1MWQ1NmM6ZmM1YjQxYzM3YTNlZTcwYjQyN2UwYzU1ODg2NzA2ZmQ=
|
|
16
|
+
response:
|
|
17
|
+
status:
|
|
18
|
+
code: 201
|
|
19
|
+
message:
|
|
20
|
+
headers:
|
|
21
|
+
server:
|
|
22
|
+
- nginx/1.9.10
|
|
23
|
+
date:
|
|
24
|
+
- Wed, 22 Jun 2016 15:34:41 GMT
|
|
25
|
+
content-type:
|
|
26
|
+
- application/json; charset=utf-8
|
|
27
|
+
transfer-encoding:
|
|
28
|
+
- chunked
|
|
29
|
+
connection:
|
|
30
|
+
- close
|
|
31
|
+
x-frame-options:
|
|
32
|
+
- SAMEORIGIN
|
|
33
|
+
x-xss-protection:
|
|
34
|
+
- 1; mode=block
|
|
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
|
|
47
|
+
body:
|
|
48
|
+
encoding: UTF-8
|
|
49
|
+
string: '{"uuid":"ds_9fb17361-f24c-4c13-a25d-4c08fbc7132e","name":"Customer
|
|
50
|
+
Invoices Test Data Source","created_at":"2016-06-22T15:34:41.041Z","status":"never_imported"}'
|
|
51
|
+
http_version:
|
|
52
|
+
recorded_at: Wed, 22 Jun 2016 15:34:41 GMT
|
|
53
|
+
- request:
|
|
54
|
+
method: post
|
|
55
|
+
uri: https://api.chartmogul.com/v1/import/customers
|
|
56
|
+
body:
|
|
57
|
+
encoding: UTF-8
|
|
58
|
+
string: '{"data_source_uuid":"ds_9fb17361-f24c-4c13-a25d-4c08fbc7132e","external_id":"test_cus_ext_id","name":"Test
|
|
59
|
+
Customer","email":"test@customer.com","company":null,"country":"DE","state":null,"city":"Berlin","zip":null}'
|
|
60
|
+
headers:
|
|
61
|
+
User-Agent:
|
|
62
|
+
- Faraday v0.9.2
|
|
63
|
+
Content-Type:
|
|
64
|
+
- application/json
|
|
65
|
+
Authorization:
|
|
66
|
+
- Basic YmIzN2I0Njk5NjNlMjhlYjY2MjA1ZWYzZmU1MWQ1NmM6ZmM1YjQxYzM3YTNlZTcwYjQyN2UwYzU1ODg2NzA2ZmQ=
|
|
67
|
+
response:
|
|
68
|
+
status:
|
|
69
|
+
code: 201
|
|
70
|
+
message:
|
|
71
|
+
headers:
|
|
72
|
+
server:
|
|
73
|
+
- nginx/1.9.10
|
|
74
|
+
date:
|
|
75
|
+
- Wed, 22 Jun 2016 15:34:41 GMT
|
|
76
|
+
content-type:
|
|
77
|
+
- application/json; charset=utf-8
|
|
78
|
+
transfer-encoding:
|
|
79
|
+
- chunked
|
|
80
|
+
connection:
|
|
81
|
+
- close
|
|
82
|
+
x-frame-options:
|
|
83
|
+
- SAMEORIGIN
|
|
84
|
+
x-xss-protection:
|
|
85
|
+
- 1; mode=block
|
|
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
|
|
98
|
+
body:
|
|
99
|
+
encoding: UTF-8
|
|
100
|
+
string: '{"uuid":"cus_5417b49e-7ea8-474a-b6bc-5bbb406c15c0","external_id":"test_cus_ext_id","name":"Test
|
|
101
|
+
Customer","company":"","email":"test@customer.com","city":"Berlin","state":"","country":"DE","zip":"","data_source_uuid":"ds_9fb17361-f24c-4c13-a25d-4c08fbc7132e"}'
|
|
102
|
+
http_version:
|
|
103
|
+
recorded_at: Wed, 22 Jun 2016 15:34:41 GMT
|
|
104
|
+
- request:
|
|
105
|
+
method: post
|
|
106
|
+
uri: https://api.chartmogul.com/v1/import/plans
|
|
107
|
+
body:
|
|
108
|
+
encoding: UTF-8
|
|
109
|
+
string: '{"data_source_uuid":"ds_9fb17361-f24c-4c13-a25d-4c08fbc7132e","name":"Test
|
|
110
|
+
Plan","interval_count":7,"interval_unit":"day","external_id":"test_cus_pl_ext_id"}'
|
|
111
|
+
headers:
|
|
112
|
+
User-Agent:
|
|
113
|
+
- Faraday v0.9.2
|
|
114
|
+
Content-Type:
|
|
115
|
+
- application/json
|
|
116
|
+
Authorization:
|
|
117
|
+
- Basic YmIzN2I0Njk5NjNlMjhlYjY2MjA1ZWYzZmU1MWQ1NmM6ZmM1YjQxYzM3YTNlZTcwYjQyN2UwYzU1ODg2NzA2ZmQ=
|
|
118
|
+
response:
|
|
119
|
+
status:
|
|
120
|
+
code: 201
|
|
121
|
+
message:
|
|
122
|
+
headers:
|
|
123
|
+
server:
|
|
124
|
+
- nginx/1.9.10
|
|
125
|
+
date:
|
|
126
|
+
- Wed, 22 Jun 2016 15:34:41 GMT
|
|
127
|
+
content-type:
|
|
128
|
+
- application/json; charset=utf-8
|
|
129
|
+
transfer-encoding:
|
|
130
|
+
- chunked
|
|
131
|
+
connection:
|
|
132
|
+
- close
|
|
133
|
+
x-frame-options:
|
|
134
|
+
- SAMEORIGIN
|
|
135
|
+
x-xss-protection:
|
|
136
|
+
- 1; mode=block
|
|
137
|
+
x-content-type-options:
|
|
138
|
+
- nosniff
|
|
139
|
+
etag:
|
|
140
|
+
- W/"e804690c42c3d5f3d9301ff57fe9e918"
|
|
141
|
+
cache-control:
|
|
142
|
+
- max-age=0, private, must-revalidate
|
|
143
|
+
x-request-id:
|
|
144
|
+
- 9473bcf9-6970-4be8-a418-d2ae2988fa0c
|
|
145
|
+
x-runtime:
|
|
146
|
+
- '0.050208'
|
|
147
|
+
strict-transport-security:
|
|
148
|
+
- max-age=15768000
|
|
149
|
+
body:
|
|
150
|
+
encoding: UTF-8
|
|
151
|
+
string: '{"uuid":"pl_209e4674-1258-4a35-8378-9b15c4086965","external_id":"test_cus_pl_ext_id","name":"Test
|
|
152
|
+
Plan","interval_count":7,"interval_unit":"day","data_source_uuid":"ds_9fb17361-f24c-4c13-a25d-4c08fbc7132e"}'
|
|
153
|
+
http_version:
|
|
154
|
+
recorded_at: Wed, 22 Jun 2016 15:34:41 GMT
|
|
155
|
+
- request:
|
|
156
|
+
method: get
|
|
157
|
+
uri: https://api.chartmogul.com/v1/import/customers/cus_5417b49e-7ea8-474a-b6bc-5bbb406c15c0/invoices
|
|
158
|
+
body:
|
|
159
|
+
encoding: US-ASCII
|
|
160
|
+
string: ''
|
|
161
|
+
headers:
|
|
162
|
+
User-Agent:
|
|
163
|
+
- Faraday v0.9.2
|
|
164
|
+
Content-Type:
|
|
165
|
+
- application/json
|
|
166
|
+
Authorization:
|
|
167
|
+
- Basic YmIzN2I0Njk5NjNlMjhlYjY2MjA1ZWYzZmU1MWQ1NmM6ZmM1YjQxYzM3YTNlZTcwYjQyN2UwYzU1ODg2NzA2ZmQ=
|
|
168
|
+
response:
|
|
169
|
+
status:
|
|
170
|
+
code: 200
|
|
171
|
+
message:
|
|
172
|
+
headers:
|
|
173
|
+
server:
|
|
174
|
+
- nginx/1.9.10
|
|
175
|
+
date:
|
|
176
|
+
- Wed, 22 Jun 2016 16:08:43 GMT
|
|
177
|
+
content-type:
|
|
178
|
+
- application/json; charset=utf-8
|
|
179
|
+
transfer-encoding:
|
|
180
|
+
- chunked
|
|
181
|
+
connection:
|
|
182
|
+
- close
|
|
183
|
+
x-frame-options:
|
|
184
|
+
- SAMEORIGIN
|
|
185
|
+
x-xss-protection:
|
|
186
|
+
- 1; mode=block
|
|
187
|
+
x-content-type-options:
|
|
188
|
+
- nosniff
|
|
189
|
+
etag:
|
|
190
|
+
- W/"cbb072e75866df2cb9be8bbdbd44920e"
|
|
191
|
+
cache-control:
|
|
192
|
+
- max-age=0, private, must-revalidate
|
|
193
|
+
x-request-id:
|
|
194
|
+
- 9d42e2ff-4066-4a90-99b4-b0999bdfeac6
|
|
195
|
+
x-runtime:
|
|
196
|
+
- '0.157408'
|
|
197
|
+
strict-transport-security:
|
|
198
|
+
- max-age=15768000
|
|
199
|
+
body:
|
|
200
|
+
encoding: UTF-8
|
|
201
|
+
string: '{"customer_uuid":"cus_5417b49e-7ea8-474a-b6bc-5bbb406c15c0","invoices":[],"current_page":1,"total_pages":0}'
|
|
202
|
+
http_version:
|
|
203
|
+
recorded_at: Wed, 22 Jun 2016 16:08:43 GMT
|
|
204
|
+
- request:
|
|
205
|
+
method: post
|
|
206
|
+
uri: https://api.chartmogul.com/v1/import/customers/cus_5417b49e-7ea8-474a-b6bc-5bbb406c15c0/invoices
|
|
207
|
+
body:
|
|
208
|
+
encoding: UTF-8
|
|
209
|
+
string: '{"invoices":[{"date":"2016-01-01 12:00:00 +0000","currency":"USD","line_items":[{"type":"subscription","subscription_external_id":"test_cus_sub_ext_id","plan_uuid":"pl_209e4674-1258-4a35-8378-9b15c4086965","service_period_start":"2016-01-01
|
|
210
|
+
12:00:00 +0000","service_period_end":"2016-02-01 12:00:00 +0000","amount_in_cents":1000,"cancelled_at":"2016-01-15
|
|
211
|
+
12:00:00 +0000","prorated":false,"quantity":5,"discount_amount_in_cents":1200,"discount_code":"DISCCODE","tax_amount_in_cents":200,"external_id":"test_cus_li_ext_id"}],"transactions":[{"type":"payment","date":"2016-01-01
|
|
212
|
+
12:00:00 +0000","result":"successful","external_id":"test_cus_tr_ext_id"}],"external_id":"test_cus_inv_ext_id","due_date":"2016-01-07
|
|
213
|
+
12:00:00 +0000"}],"customer_uuid":"cus_5417b49e-7ea8-474a-b6bc-5bbb406c15c0"}'
|
|
214
|
+
headers:
|
|
215
|
+
User-Agent:
|
|
216
|
+
- Faraday v0.9.2
|
|
217
|
+
Content-Type:
|
|
218
|
+
- application/json
|
|
219
|
+
Authorization:
|
|
220
|
+
- Basic YmIzN2I0Njk5NjNlMjhlYjY2MjA1ZWYzZmU1MWQ1NmM6ZmM1YjQxYzM3YTNlZTcwYjQyN2UwYzU1ODg2NzA2ZmQ=
|
|
221
|
+
response:
|
|
222
|
+
status:
|
|
223
|
+
code: 201
|
|
224
|
+
message:
|
|
225
|
+
headers:
|
|
226
|
+
server:
|
|
227
|
+
- nginx/1.9.10
|
|
228
|
+
date:
|
|
229
|
+
- Wed, 22 Jun 2016 16:08:43 GMT
|
|
230
|
+
content-type:
|
|
231
|
+
- application/json; charset=utf-8
|
|
232
|
+
transfer-encoding:
|
|
233
|
+
- chunked
|
|
234
|
+
connection:
|
|
235
|
+
- close
|
|
236
|
+
x-frame-options:
|
|
237
|
+
- SAMEORIGIN
|
|
238
|
+
x-xss-protection:
|
|
239
|
+
- 1; mode=block
|
|
240
|
+
x-content-type-options:
|
|
241
|
+
- nosniff
|
|
242
|
+
etag:
|
|
243
|
+
- W/"95e16111eb07645d2ab5af2f762cc1a7"
|
|
244
|
+
cache-control:
|
|
245
|
+
- max-age=0, private, must-revalidate
|
|
246
|
+
x-request-id:
|
|
247
|
+
- fcadbbb4-8984-4938-97b3-151a3efae3ce
|
|
248
|
+
x-runtime:
|
|
249
|
+
- '0.182908'
|
|
250
|
+
strict-transport-security:
|
|
251
|
+
- max-age=15768000
|
|
252
|
+
body:
|
|
253
|
+
encoding: UTF-8
|
|
254
|
+
string: '{"invoices":[{"uuid":"inv_a11675b0-f4cb-4d2b-8b38-492626ac373e","external_id":"test_cus_inv_ext_id","date":"2016-01-01T12:00:00.000Z","due_date":"2016-01-07T12:00:00.000Z","currency":"USD","line_items":[{"uuid":"li_6dc1a6bd-877d-4802-a595-4b0f5943bdfa","external_id":"test_cus_li_ext_id","type":"subscription","subscription_uuid":"sub_b39173f6-cd13-4c06-b6e6-0c659867439f","plan_uuid":"pl_209e4674-1258-4a35-8378-9b15c4086965","prorated":false,"service_period_start":"2016-01-01T12:00:00.000Z","service_period_end":"2016-02-01T12:00:00.000Z","amount_in_cents":1000,"quantity":5,"discount_code":"DISCCODE","discount_amount_in_cents":1200,"tax_amount_in_cents":200}],"transactions":[{"uuid":"tr_829db91c-8b46-48ac-805d-09d29afe64c2","external_id":"test_cus_tr_ext_id","type":"payment","date":"2016-01-01T12:00:00.000Z","result":"successful"}]}]}'
|
|
255
|
+
http_version:
|
|
256
|
+
recorded_at: Wed, 22 Jun 2016 16:08:43 GMT
|
|
257
|
+
- request:
|
|
258
|
+
method: delete
|
|
259
|
+
uri: https://api.chartmogul.com/v1/import/data_sources/ds_9fb17361-f24c-4c13-a25d-4c08fbc7132e
|
|
260
|
+
body:
|
|
261
|
+
encoding: US-ASCII
|
|
262
|
+
string: ''
|
|
263
|
+
headers:
|
|
264
|
+
User-Agent:
|
|
265
|
+
- Faraday v0.9.2
|
|
266
|
+
Authorization:
|
|
267
|
+
- Basic YmIzN2I0Njk5NjNlMjhlYjY2MjA1ZWYzZmU1MWQ1NmM6ZmM1YjQxYzM3YTNlZTcwYjQyN2UwYzU1ODg2NzA2ZmQ=
|
|
268
|
+
response:
|
|
269
|
+
status:
|
|
270
|
+
code: 204
|
|
271
|
+
message:
|
|
272
|
+
headers:
|
|
273
|
+
server:
|
|
274
|
+
- nginx/1.9.10
|
|
275
|
+
date:
|
|
276
|
+
- Wed, 22 Jun 2016 16:08:43 GMT
|
|
277
|
+
connection:
|
|
278
|
+
- close
|
|
279
|
+
x-frame-options:
|
|
280
|
+
- SAMEORIGIN
|
|
281
|
+
x-xss-protection:
|
|
282
|
+
- 1; mode=block
|
|
283
|
+
x-content-type-options:
|
|
284
|
+
- nosniff
|
|
285
|
+
cache-control:
|
|
286
|
+
- no-cache
|
|
287
|
+
x-request-id:
|
|
288
|
+
- 5f2bcbf4-0c81-435f-b168-49a245d4e2c9
|
|
289
|
+
x-runtime:
|
|
290
|
+
- '0.018236'
|
|
291
|
+
strict-transport-security:
|
|
292
|
+
- max-age=15768000
|
|
293
|
+
body:
|
|
294
|
+
encoding: UTF-8
|
|
295
|
+
string: ''
|
|
296
|
+
http_version:
|
|
297
|
+
recorded_at: Wed, 22 Jun 2016 16:08:43 GMT
|
|
298
|
+
recorded_with: VCR 3.0.3
|
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
---
|
|
2
|
+
http_interactions:
|
|
3
|
+
- request:
|
|
4
|
+
method: post
|
|
5
|
+
uri: https://api.chartmogul.com/v1/import/data_sources
|
|
6
|
+
body:
|
|
7
|
+
encoding: UTF-8
|
|
8
|
+
string: '{"name":"Test Data Source"}'
|
|
9
|
+
headers:
|
|
10
|
+
User-Agent:
|
|
11
|
+
- Faraday v0.9.1
|
|
12
|
+
Content-Type:
|
|
13
|
+
- application/json
|
|
14
|
+
Authorization:
|
|
15
|
+
- Basic ZTk5MGJkMjNmNTQzYWNjZGY3ZDg4Yjk2OWNiMzAwOWI6NWM4YThlY2UxMTFmYmE4NTE1MGVmNzBjYmZmM2I3ZWI=
|
|
16
|
+
response:
|
|
17
|
+
status:
|
|
18
|
+
code: 201
|
|
19
|
+
message:
|
|
20
|
+
headers:
|
|
21
|
+
server:
|
|
22
|
+
- nginx/1.9.10
|
|
23
|
+
date:
|
|
24
|
+
- Sun, 05 Jun 2016 18:52:01 GMT
|
|
25
|
+
content-type:
|
|
26
|
+
- application/json; charset=utf-8
|
|
27
|
+
transfer-encoding:
|
|
28
|
+
- chunked
|
|
29
|
+
connection:
|
|
30
|
+
- close
|
|
31
|
+
x-frame-options:
|
|
32
|
+
- SAMEORIGIN
|
|
33
|
+
x-xss-protection:
|
|
34
|
+
- 1; mode=block
|
|
35
|
+
x-content-type-options:
|
|
36
|
+
- nosniff
|
|
37
|
+
etag:
|
|
38
|
+
- W/"5621b5bd639d8cf3876eddd3c3617ee5"
|
|
39
|
+
cache-control:
|
|
40
|
+
- max-age=0, private, must-revalidate
|
|
41
|
+
x-request-id:
|
|
42
|
+
- 67b3f0f2-9b9a-4bae-b631-578db1d7158b
|
|
43
|
+
x-runtime:
|
|
44
|
+
- '0.435113'
|
|
45
|
+
strict-transport-security:
|
|
46
|
+
- max-age=15768000
|
|
47
|
+
body:
|
|
48
|
+
encoding: UTF-8
|
|
49
|
+
string: '{"uuid":"ds_5ee8bf93-b0b4-4722-8a17-6b624a3af072","name":"Test Data
|
|
50
|
+
Source","created_at":"2016-06-05T18:52:00.931Z","status":"never_imported"}'
|
|
51
|
+
http_version:
|
|
52
|
+
recorded_at: Sun, 05 Jun 2016 18:52:01 GMT
|
|
53
|
+
- request:
|
|
54
|
+
method: get
|
|
55
|
+
uri: https://api.chartmogul.com/v1/import/data_sources
|
|
56
|
+
body:
|
|
57
|
+
encoding: US-ASCII
|
|
58
|
+
string: ''
|
|
59
|
+
headers:
|
|
60
|
+
User-Agent:
|
|
61
|
+
- Faraday v0.9.1
|
|
62
|
+
Authorization:
|
|
63
|
+
- Basic ZTk5MGJkMjNmNTQzYWNjZGY3ZDg4Yjk2OWNiMzAwOWI6NWM4YThlY2UxMTFmYmE4NTE1MGVmNzBjYmZmM2I3ZWI=
|
|
64
|
+
response:
|
|
65
|
+
status:
|
|
66
|
+
code: 200
|
|
67
|
+
message:
|
|
68
|
+
headers:
|
|
69
|
+
server:
|
|
70
|
+
- nginx/1.9.10
|
|
71
|
+
date:
|
|
72
|
+
- Sun, 05 Jun 2016 18:52:01 GMT
|
|
73
|
+
content-type:
|
|
74
|
+
- application/json; charset=utf-8
|
|
75
|
+
transfer-encoding:
|
|
76
|
+
- chunked
|
|
77
|
+
connection:
|
|
78
|
+
- close
|
|
79
|
+
x-frame-options:
|
|
80
|
+
- SAMEORIGIN
|
|
81
|
+
x-xss-protection:
|
|
82
|
+
- 1; mode=block
|
|
83
|
+
x-content-type-options:
|
|
84
|
+
- nosniff
|
|
85
|
+
etag:
|
|
86
|
+
- W/"1fdf50f6c3b08eb62b8a2c10956df8f5"
|
|
87
|
+
cache-control:
|
|
88
|
+
- max-age=0, private, must-revalidate
|
|
89
|
+
x-request-id:
|
|
90
|
+
- 5c425737-67c3-484a-aa67-ebf4bebd81d5
|
|
91
|
+
x-runtime:
|
|
92
|
+
- '0.110555'
|
|
93
|
+
strict-transport-security:
|
|
94
|
+
- max-age=15768000
|
|
95
|
+
body:
|
|
96
|
+
encoding: UTF-8
|
|
97
|
+
string: '{"data_sources":[{"uuid":"ds_5ee8bf93-b0b4-4722-8a17-6b624a3af072","name":"Test
|
|
98
|
+
Data Source","created_at":"2016-06-05T18:52:00.931Z","status":"never_imported"}]}'
|
|
99
|
+
http_version:
|
|
100
|
+
recorded_at: Sun, 05 Jun 2016 18:52:01 GMT
|
|
101
|
+
- request:
|
|
102
|
+
method: delete
|
|
103
|
+
uri: https://api.chartmogul.com/v1/import/data_sources/ds_5ee8bf93-b0b4-4722-8a17-6b624a3af072
|
|
104
|
+
body:
|
|
105
|
+
encoding: US-ASCII
|
|
106
|
+
string: ''
|
|
107
|
+
headers:
|
|
108
|
+
User-Agent:
|
|
109
|
+
- Faraday v0.9.1
|
|
110
|
+
Authorization:
|
|
111
|
+
- Basic ZTk5MGJkMjNmNTQzYWNjZGY3ZDg4Yjk2OWNiMzAwOWI6NWM4YThlY2UxMTFmYmE4NTE1MGVmNzBjYmZmM2I3ZWI=
|
|
112
|
+
response:
|
|
113
|
+
status:
|
|
114
|
+
code: 204
|
|
115
|
+
message:
|
|
116
|
+
headers:
|
|
117
|
+
server:
|
|
118
|
+
- nginx/1.9.10
|
|
119
|
+
date:
|
|
120
|
+
- Sun, 05 Jun 2016 18:52:01 GMT
|
|
121
|
+
connection:
|
|
122
|
+
- close
|
|
123
|
+
x-frame-options:
|
|
124
|
+
- SAMEORIGIN
|
|
125
|
+
x-xss-protection:
|
|
126
|
+
- 1; mode=block
|
|
127
|
+
x-content-type-options:
|
|
128
|
+
- nosniff
|
|
129
|
+
cache-control:
|
|
130
|
+
- no-cache
|
|
131
|
+
x-request-id:
|
|
132
|
+
- 006ca269-ad29-4f54-9af5-adacd2fc917a
|
|
133
|
+
x-runtime:
|
|
134
|
+
- '0.021315'
|
|
135
|
+
strict-transport-security:
|
|
136
|
+
- max-age=15768000
|
|
137
|
+
body:
|
|
138
|
+
encoding: UTF-8
|
|
139
|
+
string: ''
|
|
140
|
+
http_version:
|
|
141
|
+
recorded_at: Sun, 05 Jun 2016 18:52:01 GMT
|
|
142
|
+
- request:
|
|
143
|
+
method: get
|
|
144
|
+
uri: https://api.chartmogul.com/v1/import/data_sources
|
|
145
|
+
body:
|
|
146
|
+
encoding: US-ASCII
|
|
147
|
+
string: ''
|
|
148
|
+
headers:
|
|
149
|
+
User-Agent:
|
|
150
|
+
- Faraday v0.9.1
|
|
151
|
+
Authorization:
|
|
152
|
+
- Basic ZTk5MGJkMjNmNTQzYWNjZGY3ZDg4Yjk2OWNiMzAwOWI6NWM4YThlY2UxMTFmYmE4NTE1MGVmNzBjYmZmM2I3ZWI=
|
|
153
|
+
response:
|
|
154
|
+
status:
|
|
155
|
+
code: 200
|
|
156
|
+
message:
|
|
157
|
+
headers:
|
|
158
|
+
server:
|
|
159
|
+
- nginx/1.9.10
|
|
160
|
+
date:
|
|
161
|
+
- Sun, 05 Jun 2016 18:52:11 GMT
|
|
162
|
+
content-type:
|
|
163
|
+
- application/json; charset=utf-8
|
|
164
|
+
transfer-encoding:
|
|
165
|
+
- chunked
|
|
166
|
+
connection:
|
|
167
|
+
- close
|
|
168
|
+
x-frame-options:
|
|
169
|
+
- SAMEORIGIN
|
|
170
|
+
x-xss-protection:
|
|
171
|
+
- 1; mode=block
|
|
172
|
+
x-content-type-options:
|
|
173
|
+
- nosniff
|
|
174
|
+
etag:
|
|
175
|
+
- W/"fff2ed4cc06b2b7851a2db975ef7e229"
|
|
176
|
+
cache-control:
|
|
177
|
+
- max-age=0, private, must-revalidate
|
|
178
|
+
x-request-id:
|
|
179
|
+
- 5a92cbd3-d30a-4900-8922-28d828cd76c1
|
|
180
|
+
x-runtime:
|
|
181
|
+
- '0.159925'
|
|
182
|
+
strict-transport-security:
|
|
183
|
+
- max-age=15768000
|
|
184
|
+
body:
|
|
185
|
+
encoding: UTF-8
|
|
186
|
+
string: '{"data_sources":[]}'
|
|
187
|
+
http_version:
|
|
188
|
+
recorded_at: Sun, 05 Jun 2016 18:52:11 GMT
|
|
189
|
+
recorded_with: VCR 3.0.3
|