chartmogul-ruby 1.1.1 → 1.1.2

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.
Files changed (121) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +10 -10
  3. data/.rspec +2 -2
  4. data/.travis.yml +4 -4
  5. data/Gemfile +4 -4
  6. data/LICENSE.txt +21 -21
  7. data/README.md +111 -111
  8. data/Rakefile +6 -6
  9. data/bin/console +14 -14
  10. data/bin/setup +9 -9
  11. data/changelog.md +27 -27
  12. data/chartmogul-ruby.gemspec +29 -29
  13. data/fixtures/vcr_cassettes/ChartMogul_Customer/API_Interactions/adds_custom_attributes.yml +80 -80
  14. data/fixtures/vcr_cassettes/ChartMogul_Customer/API_Interactions/adds_required_tags.yml +79 -79
  15. data/fixtures/vcr_cassettes/ChartMogul_Customer/API_Interactions/can_page_through_search_endpoint.yml +43 -43
  16. data/fixtures/vcr_cassettes/ChartMogul_Customer/API_Interactions/correctly_handles_a_422_response.yml +50 -50
  17. data/fixtures/vcr_cassettes/ChartMogul_Customer/API_Interactions/correctly_interracts_with_the_API.yml +244 -244
  18. data/fixtures/vcr_cassettes/ChartMogul_Customer/API_Interactions/merges_customers.yml +185 -185
  19. data/fixtures/vcr_cassettes/ChartMogul_Customer/API_Interactions/raises_401_if_invalid_credentials.yml +38 -38
  20. data/fixtures/vcr_cassettes/ChartMogul_Customer/API_Interactions/raises_404_if_no_customers_found.yml +38 -38
  21. data/fixtures/vcr_cassettes/ChartMogul_Customer/API_Interactions/raises_422_for_update_with_invalid_data.yml +86 -86
  22. data/fixtures/vcr_cassettes/ChartMogul_Customer/API_Interactions/removes_custom_attributes.yml +80 -80
  23. data/fixtures/vcr_cassettes/ChartMogul_Customer/API_Interactions/removes_tags.yml +80 -80
  24. data/fixtures/vcr_cassettes/ChartMogul_Customer/API_Interactions/returns_all_customers_through_list_all_endpoint.yml +47 -47
  25. data/fixtures/vcr_cassettes/ChartMogul_Customer/API_Interactions/returns_customer_through_retrieve_endpoint.yml +42 -42
  26. data/fixtures/vcr_cassettes/ChartMogul_Customer/API_Interactions/returns_right_customers_through_search_endpoint.yml +43 -43
  27. data/fixtures/vcr_cassettes/ChartMogul_Customer/API_Interactions/updates_custom_attributes.yml +82 -82
  28. data/fixtures/vcr_cassettes/ChartMogul_Customer/API_Interactions/updates_customer.yml +139 -139
  29. data/fixtures/vcr_cassettes/ChartMogul_Customer/_find_by_external_id/when_external_id_is_provided/returns_matching_user_if_exists.yml +102 -102
  30. 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
  31. data/fixtures/vcr_cassettes/ChartMogul_CustomerInvoices/API_Interactions/correctly_interracts_with_the_API.yml +298 -298
  32. data/fixtures/vcr_cassettes/ChartMogul_DataSource/API_Interactions/correctly_interracts_with_the_API.yml +189 -189
  33. data/fixtures/vcr_cassettes/ChartMogul_DataSource/API_Interactions/correctly_raises_errors_on_404.yml +46 -46
  34. data/fixtures/vcr_cassettes/ChartMogul_DataSource/API_Interactions/correctly_raises_errors_on_422.yml +48 -48
  35. data/fixtures/vcr_cassettes/ChartMogul_DataSource/API_Interactions/retrieves_existing_data_source_matching_uuid.yml +101 -101
  36. data/fixtures/vcr_cassettes/ChartMogul_Invoice/API_Interactions/deletes_an_invoice.yml +37 -0
  37. data/fixtures/vcr_cassettes/ChartMogul_Invoice/API_Interactions/deletes_an_invoice_with_class_method.yml +37 -0
  38. data/fixtures/vcr_cassettes/ChartMogul_Invoice/API_Interactions/raises_error_on_deleting_non-existing_invoice.yml +42 -0
  39. data/fixtures/vcr_cassettes/ChartMogul_Invoice/API_Interactions/returns_all_invoices_through_list_all_endpoint.yml +46 -46
  40. data/fixtures/vcr_cassettes/ChartMogul_Metrics_ARPA/behaves_like_Metrics_API_resource/behaves_like_Summary/should_have_summary.yml +42 -42
  41. data/fixtures/vcr_cassettes/ChartMogul_Metrics_ARPA/behaves_like_Metrics_API_resource/should_have_entries.yml +42 -42
  42. data/fixtures/vcr_cassettes/ChartMogul_Metrics_ARR/behaves_like_Metrics_API_resource/behaves_like_Summary/should_have_summary.yml +42 -42
  43. data/fixtures/vcr_cassettes/ChartMogul_Metrics_ARR/behaves_like_Metrics_API_resource/should_have_entries.yml +42 -42
  44. data/fixtures/vcr_cassettes/ChartMogul_Metrics_ASP/behaves_like_Metrics_API_resource/behaves_like_Summary/should_have_summary.yml +40 -40
  45. data/fixtures/vcr_cassettes/ChartMogul_Metrics_ASP/behaves_like_Metrics_API_resource/should_have_entries.yml +40 -40
  46. data/fixtures/vcr_cassettes/ChartMogul_Metrics_Activity/behaves_like_Pageable/should_be_pageable.yml +41 -41
  47. data/fixtures/vcr_cassettes/ChartMogul_Metrics_Activity/should_have_Activity_entries.yml +41 -41
  48. data/fixtures/vcr_cassettes/ChartMogul_Metrics_AllKeyMetric/should_have_entries.yml +42 -42
  49. data/fixtures/vcr_cassettes/ChartMogul_Metrics_CustomerChurnRate/behaves_like_Metrics_API_resource/behaves_like_Summary/should_have_summary.yml +40 -40
  50. data/fixtures/vcr_cassettes/ChartMogul_Metrics_CustomerChurnRate/behaves_like_Metrics_API_resource/should_have_entries.yml +40 -40
  51. data/fixtures/vcr_cassettes/ChartMogul_Metrics_CustomerCount/behaves_like_Metrics_API_resource/behaves_like_Summary/should_have_summary.yml +42 -42
  52. data/fixtures/vcr_cassettes/ChartMogul_Metrics_CustomerCount/behaves_like_Metrics_API_resource/should_have_entries.yml +42 -42
  53. data/fixtures/vcr_cassettes/ChartMogul_Metrics_LTV/behaves_like_Metrics_API_resource/behaves_like_Summary/should_have_summary.yml +40 -40
  54. data/fixtures/vcr_cassettes/ChartMogul_Metrics_LTV/behaves_like_Metrics_API_resource/should_have_entries.yml +40 -40
  55. data/fixtures/vcr_cassettes/ChartMogul_Metrics_MRR/behaves_like_Summary/should_have_summary.yml +42 -42
  56. data/fixtures/vcr_cassettes/ChartMogul_Metrics_MRR/should_have_entries.yml +42 -42
  57. data/fixtures/vcr_cassettes/ChartMogul_Metrics_MRRChurnRate/behaves_like_Metrics_API_resource/behaves_like_Summary/should_have_summary.yml +40 -40
  58. data/fixtures/vcr_cassettes/ChartMogul_Metrics_MRRChurnRate/behaves_like_Metrics_API_resource/should_have_entries.yml +40 -40
  59. data/fixtures/vcr_cassettes/ChartMogul_Metrics_Subscription/behaves_like_Pageable/should_be_pageable.yml +40 -40
  60. data/fixtures/vcr_cassettes/ChartMogul_Metrics_Subscription/should_have_Subscription_entries.yml +40 -40
  61. data/fixtures/vcr_cassettes/ChartMogul_Ping/pings/and_fails_on_incorrect_credentials.yml +38 -38
  62. data/fixtures/vcr_cassettes/ChartMogul_Ping/pings/when_credentials_correct.yml +38 -38
  63. data/fixtures/vcr_cassettes/ChartMogul_Plan/API_Interactions/correctly_handles_a_422_error.yml +51 -51
  64. data/fixtures/vcr_cassettes/ChartMogul_Plan/API_Interactions/correctly_interacts_with_the_API.yml +152 -152
  65. data/fixtures/vcr_cassettes/ChartMogul_Plan/API_Interactions/deletes_existing_plan.yml +198 -198
  66. data/fixtures/vcr_cassettes/ChartMogul_Plan/API_Interactions/retrieves_existing_plan_by_uuid.yml +151 -151
  67. data/fixtures/vcr_cassettes/ChartMogul_Plan/API_Interactions/updates_existing_plan.yml +198 -198
  68. data/fixtures/vcr_cassettes/ChartMogul_Subscription/API_Interactions/correctly_interracts_with_the_API.yml +340 -340
  69. data/fixtures/vcr_cassettes/ChartMogul_Subscription/API_Interactions/has_multiple_aliases.yml +101 -101
  70. data/fixtures/vcr_cassettes/ChartMogul_Transactions_Payment/API_Interactions/correctly_interracts_with_the_API.yml +243 -243
  71. data/lib/chartmogul.rb +79 -79
  72. data/lib/chartmogul/api/actions/all.rb +23 -23
  73. data/lib/chartmogul/api/actions/create.rb +39 -39
  74. data/lib/chartmogul/api/actions/custom.rb +37 -37
  75. data/lib/chartmogul/api/actions/destroy.rb +28 -14
  76. data/lib/chartmogul/api/actions/update.rb +19 -19
  77. data/lib/chartmogul/api_resource.rb +68 -68
  78. data/lib/chartmogul/concerns/entries.rb +39 -39
  79. data/lib/chartmogul/concerns/pageable.rb +13 -13
  80. data/lib/chartmogul/concerns/pageable2.rb +12 -12
  81. data/lib/chartmogul/concerns/summary.rb +20 -20
  82. data/lib/chartmogul/config_attributes.rb +15 -15
  83. data/lib/chartmogul/configuration.rb +6 -6
  84. data/lib/chartmogul/customer.rb +155 -155
  85. data/lib/chartmogul/customer_invoices.rb +44 -44
  86. data/lib/chartmogul/data_source.rb +38 -38
  87. data/lib/chartmogul/enrichment/customer.rb +141 -141
  88. data/lib/chartmogul/errors/chartmogul_error.rb +19 -19
  89. data/lib/chartmogul/errors/configuration_error.rb +4 -4
  90. data/lib/chartmogul/errors/forbidden_error.rb +4 -4
  91. data/lib/chartmogul/errors/not_found_error.rb +4 -4
  92. data/lib/chartmogul/errors/resource_invalid_error.rb +4 -4
  93. data/lib/chartmogul/errors/schema_invalid_error.rb +4 -4
  94. data/lib/chartmogul/errors/unauthorized_error.rb +4 -4
  95. data/lib/chartmogul/invoice.rb +83 -78
  96. data/lib/chartmogul/line_items/one_time.rb +23 -23
  97. data/lib/chartmogul/line_items/subscription.rb +29 -29
  98. data/lib/chartmogul/metrics/activity.rb +34 -34
  99. data/lib/chartmogul/metrics/all_key_metrics.rb +25 -25
  100. data/lib/chartmogul/metrics/arpa.rb +19 -19
  101. data/lib/chartmogul/metrics/arr.rb +19 -19
  102. data/lib/chartmogul/metrics/asp.rb +19 -19
  103. data/lib/chartmogul/metrics/base.rb +56 -56
  104. data/lib/chartmogul/metrics/customer_churn_rate.rb +19 -19
  105. data/lib/chartmogul/metrics/customer_count.rb +19 -19
  106. data/lib/chartmogul/metrics/ltv.rb +19 -19
  107. data/lib/chartmogul/metrics/mrr.rb +26 -26
  108. data/lib/chartmogul/metrics/mrr_churn_rate.rb +19 -19
  109. data/lib/chartmogul/metrics/subscription.rb +37 -37
  110. data/lib/chartmogul/object.rb +119 -119
  111. data/lib/chartmogul/ping.rb +14 -14
  112. data/lib/chartmogul/plan.rb +41 -41
  113. data/lib/chartmogul/resource_path.rb +42 -42
  114. data/lib/chartmogul/subscription.rb +48 -48
  115. data/lib/chartmogul/summary.rb +7 -7
  116. data/lib/chartmogul/transactions/payment.rb +24 -24
  117. data/lib/chartmogul/transactions/refund.rb +24 -24
  118. data/lib/chartmogul/utils/hash_snake_caser.rb +50 -50
  119. data/lib/chartmogul/utils/json_parser.rb +11 -11
  120. data/lib/chartmogul/version.rb +3 -3
  121. metadata +5 -2
