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,185 +1,185 @@
|
|
1
|
-
---
|
2
|
-
http_interactions:
|
3
|
-
- request:
|
4
|
-
method: get
|
5
|
-
uri: https://api.chartmogul.com/v1/customers/cus_35da5436-a730-11e6-a5a0-d32f2a781b50
|
6
|
-
body:
|
7
|
-
encoding: UTF-8
|
8
|
-
string: "{}"
|
9
|
-
headers:
|
10
|
-
User-Agent:
|
11
|
-
- Faraday v0.9.2
|
12
|
-
Content-Type:
|
13
|
-
- application/json
|
14
|
-
Authorization:
|
15
|
-
- Basic MDFiNzI2YzI0ZjNiYjhlOTc0MmEwNGZiMDhhZmE3NzQ6NzJlNGMxYTdlZTFiYzlkNGZjMDBlZWUwNWIyN2QzMGY=
|
16
|
-
response:
|
17
|
-
status:
|
18
|
-
code: 200
|
19
|
-
message:
|
20
|
-
headers:
|
21
|
-
server:
|
22
|
-
- nginx/1.10.1
|
23
|
-
date:
|
24
|
-
- Thu, 10 Nov 2016 10:32:07 GMT
|
25
|
-
content-type:
|
26
|
-
- application/json
|
27
|
-
content-length:
|
28
|
-
- '496'
|
29
|
-
connection:
|
30
|
-
- close
|
31
|
-
status:
|
32
|
-
- 200 OK
|
33
|
-
access-control-allow-credentials:
|
34
|
-
- 'true'
|
35
|
-
body:
|
36
|
-
encoding: UTF-8
|
37
|
-
string: '{"id":6474477,"uuid":"cus_35da5436-a730-11e6-a5a0-d32f2a781b50","external_id":"8b5b6aff-ca49-4079-9273-1268a64ac462","name":"from@merge.com","email":"from@merge.com","status":"Lead","customer-since":null,"attributes":{"tags":[]},"address":{"country":"Comoros","state":null,"city":null,"address_zip":null},"mrr":0,"arr":0,"billing-system-url":null,"chartmogul-url":"https://app.chartmogul.com/#customers/6474477-from_merge_com","billing-system-type":"Manual","currency":"UGX","currency-sign":null}'
|
38
|
-
http_version:
|
39
|
-
recorded_at: Thu, 10 Nov 2016 10:32:07 GMT
|
40
|
-
- request:
|
41
|
-
method: get
|
42
|
-
uri: https://api.chartmogul.com/v1/customers/cus_fc5451ee-a72f-11e6-9019-3b1a0ecf3c73
|
43
|
-
body:
|
44
|
-
encoding: UTF-8
|
45
|
-
string: "{}"
|
46
|
-
headers:
|
47
|
-
User-Agent:
|
48
|
-
- Faraday v0.9.2
|
49
|
-
Content-Type:
|
50
|
-
- application/json
|
51
|
-
Authorization:
|
52
|
-
- Basic MDFiNzI2YzI0ZjNiYjhlOTc0MmEwNGZiMDhhZmE3NzQ6NzJlNGMxYTdlZTFiYzlkNGZjMDBlZWUwNWIyN2QzMGY=
|
53
|
-
response:
|
54
|
-
status:
|
55
|
-
code: 200
|
56
|
-
message:
|
57
|
-
headers:
|
58
|
-
server:
|
59
|
-
- nginx/1.10.1
|
60
|
-
date:
|
61
|
-
- Thu, 10 Nov 2016 10:32:07 GMT
|
62
|
-
content-type:
|
63
|
-
- application/json
|
64
|
-
content-length:
|
65
|
-
- '495'
|
66
|
-
connection:
|
67
|
-
- close
|
68
|
-
status:
|
69
|
-
- 200 OK
|
70
|
-
access-control-allow-credentials:
|
71
|
-
- 'true'
|
72
|
-
body:
|
73
|
-
encoding: UTF-8
|
74
|
-
string: '{"id":6474475,"uuid":"cus_fc5451ee-a72f-11e6-9019-3b1a0ecf3c73","external_id":"7ea39c1b-2286-4cb7-b1c8-9a63e8358875","name":"into@merge.com","email":"into@merge.com","status":"Lead","customer-since":null,"attributes":{"tags":[]},"address":{"country":"Angola","state":null,"city":null,"address_zip":null},"mrr":0,"arr":0,"billing-system-url":null,"chartmogul-url":"https://app.chartmogul.com/#customers/6474475-into_merge_com","billing-system-type":"Manual","currency":"UGX","currency-sign":null}'
|
75
|
-
http_version:
|
76
|
-
recorded_at: Thu, 10 Nov 2016 10:32:07 GMT
|
77
|
-
- request:
|
78
|
-
method: post
|
79
|
-
uri: https://api.chartmogul.com/v1/customers/merges
|
80
|
-
body:
|
81
|
-
encoding: UTF-8
|
82
|
-
string: '{"from":{"customer_uuid":"cus_35da5436-a730-11e6-a5a0-d32f2a781b50"},"into":{"customer_uuid":"cus_fc5451ee-a72f-11e6-9019-3b1a0ecf3c73"}}'
|
83
|
-
headers:
|
84
|
-
User-Agent:
|
85
|
-
- Faraday v0.9.2
|
86
|
-
Content-Type:
|
87
|
-
- application/json
|
88
|
-
Authorization:
|
89
|
-
- Basic MDFiNzI2YzI0ZjNiYjhlOTc0MmEwNGZiMDhhZmE3NzQ6NzJlNGMxYTdlZTFiYzlkNGZjMDBlZWUwNWIyN2QzMGY=
|
90
|
-
response:
|
91
|
-
status:
|
92
|
-
code: 202
|
93
|
-
message:
|
94
|
-
headers:
|
95
|
-
server:
|
96
|
-
- nginx/1.10.1
|
97
|
-
date:
|
98
|
-
- Thu, 10 Nov 2016 10:32:07 GMT
|
99
|
-
content-type:
|
100
|
-
- application/json
|
101
|
-
content-length:
|
102
|
-
- '2'
|
103
|
-
connection:
|
104
|
-
- close
|
105
|
-
status:
|
106
|
-
- 202 Accepted
|
107
|
-
body:
|
108
|
-
encoding: UTF-8
|
109
|
-
string: "{}"
|
110
|
-
http_version:
|
111
|
-
recorded_at: Thu, 10 Nov 2016 10:32:07 GMT
|
112
|
-
- request:
|
113
|
-
method: get
|
114
|
-
uri: https://api.chartmogul.com/v1/customers/cus_35da5436-a730-11e6-a5a0-d32f2a781b50
|
115
|
-
body:
|
116
|
-
encoding: UTF-8
|
117
|
-
string: "{}"
|
118
|
-
headers:
|
119
|
-
User-Agent:
|
120
|
-
- Faraday v0.9.2
|
121
|
-
Content-Type:
|
122
|
-
- application/json
|
123
|
-
Authorization:
|
124
|
-
- Basic MDFiNzI2YzI0ZjNiYjhlOTc0MmEwNGZiMDhhZmE3NzQ6NzJlNGMxYTdlZTFiYzlkNGZjMDBlZWUwNWIyN2QzMGY=
|
125
|
-
response:
|
126
|
-
status:
|
127
|
-
code: 404
|
128
|
-
message:
|
129
|
-
headers:
|
130
|
-
server:
|
131
|
-
- nginx/1.10.1
|
132
|
-
date:
|
133
|
-
- Thu, 10 Nov 2016 10:37:08 GMT
|
134
|
-
content-type:
|
135
|
-
- application/json
|
136
|
-
content-length:
|
137
|
-
- '111'
|
138
|
-
connection:
|
139
|
-
- close
|
140
|
-
status:
|
141
|
-
- 404 Not Found
|
142
|
-
body:
|
143
|
-
encoding: UTF-8
|
144
|
-
string: '{"code":404,"message":"Customer \"35da5436-a730-11e6-a5a0-d32f2a781b50\"
|
145
|
-
does not exist","param":"customer_id"}'
|
146
|
-
http_version:
|
147
|
-
recorded_at: Thu, 10 Nov 2016 10:37:08 GMT
|
148
|
-
- request:
|
149
|
-
method: get
|
150
|
-
uri: https://api.chartmogul.com/v1/customers/cus_fc5451ee-a72f-11e6-9019-3b1a0ecf3c73
|
151
|
-
body:
|
152
|
-
encoding: UTF-8
|
153
|
-
string: "{}"
|
154
|
-
headers:
|
155
|
-
User-Agent:
|
156
|
-
- Faraday v0.9.2
|
157
|
-
Content-Type:
|
158
|
-
- application/json
|
159
|
-
Authorization:
|
160
|
-
- Basic MDFiNzI2YzI0ZjNiYjhlOTc0MmEwNGZiMDhhZmE3NzQ6NzJlNGMxYTdlZTFiYzlkNGZjMDBlZWUwNWIyN2QzMGY=
|
161
|
-
response:
|
162
|
-
status:
|
163
|
-
code: 200
|
164
|
-
message:
|
165
|
-
headers:
|
166
|
-
server:
|
167
|
-
- nginx/1.10.1
|
168
|
-
date:
|
169
|
-
- Thu, 10 Nov 2016 10:45:35 GMT
|
170
|
-
content-type:
|
171
|
-
- application/json
|
172
|
-
content-length:
|
173
|
-
- '512'
|
174
|
-
connection:
|
175
|
-
- close
|
176
|
-
status:
|
177
|
-
- 200 OK
|
178
|
-
access-control-allow-credentials:
|
179
|
-
- 'true'
|
180
|
-
body:
|
181
|
-
encoding: UTF-8
|
182
|
-
string: '{"id":6474475,"uuid":"cus_fc5451ee-a72f-11e6-9019-3b1a0ecf3c73","external_id":"7ea39c1b-2286-4cb7-b1c8-9a63e8358875","name":"into@merge.com","email":"into@merge.com","status":"Lead","customer-since":null,"attributes":{"tags":["merged-customer"]},"address":{"country":"Angola","state":null,"city":null,"address_zip":null},"mrr":0,"arr":0,"billing-system-url":null,"chartmogul-url":"https://app.chartmogul.com/#customers/6474475-into_merge_com","billing-system-type":"Manual","currency":"UGX","currency-sign":null}'
|
183
|
-
http_version:
|
184
|
-
recorded_at: Thu, 10 Nov 2016 10:45:35 GMT
|
185
|
-
recorded_with: VCR 3.0.3
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://api.chartmogul.com/v1/customers/cus_35da5436-a730-11e6-a5a0-d32f2a781b50
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: "{}"
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- Faraday v0.9.2
|
12
|
+
Content-Type:
|
13
|
+
- application/json
|
14
|
+
Authorization:
|
15
|
+
- Basic MDFiNzI2YzI0ZjNiYjhlOTc0MmEwNGZiMDhhZmE3NzQ6NzJlNGMxYTdlZTFiYzlkNGZjMDBlZWUwNWIyN2QzMGY=
|
16
|
+
response:
|
17
|
+
status:
|
18
|
+
code: 200
|
19
|
+
message:
|
20
|
+
headers:
|
21
|
+
server:
|
22
|
+
- nginx/1.10.1
|
23
|
+
date:
|
24
|
+
- Thu, 10 Nov 2016 10:32:07 GMT
|
25
|
+
content-type:
|
26
|
+
- application/json
|
27
|
+
content-length:
|
28
|
+
- '496'
|
29
|
+
connection:
|
30
|
+
- close
|
31
|
+
status:
|
32
|
+
- 200 OK
|
33
|
+
access-control-allow-credentials:
|
34
|
+
- 'true'
|
35
|
+
body:
|
36
|
+
encoding: UTF-8
|
37
|
+
string: '{"id":6474477,"uuid":"cus_35da5436-a730-11e6-a5a0-d32f2a781b50","external_id":"8b5b6aff-ca49-4079-9273-1268a64ac462","name":"from@merge.com","email":"from@merge.com","status":"Lead","customer-since":null,"attributes":{"tags":[]},"address":{"country":"Comoros","state":null,"city":null,"address_zip":null},"mrr":0,"arr":0,"billing-system-url":null,"chartmogul-url":"https://app.chartmogul.com/#customers/6474477-from_merge_com","billing-system-type":"Manual","currency":"UGX","currency-sign":null}'
|
38
|
+
http_version:
|
39
|
+
recorded_at: Thu, 10 Nov 2016 10:32:07 GMT
|
40
|
+
- request:
|
41
|
+
method: get
|
42
|
+
uri: https://api.chartmogul.com/v1/customers/cus_fc5451ee-a72f-11e6-9019-3b1a0ecf3c73
|
43
|
+
body:
|
44
|
+
encoding: UTF-8
|
45
|
+
string: "{}"
|
46
|
+
headers:
|
47
|
+
User-Agent:
|
48
|
+
- Faraday v0.9.2
|
49
|
+
Content-Type:
|
50
|
+
- application/json
|
51
|
+
Authorization:
|
52
|
+
- Basic MDFiNzI2YzI0ZjNiYjhlOTc0MmEwNGZiMDhhZmE3NzQ6NzJlNGMxYTdlZTFiYzlkNGZjMDBlZWUwNWIyN2QzMGY=
|
53
|
+
response:
|
54
|
+
status:
|
55
|
+
code: 200
|
56
|
+
message:
|
57
|
+
headers:
|
58
|
+
server:
|
59
|
+
- nginx/1.10.1
|
60
|
+
date:
|
61
|
+
- Thu, 10 Nov 2016 10:32:07 GMT
|
62
|
+
content-type:
|
63
|
+
- application/json
|
64
|
+
content-length:
|
65
|
+
- '495'
|
66
|
+
connection:
|
67
|
+
- close
|
68
|
+
status:
|
69
|
+
- 200 OK
|
70
|
+
access-control-allow-credentials:
|
71
|
+
- 'true'
|
72
|
+
body:
|
73
|
+
encoding: UTF-8
|
74
|
+
string: '{"id":6474475,"uuid":"cus_fc5451ee-a72f-11e6-9019-3b1a0ecf3c73","external_id":"7ea39c1b-2286-4cb7-b1c8-9a63e8358875","name":"into@merge.com","email":"into@merge.com","status":"Lead","customer-since":null,"attributes":{"tags":[]},"address":{"country":"Angola","state":null,"city":null,"address_zip":null},"mrr":0,"arr":0,"billing-system-url":null,"chartmogul-url":"https://app.chartmogul.com/#customers/6474475-into_merge_com","billing-system-type":"Manual","currency":"UGX","currency-sign":null}'
|
75
|
+
http_version:
|
76
|
+
recorded_at: Thu, 10 Nov 2016 10:32:07 GMT
|
77
|
+
- request:
|
78
|
+
method: post
|
79
|
+
uri: https://api.chartmogul.com/v1/customers/merges
|
80
|
+
body:
|
81
|
+
encoding: UTF-8
|
82
|
+
string: '{"from":{"customer_uuid":"cus_35da5436-a730-11e6-a5a0-d32f2a781b50"},"into":{"customer_uuid":"cus_fc5451ee-a72f-11e6-9019-3b1a0ecf3c73"}}'
|
83
|
+
headers:
|
84
|
+
User-Agent:
|
85
|
+
- Faraday v0.9.2
|
86
|
+
Content-Type:
|
87
|
+
- application/json
|
88
|
+
Authorization:
|
89
|
+
- Basic MDFiNzI2YzI0ZjNiYjhlOTc0MmEwNGZiMDhhZmE3NzQ6NzJlNGMxYTdlZTFiYzlkNGZjMDBlZWUwNWIyN2QzMGY=
|
90
|
+
response:
|
91
|
+
status:
|
92
|
+
code: 202
|
93
|
+
message:
|
94
|
+
headers:
|
95
|
+
server:
|
96
|
+
- nginx/1.10.1
|
97
|
+
date:
|
98
|
+
- Thu, 10 Nov 2016 10:32:07 GMT
|
99
|
+
content-type:
|
100
|
+
- application/json
|
101
|
+
content-length:
|
102
|
+
- '2'
|
103
|
+
connection:
|
104
|
+
- close
|
105
|
+
status:
|
106
|
+
- 202 Accepted
|
107
|
+
body:
|
108
|
+
encoding: UTF-8
|
109
|
+
string: "{}"
|
110
|
+
http_version:
|
111
|
+
recorded_at: Thu, 10 Nov 2016 10:32:07 GMT
|
112
|
+
- request:
|
113
|
+
method: get
|
114
|
+
uri: https://api.chartmogul.com/v1/customers/cus_35da5436-a730-11e6-a5a0-d32f2a781b50
|
115
|
+
body:
|
116
|
+
encoding: UTF-8
|
117
|
+
string: "{}"
|
118
|
+
headers:
|
119
|
+
User-Agent:
|
120
|
+
- Faraday v0.9.2
|
121
|
+
Content-Type:
|
122
|
+
- application/json
|
123
|
+
Authorization:
|
124
|
+
- Basic MDFiNzI2YzI0ZjNiYjhlOTc0MmEwNGZiMDhhZmE3NzQ6NzJlNGMxYTdlZTFiYzlkNGZjMDBlZWUwNWIyN2QzMGY=
|
125
|
+
response:
|
126
|
+
status:
|
127
|
+
code: 404
|
128
|
+
message:
|
129
|
+
headers:
|
130
|
+
server:
|
131
|
+
- nginx/1.10.1
|
132
|
+
date:
|
133
|
+
- Thu, 10 Nov 2016 10:37:08 GMT
|
134
|
+
content-type:
|
135
|
+
- application/json
|
136
|
+
content-length:
|
137
|
+
- '111'
|
138
|
+
connection:
|
139
|
+
- close
|
140
|
+
status:
|
141
|
+
- 404 Not Found
|
142
|
+
body:
|
143
|
+
encoding: UTF-8
|
144
|
+
string: '{"code":404,"message":"Customer \"35da5436-a730-11e6-a5a0-d32f2a781b50\"
|
145
|
+
does not exist","param":"customer_id"}'
|
146
|
+
http_version:
|
147
|
+
recorded_at: Thu, 10 Nov 2016 10:37:08 GMT
|
148
|
+
- request:
|
149
|
+
method: get
|
150
|
+
uri: https://api.chartmogul.com/v1/customers/cus_fc5451ee-a72f-11e6-9019-3b1a0ecf3c73
|
151
|
+
body:
|
152
|
+
encoding: UTF-8
|
153
|
+
string: "{}"
|
154
|
+
headers:
|
155
|
+
User-Agent:
|
156
|
+
- Faraday v0.9.2
|
157
|
+
Content-Type:
|
158
|
+
- application/json
|
159
|
+
Authorization:
|
160
|
+
- Basic MDFiNzI2YzI0ZjNiYjhlOTc0MmEwNGZiMDhhZmE3NzQ6NzJlNGMxYTdlZTFiYzlkNGZjMDBlZWUwNWIyN2QzMGY=
|
161
|
+
response:
|
162
|
+
status:
|
163
|
+
code: 200
|
164
|
+
message:
|
165
|
+
headers:
|
166
|
+
server:
|
167
|
+
- nginx/1.10.1
|
168
|
+
date:
|
169
|
+
- Thu, 10 Nov 2016 10:45:35 GMT
|
170
|
+
content-type:
|
171
|
+
- application/json
|
172
|
+
content-length:
|
173
|
+
- '512'
|
174
|
+
connection:
|
175
|
+
- close
|
176
|
+
status:
|
177
|
+
- 200 OK
|
178
|
+
access-control-allow-credentials:
|
179
|
+
- 'true'
|
180
|
+
body:
|
181
|
+
encoding: UTF-8
|
182
|
+
string: '{"id":6474475,"uuid":"cus_fc5451ee-a72f-11e6-9019-3b1a0ecf3c73","external_id":"7ea39c1b-2286-4cb7-b1c8-9a63e8358875","name":"into@merge.com","email":"into@merge.com","status":"Lead","customer-since":null,"attributes":{"tags":["merged-customer"]},"address":{"country":"Angola","state":null,"city":null,"address_zip":null},"mrr":0,"arr":0,"billing-system-url":null,"chartmogul-url":"https://app.chartmogul.com/#customers/6474475-into_merge_com","billing-system-type":"Manual","currency":"UGX","currency-sign":null}'
|
183
|
+
http_version:
|
184
|
+
recorded_at: Thu, 10 Nov 2016 10:45:35 GMT
|
185
|
+
recorded_with: VCR 3.0.3
|
@@ -1,38 +1,38 @@
|
|
1
|
-
---
|
2
|
-
http_interactions:
|
3
|
-
- request:
|
4
|
-
method: get
|
5
|
-
uri: https://api.chartmogul.com/v1/customers?per_page=10
|
6
|
-
body:
|
7
|
-
encoding: US-ASCII
|
8
|
-
string: ''
|
9
|
-
headers:
|
10
|
-
User-Agent:
|
11
|
-
- Faraday v0.10.0
|
12
|
-
Content-Type:
|
13
|
-
- application/json
|
14
|
-
Authorization:
|
15
|
-
- Basic ZHVtbXktdG9rZW46ZHVtbXktdG9rZW4=
|
16
|
-
response:
|
17
|
-
status:
|
18
|
-
code: 401
|
19
|
-
message:
|
20
|
-
headers:
|
21
|
-
server:
|
22
|
-
- nginx/1.10.1
|
23
|
-
date:
|
24
|
-
- Wed, 28 Dec 2016 17:04:19 GMT
|
25
|
-
content-type:
|
26
|
-
- application/json
|
27
|
-
content-length:
|
28
|
-
- '63'
|
29
|
-
connection:
|
30
|
-
- close
|
31
|
-
status:
|
32
|
-
- 401 Unauthorized
|
33
|
-
body:
|
34
|
-
encoding: UTF-8
|
35
|
-
string: '{"code":401,"message":"No valid API key provided","param":null}'
|
36
|
-
http_version:
|
37
|
-
recorded_at: Wed, 28 Dec 2016 17:04:19 GMT
|
38
|
-
recorded_with: VCR 3.0.3
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://api.chartmogul.com/v1/customers?per_page=10
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- Faraday v0.10.0
|
12
|
+
Content-Type:
|
13
|
+
- application/json
|
14
|
+
Authorization:
|
15
|
+
- Basic ZHVtbXktdG9rZW46ZHVtbXktdG9rZW4=
|
16
|
+
response:
|
17
|
+
status:
|
18
|
+
code: 401
|
19
|
+
message:
|
20
|
+
headers:
|
21
|
+
server:
|
22
|
+
- nginx/1.10.1
|
23
|
+
date:
|
24
|
+
- Wed, 28 Dec 2016 17:04:19 GMT
|
25
|
+
content-type:
|
26
|
+
- application/json
|
27
|
+
content-length:
|
28
|
+
- '63'
|
29
|
+
connection:
|
30
|
+
- close
|
31
|
+
status:
|
32
|
+
- 401 Unauthorized
|
33
|
+
body:
|
34
|
+
encoding: UTF-8
|
35
|
+
string: '{"code":401,"message":"No valid API key provided","param":null}'
|
36
|
+
http_version:
|
37
|
+
recorded_at: Wed, 28 Dec 2016 17:04:19 GMT
|
38
|
+
recorded_with: VCR 3.0.3
|
@@ -1,38 +1,38 @@
|
|
1
|
-
---
|
2
|
-
http_interactions:
|
3
|
-
- request:
|
4
|
-
method: get
|
5
|
-
uri: https://api.chartmogul.com/v1/customers/search?email=no%40email.com
|
6
|
-
body:
|
7
|
-
encoding: UTF-8
|
8
|
-
string: '{}'
|
9
|
-
headers:
|
10
|
-
User-Agent:
|
11
|
-
- Faraday v0.9.2
|
12
|
-
Content-Type:
|
13
|
-
- application/json
|
14
|
-
Authorization:
|
15
|
-
- Basic MDFiNzI2YzI0ZjNiYjhlOTc0MmEwNGZiMDhhZmE3NzQ6NzJlNGMxYTdlZTFiYzlkNGZjMDBlZWUwNWIyN2QzMGY=
|
16
|
-
response:
|
17
|
-
status:
|
18
|
-
code: 404
|
19
|
-
message:
|
20
|
-
headers:
|
21
|
-
server:
|
22
|
-
- nginx/1.9.10
|
23
|
-
date:
|
24
|
-
- Wed, 29 Jun 2016 12:47:11 GMT
|
25
|
-
content-type:
|
26
|
-
- application/json
|
27
|
-
content-length:
|
28
|
-
- '94'
|
29
|
-
connection:
|
30
|
-
- close
|
31
|
-
status:
|
32
|
-
- 404 Not Found
|
33
|
-
body:
|
34
|
-
encoding: UTF-8
|
35
|
-
string: '{"code":404,"message":"Can''t find any customers with email: \"no@email.com\"","param":"email"}'
|
36
|
-
http_version:
|
37
|
-
recorded_at: Wed, 29 Jun 2016 12:47:11 GMT
|
38
|
-
recorded_with: VCR 3.0.3
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://api.chartmogul.com/v1/customers/search?email=no%40email.com
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '{}'
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- Faraday v0.9.2
|
12
|
+
Content-Type:
|
13
|
+
- application/json
|
14
|
+
Authorization:
|
15
|
+
- Basic MDFiNzI2YzI0ZjNiYjhlOTc0MmEwNGZiMDhhZmE3NzQ6NzJlNGMxYTdlZTFiYzlkNGZjMDBlZWUwNWIyN2QzMGY=
|
16
|
+
response:
|
17
|
+
status:
|
18
|
+
code: 404
|
19
|
+
message:
|
20
|
+
headers:
|
21
|
+
server:
|
22
|
+
- nginx/1.9.10
|
23
|
+
date:
|
24
|
+
- Wed, 29 Jun 2016 12:47:11 GMT
|
25
|
+
content-type:
|
26
|
+
- application/json
|
27
|
+
content-length:
|
28
|
+
- '94'
|
29
|
+
connection:
|
30
|
+
- close
|
31
|
+
status:
|
32
|
+
- 404 Not Found
|
33
|
+
body:
|
34
|
+
encoding: UTF-8
|
35
|
+
string: '{"code":404,"message":"Can''t find any customers with email: \"no@email.com\"","param":"email"}'
|
36
|
+
http_version:
|
37
|
+
recorded_at: Wed, 29 Jun 2016 12:47:11 GMT
|
38
|
+
recorded_with: VCR 3.0.3
|