chartmogul-ruby 1.1.1 → 1.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +10 -10
- data/.rspec +2 -2
- data/.travis.yml +4 -4
- data/Gemfile +4 -4
- data/LICENSE.txt +21 -21
- data/README.md +111 -111
- data/Rakefile +6 -6
- data/bin/console +14 -14
- data/bin/setup +9 -9
- data/changelog.md +27 -27
- data/chartmogul-ruby.gemspec +29 -29
- data/fixtures/vcr_cassettes/ChartMogul_Customer/API_Interactions/adds_custom_attributes.yml +80 -80
- data/fixtures/vcr_cassettes/ChartMogul_Customer/API_Interactions/adds_required_tags.yml +79 -79
- data/fixtures/vcr_cassettes/ChartMogul_Customer/API_Interactions/can_page_through_search_endpoint.yml +43 -43
- data/fixtures/vcr_cassettes/ChartMogul_Customer/API_Interactions/correctly_handles_a_422_response.yml +50 -50
- data/fixtures/vcr_cassettes/ChartMogul_Customer/API_Interactions/correctly_interracts_with_the_API.yml +244 -244
- data/fixtures/vcr_cassettes/ChartMogul_Customer/API_Interactions/merges_customers.yml +185 -185
- data/fixtures/vcr_cassettes/ChartMogul_Customer/API_Interactions/raises_401_if_invalid_credentials.yml +38 -38
- data/fixtures/vcr_cassettes/ChartMogul_Customer/API_Interactions/raises_404_if_no_customers_found.yml +38 -38
- data/fixtures/vcr_cassettes/ChartMogul_Customer/API_Interactions/raises_422_for_update_with_invalid_data.yml +86 -86
- data/fixtures/vcr_cassettes/ChartMogul_Customer/API_Interactions/removes_custom_attributes.yml +80 -80
- data/fixtures/vcr_cassettes/ChartMogul_Customer/API_Interactions/removes_tags.yml +80 -80
- data/fixtures/vcr_cassettes/ChartMogul_Customer/API_Interactions/returns_all_customers_through_list_all_endpoint.yml +47 -47
- data/fixtures/vcr_cassettes/ChartMogul_Customer/API_Interactions/returns_customer_through_retrieve_endpoint.yml +42 -42
- data/fixtures/vcr_cassettes/ChartMogul_Customer/API_Interactions/returns_right_customers_through_search_endpoint.yml +43 -43
- data/fixtures/vcr_cassettes/ChartMogul_Customer/API_Interactions/updates_custom_attributes.yml +82 -82
- data/fixtures/vcr_cassettes/ChartMogul_Customer/API_Interactions/updates_customer.yml +139 -139
- data/fixtures/vcr_cassettes/ChartMogul_Customer/_find_by_external_id/when_external_id_is_provided/returns_matching_user_if_exists.yml +102 -102
- data/fixtures/vcr_cassettes/ChartMogul_Customer/_find_by_external_id/when_external_id_is_provided/returns_nil_if_customer_does_not_exist.yml +101 -101
- data/fixtures/vcr_cassettes/ChartMogul_CustomerInvoices/API_Interactions/correctly_interracts_with_the_API.yml +298 -298
- data/fixtures/vcr_cassettes/ChartMogul_DataSource/API_Interactions/correctly_interracts_with_the_API.yml +189 -189
- data/fixtures/vcr_cassettes/ChartMogul_DataSource/API_Interactions/correctly_raises_errors_on_404.yml +46 -46
- data/fixtures/vcr_cassettes/ChartMogul_DataSource/API_Interactions/correctly_raises_errors_on_422.yml +48 -48
- data/fixtures/vcr_cassettes/ChartMogul_DataSource/API_Interactions/retrieves_existing_data_source_matching_uuid.yml +101 -101
- data/fixtures/vcr_cassettes/ChartMogul_Invoice/API_Interactions/deletes_an_invoice.yml +37 -0
- data/fixtures/vcr_cassettes/ChartMogul_Invoice/API_Interactions/deletes_an_invoice_with_class_method.yml +37 -0
- data/fixtures/vcr_cassettes/ChartMogul_Invoice/API_Interactions/raises_error_on_deleting_non-existing_invoice.yml +42 -0
- data/fixtures/vcr_cassettes/ChartMogul_Invoice/API_Interactions/returns_all_invoices_through_list_all_endpoint.yml +46 -46
- data/fixtures/vcr_cassettes/ChartMogul_Metrics_ARPA/behaves_like_Metrics_API_resource/behaves_like_Summary/should_have_summary.yml +42 -42
- data/fixtures/vcr_cassettes/ChartMogul_Metrics_ARPA/behaves_like_Metrics_API_resource/should_have_entries.yml +42 -42
- data/fixtures/vcr_cassettes/ChartMogul_Metrics_ARR/behaves_like_Metrics_API_resource/behaves_like_Summary/should_have_summary.yml +42 -42
- data/fixtures/vcr_cassettes/ChartMogul_Metrics_ARR/behaves_like_Metrics_API_resource/should_have_entries.yml +42 -42
- data/fixtures/vcr_cassettes/ChartMogul_Metrics_ASP/behaves_like_Metrics_API_resource/behaves_like_Summary/should_have_summary.yml +40 -40
- data/fixtures/vcr_cassettes/ChartMogul_Metrics_ASP/behaves_like_Metrics_API_resource/should_have_entries.yml +40 -40
- data/fixtures/vcr_cassettes/ChartMogul_Metrics_Activity/behaves_like_Pageable/should_be_pageable.yml +41 -41
- data/fixtures/vcr_cassettes/ChartMogul_Metrics_Activity/should_have_Activity_entries.yml +41 -41
- data/fixtures/vcr_cassettes/ChartMogul_Metrics_AllKeyMetric/should_have_entries.yml +42 -42
- data/fixtures/vcr_cassettes/ChartMogul_Metrics_CustomerChurnRate/behaves_like_Metrics_API_resource/behaves_like_Summary/should_have_summary.yml +40 -40
- data/fixtures/vcr_cassettes/ChartMogul_Metrics_CustomerChurnRate/behaves_like_Metrics_API_resource/should_have_entries.yml +40 -40
- data/fixtures/vcr_cassettes/ChartMogul_Metrics_CustomerCount/behaves_like_Metrics_API_resource/behaves_like_Summary/should_have_summary.yml +42 -42
- data/fixtures/vcr_cassettes/ChartMogul_Metrics_CustomerCount/behaves_like_Metrics_API_resource/should_have_entries.yml +42 -42
- data/fixtures/vcr_cassettes/ChartMogul_Metrics_LTV/behaves_like_Metrics_API_resource/behaves_like_Summary/should_have_summary.yml +40 -40
- data/fixtures/vcr_cassettes/ChartMogul_Metrics_LTV/behaves_like_Metrics_API_resource/should_have_entries.yml +40 -40
- data/fixtures/vcr_cassettes/ChartMogul_Metrics_MRR/behaves_like_Summary/should_have_summary.yml +42 -42
- data/fixtures/vcr_cassettes/ChartMogul_Metrics_MRR/should_have_entries.yml +42 -42
- data/fixtures/vcr_cassettes/ChartMogul_Metrics_MRRChurnRate/behaves_like_Metrics_API_resource/behaves_like_Summary/should_have_summary.yml +40 -40
- data/fixtures/vcr_cassettes/ChartMogul_Metrics_MRRChurnRate/behaves_like_Metrics_API_resource/should_have_entries.yml +40 -40
- data/fixtures/vcr_cassettes/ChartMogul_Metrics_Subscription/behaves_like_Pageable/should_be_pageable.yml +40 -40
- data/fixtures/vcr_cassettes/ChartMogul_Metrics_Subscription/should_have_Subscription_entries.yml +40 -40
- data/fixtures/vcr_cassettes/ChartMogul_Ping/pings/and_fails_on_incorrect_credentials.yml +38 -38
- data/fixtures/vcr_cassettes/ChartMogul_Ping/pings/when_credentials_correct.yml +38 -38
- data/fixtures/vcr_cassettes/ChartMogul_Plan/API_Interactions/correctly_handles_a_422_error.yml +51 -51
- data/fixtures/vcr_cassettes/ChartMogul_Plan/API_Interactions/correctly_interacts_with_the_API.yml +152 -152
- data/fixtures/vcr_cassettes/ChartMogul_Plan/API_Interactions/deletes_existing_plan.yml +198 -198
- data/fixtures/vcr_cassettes/ChartMogul_Plan/API_Interactions/retrieves_existing_plan_by_uuid.yml +151 -151
- data/fixtures/vcr_cassettes/ChartMogul_Plan/API_Interactions/updates_existing_plan.yml +198 -198
- data/fixtures/vcr_cassettes/ChartMogul_Subscription/API_Interactions/correctly_interracts_with_the_API.yml +340 -340
- data/fixtures/vcr_cassettes/ChartMogul_Subscription/API_Interactions/has_multiple_aliases.yml +101 -101
- data/fixtures/vcr_cassettes/ChartMogul_Transactions_Payment/API_Interactions/correctly_interracts_with_the_API.yml +243 -243
- data/lib/chartmogul.rb +79 -79
- data/lib/chartmogul/api/actions/all.rb +23 -23
- data/lib/chartmogul/api/actions/create.rb +39 -39
- data/lib/chartmogul/api/actions/custom.rb +37 -37
- data/lib/chartmogul/api/actions/destroy.rb +28 -14
- data/lib/chartmogul/api/actions/update.rb +19 -19
- data/lib/chartmogul/api_resource.rb +68 -68
- data/lib/chartmogul/concerns/entries.rb +39 -39
- data/lib/chartmogul/concerns/pageable.rb +13 -13
- data/lib/chartmogul/concerns/pageable2.rb +12 -12
- data/lib/chartmogul/concerns/summary.rb +20 -20
- data/lib/chartmogul/config_attributes.rb +15 -15
- data/lib/chartmogul/configuration.rb +6 -6
- data/lib/chartmogul/customer.rb +155 -155
- data/lib/chartmogul/customer_invoices.rb +44 -44
- data/lib/chartmogul/data_source.rb +38 -38
- data/lib/chartmogul/enrichment/customer.rb +141 -141
- data/lib/chartmogul/errors/chartmogul_error.rb +19 -19
- data/lib/chartmogul/errors/configuration_error.rb +4 -4
- data/lib/chartmogul/errors/forbidden_error.rb +4 -4
- data/lib/chartmogul/errors/not_found_error.rb +4 -4
- data/lib/chartmogul/errors/resource_invalid_error.rb +4 -4
- data/lib/chartmogul/errors/schema_invalid_error.rb +4 -4
- data/lib/chartmogul/errors/unauthorized_error.rb +4 -4
- data/lib/chartmogul/invoice.rb +83 -78
- data/lib/chartmogul/line_items/one_time.rb +23 -23
- data/lib/chartmogul/line_items/subscription.rb +29 -29
- data/lib/chartmogul/metrics/activity.rb +34 -34
- data/lib/chartmogul/metrics/all_key_metrics.rb +25 -25
- data/lib/chartmogul/metrics/arpa.rb +19 -19
- data/lib/chartmogul/metrics/arr.rb +19 -19
- data/lib/chartmogul/metrics/asp.rb +19 -19
- data/lib/chartmogul/metrics/base.rb +56 -56
- data/lib/chartmogul/metrics/customer_churn_rate.rb +19 -19
- data/lib/chartmogul/metrics/customer_count.rb +19 -19
- data/lib/chartmogul/metrics/ltv.rb +19 -19
- data/lib/chartmogul/metrics/mrr.rb +26 -26
- data/lib/chartmogul/metrics/mrr_churn_rate.rb +19 -19
- data/lib/chartmogul/metrics/subscription.rb +37 -37
- data/lib/chartmogul/object.rb +119 -119
- data/lib/chartmogul/ping.rb +14 -14
- data/lib/chartmogul/plan.rb +41 -41
- data/lib/chartmogul/resource_path.rb +42 -42
- data/lib/chartmogul/subscription.rb +48 -48
- data/lib/chartmogul/summary.rb +7 -7
- data/lib/chartmogul/transactions/payment.rb +24 -24
- data/lib/chartmogul/transactions/refund.rb +24 -24
- data/lib/chartmogul/utils/hash_snake_caser.rb +50 -50
- data/lib/chartmogul/utils/json_parser.rb +11 -11
- data/lib/chartmogul/version.rb +3 -3
- metadata +5 -2
data/fixtures/vcr_cassettes/ChartMogul_Plan/API_Interactions/correctly_interacts_with_the_API.yml
CHANGED
@@ -1,152 +1,152 @@
|
|
1
|
-
---
|
2
|
-
http_interactions:
|
3
|
-
- request:
|
4
|
-
method: post
|
5
|
-
uri: https://api.chartmogul.com/v1/data_sources
|
6
|
-
body:
|
7
|
-
encoding: UTF-8
|
8
|
-
string: '{"name":"Another 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
|
-
- Sun, 05 Jun 2016 19:47:08 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/"05335923b74e9c38a5a5fe8e83ac0f79"
|
39
|
-
cache-control:
|
40
|
-
- max-age=0, private, must-revalidate
|
41
|
-
x-request-id:
|
42
|
-
- e163c0c6-e937-4427-a0c8-78bd5e3f1711
|
43
|
-
x-runtime:
|
44
|
-
- '0.509776'
|
45
|
-
strict-transport-security:
|
46
|
-
- max-age=15768000
|
47
|
-
body:
|
48
|
-
encoding: UTF-8
|
49
|
-
string: '{"uuid":"ds_77eb401d-fff6-43be-94dc-2cbc2e96e31e","name":"Another Data
|
50
|
-
Source","created_at":"2016-06-05T19:47:08.020Z","status":"never_imported"}'
|
51
|
-
http_version:
|
52
|
-
recorded_at: Sun, 05 Jun 2016 19:47:08 GMT
|
53
|
-
- request:
|
54
|
-
method: post
|
55
|
-
uri: https://api.chartmogul.com/v1/plans
|
56
|
-
body:
|
57
|
-
encoding: UTF-8
|
58
|
-
string: '{"data_source_uuid":"ds_77eb401d-fff6-43be-94dc-2cbc2e96e31e","name":"A
|
59
|
-
Test Plan","interval_count":1,"interval_unit":"month","external_id":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
|
-
- Sun, 05 Jun 2016 19:47:08 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/"7086a2e8b932cc1ce3b47f8de5fdfdb8"
|
90
|
-
cache-control:
|
91
|
-
- max-age=0, private, must-revalidate
|
92
|
-
x-request-id:
|
93
|
-
- 6e97fa02-8bc1-4d2f-8718-8473a58e4254
|
94
|
-
x-runtime:
|
95
|
-
- '0.120821'
|
96
|
-
strict-transport-security:
|
97
|
-
- max-age=15768000
|
98
|
-
body:
|
99
|
-
encoding: UTF-8
|
100
|
-
string: '{"uuid":"pl_ba808f0b-4c1c-4824-8705-a6736efa96dc","external_id":null,"name":"A
|
101
|
-
Test Plan","interval_count":1,"interval_unit":"month","data_source_uuid":"ds_77eb401d-fff6-43be-94dc-2cbc2e96e31e"}'
|
102
|
-
http_version:
|
103
|
-
recorded_at: Sun, 05 Jun 2016 19:47:08 GMT
|
104
|
-
- request:
|
105
|
-
method: get
|
106
|
-
uri: https://api.chartmogul.com/v1/plans
|
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
|
-
- Sun, 05 Jun 2016 19:47:08 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/"2122e94312ef92cc077db62910743655"
|
138
|
-
cache-control:
|
139
|
-
- max-age=0, private, must-revalidate
|
140
|
-
x-request-id:
|
141
|
-
- 1286c5a2-596a-4bc2-9e24-cfccc393e589
|
142
|
-
x-runtime:
|
143
|
-
- '0.018019'
|
144
|
-
strict-transport-security:
|
145
|
-
- max-age=15768000
|
146
|
-
body:
|
147
|
-
encoding: UTF-8
|
148
|
-
string: '{"plans":[{"uuid":"pl_ba808f0b-4c1c-4824-8705-a6736efa96dc","external_id":null,"name":"A
|
149
|
-
Test Plan","interval_count":1,"interval_unit":"month","data_source_uuid":"ds_77eb401d-fff6-43be-94dc-2cbc2e96e31e"}],"current_page":1,"total_pages":1}'
|
150
|
-
http_version:
|
151
|
-
recorded_at: Sun, 05 Jun 2016 19:47:08 GMT
|
152
|
-
recorded_with: VCR 3.0.3
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://api.chartmogul.com/v1/data_sources
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '{"name":"Another 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
|
+
- Sun, 05 Jun 2016 19:47:08 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/"05335923b74e9c38a5a5fe8e83ac0f79"
|
39
|
+
cache-control:
|
40
|
+
- max-age=0, private, must-revalidate
|
41
|
+
x-request-id:
|
42
|
+
- e163c0c6-e937-4427-a0c8-78bd5e3f1711
|
43
|
+
x-runtime:
|
44
|
+
- '0.509776'
|
45
|
+
strict-transport-security:
|
46
|
+
- max-age=15768000
|
47
|
+
body:
|
48
|
+
encoding: UTF-8
|
49
|
+
string: '{"uuid":"ds_77eb401d-fff6-43be-94dc-2cbc2e96e31e","name":"Another Data
|
50
|
+
Source","created_at":"2016-06-05T19:47:08.020Z","status":"never_imported"}'
|
51
|
+
http_version:
|
52
|
+
recorded_at: Sun, 05 Jun 2016 19:47:08 GMT
|
53
|
+
- request:
|
54
|
+
method: post
|
55
|
+
uri: https://api.chartmogul.com/v1/plans
|
56
|
+
body:
|
57
|
+
encoding: UTF-8
|
58
|
+
string: '{"data_source_uuid":"ds_77eb401d-fff6-43be-94dc-2cbc2e96e31e","name":"A
|
59
|
+
Test Plan","interval_count":1,"interval_unit":"month","external_id":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
|
+
- Sun, 05 Jun 2016 19:47:08 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/"7086a2e8b932cc1ce3b47f8de5fdfdb8"
|
90
|
+
cache-control:
|
91
|
+
- max-age=0, private, must-revalidate
|
92
|
+
x-request-id:
|
93
|
+
- 6e97fa02-8bc1-4d2f-8718-8473a58e4254
|
94
|
+
x-runtime:
|
95
|
+
- '0.120821'
|
96
|
+
strict-transport-security:
|
97
|
+
- max-age=15768000
|
98
|
+
body:
|
99
|
+
encoding: UTF-8
|
100
|
+
string: '{"uuid":"pl_ba808f0b-4c1c-4824-8705-a6736efa96dc","external_id":null,"name":"A
|
101
|
+
Test Plan","interval_count":1,"interval_unit":"month","data_source_uuid":"ds_77eb401d-fff6-43be-94dc-2cbc2e96e31e"}'
|
102
|
+
http_version:
|
103
|
+
recorded_at: Sun, 05 Jun 2016 19:47:08 GMT
|
104
|
+
- request:
|
105
|
+
method: get
|
106
|
+
uri: https://api.chartmogul.com/v1/plans
|
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
|
+
- Sun, 05 Jun 2016 19:47:08 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/"2122e94312ef92cc077db62910743655"
|
138
|
+
cache-control:
|
139
|
+
- max-age=0, private, must-revalidate
|
140
|
+
x-request-id:
|
141
|
+
- 1286c5a2-596a-4bc2-9e24-cfccc393e589
|
142
|
+
x-runtime:
|
143
|
+
- '0.018019'
|
144
|
+
strict-transport-security:
|
145
|
+
- max-age=15768000
|
146
|
+
body:
|
147
|
+
encoding: UTF-8
|
148
|
+
string: '{"plans":[{"uuid":"pl_ba808f0b-4c1c-4824-8705-a6736efa96dc","external_id":null,"name":"A
|
149
|
+
Test Plan","interval_count":1,"interval_unit":"month","data_source_uuid":"ds_77eb401d-fff6-43be-94dc-2cbc2e96e31e"}],"current_page":1,"total_pages":1}'
|
150
|
+
http_version:
|
151
|
+
recorded_at: Sun, 05 Jun 2016 19:47:08 GMT
|
152
|
+
recorded_with: VCR 3.0.3
|
@@ -1,198 +1,198 @@
|
|
1
|
-
---
|
2
|
-
http_interactions:
|
3
|
-
- request:
|
4
|
-
method: post
|
5
|
-
uri: https://api.chartmogul.com/v1/data_sources
|
6
|
-
body:
|
7
|
-
encoding: UTF-8
|
8
|
-
string: '{"name":"Another Data Source"}'
|
9
|
-
headers:
|
10
|
-
User-Agent:
|
11
|
-
- Faraday v0.10.0
|
12
|
-
Content-Type:
|
13
|
-
- application/json
|
14
|
-
Authorization:
|
15
|
-
- Basic ZHVtbXktdG9rZW46ZHVtbXktdG9rZW4=
|
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 19:47:08 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/"05335923b74e9c38a5a5fe8e83ac0f79"
|
39
|
-
cache-control:
|
40
|
-
- max-age=0, private, must-revalidate
|
41
|
-
x-request-id:
|
42
|
-
- e163c0c6-e937-4427-a0c8-78bd5e3f1711
|
43
|
-
x-runtime:
|
44
|
-
- '0.509776'
|
45
|
-
strict-transport-security:
|
46
|
-
- max-age=15768000
|
47
|
-
body:
|
48
|
-
encoding: UTF-8
|
49
|
-
string: '{"uuid":"ds_77eb401d-fff6-43be-94dc-2cbc2e96e31e","name":"Another Data
|
50
|
-
Source","created_at":"2016-06-05T19:47:08.020Z","status":"never_imported"}'
|
51
|
-
http_version:
|
52
|
-
recorded_at: Wed, 04 Jan 2017 02:32:48 GMT
|
53
|
-
- request:
|
54
|
-
method: post
|
55
|
-
uri: https://api.chartmogul.com/v1/plans
|
56
|
-
body:
|
57
|
-
encoding: UTF-8
|
58
|
-
string: '{"data_source_uuid":"ds_77eb401d-fff6-43be-94dc-2cbc2e96e31e","name":"A
|
59
|
-
Test Plan","interval_count":1,"interval_unit":"month","external_id":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
|
-
- Sun, 05 Jun 2016 19:47:08 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/"7086a2e8b932cc1ce3b47f8de5fdfdb8"
|
90
|
-
cache-control:
|
91
|
-
- max-age=0, private, must-revalidate
|
92
|
-
x-request-id:
|
93
|
-
- 6e97fa02-8bc1-4d2f-8718-8473a58e4254
|
94
|
-
x-runtime:
|
95
|
-
- '0.120821'
|
96
|
-
strict-transport-security:
|
97
|
-
- max-age=15768000
|
98
|
-
body:
|
99
|
-
encoding: UTF-8
|
100
|
-
string: '{"uuid":"pl_ba808f0b-4c1c-4824-8705-a6736efa96dc","external_id":null,"name":"A
|
101
|
-
Test Plan","interval_count":1,"interval_unit":"month","data_source_uuid":"ds_77eb401d-fff6-43be-94dc-2cbc2e96e31e"}'
|
102
|
-
http_version:
|
103
|
-
recorded_at: Sun, 05 Jun 2016 19:47:08 GMT
|
104
|
-
- request:
|
105
|
-
method: get
|
106
|
-
uri: https://api.chartmogul.com/v1/plans/pl_5ee8bf93-b0b4-4722-8a17-6b624a3af072
|
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: 404
|
118
|
-
message:
|
119
|
-
headers:
|
120
|
-
server:
|
121
|
-
- nginx/1.9.10
|
122
|
-
date:
|
123
|
-
- Sun, 05 Jun 2016 19:47:08 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/"2122e94312ef92cc077db62910743655"
|
138
|
-
cache-control:
|
139
|
-
- max-age=0, private, must-revalidate
|
140
|
-
x-request-id:
|
141
|
-
- 1286c5a2-596a-4bc2-9e24-cfccc393e589
|
142
|
-
x-runtime:
|
143
|
-
- '0.018019'
|
144
|
-
strict-transport-security:
|
145
|
-
- max-age=15768000
|
146
|
-
body:
|
147
|
-
encoding: UTF-8
|
148
|
-
string: '{"error": "Plan not found"}'
|
149
|
-
http_version:
|
150
|
-
recorded_at: Wed, 04 Jan 2017 02:32:48 GMT
|
151
|
-
- request:
|
152
|
-
method: delete
|
153
|
-
uri: https://api.chartmogul.com/v1/plans/pl_5ee8bf93-b0b4-4722-8a17-6b624a3af072
|
154
|
-
body:
|
155
|
-
encoding: US-ASCII
|
156
|
-
string: ''
|
157
|
-
headers:
|
158
|
-
User-Agent:
|
159
|
-
- Faraday v0.9.1
|
160
|
-
Authorization:
|
161
|
-
- Basic ODE2MjZkMWFiMzU5NTIwMzY5MjhjNjJjYmJiNDMyN2M6ODY3MDRmMDdkYzQwZmYzYjYyYzRjY2E5OTYxMjk2MzY=
|
162
|
-
response:
|
163
|
-
status:
|
164
|
-
code: 204
|
165
|
-
message:
|
166
|
-
headers:
|
167
|
-
server:
|
168
|
-
- nginx/1.9.10
|
169
|
-
date:
|
170
|
-
- Sun, 05 Jun 2016 19:47:08 GMT
|
171
|
-
content-type:
|
172
|
-
- application/json; charset=utf-8
|
173
|
-
transfer-encoding:
|
174
|
-
- chunked
|
175
|
-
connection:
|
176
|
-
- close
|
177
|
-
x-frame-options:
|
178
|
-
- SAMEORIGIN
|
179
|
-
x-xss-protection:
|
180
|
-
- 1; mode=block
|
181
|
-
x-content-type-options:
|
182
|
-
- nosniff
|
183
|
-
etag:
|
184
|
-
- W/"2122e94312ef92cc077db62910743655"
|
185
|
-
cache-control:
|
186
|
-
- max-age=0, private, must-revalidate
|
187
|
-
x-request-id:
|
188
|
-
- 1286c5a2-596a-4bc2-9e24-cfccc393e589
|
189
|
-
x-runtime:
|
190
|
-
- '0.018019'
|
191
|
-
strict-transport-security:
|
192
|
-
- max-age=15768000
|
193
|
-
body:
|
194
|
-
encoding: UTF-8
|
195
|
-
string: '{}'
|
196
|
-
http_version:
|
197
|
-
recorded_at: Wed, 04 Jan 2017 02:32:48 GMT
|
198
|
-
recorded_with: VCR 3.0.3
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://api.chartmogul.com/v1/data_sources
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '{"name":"Another Data Source"}'
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- Faraday v0.10.0
|
12
|
+
Content-Type:
|
13
|
+
- application/json
|
14
|
+
Authorization:
|
15
|
+
- Basic ZHVtbXktdG9rZW46ZHVtbXktdG9rZW4=
|
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 19:47:08 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/"05335923b74e9c38a5a5fe8e83ac0f79"
|
39
|
+
cache-control:
|
40
|
+
- max-age=0, private, must-revalidate
|
41
|
+
x-request-id:
|
42
|
+
- e163c0c6-e937-4427-a0c8-78bd5e3f1711
|
43
|
+
x-runtime:
|
44
|
+
- '0.509776'
|
45
|
+
strict-transport-security:
|
46
|
+
- max-age=15768000
|
47
|
+
body:
|
48
|
+
encoding: UTF-8
|
49
|
+
string: '{"uuid":"ds_77eb401d-fff6-43be-94dc-2cbc2e96e31e","name":"Another Data
|
50
|
+
Source","created_at":"2016-06-05T19:47:08.020Z","status":"never_imported"}'
|
51
|
+
http_version:
|
52
|
+
recorded_at: Wed, 04 Jan 2017 02:32:48 GMT
|
53
|
+
- request:
|
54
|
+
method: post
|
55
|
+
uri: https://api.chartmogul.com/v1/plans
|
56
|
+
body:
|
57
|
+
encoding: UTF-8
|
58
|
+
string: '{"data_source_uuid":"ds_77eb401d-fff6-43be-94dc-2cbc2e96e31e","name":"A
|
59
|
+
Test Plan","interval_count":1,"interval_unit":"month","external_id":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
|
+
- Sun, 05 Jun 2016 19:47:08 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/"7086a2e8b932cc1ce3b47f8de5fdfdb8"
|
90
|
+
cache-control:
|
91
|
+
- max-age=0, private, must-revalidate
|
92
|
+
x-request-id:
|
93
|
+
- 6e97fa02-8bc1-4d2f-8718-8473a58e4254
|
94
|
+
x-runtime:
|
95
|
+
- '0.120821'
|
96
|
+
strict-transport-security:
|
97
|
+
- max-age=15768000
|
98
|
+
body:
|
99
|
+
encoding: UTF-8
|
100
|
+
string: '{"uuid":"pl_ba808f0b-4c1c-4824-8705-a6736efa96dc","external_id":null,"name":"A
|
101
|
+
Test Plan","interval_count":1,"interval_unit":"month","data_source_uuid":"ds_77eb401d-fff6-43be-94dc-2cbc2e96e31e"}'
|
102
|
+
http_version:
|
103
|
+
recorded_at: Sun, 05 Jun 2016 19:47:08 GMT
|
104
|
+
- request:
|
105
|
+
method: get
|
106
|
+
uri: https://api.chartmogul.com/v1/plans/pl_5ee8bf93-b0b4-4722-8a17-6b624a3af072
|
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: 404
|
118
|
+
message:
|
119
|
+
headers:
|
120
|
+
server:
|
121
|
+
- nginx/1.9.10
|
122
|
+
date:
|
123
|
+
- Sun, 05 Jun 2016 19:47:08 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/"2122e94312ef92cc077db62910743655"
|
138
|
+
cache-control:
|
139
|
+
- max-age=0, private, must-revalidate
|
140
|
+
x-request-id:
|
141
|
+
- 1286c5a2-596a-4bc2-9e24-cfccc393e589
|
142
|
+
x-runtime:
|
143
|
+
- '0.018019'
|
144
|
+
strict-transport-security:
|
145
|
+
- max-age=15768000
|
146
|
+
body:
|
147
|
+
encoding: UTF-8
|
148
|
+
string: '{"error": "Plan not found"}'
|
149
|
+
http_version:
|
150
|
+
recorded_at: Wed, 04 Jan 2017 02:32:48 GMT
|
151
|
+
- request:
|
152
|
+
method: delete
|
153
|
+
uri: https://api.chartmogul.com/v1/plans/pl_5ee8bf93-b0b4-4722-8a17-6b624a3af072
|
154
|
+
body:
|
155
|
+
encoding: US-ASCII
|
156
|
+
string: ''
|
157
|
+
headers:
|
158
|
+
User-Agent:
|
159
|
+
- Faraday v0.9.1
|
160
|
+
Authorization:
|
161
|
+
- Basic ODE2MjZkMWFiMzU5NTIwMzY5MjhjNjJjYmJiNDMyN2M6ODY3MDRmMDdkYzQwZmYzYjYyYzRjY2E5OTYxMjk2MzY=
|
162
|
+
response:
|
163
|
+
status:
|
164
|
+
code: 204
|
165
|
+
message:
|
166
|
+
headers:
|
167
|
+
server:
|
168
|
+
- nginx/1.9.10
|
169
|
+
date:
|
170
|
+
- Sun, 05 Jun 2016 19:47:08 GMT
|
171
|
+
content-type:
|
172
|
+
- application/json; charset=utf-8
|
173
|
+
transfer-encoding:
|
174
|
+
- chunked
|
175
|
+
connection:
|
176
|
+
- close
|
177
|
+
x-frame-options:
|
178
|
+
- SAMEORIGIN
|
179
|
+
x-xss-protection:
|
180
|
+
- 1; mode=block
|
181
|
+
x-content-type-options:
|
182
|
+
- nosniff
|
183
|
+
etag:
|
184
|
+
- W/"2122e94312ef92cc077db62910743655"
|
185
|
+
cache-control:
|
186
|
+
- max-age=0, private, must-revalidate
|
187
|
+
x-request-id:
|
188
|
+
- 1286c5a2-596a-4bc2-9e24-cfccc393e589
|
189
|
+
x-runtime:
|
190
|
+
- '0.018019'
|
191
|
+
strict-transport-security:
|
192
|
+
- max-age=15768000
|
193
|
+
body:
|
194
|
+
encoding: UTF-8
|
195
|
+
string: '{}'
|
196
|
+
http_version:
|
197
|
+
recorded_at: Wed, 04 Jan 2017 02:32:48 GMT
|
198
|
+
recorded_with: VCR 3.0.3
|