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
@@ -1,102 +1,102 @@
|
|
1
|
-
---
|
2
|
-
http_interactions:
|
3
|
-
- request:
|
4
|
-
method: post
|
5
|
-
uri: https://api.chartmogul.com/v1/customers
|
6
|
-
body:
|
7
|
-
encoding: UTF-8
|
8
|
-
string: '{"data_source_uuid":"ds_154b9620-a22a-478a-8b44-198d11cc9a85","external_id":"X1234","name":"Test
|
9
|
-
Customer","email":"test@example.com","company":null,"country":"DE","state":null,"city":"Berlin","zip":null}'
|
10
|
-
headers:
|
11
|
-
User-Agent:
|
12
|
-
- Faraday v0.9.1
|
13
|
-
Content-Type:
|
14
|
-
- application/json
|
15
|
-
Authorization:
|
16
|
-
- Basic ODE2MjZkMWFiMzU5NTIwMzY5MjhjNjJjYmJiNDMyN2M6ODY3MDRmMDdkYzQwZmYzYjYyYzRjY2E5OTYxMjk2MzY=
|
17
|
-
response:
|
18
|
-
status:
|
19
|
-
code: 201
|
20
|
-
message:
|
21
|
-
headers:
|
22
|
-
server:
|
23
|
-
- nginx/1.9.10
|
24
|
-
date:
|
25
|
-
- Mon, 06 Jun 2016 15:26:39 GMT
|
26
|
-
content-type:
|
27
|
-
- application/json; charset=utf-8
|
28
|
-
transfer-encoding:
|
29
|
-
- chunked
|
30
|
-
connection:
|
31
|
-
- close
|
32
|
-
x-frame-options:
|
33
|
-
- SAMEORIGIN
|
34
|
-
x-xss-protection:
|
35
|
-
- 1; mode=block
|
36
|
-
x-content-type-options:
|
37
|
-
- nosniff
|
38
|
-
etag:
|
39
|
-
- W/"2bb61213c73b74bf7e3094b3a2814b1c"
|
40
|
-
cache-control:
|
41
|
-
- max-age=0, private, must-revalidate
|
42
|
-
x-request-id:
|
43
|
-
- 7a43eb0b-0099-4cef-b620-a6ac687ace2f
|
44
|
-
x-runtime:
|
45
|
-
- '0.202425'
|
46
|
-
strict-transport-security:
|
47
|
-
- max-age=15768000
|
48
|
-
body:
|
49
|
-
encoding: UTF-8
|
50
|
-
string: '{"uuid":"cus_c4babf63-3eb9-4125-8687-2a0d781b0af2","external_id":"X1234","name":"Test
|
51
|
-
Customer","company":"","email":"test@example.com","city":"Berlin","state":"","country":"DE","zip":"","data_source_uuid":"ds_154b9620-a22a-478a-8b44-198d11cc9a85"}'
|
52
|
-
http_version:
|
53
|
-
recorded_at: Mon, 06 Jun 2016 15:26:39 GMT
|
54
|
-
- request:
|
55
|
-
method: get
|
56
|
-
uri: https://api.chartmogul.com/v1/customers?external_id=X1234
|
57
|
-
body:
|
58
|
-
encoding: US-ASCII
|
59
|
-
string: ''
|
60
|
-
headers:
|
61
|
-
User-Agent:
|
62
|
-
- Faraday v0.9.1
|
63
|
-
Authorization:
|
64
|
-
- Basic ODE2MjZkMWFiMzU5NTIwMzY5MjhjNjJjYmJiNDMyN2M6ODY3MDRmMDdkYzQwZmYzYjYyYzRjY2E5OTYxMjk2MzY=
|
65
|
-
response:
|
66
|
-
status:
|
67
|
-
code: 200
|
68
|
-
message:
|
69
|
-
headers:
|
70
|
-
server:
|
71
|
-
- nginx/1.9.10
|
72
|
-
date:
|
73
|
-
- Mon, 06 Jun 2016 15:26:40 GMT
|
74
|
-
content-type:
|
75
|
-
- application/json; charset=utf-8
|
76
|
-
transfer-encoding:
|
77
|
-
- chunked
|
78
|
-
connection:
|
79
|
-
- close
|
80
|
-
x-frame-options:
|
81
|
-
- SAMEORIGIN
|
82
|
-
x-xss-protection:
|
83
|
-
- 1; mode=block
|
84
|
-
x-content-type-options:
|
85
|
-
- nosniff
|
86
|
-
etag:
|
87
|
-
- W/"f8b194be146b71827424808d2de63994"
|
88
|
-
cache-control:
|
89
|
-
- max-age=0, private, must-revalidate
|
90
|
-
x-request-id:
|
91
|
-
- aa0a64af-9cd4-4b7d-9d43-d3b7c08ac7d1
|
92
|
-
x-runtime:
|
93
|
-
- '0.020597'
|
94
|
-
strict-transport-security:
|
95
|
-
- max-age=15768000
|
96
|
-
body:
|
97
|
-
encoding: UTF-8
|
98
|
-
string: '{"entries":[{"uuid":"cus_c4babf63-3eb9-4125-8687-2a0d781b0af2","external_id":"X1234","name":"Test
|
99
|
-
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}'
|
100
|
-
http_version:
|
101
|
-
recorded_at: Mon, 06 Jun 2016 15:26:40 GMT
|
102
|
-
recorded_with: VCR 3.0.3
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://api.chartmogul.com/v1/customers
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '{"data_source_uuid":"ds_154b9620-a22a-478a-8b44-198d11cc9a85","external_id":"X1234","name":"Test
|
9
|
+
Customer","email":"test@example.com","company":null,"country":"DE","state":null,"city":"Berlin","zip":null}'
|
10
|
+
headers:
|
11
|
+
User-Agent:
|
12
|
+
- Faraday v0.9.1
|
13
|
+
Content-Type:
|
14
|
+
- application/json
|
15
|
+
Authorization:
|
16
|
+
- Basic ODE2MjZkMWFiMzU5NTIwMzY5MjhjNjJjYmJiNDMyN2M6ODY3MDRmMDdkYzQwZmYzYjYyYzRjY2E5OTYxMjk2MzY=
|
17
|
+
response:
|
18
|
+
status:
|
19
|
+
code: 201
|
20
|
+
message:
|
21
|
+
headers:
|
22
|
+
server:
|
23
|
+
- nginx/1.9.10
|
24
|
+
date:
|
25
|
+
- Mon, 06 Jun 2016 15:26:39 GMT
|
26
|
+
content-type:
|
27
|
+
- application/json; charset=utf-8
|
28
|
+
transfer-encoding:
|
29
|
+
- chunked
|
30
|
+
connection:
|
31
|
+
- close
|
32
|
+
x-frame-options:
|
33
|
+
- SAMEORIGIN
|
34
|
+
x-xss-protection:
|
35
|
+
- 1; mode=block
|
36
|
+
x-content-type-options:
|
37
|
+
- nosniff
|
38
|
+
etag:
|
39
|
+
- W/"2bb61213c73b74bf7e3094b3a2814b1c"
|
40
|
+
cache-control:
|
41
|
+
- max-age=0, private, must-revalidate
|
42
|
+
x-request-id:
|
43
|
+
- 7a43eb0b-0099-4cef-b620-a6ac687ace2f
|
44
|
+
x-runtime:
|
45
|
+
- '0.202425'
|
46
|
+
strict-transport-security:
|
47
|
+
- max-age=15768000
|
48
|
+
body:
|
49
|
+
encoding: UTF-8
|
50
|
+
string: '{"uuid":"cus_c4babf63-3eb9-4125-8687-2a0d781b0af2","external_id":"X1234","name":"Test
|
51
|
+
Customer","company":"","email":"test@example.com","city":"Berlin","state":"","country":"DE","zip":"","data_source_uuid":"ds_154b9620-a22a-478a-8b44-198d11cc9a85"}'
|
52
|
+
http_version:
|
53
|
+
recorded_at: Mon, 06 Jun 2016 15:26:39 GMT
|
54
|
+
- request:
|
55
|
+
method: get
|
56
|
+
uri: https://api.chartmogul.com/v1/customers?external_id=X1234
|
57
|
+
body:
|
58
|
+
encoding: US-ASCII
|
59
|
+
string: ''
|
60
|
+
headers:
|
61
|
+
User-Agent:
|
62
|
+
- Faraday v0.9.1
|
63
|
+
Authorization:
|
64
|
+
- Basic ODE2MjZkMWFiMzU5NTIwMzY5MjhjNjJjYmJiNDMyN2M6ODY3MDRmMDdkYzQwZmYzYjYyYzRjY2E5OTYxMjk2MzY=
|
65
|
+
response:
|
66
|
+
status:
|
67
|
+
code: 200
|
68
|
+
message:
|
69
|
+
headers:
|
70
|
+
server:
|
71
|
+
- nginx/1.9.10
|
72
|
+
date:
|
73
|
+
- Mon, 06 Jun 2016 15:26:40 GMT
|
74
|
+
content-type:
|
75
|
+
- application/json; charset=utf-8
|
76
|
+
transfer-encoding:
|
77
|
+
- chunked
|
78
|
+
connection:
|
79
|
+
- close
|
80
|
+
x-frame-options:
|
81
|
+
- SAMEORIGIN
|
82
|
+
x-xss-protection:
|
83
|
+
- 1; mode=block
|
84
|
+
x-content-type-options:
|
85
|
+
- nosniff
|
86
|
+
etag:
|
87
|
+
- W/"f8b194be146b71827424808d2de63994"
|
88
|
+
cache-control:
|
89
|
+
- max-age=0, private, must-revalidate
|
90
|
+
x-request-id:
|
91
|
+
- aa0a64af-9cd4-4b7d-9d43-d3b7c08ac7d1
|
92
|
+
x-runtime:
|
93
|
+
- '0.020597'
|
94
|
+
strict-transport-security:
|
95
|
+
- max-age=15768000
|
96
|
+
body:
|
97
|
+
encoding: UTF-8
|
98
|
+
string: '{"entries":[{"uuid":"cus_c4babf63-3eb9-4125-8687-2a0d781b0af2","external_id":"X1234","name":"Test
|
99
|
+
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}'
|
100
|
+
http_version:
|
101
|
+
recorded_at: Mon, 06 Jun 2016 15:26:40 GMT
|
102
|
+
recorded_with: VCR 3.0.3
|
@@ -1,101 +1,101 @@
|
|
1
|
-
---
|
2
|
-
http_interactions:
|
3
|
-
- request:
|
4
|
-
method: post
|
5
|
-
uri: https://api.chartmogul.com/v1/customers
|
6
|
-
body:
|
7
|
-
encoding: UTF-8
|
8
|
-
string: '{"data_source_uuid":"ds_154b9620-a22a-478a-8b44-198d11cc9a85","external_id":"X1234","name":"Test
|
9
|
-
Customer","email":"test@example.com","company":null,"country":"DE","state":null,"city":"Berlin","zip":null}'
|
10
|
-
headers:
|
11
|
-
User-Agent:
|
12
|
-
- Faraday v0.9.1
|
13
|
-
Content-Type:
|
14
|
-
- application/json
|
15
|
-
Authorization:
|
16
|
-
- Basic ODE2MjZkMWFiMzU5NTIwMzY5MjhjNjJjYmJiNDMyN2M6ODY3MDRmMDdkYzQwZmYzYjYyYzRjY2E5OTYxMjk2MzY=
|
17
|
-
response:
|
18
|
-
status:
|
19
|
-
code: 201
|
20
|
-
message:
|
21
|
-
headers:
|
22
|
-
server:
|
23
|
-
- nginx/1.9.10
|
24
|
-
date:
|
25
|
-
- Mon, 06 Jun 2016 15:26:39 GMT
|
26
|
-
content-type:
|
27
|
-
- application/json; charset=utf-8
|
28
|
-
transfer-encoding:
|
29
|
-
- chunked
|
30
|
-
connection:
|
31
|
-
- close
|
32
|
-
x-frame-options:
|
33
|
-
- SAMEORIGIN
|
34
|
-
x-xss-protection:
|
35
|
-
- 1; mode=block
|
36
|
-
x-content-type-options:
|
37
|
-
- nosniff
|
38
|
-
etag:
|
39
|
-
- W/"2bb61213c73b74bf7e3094b3a2814b1c"
|
40
|
-
cache-control:
|
41
|
-
- max-age=0, private, must-revalidate
|
42
|
-
x-request-id:
|
43
|
-
- 7a43eb0b-0099-4cef-b620-a6ac687ace2f
|
44
|
-
x-runtime:
|
45
|
-
- '0.202425'
|
46
|
-
strict-transport-security:
|
47
|
-
- max-age=15768000
|
48
|
-
body:
|
49
|
-
encoding: UTF-8
|
50
|
-
string: '{"uuid":"cus_c4babf63-3eb9-4125-8687-2a0d781b0af2","external_id":"X1234","name":"Test
|
51
|
-
Customer","company":"","email":"test@example.com","city":"Berlin","state":"","country":"DE","zip":"","data_source_uuid":"ds_154b9620-a22a-478a-8b44-198d11cc9a85"}'
|
52
|
-
http_version:
|
53
|
-
recorded_at: Mon, 06 Jun 2016 15:26:39 GMT
|
54
|
-
- request:
|
55
|
-
method: get
|
56
|
-
uri: https://api.chartmogul.com/v1/customers?external_id=nope
|
57
|
-
body:
|
58
|
-
encoding: US-ASCII
|
59
|
-
string: ''
|
60
|
-
headers:
|
61
|
-
User-Agent:
|
62
|
-
- Faraday v0.9.1
|
63
|
-
Authorization:
|
64
|
-
- Basic ODE2MjZkMWFiMzU5NTIwMzY5MjhjNjJjYmJiNDMyN2M6ODY3MDRmMDdkYzQwZmYzYjYyYzRjY2E5OTYxMjk2MzY=
|
65
|
-
response:
|
66
|
-
status:
|
67
|
-
code: 200
|
68
|
-
message:
|
69
|
-
headers:
|
70
|
-
server:
|
71
|
-
- nginx/1.9.10
|
72
|
-
date:
|
73
|
-
- Mon, 06 Jun 2016 15:26:40 GMT
|
74
|
-
content-type:
|
75
|
-
- application/json; charset=utf-8
|
76
|
-
transfer-encoding:
|
77
|
-
- chunked
|
78
|
-
connection:
|
79
|
-
- close
|
80
|
-
x-frame-options:
|
81
|
-
- SAMEORIGIN
|
82
|
-
x-xss-protection:
|
83
|
-
- 1; mode=block
|
84
|
-
x-content-type-options:
|
85
|
-
- nosniff
|
86
|
-
etag:
|
87
|
-
- W/"f8b194be146b71827424808d2de63994"
|
88
|
-
cache-control:
|
89
|
-
- max-age=0, private, must-revalidate
|
90
|
-
x-request-id:
|
91
|
-
- aa0a64af-9cd4-4b7d-9d43-d3b7c08ac7d1
|
92
|
-
x-runtime:
|
93
|
-
- '0.020597'
|
94
|
-
strict-transport-security:
|
95
|
-
- max-age=15768000
|
96
|
-
body:
|
97
|
-
encoding: UTF-8
|
98
|
-
string: '{"entries":[]}'
|
99
|
-
http_version:
|
100
|
-
recorded_at: Mon, 06 Jun 2016 15:26:40 GMT
|
101
|
-
recorded_with: VCR 3.0.3
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://api.chartmogul.com/v1/customers
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '{"data_source_uuid":"ds_154b9620-a22a-478a-8b44-198d11cc9a85","external_id":"X1234","name":"Test
|
9
|
+
Customer","email":"test@example.com","company":null,"country":"DE","state":null,"city":"Berlin","zip":null}'
|
10
|
+
headers:
|
11
|
+
User-Agent:
|
12
|
+
- Faraday v0.9.1
|
13
|
+
Content-Type:
|
14
|
+
- application/json
|
15
|
+
Authorization:
|
16
|
+
- Basic ODE2MjZkMWFiMzU5NTIwMzY5MjhjNjJjYmJiNDMyN2M6ODY3MDRmMDdkYzQwZmYzYjYyYzRjY2E5OTYxMjk2MzY=
|
17
|
+
response:
|
18
|
+
status:
|
19
|
+
code: 201
|
20
|
+
message:
|
21
|
+
headers:
|
22
|
+
server:
|
23
|
+
- nginx/1.9.10
|
24
|
+
date:
|
25
|
+
- Mon, 06 Jun 2016 15:26:39 GMT
|
26
|
+
content-type:
|
27
|
+
- application/json; charset=utf-8
|
28
|
+
transfer-encoding:
|
29
|
+
- chunked
|
30
|
+
connection:
|
31
|
+
- close
|
32
|
+
x-frame-options:
|
33
|
+
- SAMEORIGIN
|
34
|
+
x-xss-protection:
|
35
|
+
- 1; mode=block
|
36
|
+
x-content-type-options:
|
37
|
+
- nosniff
|
38
|
+
etag:
|
39
|
+
- W/"2bb61213c73b74bf7e3094b3a2814b1c"
|
40
|
+
cache-control:
|
41
|
+
- max-age=0, private, must-revalidate
|
42
|
+
x-request-id:
|
43
|
+
- 7a43eb0b-0099-4cef-b620-a6ac687ace2f
|
44
|
+
x-runtime:
|
45
|
+
- '0.202425'
|
46
|
+
strict-transport-security:
|
47
|
+
- max-age=15768000
|
48
|
+
body:
|
49
|
+
encoding: UTF-8
|
50
|
+
string: '{"uuid":"cus_c4babf63-3eb9-4125-8687-2a0d781b0af2","external_id":"X1234","name":"Test
|
51
|
+
Customer","company":"","email":"test@example.com","city":"Berlin","state":"","country":"DE","zip":"","data_source_uuid":"ds_154b9620-a22a-478a-8b44-198d11cc9a85"}'
|
52
|
+
http_version:
|
53
|
+
recorded_at: Mon, 06 Jun 2016 15:26:39 GMT
|
54
|
+
- request:
|
55
|
+
method: get
|
56
|
+
uri: https://api.chartmogul.com/v1/customers?external_id=nope
|
57
|
+
body:
|
58
|
+
encoding: US-ASCII
|
59
|
+
string: ''
|
60
|
+
headers:
|
61
|
+
User-Agent:
|
62
|
+
- Faraday v0.9.1
|
63
|
+
Authorization:
|
64
|
+
- Basic ODE2MjZkMWFiMzU5NTIwMzY5MjhjNjJjYmJiNDMyN2M6ODY3MDRmMDdkYzQwZmYzYjYyYzRjY2E5OTYxMjk2MzY=
|
65
|
+
response:
|
66
|
+
status:
|
67
|
+
code: 200
|
68
|
+
message:
|
69
|
+
headers:
|
70
|
+
server:
|
71
|
+
- nginx/1.9.10
|
72
|
+
date:
|
73
|
+
- Mon, 06 Jun 2016 15:26:40 GMT
|
74
|
+
content-type:
|
75
|
+
- application/json; charset=utf-8
|
76
|
+
transfer-encoding:
|
77
|
+
- chunked
|
78
|
+
connection:
|
79
|
+
- close
|
80
|
+
x-frame-options:
|
81
|
+
- SAMEORIGIN
|
82
|
+
x-xss-protection:
|
83
|
+
- 1; mode=block
|
84
|
+
x-content-type-options:
|
85
|
+
- nosniff
|
86
|
+
etag:
|
87
|
+
- W/"f8b194be146b71827424808d2de63994"
|
88
|
+
cache-control:
|
89
|
+
- max-age=0, private, must-revalidate
|
90
|
+
x-request-id:
|
91
|
+
- aa0a64af-9cd4-4b7d-9d43-d3b7c08ac7d1
|
92
|
+
x-runtime:
|
93
|
+
- '0.020597'
|
94
|
+
strict-transport-security:
|
95
|
+
- max-age=15768000
|
96
|
+
body:
|
97
|
+
encoding: UTF-8
|
98
|
+
string: '{"entries":[]}'
|
99
|
+
http_version:
|
100
|
+
recorded_at: Mon, 06 Jun 2016 15:26:40 GMT
|
101
|
+
recorded_with: VCR 3.0.3
|
@@ -1,298 +1,298 @@
|
|
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":"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/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/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/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
|
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":"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/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/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/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
|