@@ -1,40 +1,40 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: get
5
- uri: https://api.chartmogul.com/v1/metrics/mrr-churn-rate?end-date=2015-02-01&start-date=2015-01-01
6
- body:
7
- encoding: US-ASCII
8
- string: ''
9
- headers:
10
- User-Agent:
11
- - Faraday v0.9.2
12
- Content-Type:
13
- - application/json
14
- Authorization:
15
- - Basic YzU0NjYwNDU5ZTMzODBkYzUyNmVhYjNiZjlhZGIyOGQ6N2MyMDEzOTYzZjQ2NGZiMmQ3ZjVjOTJkZDZiMjk2NDQ=
16
- response:
17
- status:
18
- code: 200
19
- message:
20
- headers:
21
- server:
22
- - nginx/1.9.10
23
- date:
24
- - Fri, 01 Jul 2016 16:56:25 GMT
25
- content-type:
26
- - application/json
27
- content-length:
28
- - '160'
29
- connection:
30
- - close
31
- status:
32
- - 200 OK
33
- access-control-allow-credentials:
34
- - 'true'
35
- body:
36
- encoding: UTF-8
37
- string: '{"entries":[{"date":"2015-01-31","mrr-churn-rate":0.0},{"date":"2015-02-01","mrr-churn-rate":0.0}],"summary":{"current":0,"previous":0,"percentage-change":0.0}}'
38
- http_version:
39
- recorded_at: Fri, 01 Jul 2016 16:56:25 GMT
40
- recorded_with: VCR 3.0.3
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://api.chartmogul.com/v1/metrics/mrr-churn-rate?end-date=2015-02-01&start-date=2015-01-01
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ User-Agent:
11
+ - Faraday v0.9.2
12
+ Content-Type:
13
+ - application/json
14
+ Authorization:
15
+ - Basic YzU0NjYwNDU5ZTMzODBkYzUyNmVhYjNiZjlhZGIyOGQ6N2MyMDEzOTYzZjQ2NGZiMmQ3ZjVjOTJkZDZiMjk2NDQ=
16
+ response:
17
+ status:
18
+ code: 200
19
+ message:
20
+ headers:
21
+ server:
22
+ - nginx/1.9.10
23
+ date:
24
+ - Fri, 01 Jul 2016 16:56:25 GMT
25
+ content-type:
26
+ - application/json
27
+ content-length:
28
+ - '160'
29
+ connection:
30
+ - close
31
+ status:
32
+ - 200 OK
33
+ access-control-allow-credentials:
34
+ - 'true'
35
+ body:
36
+ encoding: UTF-8
37
+ string: '{"entries":[{"date":"2015-01-31","mrr-churn-rate":0.0},{"date":"2015-02-01","mrr-churn-rate":0.0}],"summary":{"current":0,"previous":0,"percentage-change":0.0}}'
38
+ http_version:
39
+ recorded_at: Fri, 01 Jul 2016 16:56:25 GMT
40
+ recorded_with: VCR 3.0.3
@@ -1,40 +1,40 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: get
5
- uri: https://api.chartmogul.com/v1/customers/cus_91af761e-9d0a-11e5-b514-1feab446feac/subscriptions
6
- body:
7
- encoding: US-ASCII
8
- string: ''
9
- headers:
10
- User-Agent:
11
- - Faraday v0.9.2
12
- Content-Type:
13
- - application/json
14
- Authorization:
15
- - Basic YzU0NjYwNDU5ZTMzODBkYzUyNmVhYjNiZjlhZGIyOGQ6N2MyMDEzOTYzZjQ2NGZiMmQ3ZjVjOTJkZDZiMjk2NDQ=
16
- response:
17
- status:
18
- code: 200
19
- message:
20
- headers:
21
- server:
22
- - nginx/1.9.10
23
- date:
24
- - Fri, 01 Jul 2016 14:47:48 GMT
25
- content-type:
26
- - application/json
27
- content-length:
28
- - '308'
29
- connection:
30
- - close
31
- status:
32
- - 200 OK
33
- access-control-allow-credentials:
34
- - 'true'
35
- body:
36
- encoding: UTF-8
37
- string: '{"entries":[{"id":9201273,"plan":"Yael Cohen","quantity":1,"mrr":10871,"arr":130452,"status":"active","billing-cycle":"day","billing-cycle-count":7,"start-date":"2015-10-15T13:41:40+00:00","end-date":"2015-10-22T13:41:40+00:00","currency":"USD","currency-sign":"$"}],"has_more":false,"per_page":200,"page":1}'
38
- http_version:
39
- recorded_at: Fri, 01 Jul 2016 14:47:48 GMT
40
- recorded_with: VCR 3.0.3
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://api.chartmogul.com/v1/customers/cus_91af761e-9d0a-11e5-b514-1feab446feac/subscriptions
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ User-Agent:
11
+ - Faraday v0.9.2
12
+ Content-Type:
13
+ - application/json
14
+ Authorization:
15
+ - Basic YzU0NjYwNDU5ZTMzODBkYzUyNmVhYjNiZjlhZGIyOGQ6N2MyMDEzOTYzZjQ2NGZiMmQ3ZjVjOTJkZDZiMjk2NDQ=
16
+ response:
17
+ status:
18
+ code: 200
19
+ message:
20
+ headers:
21
+ server:
22
+ - nginx/1.9.10
23
+ date:
24
+ - Fri, 01 Jul 2016 14:47:48 GMT
25
+ content-type:
26
+ - application/json
27
+ content-length:
28
+ - '308'
29
+ connection:
30
+ - close
31
+ status:
32
+ - 200 OK
33
+ access-control-allow-credentials:
34
+ - 'true'
35
+ body:
36
+ encoding: UTF-8
37
+ string: '{"entries":[{"id":9201273,"plan":"Yael Cohen","quantity":1,"mrr":10871,"arr":130452,"status":"active","billing-cycle":"day","billing-cycle-count":7,"start-date":"2015-10-15T13:41:40+00:00","end-date":"2015-10-22T13:41:40+00:00","currency":"USD","currency-sign":"$"}],"has_more":false,"per_page":200,"page":1}'
38
+ http_version:
39
+ recorded_at: Fri, 01 Jul 2016 14:47:48 GMT
40
+ recorded_with: VCR 3.0.3
@@ -1,40 +1,40 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: get
5
- uri: https://api.chartmogul.com/v1/customers/cus_91af761e-9d0a-11e5-b514-1feab446feac/subscriptions
6
- body:
7
- encoding: US-ASCII
8
- string: ''
9
- headers:
10
- User-Agent:
11
- - Faraday v0.9.2
12
- Content-Type:
13
- - application/json
14
- Authorization:
15
- - Basic YzU0NjYwNDU5ZTMzODBkYzUyNmVhYjNiZjlhZGIyOGQ6N2MyMDEzOTYzZjQ2NGZiMmQ3ZjVjOTJkZDZiMjk2NDQ=
16
- response:
17
- status:
18
- code: 200
19
- message:
20
- headers:
21
- server:
22
- - nginx/1.9.10
23
- date:
24
- - Fri, 01 Jul 2016 14:47:47 GMT
25
- content-type:
26
- - application/json
27
- content-length:
28
- - '308'
29
- connection:
30
- - close
31
- status:
32
- - 200 OK
33
- access-control-allow-credentials:
34
- - 'true'
35
- body:
36
- encoding: UTF-8
37
- string: '{"entries":[{"id":9201273,"plan":"Yael Cohen","quantity":1,"mrr":10871,"arr":130452,"status":"active","billing-cycle":"day","billing-cycle-count":7,"start-date":"2015-10-15T13:41:40+00:00","end-date":"2015-10-22T13:41:40+00:00","currency":"USD","currency-sign":"$"}],"has_more":false,"per_page":200,"page":1}'
38
- http_version:
39
- recorded_at: Fri, 01 Jul 2016 14:47:47 GMT
40
- recorded_with: VCR 3.0.3
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://api.chartmogul.com/v1/customers/cus_91af761e-9d0a-11e5-b514-1feab446feac/subscriptions
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ User-Agent:
11
+ - Faraday v0.9.2
12
+ Content-Type:
13
+ - application/json
14
+ Authorization:
15
+ - Basic YzU0NjYwNDU5ZTMzODBkYzUyNmVhYjNiZjlhZGIyOGQ6N2MyMDEzOTYzZjQ2NGZiMmQ3ZjVjOTJkZDZiMjk2NDQ=
16
+ response:
17
+ status:
18
+ code: 200
19
+ message:
20
+ headers:
21
+ server:
22
+ - nginx/1.9.10
23
+ date:
24
+ - Fri, 01 Jul 2016 14:47:47 GMT
25
+ content-type:
26
+ - application/json
27
+ content-length:
28
+ - '308'
29
+ connection:
30
+ - close
31
+ status:
32
+ - 200 OK
33
+ access-control-allow-credentials:
34
+ - 'true'
35
+ body:
36
+ encoding: UTF-8
37
+ string: '{"entries":[{"id":9201273,"plan":"Yael Cohen","quantity":1,"mrr":10871,"arr":130452,"status":"active","billing-cycle":"day","billing-cycle-count":7,"start-date":"2015-10-15T13:41:40+00:00","end-date":"2015-10-22T13:41:40+00:00","currency":"USD","currency-sign":"$"}],"has_more":false,"per_page":200,"page":1}'
38
+ http_version:
39
+ recorded_at: Fri, 01 Jul 2016 14:47:47 GMT
40
+ 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/ping
6
- body:
7
- encoding: UTF-8
8
- string: "{}"
9
- headers:
10
- User-Agent:
11
- - Faraday v0.11.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
- - Mon, 13 Feb 2017 15:09:26 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: Mon, 13 Feb 2017 15:09:28 GMT
38
- recorded_with: VCR 3.0.3
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://api.chartmogul.com/v1/ping
6
+ body:
7
+ encoding: UTF-8
8
+ string: "{}"
9
+ headers:
10
+ User-Agent:
11
+ - Faraday v0.11.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
+ - Mon, 13 Feb 2017 15:09:26 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: Mon, 13 Feb 2017 15:09:28 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/ping
6
- body:
7
- encoding: UTF-8
8
- string: "{}"
9
- headers:
10
- User-Agent:
11
- - Faraday v0.11.0
12
- Content-Type:
13
- - application/json
14
- Authorization:
15
- - Basic ZHVtbXktdG9rZW46ZHVtbXktdG9rZW4=
16
- response:
17
- status:
18
- code: 200
19
- message:
20
- headers:
21
- server:
22
- - nginx/1.10.1
23
- date:
24
- - Mon, 13 Feb 2017 15:04:03 GMT
25
- content-type:
26
- - application/json
27
- content-length:
28
- - '16'
29
- connection:
30
- - close
31
- status:
32
- - 200 OK
33
- body:
34
- encoding: UTF-8
35
- string: '{"data":"pong!"}'
36
- http_version:
37
- recorded_at: Mon, 13 Feb 2017 15:04:05 GMT
38
- recorded_with: VCR 3.0.3
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://api.chartmogul.com/v1/ping
6
+ body:
7
+ encoding: UTF-8
8
+ string: "{}"
9
+ headers:
10
+ User-Agent:
11
+ - Faraday v0.11.0
12
+ Content-Type:
13
+ - application/json
14
+ Authorization:
15
+ - Basic ZHVtbXktdG9rZW46ZHVtbXktdG9rZW4=
16
+ response:
17
+ status:
18
+ code: 200
19
+ message:
20
+ headers:
21
+ server:
22
+ - nginx/1.10.1
23
+ date:
24
+ - Mon, 13 Feb 2017 15:04:03 GMT
25
+ content-type:
26
+ - application/json
27
+ content-length:
28
+ - '16'
29
+ connection:
30
+ - close
31
+ status:
32
+ - 200 OK
33
+ body:
34
+ encoding: UTF-8
35
+ string: '{"data":"pong!"}'
36
+ http_version:
37
+ recorded_at: Mon, 13 Feb 2017 15:04:05 GMT
38
+ recorded_with: VCR 3.0.3
@@ -1,51 +1,51 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: post
5
- uri: https://api.chartmogul.com/v1/plans
6
- body:
7
- encoding: UTF-8
8
- string: '{"data_source_uuid":null,"name":null,"interval_count":null,"interval_unit":null,"external_id":null}'
9
- headers:
10
- User-Agent:
11
- - Faraday v0.9.1
12
- Content-Type:
13
- - application/json
14
- Authorization:
15
- - Basic ODE2MjZkMWFiMzU5NTIwMzY5MjhjNjJjYmJiNDMyN2M6ODY3MDRmMDdkYzQwZmYzYjYyYzRjY2E5OTYxMjk2MzY=
16
- response:
17
- status:
18
- code: 422
19
- message:
20
- headers:
21
- server:
22
- - nginx/1.9.10
23
- date:
24
- - Sun, 05 Jun 2016 19:47:08 GMT
25
- content-type:
26
- - application/json; charset=utf-8
27
- transfer-encoding:
28
- - chunked
29
- connection:
30
- - close
31
- x-frame-options:
32
- - SAMEORIGIN
33
- x-xss-protection:
34
- - 1; mode=block
35
- x-content-type-options:
36
- - nosniff
37
- cache-control:
38
- - no-cache
39
- x-request-id:
40
- - 72fc5d2e-0e09-4d62-b0b6-c10299d79c0a
41
- x-runtime:
42
- - '0.026567'
43
- body:
44
- encoding: UTF-8
45
- string: '{"errors":{"name":"A unique name is required for each plan.","interval_count":"is
46
- not a number","interval_unit":"Only ''day'', ''month'' or ''year'' are valid
47
- values for interval_unit.","data_source_uuid":"A valid data source UUID is
48
- required for each plan."}}'
49
- http_version:
50
- recorded_at: Sun, 05 Jun 2016 19:47:08 GMT
51
- recorded_with: VCR 3.0.3
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://api.chartmogul.com/v1/plans
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"data_source_uuid":null,"name":null,"interval_count":null,"interval_unit":null,"external_id":null}'
9
+ headers:
10
+ User-Agent:
11
+ - Faraday v0.9.1
12
+ Content-Type:
13
+ - application/json
14
+ Authorization:
15
+ - Basic ODE2MjZkMWFiMzU5NTIwMzY5MjhjNjJjYmJiNDMyN2M6ODY3MDRmMDdkYzQwZmYzYjYyYzRjY2E5OTYxMjk2MzY=
16
+ response:
17
+ status:
18
+ code: 422
19
+ message:
20
+ headers:
21
+ server:
22
+ - nginx/1.9.10
23
+ date:
24
+ - Sun, 05 Jun 2016 19:47:08 GMT
25
+ content-type:
26
+ - application/json; charset=utf-8
27
+ transfer-encoding:
28
+ - chunked
29
+ connection:
30
+ - close
31
+ x-frame-options:
32
+ - SAMEORIGIN
33
+ x-xss-protection:
34
+ - 1; mode=block
35
+ x-content-type-options:
36
+ - nosniff
37
+ cache-control:
38
+ - no-cache
39
+ x-request-id:
40
+ - 72fc5d2e-0e09-4d62-b0b6-c10299d79c0a
41
+ x-runtime:
42
+ - '0.026567'
43
+ body:
44
+ encoding: UTF-8
45
+ string: '{"errors":{"name":"A unique name is required for each plan.","interval_count":"is
46
+ not a number","interval_unit":"Only ''day'', ''month'' or ''year'' are valid
47
+ values for interval_unit.","data_source_uuid":"A valid data source UUID is
48
+ required for each plan."}}'
49
+ http_version:
50
+ recorded_at: Sun, 05 Jun 2016 19:47:08 GMT
51
+ recorded_with: VCR 3.0.3