chartmogul-ruby 3.3.0 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/workflows/test.yml +1 -1
- data/.gitignore +2 -1
- data/README.md +1 -1
- data/changelog.md +15 -0
- data/chartmogul-ruby.gemspec +2 -2
- data/lib/chartmogul/api/actions/custom.rb +2 -1
- data/lib/chartmogul/concerns/pageable_with_cursor.rb +4 -0
- data/lib/chartmogul/contact.rb +1 -4
- data/lib/chartmogul/customer.rb +13 -1
- data/lib/chartmogul/customer_invoices.rb +5 -1
- data/lib/chartmogul/enrichment/customer.rb +1 -0
- data/lib/chartmogul/errors/deprecated_parameter_error.rb +6 -0
- data/lib/chartmogul/invoice.rb +1 -0
- data/lib/chartmogul/metrics/activity.rb +1 -4
- data/lib/chartmogul/metrics/customers/activity.rb +5 -0
- data/lib/chartmogul/metrics/customers/subscription.rb +5 -0
- data/lib/chartmogul/plan.rb +1 -0
- data/lib/chartmogul/plan_group.rb +1 -0
- data/lib/chartmogul/plan_groups/plans.rb +11 -0
- data/lib/chartmogul/resource_path.rb +6 -1
- data/lib/chartmogul/subscription.rb +5 -0
- data/lib/chartmogul/subscription_event.rb +1 -0
- data/lib/chartmogul/version.rb +1 -1
- data/lib/chartmogul.rb +1 -0
- metadata +6 -103
- data/fixtures/vcr_cassettes/ChartMogul_APIResource/connection/works_in_a_threaded_environment.yml +0 -112
- data/fixtures/vcr_cassettes/ChartMogul_APIResource/connection/works_when_credentials_are_updated.yml +0 -77
- data/fixtures/vcr_cassettes/ChartMogul_Account/returns_details_of_current_account.yml +0 -64
- data/fixtures/vcr_cassettes/ChartMogul_Contact/API_Interactions/creates_contact_correctly.yml +0 -134
- data/fixtures/vcr_cassettes/ChartMogul_Contact/API_Interactions/destroys_contact_correctly.yml +0 -99
- data/fixtures/vcr_cassettes/ChartMogul_Contact/API_Interactions/merges_contact_correctly.yml +0 -105
- data/fixtures/vcr_cassettes/ChartMogul_Contact/API_Interactions/paginates_correctly.yml +0 -133
- data/fixtures/vcr_cassettes/ChartMogul_Contact/API_Interactions/updates_contact_correctly.yml +0 -102
- data/fixtures/vcr_cassettes/ChartMogul_Customer/API_Interactions/adds_custom_attributes.yml +0 -80
- data/fixtures/vcr_cassettes/ChartMogul_Customer/API_Interactions/adds_required_tags.yml +0 -79
- data/fixtures/vcr_cassettes/ChartMogul_Customer/API_Interactions/can_page_through_search_endpoint.yml +0 -43
- data/fixtures/vcr_cassettes/ChartMogul_Customer/API_Interactions/correctly_handles_a_422_response.yml +0 -50
- data/fixtures/vcr_cassettes/ChartMogul_Customer/API_Interactions/correctly_interracts_with_the_API.yml +0 -192
- data/fixtures/vcr_cassettes/ChartMogul_Customer/API_Interactions/creates_a_contact_belonging_to_the_customer_correctly.yml +0 -72
- data/fixtures/vcr_cassettes/ChartMogul_Customer/API_Interactions/lists_the_contacts_belonging_to_the_customer_correctly.yml +0 -72
- data/fixtures/vcr_cassettes/ChartMogul_Customer/API_Interactions/merges_customers.yml +0 -185
- data/fixtures/vcr_cassettes/ChartMogul_Customer/API_Interactions/raises_401_if_invalid_credentials.yml +0 -38
- data/fixtures/vcr_cassettes/ChartMogul_Customer/API_Interactions/raises_404_if_no_customers_found.yml +0 -38
- data/fixtures/vcr_cassettes/ChartMogul_Customer/API_Interactions/raises_422_for_update_with_invalid_data.yml +0 -86
- data/fixtures/vcr_cassettes/ChartMogul_Customer/API_Interactions/removes_custom_attributes.yml +0 -80
- data/fixtures/vcr_cassettes/ChartMogul_Customer/API_Interactions/removes_tags.yml +0 -80
- data/fixtures/vcr_cassettes/ChartMogul_Customer/API_Interactions/respects_camel_case_for_all_customers_endpoint.yml +0 -45
- data/fixtures/vcr_cassettes/ChartMogul_Customer/API_Interactions/returns_all_customers_through_list_all_endpoint.yml +0 -47
- data/fixtures/vcr_cassettes/ChartMogul_Customer/API_Interactions/returns_customer_through_retrieve_endpoint.yml +0 -42
- data/fixtures/vcr_cassettes/ChartMogul_Customer/API_Interactions/returns_right_customers_through_search_endpoint.yml +0 -43
- data/fixtures/vcr_cassettes/ChartMogul_Customer/API_Interactions/updates_custom_attributes.yml +0 -81
- data/fixtures/vcr_cassettes/ChartMogul_Customer/API_Interactions/updates_customer.yml +0 -139
- data/fixtures/vcr_cassettes/ChartMogul_Customer/API_Interactions/updates_customer_using_class_method.yml +0 -53
- data/fixtures/vcr_cassettes/ChartMogul_Customer/_find_by_external_id/when_external_id_is_provided/returns_matching_user_if_exists.yml +0 -102
- data/fixtures/vcr_cassettes/ChartMogul_Customer/_find_by_external_id/when_external_id_is_provided/returns_nil_if_customer_does_not_exist.yml +0 -101
- data/fixtures/vcr_cassettes/ChartMogul_CustomerInvoices/API_Interactions/correctly_interracts_with_the_API.yml +0 -337
- data/fixtures/vcr_cassettes/ChartMogul_DataSource/API_Interactions/correctly_interracts_with_the_API.yml +0 -189
- data/fixtures/vcr_cassettes/ChartMogul_DataSource/API_Interactions/correctly_raises_errors_on_404.yml +0 -46
- data/fixtures/vcr_cassettes/ChartMogul_DataSource/API_Interactions/correctly_raises_errors_on_422.yml +0 -48
- data/fixtures/vcr_cassettes/ChartMogul_DataSource/API_Interactions/retrieves_existing_data_source_matching_uuid.yml +0 -101
- data/fixtures/vcr_cassettes/ChartMogul_Invoice/API_Interactions/deletes_an_invoice.yml +0 -37
- data/fixtures/vcr_cassettes/ChartMogul_Invoice/API_Interactions/deletes_an_invoice_with_class_method.yml +0 -37
- data/fixtures/vcr_cassettes/ChartMogul_Invoice/API_Interactions/raises_error_on_deleting_non-existing_invoice.yml +0 -42
- data/fixtures/vcr_cassettes/ChartMogul_Invoice/API_Interactions/retrieves_existing_invoice_by_uuid.yml +0 -50
- data/fixtures/vcr_cassettes/ChartMogul_Invoice/API_Interactions/returns_all_invoices_through_list_all_endpoint.yml +0 -46
- data/fixtures/vcr_cassettes/ChartMogul_Metrics_ARPA/behaves_like_Metrics_API_resource/behaves_like_Summary/should_have_summary.yml +0 -42
- data/fixtures/vcr_cassettes/ChartMogul_Metrics_ARPA/behaves_like_Metrics_API_resource/should_have_entries.yml +0 -42
- data/fixtures/vcr_cassettes/ChartMogul_Metrics_ARR/behaves_like_Metrics_API_resource/behaves_like_Summary/should_have_summary.yml +0 -42
- data/fixtures/vcr_cassettes/ChartMogul_Metrics_ARR/behaves_like_Metrics_API_resource/should_have_entries.yml +0 -42
- data/fixtures/vcr_cassettes/ChartMogul_Metrics_ASP/behaves_like_Metrics_API_resource/behaves_like_Summary/should_have_summary.yml +0 -40
- data/fixtures/vcr_cassettes/ChartMogul_Metrics_ASP/behaves_like_Metrics_API_resource/should_have_entries.yml +0 -40
- data/fixtures/vcr_cassettes/ChartMogul_Metrics_ActivitiesExport/get_activities_export.yml +0 -43
- data/fixtures/vcr_cassettes/ChartMogul_Metrics_ActivitiesExport/post_activities_export.yml +0 -83
- data/fixtures/vcr_cassettes/ChartMogul_Metrics_Activity/behaves_like_PageableWithAnchor/should_be_pageable.yml +0 -44
- data/fixtures/vcr_cassettes/ChartMogul_Metrics_Activity/should_have_Activity_entries.yml +0 -44
- data/fixtures/vcr_cassettes/ChartMogul_Metrics_Activity.yml +0 -37
- data/fixtures/vcr_cassettes/ChartMogul_Metrics_AllKeyMetric/should_have_entries.yml +0 -42
- data/fixtures/vcr_cassettes/ChartMogul_Metrics_AllKeyMetric/should_have_summary.yml +0 -42
- data/fixtures/vcr_cassettes/ChartMogul_Metrics_CustomerChurnRate/behaves_like_Metrics_API_resource/behaves_like_Summary/should_have_summary.yml +0 -40
- data/fixtures/vcr_cassettes/ChartMogul_Metrics_CustomerChurnRate/behaves_like_Metrics_API_resource/should_have_entries.yml +0 -40
- data/fixtures/vcr_cassettes/ChartMogul_Metrics_CustomerCount/behaves_like_Metrics_API_resource/behaves_like_Summary/should_have_summary.yml +0 -42
- data/fixtures/vcr_cassettes/ChartMogul_Metrics_CustomerCount/behaves_like_Metrics_API_resource/should_have_entries.yml +0 -42
- data/fixtures/vcr_cassettes/ChartMogul_Metrics_Customers_Activity/behaves_like_Pageable/should_be_pageable.yml +0 -41
- data/fixtures/vcr_cassettes/ChartMogul_Metrics_Customers_Activity/should_have_Activity_entries.yml +0 -41
- data/fixtures/vcr_cassettes/ChartMogul_Metrics_Customers_Subscription/behaves_like_Pageable/should_be_pageable.yml +0 -40
- data/fixtures/vcr_cassettes/ChartMogul_Metrics_Customers_Subscription/should_have_Subscription_entries.yml +0 -40
- data/fixtures/vcr_cassettes/ChartMogul_Metrics_LTV/behaves_like_Metrics_API_resource/behaves_like_Summary/should_have_summary.yml +0 -40
- data/fixtures/vcr_cassettes/ChartMogul_Metrics_LTV/behaves_like_Metrics_API_resource/should_have_entries.yml +0 -40
- data/fixtures/vcr_cassettes/ChartMogul_Metrics_MRR/behaves_like_Summary/should_have_summary.yml +0 -42
- data/fixtures/vcr_cassettes/ChartMogul_Metrics_MRR/should_have_entries.yml +0 -42
- data/fixtures/vcr_cassettes/ChartMogul_Metrics_MRRChurnRate/behaves_like_Metrics_API_resource/behaves_like_Summary/should_have_summary.yml +0 -40
- data/fixtures/vcr_cassettes/ChartMogul_Metrics_MRRChurnRate/behaves_like_Metrics_API_resource/should_have_entries.yml +0 -40
- data/fixtures/vcr_cassettes/ChartMogul_Ping/pings/and_fails_on_incorrect_credentials.yml +0 -38
- data/fixtures/vcr_cassettes/ChartMogul_Ping/pings/and_fails_with_500_internal_server_error.yml +0 -40
- data/fixtures/vcr_cassettes/ChartMogul_Ping/pings/and_fails_with_504_gateway_timeout_error.yml +0 -40
- data/fixtures/vcr_cassettes/ChartMogul_Ping/pings/when_credentials_correct.yml +0 -38
- data/fixtures/vcr_cassettes/ChartMogul_Plan/API_Interactions/correctly_handles_a_422_error.yml +0 -51
- data/fixtures/vcr_cassettes/ChartMogul_Plan/API_Interactions/correctly_interacts_with_the_API.yml +0 -152
- data/fixtures/vcr_cassettes/ChartMogul_Plan/API_Interactions/deletes_existing_plan.yml +0 -198
- data/fixtures/vcr_cassettes/ChartMogul_Plan/API_Interactions/retrieves_existing_plan_by_uuid.yml +0 -151
- data/fixtures/vcr_cassettes/ChartMogul_Plan/API_Interactions/updates_existing_plan.yml +0 -198
- data/fixtures/vcr_cassettes/ChartMogul_Plan/API_Interactions/updates_existing_plan_using_class_method.yml +0 -164
- data/fixtures/vcr_cassettes/ChartMogul_PlanGroup/API_interactions/correctly_handles_a_422_error.yml +0 -50
- data/fixtures/vcr_cassettes/ChartMogul_PlanGroup/API_interactions/deletes_a_plan_group.yml +0 -293
- data/fixtures/vcr_cassettes/ChartMogul_PlanGroup/API_interactions/retrieves_existing_plan_group_by_uuid.yml +0 -251
- data/fixtures/vcr_cassettes/ChartMogul_PlanGroup/API_interactions/returns_an_array_of_plan_groups.yml +0 -357
- data/fixtures/vcr_cassettes/ChartMogul_PlanGroup/API_interactions/updates_existing_plan_group_name.yml +0 -304
- data/fixtures/vcr_cassettes/ChartMogul_PlanGroup/API_interactions/updates_existing_plan_group_name_via_class_method.yml +0 -297
- data/fixtures/vcr_cassettes/ChartMogul_PlanGroup/API_interactions/updates_existing_plan_group_plans.yml +0 -411
- data/fixtures/vcr_cassettes/ChartMogul_PlanGroups_Plans/API_interactions/given_a_plan_group_uuid_returns_an_array_of_plans_in_the_plan_group.yml +0 -252
- data/fixtures/vcr_cassettes/ChartMogul_Subscription/API_Interactions/connects_subscriptions.yml +0 -436
- data/fixtures/vcr_cassettes/ChartMogul_Subscription/API_Interactions/correctly_interracts_with_the_API.yml +0 -340
- data/fixtures/vcr_cassettes/ChartMogul_Subscription/API_Interactions/has_multiple_aliases.yml +0 -101
- data/fixtures/vcr_cassettes/ChartMogul_Subscription/_update_cancellation_dates/when_array_has_time_objects/is_setting_the_cancellation_dates_of_the_subscription.yml +0 -138
- data/fixtures/vcr_cassettes/ChartMogul_Subscription/_update_cancellation_dates/when_array_includes_invalid_entries/raises_an_exception.yml +0 -93
- data/fixtures/vcr_cassettes/ChartMogul_Subscription/_update_cancellation_dates/when_array_includes_valid_entries/is_setting_the_cancellation_dates_of_the_subscription.yml +0 -138
- data/fixtures/vcr_cassettes/ChartMogul_Subscription/_update_cancellation_dates/when_array_is_empty/makes_an_API_call_and_removes_the_cancellation_dates.yml +0 -138
- data/fixtures/vcr_cassettes/ChartMogul_SubscriptionEvent/API_interactions/creates_a_new_subscription_event.yml +0 -320
- data/fixtures/vcr_cassettes/ChartMogul_SubscriptionEvent/API_interactions/creates_a_new_subscription_event_through_initialization.yml +0 -320
- data/fixtures/vcr_cassettes/ChartMogul_SubscriptionEvent/API_interactions/deletes_the_subscription_event.yml +0 -377
- data/fixtures/vcr_cassettes/ChartMogul_SubscriptionEvent/API_interactions/lists_all_subscription_events.yml +0 -320
- data/fixtures/vcr_cassettes/ChartMogul_SubscriptionEvent/API_interactions/updates_the_subscription_event.yml +0 -377
- data/fixtures/vcr_cassettes/ChartMogul_Transactions_Payment/API_Interactions/correctly_interracts_with_the_API.yml +0 -243
@@ -1,138 +0,0 @@
|
|
1
|
-
---
|
2
|
-
http_interactions:
|
3
|
-
- request:
|
4
|
-
method: get
|
5
|
-
uri: https://api.chartmogul.com/v1/customers?external_id=test_cus_ext_id
|
6
|
-
body:
|
7
|
-
encoding: US-ASCII
|
8
|
-
string: ''
|
9
|
-
headers:
|
10
|
-
User-Agent:
|
11
|
-
- Faraday v0.15.4
|
12
|
-
Content-Type:
|
13
|
-
- application/json
|
14
|
-
Authorization:
|
15
|
-
- Basic hidden
|
16
|
-
response:
|
17
|
-
status:
|
18
|
-
code: 200
|
19
|
-
message:
|
20
|
-
headers:
|
21
|
-
server:
|
22
|
-
- nginx/1.10.1
|
23
|
-
date:
|
24
|
-
- Mon, 04 Mar 2019 12:51:16 GMT
|
25
|
-
content-type:
|
26
|
-
- application/json
|
27
|
-
content-length:
|
28
|
-
- '889'
|
29
|
-
connection:
|
30
|
-
- keep-alive
|
31
|
-
status:
|
32
|
-
- 200 OK
|
33
|
-
access-control-allow-credentials:
|
34
|
-
- 'true'
|
35
|
-
body:
|
36
|
-
encoding: UTF-8
|
37
|
-
string: '{"entries":[{"id":22661127,"uuid":"cus_b289bb4c-3e6f-11e9-b645-6369759fc9da","external_id":"test_cus_ext_id","name":"Test
|
38
|
-
Customer","email":"","status":"Active","customer-since":"2016-01-01T12:00:00+00:00","attributes":{"custom":{},"clearbit":{},"stripe":{},"tags":[]},"data_source_uuid":"ds_99d06d30-3e6f-11e9-b645-837bf5404a47","data_source_uuids":["ds_99d06d30-3e6f-11e9-b645-837bf5404a47"],"external_ids":["test_cus_ext_id"],"company":"","country":null,"state":null,"city":"","zip":null,"lead_created_at":null,"free_trial_started_at":null,"address":{"country":null,"state":null,"city":"","address_zip":null},"mrr":4348,"arr":52176,"billing-system-url":null,"chartmogul-url":"https://app.chartmogul.com/#customers/22661127-Test_Customer","billing-system-type":"Import
|
39
|
-
API","currency":"USD","currency-sign":"$"}],"current_page":1,"total_pages":1,"has_more":false,"per_page":200,"page":1}'
|
40
|
-
http_version:
|
41
|
-
recorded_at: Mon, 04 Mar 2019 12:51:16 GMT
|
42
|
-
- request:
|
43
|
-
method: get
|
44
|
-
uri: https://api.chartmogul.com/v1/import/customers/cus_b289bb4c-3e6f-11e9-b645-6369759fc9da/subscriptions
|
45
|
-
body:
|
46
|
-
encoding: US-ASCII
|
47
|
-
string: ''
|
48
|
-
headers:
|
49
|
-
User-Agent:
|
50
|
-
- Faraday v0.15.4
|
51
|
-
Content-Type:
|
52
|
-
- application/json
|
53
|
-
Authorization:
|
54
|
-
- Basic hidden
|
55
|
-
response:
|
56
|
-
status:
|
57
|
-
code: 200
|
58
|
-
message:
|
59
|
-
headers:
|
60
|
-
server:
|
61
|
-
- nginx/1.10.1
|
62
|
-
date:
|
63
|
-
- Mon, 04 Mar 2019 12:51:17 GMT
|
64
|
-
content-type:
|
65
|
-
- application/json; charset=utf-8
|
66
|
-
transfer-encoding:
|
67
|
-
- chunked
|
68
|
-
connection:
|
69
|
-
- keep-alive
|
70
|
-
vary:
|
71
|
-
- Accept-Encoding, Accept-Encoding
|
72
|
-
x-frame-options:
|
73
|
-
- SAMEORIGIN
|
74
|
-
x-xss-protection:
|
75
|
-
- 1; mode=block
|
76
|
-
x-content-type-options:
|
77
|
-
- nosniff
|
78
|
-
etag:
|
79
|
-
- W/"254e64ffb96f23cc2f16356dbd4e8051"
|
80
|
-
cache-control:
|
81
|
-
- max-age=0, private, must-revalidate
|
82
|
-
x-request-id:
|
83
|
-
- '08593034-b32b-4941-aaf0-6fc712762a81'
|
84
|
-
x-runtime:
|
85
|
-
- '0.070115'
|
86
|
-
strict-transport-security:
|
87
|
-
- max-age=15768000
|
88
|
-
body:
|
89
|
-
encoding: ASCII-8BIT
|
90
|
-
string: '{"customer_uuid":"cus_b289bb4c-3e6f-11e9-b645-6369759fc9da","subscriptions":[{"uuid":"sub_c2c97897-f0a0-4448-a035-043d7a19b845","external_id":"test_cus_sub_ext_id","cancellation_dates":["1999-12-31T22:00:00.000Z"],"plan_uuid":"pl_933aefe0-209d-0137-2188-040113b1c101","data_source_uuid":"ds_99d06d30-3e6f-11e9-b645-837bf5404a47"}],"current_page":1,"total_pages":1}'
|
91
|
-
http_version:
|
92
|
-
recorded_at: Mon, 04 Mar 2019 12:51:17 GMT
|
93
|
-
- request:
|
94
|
-
method: patch
|
95
|
-
uri: https://api.chartmogul.com/v1/import/subscriptions/sub_c2c97897-f0a0-4448-a035-043d7a19b845
|
96
|
-
body:
|
97
|
-
encoding: UTF-8
|
98
|
-
string: '{"cancellation_dates":["2000-01-01 00:00:00 +0200"]}'
|
99
|
-
headers:
|
100
|
-
User-Agent:
|
101
|
-
- Faraday v0.15.4
|
102
|
-
Content-Type:
|
103
|
-
- application/json
|
104
|
-
Authorization:
|
105
|
-
- Basic hidden
|
106
|
-
response:
|
107
|
-
status:
|
108
|
-
code: 202
|
109
|
-
message:
|
110
|
-
headers:
|
111
|
-
server:
|
112
|
-
- nginx/1.10.1
|
113
|
-
date:
|
114
|
-
- Mon, 04 Mar 2019 12:51:17 GMT
|
115
|
-
content-type:
|
116
|
-
- application/json; charset=utf-8
|
117
|
-
transfer-encoding:
|
118
|
-
- chunked
|
119
|
-
connection:
|
120
|
-
- keep-alive
|
121
|
-
x-frame-options:
|
122
|
-
- SAMEORIGIN
|
123
|
-
x-xss-protection:
|
124
|
-
- 1; mode=block
|
125
|
-
x-content-type-options:
|
126
|
-
- nosniff
|
127
|
-
cache-control:
|
128
|
-
- no-cache
|
129
|
-
x-request-id:
|
130
|
-
- 737a7d3a-bac8-4cdc-8d8f-15056faab094
|
131
|
-
x-runtime:
|
132
|
-
- '0.127860'
|
133
|
-
body:
|
134
|
-
encoding: UTF-8
|
135
|
-
string: '{"uuid":"sub_c2c97897-f0a0-4448-a035-043d7a19b845","external_id":"test_cus_sub_ext_id","cancellation_dates":["1999-12-31T22:00:00.000Z"],"customer_uuid":"cus_b289bb4c-3e6f-11e9-b645-6369759fc9da","plan_uuid":"pl_933aefe0-209d-0137-2188-040113b1c101","data_source_uuid":"ds_99d06d30-3e6f-11e9-b645-837bf5404a47"}'
|
136
|
-
http_version:
|
137
|
-
recorded_at: Mon, 04 Mar 2019 12:51:17 GMT
|
138
|
-
recorded_with: VCR 3.0.3
|
@@ -1,138 +0,0 @@
|
|
1
|
-
---
|
2
|
-
http_interactions:
|
3
|
-
- request:
|
4
|
-
method: get
|
5
|
-
uri: https://api.chartmogul.com/v1/customers?external_id=test_cus_ext_id
|
6
|
-
body:
|
7
|
-
encoding: US-ASCII
|
8
|
-
string: ''
|
9
|
-
headers:
|
10
|
-
User-Agent:
|
11
|
-
- Faraday v0.15.4
|
12
|
-
Content-Type:
|
13
|
-
- application/json
|
14
|
-
Authorization:
|
15
|
-
- Basic hidden
|
16
|
-
response:
|
17
|
-
status:
|
18
|
-
code: 200
|
19
|
-
message:
|
20
|
-
headers:
|
21
|
-
server:
|
22
|
-
- nginx/1.10.1
|
23
|
-
date:
|
24
|
-
- Mon, 04 Mar 2019 12:51:17 GMT
|
25
|
-
content-type:
|
26
|
-
- application/json
|
27
|
-
content-length:
|
28
|
-
- '889'
|
29
|
-
connection:
|
30
|
-
- keep-alive
|
31
|
-
status:
|
32
|
-
- 200 OK
|
33
|
-
access-control-allow-credentials:
|
34
|
-
- 'true'
|
35
|
-
body:
|
36
|
-
encoding: UTF-8
|
37
|
-
string: '{"entries":[{"id":22661127,"uuid":"cus_b289bb4c-3e6f-11e9-b645-6369759fc9da","external_id":"test_cus_ext_id","name":"Test
|
38
|
-
Customer","email":"","status":"Active","customer-since":"2016-01-01T12:00:00+00:00","attributes":{"custom":{},"clearbit":{},"stripe":{},"tags":[]},"data_source_uuid":"ds_99d06d30-3e6f-11e9-b645-837bf5404a47","data_source_uuids":["ds_99d06d30-3e6f-11e9-b645-837bf5404a47"],"external_ids":["test_cus_ext_id"],"company":"","country":null,"state":null,"city":"","zip":null,"lead_created_at":null,"free_trial_started_at":null,"address":{"country":null,"state":null,"city":"","address_zip":null},"mrr":4348,"arr":52176,"billing-system-url":null,"chartmogul-url":"https://app.chartmogul.com/#customers/22661127-Test_Customer","billing-system-type":"Import
|
39
|
-
API","currency":"USD","currency-sign":"$"}],"current_page":1,"total_pages":1,"has_more":false,"per_page":200,"page":1}'
|
40
|
-
http_version:
|
41
|
-
recorded_at: Mon, 04 Mar 2019 12:51:17 GMT
|
42
|
-
- request:
|
43
|
-
method: get
|
44
|
-
uri: https://api.chartmogul.com/v1/import/customers/cus_b289bb4c-3e6f-11e9-b645-6369759fc9da/subscriptions
|
45
|
-
body:
|
46
|
-
encoding: US-ASCII
|
47
|
-
string: ''
|
48
|
-
headers:
|
49
|
-
User-Agent:
|
50
|
-
- Faraday v0.15.4
|
51
|
-
Content-Type:
|
52
|
-
- application/json
|
53
|
-
Authorization:
|
54
|
-
- Basic hidden
|
55
|
-
response:
|
56
|
-
status:
|
57
|
-
code: 200
|
58
|
-
message:
|
59
|
-
headers:
|
60
|
-
server:
|
61
|
-
- nginx/1.10.1
|
62
|
-
date:
|
63
|
-
- Mon, 04 Mar 2019 12:51:18 GMT
|
64
|
-
content-type:
|
65
|
-
- application/json; charset=utf-8
|
66
|
-
transfer-encoding:
|
67
|
-
- chunked
|
68
|
-
connection:
|
69
|
-
- keep-alive
|
70
|
-
vary:
|
71
|
-
- Accept-Encoding, Accept-Encoding
|
72
|
-
x-frame-options:
|
73
|
-
- SAMEORIGIN
|
74
|
-
x-xss-protection:
|
75
|
-
- 1; mode=block
|
76
|
-
x-content-type-options:
|
77
|
-
- nosniff
|
78
|
-
etag:
|
79
|
-
- W/"254e64ffb96f23cc2f16356dbd4e8051"
|
80
|
-
cache-control:
|
81
|
-
- max-age=0, private, must-revalidate
|
82
|
-
x-request-id:
|
83
|
-
- feb37862-a362-4a35-898b-58677e08f554
|
84
|
-
x-runtime:
|
85
|
-
- '0.061015'
|
86
|
-
strict-transport-security:
|
87
|
-
- max-age=15768000
|
88
|
-
body:
|
89
|
-
encoding: ASCII-8BIT
|
90
|
-
string: '{"customer_uuid":"cus_b289bb4c-3e6f-11e9-b645-6369759fc9da","subscriptions":[{"uuid":"sub_c2c97897-f0a0-4448-a035-043d7a19b845","external_id":"test_cus_sub_ext_id","cancellation_dates":["1999-12-31T22:00:00.000Z"],"plan_uuid":"pl_933aefe0-209d-0137-2188-040113b1c101","data_source_uuid":"ds_99d06d30-3e6f-11e9-b645-837bf5404a47"}],"current_page":1,"total_pages":1}'
|
91
|
-
http_version:
|
92
|
-
recorded_at: Mon, 04 Mar 2019 12:51:18 GMT
|
93
|
-
- request:
|
94
|
-
method: patch
|
95
|
-
uri: https://api.chartmogul.com/v1/import/subscriptions/sub_c2c97897-f0a0-4448-a035-043d7a19b845
|
96
|
-
body:
|
97
|
-
encoding: UTF-8
|
98
|
-
string: '{"cancellation_dates":[]}'
|
99
|
-
headers:
|
100
|
-
User-Agent:
|
101
|
-
- Faraday v0.15.4
|
102
|
-
Content-Type:
|
103
|
-
- application/json
|
104
|
-
Authorization:
|
105
|
-
- Basic hidden
|
106
|
-
response:
|
107
|
-
status:
|
108
|
-
code: 202
|
109
|
-
message:
|
110
|
-
headers:
|
111
|
-
server:
|
112
|
-
- nginx/1.10.1
|
113
|
-
date:
|
114
|
-
- Mon, 04 Mar 2019 12:51:18 GMT
|
115
|
-
content-type:
|
116
|
-
- application/json; charset=utf-8
|
117
|
-
transfer-encoding:
|
118
|
-
- chunked
|
119
|
-
connection:
|
120
|
-
- keep-alive
|
121
|
-
x-frame-options:
|
122
|
-
- SAMEORIGIN
|
123
|
-
x-xss-protection:
|
124
|
-
- 1; mode=block
|
125
|
-
x-content-type-options:
|
126
|
-
- nosniff
|
127
|
-
cache-control:
|
128
|
-
- no-cache
|
129
|
-
x-request-id:
|
130
|
-
- 76ef1912-9ef8-4bc7-b56f-4e09e230be06
|
131
|
-
x-runtime:
|
132
|
-
- '0.135980'
|
133
|
-
body:
|
134
|
-
encoding: UTF-8
|
135
|
-
string: '{"uuid":"sub_c2c97897-f0a0-4448-a035-043d7a19b845","external_id":"test_cus_sub_ext_id","cancellation_dates":[],"customer_uuid":"cus_b289bb4c-3e6f-11e9-b645-6369759fc9da","plan_uuid":"pl_933aefe0-209d-0137-2188-040113b1c101","data_source_uuid":"ds_99d06d30-3e6f-11e9-b645-837bf5404a47"}'
|
136
|
-
http_version:
|
137
|
-
recorded_at: Mon, 04 Mar 2019 12:51:18 GMT
|
138
|
-
recorded_with: VCR 3.0.3
|
@@ -1,320 +0,0 @@
|
|
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":"Subscription Events Test ds_create"}'
|
9
|
-
headers:
|
10
|
-
User-Agent:
|
11
|
-
- chartmogul-ruby/3.0.0
|
12
|
-
Content-Type:
|
13
|
-
- application/json
|
14
|
-
Authorization:
|
15
|
-
- Basic hidden
|
16
|
-
response:
|
17
|
-
status:
|
18
|
-
code: 201
|
19
|
-
message: Created
|
20
|
-
headers:
|
21
|
-
access-control-allow-credentials:
|
22
|
-
- 'true'
|
23
|
-
content-type:
|
24
|
-
- application/json
|
25
|
-
date:
|
26
|
-
- Fri, 27 May 2022 21:54:10 GMT
|
27
|
-
status:
|
28
|
-
- 201 Created
|
29
|
-
content-length:
|
30
|
-
- '172'
|
31
|
-
connection:
|
32
|
-
- keep-alive
|
33
|
-
body:
|
34
|
-
encoding: UTF-8
|
35
|
-
string: '{"uuid":"ds_8a5c8aa6-de07-11ec-bf86-afa844e0d0e3","name":"Subscription
|
36
|
-
Events Test ds_create","system":"Import API","created_at":"2022-05-27T21:54:10.897Z","status":"idle"}'
|
37
|
-
http_version:
|
38
|
-
recorded_at: Fri, 27 May 2022 21:54:10 GMT
|
39
|
-
- request:
|
40
|
-
method: post
|
41
|
-
uri: https://api.chartmogul.com/v1/customers
|
42
|
-
body:
|
43
|
-
encoding: UTF-8
|
44
|
-
string: '{"external_id":"test_cus_ext_id","name":"Test Customer","data_source_uuid":"ds_8a5c8aa6-de07-11ec-bf86-afa844e0d0e3"}'
|
45
|
-
headers:
|
46
|
-
User-Agent:
|
47
|
-
- chartmogul-ruby/3.0.0
|
48
|
-
Content-Type:
|
49
|
-
- application/json
|
50
|
-
Authorization:
|
51
|
-
- Basic hidden
|
52
|
-
response:
|
53
|
-
status:
|
54
|
-
code: 201
|
55
|
-
message: Created
|
56
|
-
headers:
|
57
|
-
access-control-allow-credentials:
|
58
|
-
- 'true'
|
59
|
-
content-type:
|
60
|
-
- application/json
|
61
|
-
date:
|
62
|
-
- Fri, 27 May 2022 21:54:11 GMT
|
63
|
-
status:
|
64
|
-
- 201 Created
|
65
|
-
content-length:
|
66
|
-
- '772'
|
67
|
-
connection:
|
68
|
-
- keep-alive
|
69
|
-
body:
|
70
|
-
encoding: UTF-8
|
71
|
-
string: '{"id":131944224,"uuid":"cus_8a9bfcc2-de07-11ec-bf87-330a0f8a4736","external_id":"test_cus_ext_id","name":"Test
|
72
|
-
Customer","email":"","status":"Lead","customer-since":null,"attributes":{"custom":{},"clearbit":{},"stripe":{},"tags":[]},"data_source_uuid":"ds_8a5c8aa6-de07-11ec-bf86-afa844e0d0e3","data_source_uuids":["ds_8a5c8aa6-de07-11ec-bf86-afa844e0d0e3"],"external_ids":["test_cus_ext_id"],"company":"","country":null,"state":null,"city":"","zip":null,"lead_created_at":null,"free_trial_started_at":null,"address":{"country":null,"state":null,"city":"","address_zip":null},"mrr":0,"arr":0,"billing-system-url":null,"chartmogul-url":"https://app.chartmogul.com/#/customers/131944224-Test_Customer","billing-system-type":"Import
|
73
|
-
API","currency":"USD","currency-sign":"$"}'
|
74
|
-
http_version:
|
75
|
-
recorded_at: Fri, 27 May 2022 21:54:11 GMT
|
76
|
-
- request:
|
77
|
-
method: post
|
78
|
-
uri: https://api.chartmogul.com/v1/plans
|
79
|
-
body:
|
80
|
-
encoding: UTF-8
|
81
|
-
string: '{"name":"Test Plan1","interval_count":7,"interval_unit":"day","data_source_uuid":"ds_8a5c8aa6-de07-11ec-bf86-afa844e0d0e3"}'
|
82
|
-
headers:
|
83
|
-
User-Agent:
|
84
|
-
- chartmogul-ruby/3.0.0
|
85
|
-
Content-Type:
|
86
|
-
- application/json
|
87
|
-
Authorization:
|
88
|
-
- Basic hidden
|
89
|
-
response:
|
90
|
-
status:
|
91
|
-
code: 201
|
92
|
-
message: Created
|
93
|
-
headers:
|
94
|
-
access-control-allow-credentials:
|
95
|
-
- 'true'
|
96
|
-
cache-control:
|
97
|
-
- max-age=0, private, must-revalidate
|
98
|
-
content-type:
|
99
|
-
- application/json; charset=utf-8
|
100
|
-
date:
|
101
|
-
- Fri, 27 May 2022 21:54:12 GMT
|
102
|
-
etag:
|
103
|
-
- W/"3242b5ebeda79192d6f7f67c13b958d9"
|
104
|
-
referrer-policy:
|
105
|
-
- strict-origin-when-cross-origin
|
106
|
-
status:
|
107
|
-
- 201 Created
|
108
|
-
x-content-type-options:
|
109
|
-
- nosniff
|
110
|
-
x-download-options:
|
111
|
-
- noopen
|
112
|
-
x-frame-options:
|
113
|
-
- DENY
|
114
|
-
x-permitted-cross-domain-policies:
|
115
|
-
- none
|
116
|
-
x-request-id:
|
117
|
-
- 9d52d66d6610321598d3b723786c28ab
|
118
|
-
x-runtime:
|
119
|
-
- '0.052711'
|
120
|
-
x-xss-protection:
|
121
|
-
- 1; mode=block
|
122
|
-
content-length:
|
123
|
-
- '225'
|
124
|
-
connection:
|
125
|
-
- keep-alive
|
126
|
-
body:
|
127
|
-
encoding: UTF-8
|
128
|
-
string: '{"external_id":"77b16a30-c035-013a-fdad-62658d22be5b","name":"Test
|
129
|
-
Plan1","interval_count":7,"interval_unit":"day","data_source_uuid":"ds_8a5c8aa6-de07-11ec-bf86-afa844e0d0e3","uuid":"pl_77b16a30-c035-013a-fdad-62658d22be5b"}'
|
130
|
-
http_version:
|
131
|
-
recorded_at: Fri, 27 May 2022 21:54:12 GMT
|
132
|
-
- request:
|
133
|
-
method: post
|
134
|
-
uri: https://api.chartmogul.com/v1/subscription_events
|
135
|
-
body:
|
136
|
-
encoding: UTF-8
|
137
|
-
string: '{"subscription_event":{"id":null,"data_source_uuid":"ds_8a5c8aa6-de07-11ec-bf86-afa844e0d0e3","customer_external_id":"test_cus_ext_id","subscription_set_external_id":"","subscription_external_id":"test_cus_sub_ext_id1","plan_external_id":"","event_date":"2022-05-18T09:48:34Z","effective_date":"2021-12-30T00:01:00Z","event_type":"subscription_cancelled","external_id":"test_ev_id_create_1","errors":null,"created_at":null,"updated_at":null,"quantity":"","currency":"","amount_in_cents":"","tax_amount_in_cents":null,"retracted_event_id":null}}'
|
138
|
-
headers:
|
139
|
-
User-Agent:
|
140
|
-
- chartmogul-ruby/3.0.0
|
141
|
-
Content-Type:
|
142
|
-
- application/json
|
143
|
-
Authorization:
|
144
|
-
- Basic hidden
|
145
|
-
response:
|
146
|
-
status:
|
147
|
-
code: 201
|
148
|
-
message: Created
|
149
|
-
headers:
|
150
|
-
access-control-allow-credentials:
|
151
|
-
- 'true'
|
152
|
-
cache-control:
|
153
|
-
- max-age=0, private, must-revalidate
|
154
|
-
content-type:
|
155
|
-
- application/json; charset=utf-8
|
156
|
-
date:
|
157
|
-
- Fri, 27 May 2022 21:54:12 GMT
|
158
|
-
etag:
|
159
|
-
- W/"9394c4479530dec99d1ae768f24144ac"
|
160
|
-
referrer-policy:
|
161
|
-
- strict-origin-when-cross-origin
|
162
|
-
status:
|
163
|
-
- 201 Created
|
164
|
-
x-content-type-options:
|
165
|
-
- nosniff
|
166
|
-
x-download-options:
|
167
|
-
- noopen
|
168
|
-
x-frame-options:
|
169
|
-
- DENY
|
170
|
-
x-permitted-cross-domain-policies:
|
171
|
-
- none
|
172
|
-
x-request-id:
|
173
|
-
- cf699a67b6d807a4e5ae9e0b657ee067
|
174
|
-
x-runtime:
|
175
|
-
- '0.041647'
|
176
|
-
x-xss-protection:
|
177
|
-
- 1; mode=block
|
178
|
-
content-length:
|
179
|
-
- '560'
|
180
|
-
connection:
|
181
|
-
- keep-alive
|
182
|
-
body:
|
183
|
-
encoding: UTF-8
|
184
|
-
string: '{"id":138979488,"data_source_uuid":"ds_8a5c8aa6-de07-11ec-bf86-afa844e0d0e3","customer_external_id":"test_cus_ext_id","subscription_set_external_id":"","subscription_external_id":"test_cus_sub_ext_id1","plan_external_id":"","event_date":"2022-05-18T09:48:34Z","effective_date":"2021-12-30T00:01:00Z","event_type":"subscription_cancelled","external_id":"test_ev_id_create_1","errors":{},"created_at":"2022-05-27T21:54:12Z","updated_at":"2022-05-27T21:54:12Z","quantity":"","currency":"","amount_in_cents":"","tax_amount_in_cents":null,"retracted_event_id":null}'
|
185
|
-
http_version:
|
186
|
-
recorded_at: Fri, 27 May 2022 21:54:12 GMT
|
187
|
-
- request:
|
188
|
-
method: get
|
189
|
-
uri: https://api.chartmogul.com/v1/subscription_events?data_source_uuid=ds_8a5c8aa6-de07-11ec-bf86-afa844e0d0e3
|
190
|
-
body:
|
191
|
-
encoding: US-ASCII
|
192
|
-
string: ''
|
193
|
-
headers:
|
194
|
-
User-Agent:
|
195
|
-
- chartmogul-ruby/3.0.0
|
196
|
-
Content-Type:
|
197
|
-
- application/json
|
198
|
-
Authorization:
|
199
|
-
- Basic hidden
|
200
|
-
response:
|
201
|
-
status:
|
202
|
-
code: 200
|
203
|
-
message: OK
|
204
|
-
headers:
|
205
|
-
access-control-allow-credentials:
|
206
|
-
- 'true'
|
207
|
-
cache-control:
|
208
|
-
- max-age=0, private, must-revalidate
|
209
|
-
content-type:
|
210
|
-
- application/json; charset=utf-8
|
211
|
-
date:
|
212
|
-
- Fri, 27 May 2022 21:54:13 GMT
|
213
|
-
etag:
|
214
|
-
- W/"284a193c365cecb97517c5b3f7732e01"
|
215
|
-
referrer-policy:
|
216
|
-
- strict-origin-when-cross-origin
|
217
|
-
status:
|
218
|
-
- 200 OK
|
219
|
-
vary:
|
220
|
-
- Accept-Encoding, Accept-Encoding
|
221
|
-
x-content-type-options:
|
222
|
-
- nosniff
|
223
|
-
x-download-options:
|
224
|
-
- noopen
|
225
|
-
x-frame-options:
|
226
|
-
- DENY
|
227
|
-
x-permitted-cross-domain-policies:
|
228
|
-
- none
|
229
|
-
x-request-id:
|
230
|
-
- c1886a231273596512261eb400777323
|
231
|
-
x-runtime:
|
232
|
-
- '0.016469'
|
233
|
-
x-xss-protection:
|
234
|
-
- 1; mode=block
|
235
|
-
content-length:
|
236
|
-
- '370'
|
237
|
-
connection:
|
238
|
-
- keep-alive
|
239
|
-
body:
|
240
|
-
encoding: ASCII-8BIT
|
241
|
-
string: '{"subscription_events":[{"id":138979488,"data_source_uuid":"ds_8a5c8aa6-de07-11ec-bf86-afa844e0d0e3","customer_external_id":"test_cus_ext_id","subscription_set_external_id":"","subscription_external_id":"test_cus_sub_ext_id1","plan_external_id":"","event_date":"2022-05-18T09:48:34Z","effective_date":"2021-12-30T00:01:00Z","event_type":"subscription_cancelled","external_id":"test_ev_id_create_1","errors":{},"created_at":"2022-05-27T21:54:12Z","updated_at":"2022-05-27T21:54:12Z","quantity":"","currency":"","amount_in_cents":"","tax_amount_in_cents":null,"retracted_event_id":null}],"meta":{"next_key":null,"prev_key":null,"before_key":"2022-05-27T21:54:13.079Z","page":1,"total_pages":1}}'
|
242
|
-
http_version:
|
243
|
-
recorded_at: Fri, 27 May 2022 21:54:13 GMT
|
244
|
-
- request:
|
245
|
-
method: delete
|
246
|
-
uri: https://api.chartmogul.com/v1/subscription_events?subscription_event%5Bid%5D=138979488
|
247
|
-
body:
|
248
|
-
encoding: US-ASCII
|
249
|
-
string: ''
|
250
|
-
headers:
|
251
|
-
User-Agent:
|
252
|
-
- chartmogul-ruby/3.0.0
|
253
|
-
Authorization:
|
254
|
-
- Basic hidden
|
255
|
-
response:
|
256
|
-
status:
|
257
|
-
code: 204
|
258
|
-
message: No Content
|
259
|
-
headers:
|
260
|
-
access-control-allow-credentials:
|
261
|
-
- 'true'
|
262
|
-
cache-control:
|
263
|
-
- no-cache
|
264
|
-
date:
|
265
|
-
- Fri, 27 May 2022 21:54:13 GMT
|
266
|
-
referrer-policy:
|
267
|
-
- strict-origin-when-cross-origin
|
268
|
-
status:
|
269
|
-
- 204 No Content
|
270
|
-
x-content-type-options:
|
271
|
-
- nosniff
|
272
|
-
x-download-options:
|
273
|
-
- noopen
|
274
|
-
x-frame-options:
|
275
|
-
- DENY
|
276
|
-
x-permitted-cross-domain-policies:
|
277
|
-
- none
|
278
|
-
x-request-id:
|
279
|
-
- d8fae1b2be5b11017e900b87748532fc
|
280
|
-
x-runtime:
|
281
|
-
- '0.037148'
|
282
|
-
x-xss-protection:
|
283
|
-
- 1; mode=block
|
284
|
-
connection:
|
285
|
-
- keep-alive
|
286
|
-
body:
|
287
|
-
encoding: UTF-8
|
288
|
-
string: ''
|
289
|
-
http_version:
|
290
|
-
recorded_at: Fri, 27 May 2022 21:54:13 GMT
|
291
|
-
- request:
|
292
|
-
method: delete
|
293
|
-
uri: https://api.chartmogul.com/v1/data_sources/ds_8a5c8aa6-de07-11ec-bf86-afa844e0d0e3
|
294
|
-
body:
|
295
|
-
encoding: US-ASCII
|
296
|
-
string: ''
|
297
|
-
headers:
|
298
|
-
User-Agent:
|
299
|
-
- chartmogul-ruby/3.0.0
|
300
|
-
Authorization:
|
301
|
-
- Basic hidden
|
302
|
-
response:
|
303
|
-
status:
|
304
|
-
code: 204
|
305
|
-
message: No Content
|
306
|
-
headers:
|
307
|
-
access-control-allow-credentials:
|
308
|
-
- 'true'
|
309
|
-
date:
|
310
|
-
- Fri, 27 May 2022 21:54:13 GMT
|
311
|
-
status:
|
312
|
-
- 204 No Content
|
313
|
-
connection:
|
314
|
-
- keep-alive
|
315
|
-
body:
|
316
|
-
encoding: UTF-8
|
317
|
-
string: ''
|
318
|
-
http_version:
|
319
|
-
recorded_at: Fri, 27 May 2022 21:54:13 GMT
|
320
|
-
recorded_with: VCR 5.1.0
|