chartmogul-ruby 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- 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,47 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://api.chartmogul.com/v1/customers?per_page=10
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- Faraday v0.9.2
|
12
|
+
Content-Type:
|
13
|
+
- application/json
|
14
|
+
Authorization:
|
15
|
+
- Basic MDFiNzI2YzI0ZjNiYjhlOTc0MmEwNGZiMDhhZmE3NzQ6NzJlNGMxYTdlZTFiYzlkNGZjMDBlZWUwNWIyN2QzMGY=
|
16
|
+
response:
|
17
|
+
status:
|
18
|
+
code: 200
|
19
|
+
message:
|
20
|
+
headers:
|
21
|
+
server:
|
22
|
+
- nginx/1.9.10
|
23
|
+
date:
|
24
|
+
- Wed, 29 Jun 2016 12:45:27 GMT
|
25
|
+
content-type:
|
26
|
+
- application/json
|
27
|
+
content-length:
|
28
|
+
- '1297'
|
29
|
+
connection:
|
30
|
+
- close
|
31
|
+
vary:
|
32
|
+
- Accept-Encoding
|
33
|
+
status:
|
34
|
+
- 200 OK
|
35
|
+
access-control-allow-credentials:
|
36
|
+
- 'true'
|
37
|
+
body:
|
38
|
+
encoding: UTF-8
|
39
|
+
string: '{"entries":[{"id":20286023,"uuid":"cus_db011fbe-b8d5-46d4-9949-dff12fe0744b","external_id":"cus_0001","name":"Zuora
|
40
|
+
Customer","email":"zuora@customer.com","status":"Active","customer-since":"2015-08-01T00:00:00+00:00","attributes":{"tags":["another-tag"],"custom":{"string_key":"String
|
41
|
+
Value","integer_key":1234,"timestamp_key":"2016-01-31T00:00:00.000Z","boolean_key":true}},"address":{"country":"United
|
42
|
+
States","state":null,"city":"San Francisco","address_line1":null,"address_line2":null,"address_zip":""},"mrr":7500,"arr":90000,"billing-system-url":null,"chartmogul-url":"https://app.chartmogul.com/#customers/20286023-Zuora_Customer","billing-system-type":"ImportApi","currency":"USD","currency-sign":"$"},{"id":20268060,"uuid":"cus_07393ece-aab1-4255-8bcd-0ef11e24b047","external_id":"cus_0001","name":"Adam
|
43
|
+
Smith","email":"adam@smith.com","status":"Cancelled","customer-since":"2016-05-01T12:00:00+00:00","attributes":{"tags":[]},"address":{"country":"United
|
44
|
+
States","state":null,"city":"New York","address_line1":null,"address_line2":null,"address_zip":""},"mrr":0,"arr":0,"billing-system-url":null,"chartmogul-url":"https://app.chartmogul.com/#customers/20268060-Adam_Smith","billing-system-type":"ImportApi","currency":"USD","currency-sign":"$"}],"has_more":false,"per_page":10,"page":1}'
|
45
|
+
http_version:
|
46
|
+
recorded_at: Wed, 29 Jun 2016 12:45:27 GMT
|
47
|
+
recorded_with: VCR 3.0.3
|
@@ -0,0 +1,42 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://api.chartmogul.com/v1/customers/20268060
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '{}'
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- Faraday v0.9.2
|
12
|
+
Content-Type:
|
13
|
+
- application/json
|
14
|
+
Authorization:
|
15
|
+
- Basic MDFiNzI2YzI0ZjNiYjhlOTc0MmEwNGZiMDhhZmE3NzQ6NzJlNGMxYTdlZTFiYzlkNGZjMDBlZWUwNWIyN2QzMGY=
|
16
|
+
response:
|
17
|
+
status:
|
18
|
+
code: 200
|
19
|
+
message:
|
20
|
+
headers:
|
21
|
+
server:
|
22
|
+
- nginx/1.9.10
|
23
|
+
date:
|
24
|
+
- Wed, 29 Jun 2016 12:47:08 GMT
|
25
|
+
content-type:
|
26
|
+
- application/json
|
27
|
+
content-length:
|
28
|
+
- '544'
|
29
|
+
connection:
|
30
|
+
- close
|
31
|
+
status:
|
32
|
+
- 200 OK
|
33
|
+
access-control-allow-credentials:
|
34
|
+
- 'true'
|
35
|
+
body:
|
36
|
+
encoding: UTF-8
|
37
|
+
string: '{"id":20268060,"uuid":"cus_07393ece-aab1-4255-8bcd-0ef11e24b047","external_id":"cus_0001","name":"Adam
|
38
|
+
Smith","email":"adam@smith.com","status":"Cancelled","customer-since":"2016-05-01T12:00:00+00:00","attributes":{"tags":[]},"address":{"country":"United
|
39
|
+
States","state":null,"city":"New York","address_line1":null,"address_line2":null,"address_zip":""},"mrr":0,"arr":0,"billing-system-url":null,"chartmogul-url":"https://app.chartmogul.com/#customers/20268060-Adam_Smith","billing-system-type":"ImportApi","currency":"USD","currency-sign":"$"}'
|
40
|
+
http_version:
|
41
|
+
recorded_at: Wed, 29 Jun 2016 12:47:08 GMT
|
42
|
+
recorded_with: VCR 3.0.3
|
@@ -0,0 +1,43 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://api.chartmogul.com/v1/customers/search?email=adam%40smith.com
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '{}'
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- Faraday v0.9.2
|
12
|
+
Content-Type:
|
13
|
+
- application/json
|
14
|
+
Authorization:
|
15
|
+
- Basic MDFiNzI2YzI0ZjNiYjhlOTc0MmEwNGZiMDhhZmE3NzQ6NzJlNGMxYTdlZTFiYzlkNGZjMDBlZWUwNWIyN2QzMGY=
|
16
|
+
response:
|
17
|
+
status:
|
18
|
+
code: 200
|
19
|
+
message:
|
20
|
+
headers:
|
21
|
+
server:
|
22
|
+
- nginx/1.9.10
|
23
|
+
date:
|
24
|
+
- Wed, 29 Jun 2016 12:47:11 GMT
|
25
|
+
content-type:
|
26
|
+
- application/json
|
27
|
+
content-length:
|
28
|
+
- '740'
|
29
|
+
connection:
|
30
|
+
- close
|
31
|
+
status:
|
32
|
+
- 200 OK
|
33
|
+
access-control-allow-credentials:
|
34
|
+
- 'true'
|
35
|
+
body:
|
36
|
+
encoding: UTF-8
|
37
|
+
string: '{"entries":[{"id":20268060,"uuid":"cus_07393ece-aab1-4255-8bcd-0ef11e24b047","external_id":"cus_0001","name":"Adam
|
38
|
+
Smith","email":"adam@smith.com","status":"Cancelled","customer-since":"2016-05-01T12:00:00+00:00","attributes":{"tags":["another-tag"],"custom":{"string_key":"Another
|
39
|
+
String Value","integer_key":"5678","timestamp_key":"2016-02-01 00:00:00 UTC","boolean_key":"f"}},"address":{"country":"United
|
40
|
+
States","state":null,"city":"New York","address_line1":null,"address_line2":null,"address_zip":""},"mrr":0,"arr":0,"billing-system-url":null,"chartmogul-url":"https://app.chartmogul.com/#customers/20268060-Adam_Smith","billing-system-type":"ImportApi","currency":"USD","currency-sign":"$"}],"has_more":false,"per_page":200,"page":1}'
|
41
|
+
http_version:
|
42
|
+
recorded_at: Wed, 29 Jun 2016 12:47:11 GMT
|
43
|
+
recorded_with: VCR 3.0.3
|
@@ -0,0 +1,82 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://api.chartmogul.com/v1/customers/20268060
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '{}'
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- Faraday v0.9.2
|
12
|
+
Content-Type:
|
13
|
+
- application/json
|
14
|
+
Authorization:
|
15
|
+
- Basic MDFiNzI2YzI0ZjNiYjhlOTc0MmEwNGZiMDhhZmE3NzQ6NzJlNGMxYTdlZTFiYzlkNGZjMDBlZWUwNWIyN2QzMGY=
|
16
|
+
response:
|
17
|
+
status:
|
18
|
+
code: 200
|
19
|
+
message:
|
20
|
+
headers:
|
21
|
+
server:
|
22
|
+
- nginx/1.9.10
|
23
|
+
date:
|
24
|
+
- Wed, 29 Jun 2016 12:47:09 GMT
|
25
|
+
content-type:
|
26
|
+
- application/json
|
27
|
+
content-length:
|
28
|
+
- '687'
|
29
|
+
connection:
|
30
|
+
- close
|
31
|
+
status:
|
32
|
+
- 200 OK
|
33
|
+
access-control-allow-credentials:
|
34
|
+
- 'true'
|
35
|
+
body:
|
36
|
+
encoding: UTF-8
|
37
|
+
string: '{"id":20268060,"uuid":"cus_07393ece-aab1-4255-8bcd-0ef11e24b047","external_id":"cus_0001","name":"Adam
|
38
|
+
Smith","email":"adam@smith.com","status":"Cancelled","customer-since":"2016-05-01T12:00:00+00:00","attributes":{"tags":["example","another-tag"],"custom":{"string_key":"String
|
39
|
+
Value","integer_key":1234,"timestamp_key":"2016-01-31T00:00:00.000Z","boolean_key":true}},"address":{"country":"United
|
40
|
+
States","state":null,"city":"New York","address_line1":null,"address_line2":null,"address_zip":""},"mrr":0,"arr":0,"billing-system-url":null,"chartmogul-url":"https://app.chartmogul.com/#customers/20268060-Adam_Smith","billing-system-type":"ImportApi","currency":"USD","currency-sign":"$"}'
|
41
|
+
http_version:
|
42
|
+
recorded_at: Wed, 29 Jun 2016 12:47:09 GMT
|
43
|
+
- request:
|
44
|
+
method: put
|
45
|
+
uri: https://api.chartmogul.com/v1/customers/20268060/attributes/custom
|
46
|
+
body:
|
47
|
+
encoding: UTF-8
|
48
|
+
string: '{"custom":{"string_key":"Another String Value","integer_key":5678,"timestamp_key":"2016-02-01
|
49
|
+
00:00:00 UTC","boolean_key":false}}'
|
50
|
+
headers:
|
51
|
+
User-Agent:
|
52
|
+
- Faraday v0.9.2
|
53
|
+
Content-Type:
|
54
|
+
- application/json
|
55
|
+
Authorization:
|
56
|
+
- Basic MDFiNzI2YzI0ZjNiYjhlOTc0MmEwNGZiMDhhZmE3NzQ6NzJlNGMxYTdlZTFiYzlkNGZjMDBlZWUwNWIyN2QzMGY=
|
57
|
+
response:
|
58
|
+
status:
|
59
|
+
code: 200
|
60
|
+
message:
|
61
|
+
headers:
|
62
|
+
server:
|
63
|
+
- nginx/1.9.10
|
64
|
+
date:
|
65
|
+
- Wed, 29 Jun 2016 12:47:09 GMT
|
66
|
+
content-type:
|
67
|
+
- application/json
|
68
|
+
content-length:
|
69
|
+
- '129'
|
70
|
+
connection:
|
71
|
+
- close
|
72
|
+
status:
|
73
|
+
- 200 OK
|
74
|
+
access-control-allow-credentials:
|
75
|
+
- 'true'
|
76
|
+
body:
|
77
|
+
encoding: UTF-8
|
78
|
+
string: '{"custom":{"string_key":"Another String Value","integer_key":5678,"timestamp_key":"2016-02-01
|
79
|
+
00:00:00 UTC","boolean_key":false}}'
|
80
|
+
http_version:
|
81
|
+
recorded_at: Wed, 29 Jun 2016 12:47:09 GMT
|
82
|
+
recorded_with: VCR 3.0.3
|
@@ -0,0 +1,50 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://api.chartmogul.com/v1/import/customers
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '{"data_source_uuid":null,"external_id":null,"name":null,"email":null,"company":null,"country":null,"state":null,"city":null,"zip":null}'
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- Faraday v0.9.1
|
12
|
+
Content-Type:
|
13
|
+
- application/json
|
14
|
+
Authorization:
|
15
|
+
- Basic ODE2MjZkMWFiMzU5NTIwMzY5MjhjNjJjYmJiNDMyN2M6ODY3MDRmMDdkYzQwZmYzYjYyYzRjY2E5OTYxMjk2MzY=
|
16
|
+
response:
|
17
|
+
status:
|
18
|
+
code: 422
|
19
|
+
message:
|
20
|
+
headers:
|
21
|
+
server:
|
22
|
+
- nginx/1.9.10
|
23
|
+
date:
|
24
|
+
- Mon, 06 Jun 2016 15:26:39 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
|
+
cache-control:
|
38
|
+
- no-cache
|
39
|
+
x-request-id:
|
40
|
+
- db053e91-1f33-45fe-a8f2-d06c507e8066
|
41
|
+
x-runtime:
|
42
|
+
- '0.033493'
|
43
|
+
body:
|
44
|
+
encoding: UTF-8
|
45
|
+
string: '{"errors":{"external_id":"A unique external ID is required for each
|
46
|
+
customer.","name":"A name is required for each customer.","data_source_uuid":"A
|
47
|
+
valid data source UUID is required for each customer."}}'
|
48
|
+
http_version:
|
49
|
+
recorded_at: Mon, 06 Jun 2016 15:26:39 GMT
|
50
|
+
recorded_with: VCR 3.0.3
|
@@ -0,0 +1,240 @@
|
|
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 Test Data Source"}'
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- Faraday v0.9.1
|
12
|
+
Content-Type:
|
13
|
+
- application/json
|
14
|
+
Authorization:
|
15
|
+
- Basic ODE2MjZkMWFiMzU5NTIwMzY5MjhjNjJjYmJiNDMyN2M6ODY3MDRmMDdkYzQwZmYzYjYyYzRjY2E5OTYxMjk2MzY=
|
16
|
+
response:
|
17
|
+
status:
|
18
|
+
code: 201
|
19
|
+
message:
|
20
|
+
headers:
|
21
|
+
server:
|
22
|
+
- nginx/1.9.10
|
23
|
+
date:
|
24
|
+
- Mon, 06 Jun 2016 15:26:39 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/"efc297a7a44e439e9e557cdb452df1f4"
|
39
|
+
cache-control:
|
40
|
+
- max-age=0, private, must-revalidate
|
41
|
+
x-request-id:
|
42
|
+
- 2a244394-b7a8-4a47-bb66-b5122c819ab2
|
43
|
+
x-runtime:
|
44
|
+
- '0.334024'
|
45
|
+
strict-transport-security:
|
46
|
+
- max-age=15768000
|
47
|
+
body:
|
48
|
+
encoding: UTF-8
|
49
|
+
string: '{"uuid":"ds_154b9620-a22a-478a-8b44-198d11cc9a85","name":"Customer
|
50
|
+
Test Data Source","created_at":"2016-06-06T15:26:39.448Z","status":"never_imported"}'
|
51
|
+
http_version:
|
52
|
+
recorded_at: Mon, 06 Jun 2016 15:26:39 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_154b9620-a22a-478a-8b44-198d11cc9a85","external_id":"X1234","name":"Test
|
59
|
+
Customer","email":"test@example.com","company":null,"country":"DE","state":null,"city":"Berlin","zip":null}'
|
60
|
+
headers:
|
61
|
+
User-Agent:
|
62
|
+
- Faraday v0.9.1
|
63
|
+
Content-Type:
|
64
|
+
- application/json
|
65
|
+
Authorization:
|
66
|
+
- Basic ODE2MjZkMWFiMzU5NTIwMzY5MjhjNjJjYmJiNDMyN2M6ODY3MDRmMDdkYzQwZmYzYjYyYzRjY2E5OTYxMjk2MzY=
|
67
|
+
response:
|
68
|
+
status:
|
69
|
+
code: 201
|
70
|
+
message:
|
71
|
+
headers:
|
72
|
+
server:
|
73
|
+
- nginx/1.9.10
|
74
|
+
date:
|
75
|
+
- Mon, 06 Jun 2016 15:26:39 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/"2bb61213c73b74bf7e3094b3a2814b1c"
|
90
|
+
cache-control:
|
91
|
+
- max-age=0, private, must-revalidate
|
92
|
+
x-request-id:
|
93
|
+
- 7a43eb0b-0099-4cef-b620-a6ac687ace2f
|
94
|
+
x-runtime:
|
95
|
+
- '0.202425'
|
96
|
+
strict-transport-security:
|
97
|
+
- max-age=15768000
|
98
|
+
body:
|
99
|
+
encoding: UTF-8
|
100
|
+
string: '{"uuid":"cus_c4babf63-3eb9-4125-8687-2a0d781b0af2","external_id":"X1234","name":"Test
|
101
|
+
Customer","company":"","email":"test@example.com","city":"Berlin","state":"","country":"DE","zip":"","data_source_uuid":"ds_154b9620-a22a-478a-8b44-198d11cc9a85"}'
|
102
|
+
http_version:
|
103
|
+
recorded_at: Mon, 06 Jun 2016 15:26:39 GMT
|
104
|
+
- request:
|
105
|
+
method: get
|
106
|
+
uri: https://api.chartmogul.com/v1/import/customers
|
107
|
+
body:
|
108
|
+
encoding: US-ASCII
|
109
|
+
string: ''
|
110
|
+
headers:
|
111
|
+
User-Agent:
|
112
|
+
- Faraday v0.9.1
|
113
|
+
Authorization:
|
114
|
+
- Basic ODE2MjZkMWFiMzU5NTIwMzY5MjhjNjJjYmJiNDMyN2M6ODY3MDRmMDdkYzQwZmYzYjYyYzRjY2E5OTYxMjk2MzY=
|
115
|
+
response:
|
116
|
+
status:
|
117
|
+
code: 200
|
118
|
+
message:
|
119
|
+
headers:
|
120
|
+
server:
|
121
|
+
- nginx/1.9.10
|
122
|
+
date:
|
123
|
+
- Mon, 06 Jun 2016 15:26:40 GMT
|
124
|
+
content-type:
|
125
|
+
- application/json; charset=utf-8
|
126
|
+
transfer-encoding:
|
127
|
+
- chunked
|
128
|
+
connection:
|
129
|
+
- close
|
130
|
+
x-frame-options:
|
131
|
+
- SAMEORIGIN
|
132
|
+
x-xss-protection:
|
133
|
+
- 1; mode=block
|
134
|
+
x-content-type-options:
|
135
|
+
- nosniff
|
136
|
+
etag:
|
137
|
+
- W/"f8b194be146b71827424808d2de63994"
|
138
|
+
cache-control:
|
139
|
+
- max-age=0, private, must-revalidate
|
140
|
+
x-request-id:
|
141
|
+
- aa0a64af-9cd4-4b7d-9d43-d3b7c08ac7d1
|
142
|
+
x-runtime:
|
143
|
+
- '0.020597'
|
144
|
+
strict-transport-security:
|
145
|
+
- max-age=15768000
|
146
|
+
body:
|
147
|
+
encoding: UTF-8
|
148
|
+
string: '{"customers":[{"uuid":"cus_c4babf63-3eb9-4125-8687-2a0d781b0af2","external_id":"X1234","name":"Test
|
149
|
+
Customer","company":"","email":"test@example.com","city":"Berlin","state":"","country":"DE","zip":"","data_source_uuid":"ds_154b9620-a22a-478a-8b44-198d11cc9a85"}],"current_page":1,"total_pages":1}'
|
150
|
+
http_version:
|
151
|
+
recorded_at: Mon, 06 Jun 2016 15:26:40 GMT
|
152
|
+
- request:
|
153
|
+
method: delete
|
154
|
+
uri: https://api.chartmogul.com/v1/import/customers/cus_c4babf63-3eb9-4125-8687-2a0d781b0af2
|
155
|
+
body:
|
156
|
+
encoding: US-ASCII
|
157
|
+
string: ''
|
158
|
+
headers:
|
159
|
+
User-Agent:
|
160
|
+
- Faraday v0.9.1
|
161
|
+
Authorization:
|
162
|
+
- Basic ODE2MjZkMWFiMzU5NTIwMzY5MjhjNjJjYmJiNDMyN2M6ODY3MDRmMDdkYzQwZmYzYjYyYzRjY2E5OTYxMjk2MzY=
|
163
|
+
response:
|
164
|
+
status:
|
165
|
+
code: 204
|
166
|
+
message:
|
167
|
+
headers:
|
168
|
+
server:
|
169
|
+
- nginx/1.9.10
|
170
|
+
date:
|
171
|
+
- Mon, 06 Jun 2016 15:26:40 GMT
|
172
|
+
connection:
|
173
|
+
- close
|
174
|
+
x-frame-options:
|
175
|
+
- SAMEORIGIN
|
176
|
+
x-xss-protection:
|
177
|
+
- 1; mode=block
|
178
|
+
x-content-type-options:
|
179
|
+
- nosniff
|
180
|
+
cache-control:
|
181
|
+
- no-cache
|
182
|
+
x-request-id:
|
183
|
+
- accd161f-de8b-426f-9a44-4b142a69ccc4
|
184
|
+
x-runtime:
|
185
|
+
- '0.022023'
|
186
|
+
strict-transport-security:
|
187
|
+
- max-age=15768000
|
188
|
+
body:
|
189
|
+
encoding: UTF-8
|
190
|
+
string: ''
|
191
|
+
http_version:
|
192
|
+
recorded_at: Mon, 06 Jun 2016 15:26:40 GMT
|
193
|
+
- request:
|
194
|
+
method: get
|
195
|
+
uri: https://api.chartmogul.com/v1/import/customers
|
196
|
+
body:
|
197
|
+
encoding: US-ASCII
|
198
|
+
string: ''
|
199
|
+
headers:
|
200
|
+
User-Agent:
|
201
|
+
- Faraday v0.9.1
|
202
|
+
Authorization:
|
203
|
+
- Basic ODE2MjZkMWFiMzU5NTIwMzY5MjhjNjJjYmJiNDMyN2M6ODY3MDRmMDdkYzQwZmYzYjYyYzRjY2E5OTYxMjk2MzY=
|
204
|
+
response:
|
205
|
+
status:
|
206
|
+
code: 200
|
207
|
+
message:
|
208
|
+
headers:
|
209
|
+
server:
|
210
|
+
- nginx/1.9.10
|
211
|
+
date:
|
212
|
+
- Mon, 06 Jun 2016 15:26:50 GMT
|
213
|
+
content-type:
|
214
|
+
- application/json; charset=utf-8
|
215
|
+
transfer-encoding:
|
216
|
+
- chunked
|
217
|
+
connection:
|
218
|
+
- close
|
219
|
+
x-frame-options:
|
220
|
+
- SAMEORIGIN
|
221
|
+
x-xss-protection:
|
222
|
+
- 1; mode=block
|
223
|
+
x-content-type-options:
|
224
|
+
- nosniff
|
225
|
+
etag:
|
226
|
+
- W/"82f80d77a5a88d6de206bb1feeb897cc"
|
227
|
+
cache-control:
|
228
|
+
- max-age=0, private, must-revalidate
|
229
|
+
x-request-id:
|
230
|
+
- 955582ac-5fe6-43c4-b0e8-f36fa27fdd57
|
231
|
+
x-runtime:
|
232
|
+
- '0.011286'
|
233
|
+
strict-transport-security:
|
234
|
+
- max-age=15768000
|
235
|
+
body:
|
236
|
+
encoding: UTF-8
|
237
|
+
string: '{"customers":[],"current_page":1,"total_pages":0}'
|
238
|
+
http_version:
|
239
|
+
recorded_at: Mon, 06 Jun 2016 15:26:50 GMT
|
240
|
+
recorded_with: VCR 3.0.3
|