chartmogul-ruby 1.6.8 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (112) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/test.yml +44 -0
  3. data/2.0-Upgrade.md +9 -0
  4. data/README.md +8 -2
  5. data/changelog.md +15 -1
  6. data/chartmogul-ruby.gemspec +1 -1
  7. data/fixtures/vcr_cassettes/ChartMogul_APIResource/connection/works_in_a_threaded_environment.yml +3 -3
  8. data/fixtures/vcr_cassettes/ChartMogul_APIResource/connection/works_when_credentials_are_updated.yml +2 -2
  9. data/fixtures/vcr_cassettes/ChartMogul_Account/returns_details_of_current_account.yml +64 -0
  10. data/fixtures/vcr_cassettes/ChartMogul_Customer/API_Interactions/adds_custom_attributes.yml +2 -2
  11. data/fixtures/vcr_cassettes/ChartMogul_Customer/API_Interactions/adds_required_tags.yml +2 -2
  12. data/fixtures/vcr_cassettes/ChartMogul_Customer/API_Interactions/can_page_through_search_endpoint.yml +1 -1
  13. data/fixtures/vcr_cassettes/ChartMogul_Customer/API_Interactions/correctly_handles_a_422_response.yml +1 -1
  14. data/fixtures/vcr_cassettes/ChartMogul_Customer/API_Interactions/correctly_interracts_with_the_API.yml +72 -124
  15. data/fixtures/vcr_cassettes/ChartMogul_Customer/API_Interactions/merges_customers.yml +5 -5
  16. data/fixtures/vcr_cassettes/ChartMogul_Customer/API_Interactions/raises_401_if_invalid_credentials.yml +1 -1
  17. data/fixtures/vcr_cassettes/ChartMogul_Customer/API_Interactions/raises_404_if_no_customers_found.yml +1 -1
  18. data/fixtures/vcr_cassettes/ChartMogul_Customer/API_Interactions/raises_422_for_update_with_invalid_data.yml +2 -2
  19. data/fixtures/vcr_cassettes/ChartMogul_Customer/API_Interactions/removes_custom_attributes.yml +2 -2
  20. data/fixtures/vcr_cassettes/ChartMogul_Customer/API_Interactions/removes_tags.yml +2 -2
  21. data/fixtures/vcr_cassettes/ChartMogul_Customer/API_Interactions/respects_camel_case_for_all_customers_endpoint.yml +45 -0
  22. data/fixtures/vcr_cassettes/ChartMogul_Customer/API_Interactions/returns_all_customers_through_list_all_endpoint.yml +1 -1
  23. data/fixtures/vcr_cassettes/ChartMogul_Customer/API_Interactions/returns_customer_through_retrieve_endpoint.yml +1 -1
  24. data/fixtures/vcr_cassettes/ChartMogul_Customer/API_Interactions/returns_right_customers_through_search_endpoint.yml +1 -1
  25. data/fixtures/vcr_cassettes/ChartMogul_Customer/API_Interactions/updates_custom_attributes.yml +2 -2
  26. data/fixtures/vcr_cassettes/ChartMogul_Customer/API_Interactions/updates_customer.yml +3 -3
  27. data/fixtures/vcr_cassettes/ChartMogul_Customer/API_Interactions/updates_customer_using_class_method.yml +1 -1
  28. data/fixtures/vcr_cassettes/ChartMogul_Customer/_find_by_external_id/when_external_id_is_provided/returns_matching_user_if_exists.yml +2 -2
  29. data/fixtures/vcr_cassettes/ChartMogul_Customer/_find_by_external_id/when_external_id_is_provided/returns_nil_if_customer_does_not_exist.yml +2 -2
  30. data/fixtures/vcr_cassettes/ChartMogul_CustomerInvoices/API_Interactions/correctly_interracts_with_the_API.yml +7 -7
  31. data/fixtures/vcr_cassettes/ChartMogul_DataSource/API_Interactions/correctly_interracts_with_the_API.yml +4 -4
  32. data/fixtures/vcr_cassettes/ChartMogul_DataSource/API_Interactions/correctly_raises_errors_on_404.yml +1 -1
  33. data/fixtures/vcr_cassettes/ChartMogul_DataSource/API_Interactions/correctly_raises_errors_on_422.yml +1 -1
  34. data/fixtures/vcr_cassettes/ChartMogul_DataSource/API_Interactions/retrieves_existing_data_source_matching_uuid.yml +2 -2
  35. data/fixtures/vcr_cassettes/ChartMogul_Invoice/API_Interactions/deletes_an_invoice.yml +1 -1
  36. data/fixtures/vcr_cassettes/ChartMogul_Invoice/API_Interactions/deletes_an_invoice_with_class_method.yml +1 -1
  37. data/fixtures/vcr_cassettes/ChartMogul_Invoice/API_Interactions/raises_error_on_deleting_non-existing_invoice.yml +1 -1
  38. data/fixtures/vcr_cassettes/ChartMogul_Invoice/API_Interactions/retrieves_existing_invoice_by_uuid.yml +1 -1
  39. data/fixtures/vcr_cassettes/ChartMogul_Invoice/API_Interactions/returns_all_invoices_through_list_all_endpoint.yml +1 -1
  40. data/fixtures/vcr_cassettes/ChartMogul_Metrics_ARPA/behaves_like_Metrics_API_resource/behaves_like_Summary/should_have_summary.yml +1 -1
  41. data/fixtures/vcr_cassettes/ChartMogul_Metrics_ARPA/behaves_like_Metrics_API_resource/should_have_entries.yml +1 -1
  42. data/fixtures/vcr_cassettes/ChartMogul_Metrics_ARR/behaves_like_Metrics_API_resource/behaves_like_Summary/should_have_summary.yml +1 -1
  43. data/fixtures/vcr_cassettes/ChartMogul_Metrics_ARR/behaves_like_Metrics_API_resource/should_have_entries.yml +1 -1
  44. data/fixtures/vcr_cassettes/ChartMogul_Metrics_ASP/behaves_like_Metrics_API_resource/behaves_like_Summary/should_have_summary.yml +1 -1
  45. data/fixtures/vcr_cassettes/ChartMogul_Metrics_ASP/behaves_like_Metrics_API_resource/should_have_entries.yml +1 -1
  46. data/fixtures/vcr_cassettes/ChartMogul_Metrics_Activity.yml +37 -0
  47. data/fixtures/vcr_cassettes/ChartMogul_Metrics_Activity/behaves_like_PageableWithAnchor/should_be_pageable.yml +44 -0
  48. data/fixtures/vcr_cassettes/ChartMogul_Metrics_Activity/should_have_Activity_entries.yml +18 -15
  49. data/fixtures/vcr_cassettes/ChartMogul_Metrics_AllKeyMetric/should_have_entries.yml +1 -1
  50. data/fixtures/vcr_cassettes/ChartMogul_Metrics_CustomerChurnRate/behaves_like_Metrics_API_resource/behaves_like_Summary/should_have_summary.yml +1 -1
  51. data/fixtures/vcr_cassettes/ChartMogul_Metrics_CustomerChurnRate/behaves_like_Metrics_API_resource/should_have_entries.yml +1 -1
  52. data/fixtures/vcr_cassettes/ChartMogul_Metrics_CustomerCount/behaves_like_Metrics_API_resource/behaves_like_Summary/should_have_summary.yml +1 -1
  53. data/fixtures/vcr_cassettes/ChartMogul_Metrics_CustomerCount/behaves_like_Metrics_API_resource/should_have_entries.yml +1 -1
  54. data/fixtures/vcr_cassettes/{ChartMogul_Metrics_Activity → ChartMogul_Metrics_Customers_Activity}/behaves_like_Pageable/should_be_pageable.yml +1 -1
  55. data/fixtures/vcr_cassettes/ChartMogul_Metrics_Customers_Activity/should_have_Activity_entries.yml +41 -0
  56. data/fixtures/vcr_cassettes/{ChartMogul_Metrics_Subscription → ChartMogul_Metrics_Customers_Subscription}/behaves_like_Pageable/should_be_pageable.yml +1 -1
  57. data/fixtures/vcr_cassettes/{ChartMogul_Metrics_Subscription → ChartMogul_Metrics_Customers_Subscription}/should_have_Subscription_entries.yml +1 -1
  58. data/fixtures/vcr_cassettes/ChartMogul_Metrics_LTV/behaves_like_Metrics_API_resource/behaves_like_Summary/should_have_summary.yml +1 -1
  59. data/fixtures/vcr_cassettes/ChartMogul_Metrics_LTV/behaves_like_Metrics_API_resource/should_have_entries.yml +1 -1
  60. data/fixtures/vcr_cassettes/ChartMogul_Metrics_MRR/behaves_like_Summary/should_have_summary.yml +1 -1
  61. data/fixtures/vcr_cassettes/ChartMogul_Metrics_MRR/should_have_entries.yml +1 -1
  62. data/fixtures/vcr_cassettes/ChartMogul_Metrics_MRRChurnRate/behaves_like_Metrics_API_resource/behaves_like_Summary/should_have_summary.yml +1 -1
  63. data/fixtures/vcr_cassettes/ChartMogul_Metrics_MRRChurnRate/behaves_like_Metrics_API_resource/should_have_entries.yml +1 -1
  64. data/fixtures/vcr_cassettes/ChartMogul_Ping/pings/and_fails_on_incorrect_credentials.yml +1 -1
  65. data/fixtures/vcr_cassettes/ChartMogul_Ping/pings/and_fails_with_500_internal_server_error.yml +1 -1
  66. data/fixtures/vcr_cassettes/ChartMogul_Ping/pings/and_fails_with_504_gateway_timeout_error.yml +1 -1
  67. data/fixtures/vcr_cassettes/ChartMogul_Ping/pings/when_credentials_correct.yml +1 -1
  68. data/fixtures/vcr_cassettes/ChartMogul_Plan/API_Interactions/correctly_handles_a_422_error.yml +1 -1
  69. data/fixtures/vcr_cassettes/ChartMogul_Plan/API_Interactions/correctly_interacts_with_the_API.yml +3 -3
  70. data/fixtures/vcr_cassettes/ChartMogul_Plan/API_Interactions/deletes_existing_plan.yml +4 -4
  71. data/fixtures/vcr_cassettes/ChartMogul_Plan/API_Interactions/retrieves_existing_plan_by_uuid.yml +3 -3
  72. data/fixtures/vcr_cassettes/ChartMogul_Plan/API_Interactions/updates_existing_plan.yml +4 -4
  73. data/fixtures/vcr_cassettes/ChartMogul_Plan/API_Interactions/updates_existing_plan_using_class_method.yml +3 -3
  74. data/fixtures/vcr_cassettes/ChartMogul_PlanGroup/API_interactions/correctly_handles_a_422_error.yml +1 -1
  75. data/fixtures/vcr_cassettes/ChartMogul_PlanGroup/API_interactions/deletes_a_plan_group.yml +6 -6
  76. data/fixtures/vcr_cassettes/ChartMogul_PlanGroup/API_interactions/retrieves_existing_plan_group_by_uuid.yml +5 -5
  77. data/fixtures/vcr_cassettes/ChartMogul_PlanGroup/API_interactions/returns_an_array_of_plan_groups.yml +7 -7
  78. data/fixtures/vcr_cassettes/ChartMogul_PlanGroup/API_interactions/updates_existing_plan_group_name.yml +6 -6
  79. data/fixtures/vcr_cassettes/ChartMogul_PlanGroup/API_interactions/updates_existing_plan_group_name_via_class_method.yml +5 -5
  80. data/fixtures/vcr_cassettes/ChartMogul_PlanGroup/API_interactions/updates_existing_plan_group_plans.yml +8 -8
  81. data/fixtures/vcr_cassettes/ChartMogul_PlanGroups_Plans/API_interactions/given_a_plan_group_uuid_returns_an_array_of_plans_in_the_plan_group.yml +5 -5
  82. data/fixtures/vcr_cassettes/ChartMogul_Subscription/API_Interactions/connects_subscriptions.yml +10 -10
  83. data/fixtures/vcr_cassettes/ChartMogul_Subscription/API_Interactions/correctly_interracts_with_the_API.yml +7 -7
  84. data/fixtures/vcr_cassettes/ChartMogul_Subscription/API_Interactions/has_multiple_aliases.yml +2 -2
  85. data/fixtures/vcr_cassettes/ChartMogul_Subscription/_update_cancellation_dates/when_array_has_time_objects/is_setting_the_cancellation_dates_of_the_subscription.yml +3 -3
  86. data/fixtures/vcr_cassettes/ChartMogul_Subscription/_update_cancellation_dates/when_array_includes_invalid_entries/raises_an_exception.yml +2 -2
  87. data/fixtures/vcr_cassettes/ChartMogul_Subscription/_update_cancellation_dates/when_array_includes_valid_entries/is_setting_the_cancellation_dates_of_the_subscription.yml +3 -3
  88. data/fixtures/vcr_cassettes/ChartMogul_Subscription/_update_cancellation_dates/when_array_is_empty/makes_an_API_call_and_removes_the_cancellation_dates.yml +3 -3
  89. data/fixtures/vcr_cassettes/ChartMogul_Transactions_Payment/API_Interactions/correctly_interracts_with_the_API.yml +5 -5
  90. data/lib/chartmogul.rb +10 -3
  91. data/lib/chartmogul/account.rb +19 -0
  92. data/lib/chartmogul/api/actions/all.rb +2 -1
  93. data/lib/chartmogul/api/actions/create.rb +2 -2
  94. data/lib/chartmogul/api/actions/custom.rb +1 -1
  95. data/lib/chartmogul/api/actions/retrieve.rb +2 -1
  96. data/lib/chartmogul/api/actions/update.rb +2 -2
  97. data/lib/chartmogul/api_resource.rb +8 -4
  98. data/lib/chartmogul/concerns/pageable_with_anchor.rb +14 -0
  99. data/lib/chartmogul/config_attributes.rb +17 -1
  100. data/lib/chartmogul/customer.rb +2 -1
  101. data/lib/chartmogul/metrics/activity.rb +12 -8
  102. data/lib/chartmogul/metrics/customers/activity.rb +38 -0
  103. data/lib/chartmogul/metrics/customers/subscription.rb +41 -0
  104. data/lib/chartmogul/transactions/payment.rb +1 -1
  105. data/lib/chartmogul/transactions/refund.rb +1 -1
  106. data/lib/chartmogul/utils/hash_snake_caser.rb +9 -2
  107. data/lib/chartmogul/utils/json_parser.rb +2 -4
  108. data/lib/chartmogul/version.rb +1 -1
  109. metadata +18 -10
  110. data/.DS_Store +0 -0
  111. data/.travis.yml +0 -25
  112. data/lib/chartmogul/metrics/subscription.rb +0 -39
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9dda2af29a185fd3a055fbfa3eeed97099989826a85f356e90ca7d0878757df2
4
- data.tar.gz: 62a743e3b125b484e2993c6d539a8ec7f1ce7da67b2d40bc19d6853cee85fdd3
3
+ metadata.gz: 86b36660d2c3b0a96c64043db0972df8d4e175a0c5aa16207205af589b0c1519
4
+ data.tar.gz: d94893728579c81658b93a79dad253806bb98021f6ccc5eb124d81452c2f621b
5
5
  SHA512:
6
- metadata.gz: 2bda6fc0c8a5266d528b7cc41d71da5f1b5471c0b526d2a7008cc93cb92f6c07fa7029af93801db3f24b07c79e035be9841324c9e4a6212c0ff4f510ceea82ec
7
- data.tar.gz: 2c666f0cb45b87c1d4ca453e966d935680ed836dd0e3178b8b35c2e89e4094827b7baa297fea5669e3560fc5d5b436b1a42b3fdcb5e786a00d5163ddfe40f7f6
6
+ metadata.gz: 34f57b3c3eda27f75c710c2d38c1b95fe66caa726e401d700a42dfbd4c75f54c4bbf7c9fd31768e8478d59663518a340d42e34592890ad088323a0e0a031ad84
7
+ data.tar.gz: e9e2bcc3fa435cfe8f924673db791ffda6c5dc3da740eee2b9b4118dc025ce2c3fb10ceff8d2383db1acb255a039f9ecbbeda1dc457cae8b6329d6454107386f
@@ -0,0 +1,44 @@
1
+ name: Run specs and generate Code Climate report
2
+ on:
3
+ push:
4
+ branches: [ main ]
5
+ pull_request:
6
+ branches: [ main ]
7
+ jobs:
8
+ test:
9
+ runs-on: ubuntu-latest
10
+ strategy:
11
+ matrix:
12
+ ruby-version: [2.3, 2.4, 2.5, 2.6, 2.7]
13
+ steps:
14
+ - uses: actions/checkout@v2
15
+ - name: Set up Ruby ${{ matrix.ruby-version }}
16
+ uses: ruby/setup-ruby@v1
17
+ with:
18
+ ruby-version: ${{ matrix.ruby-version }}
19
+ bundler-cache: true
20
+ - name: Install dependencies
21
+ run: bundle install
22
+ - name: Set ENV for codeclimate (pull_request)
23
+ run: |
24
+ git fetch --no-tags --prune --depth=1 origin +refs/heads/$GITHUB_HEAD_REF:refs/remotes/origin/$GITHUB_HEAD_REF
25
+ echo "GIT_BRANCH=$GITHUB_HEAD_REF" >> $GITHUB_ENV
26
+ echo "GIT_COMMIT_SHA=$(git rev-parse origin/$GITHUB_HEAD_REF)" >> $GITHUB_ENV
27
+ if: github.event_name == 'pull_request'
28
+ - name: Set ENV for codeclimate (push)
29
+ run: |
30
+ echo "GIT_BRANCH=${GITHUB_REF#refs/heads/}" >> $GITHUB_ENV
31
+ echo "GIT_COMMIT_SHA=$GITHUB_SHA" >> $GITHUB_ENV
32
+ if: github.event_name == 'push'
33
+ - name: Install Code Climate test report
34
+ run: |
35
+ curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
36
+ chmod +x ./cc-test-reporter
37
+ ./cc-test-reporter before-build
38
+ - name: Run tests
39
+ run: bundle exec rake
40
+ - name: Send Report to Code Climate
41
+ env:
42
+ CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
43
+ if: ${{ success() }}
44
+ run: ./cc-test-reporter after-build
data/2.0-Upgrade.md ADDED
@@ -0,0 +1,9 @@
1
+ # Upgrading to chartmogul-ruby 2.0.0
2
+
3
+ The gem upgrade brings breaking changes to the Metrics API. All other APIs remain unaffected. Please note the following changes:
4
+
5
+ * If you used the Metrics API to get a customer's activities or subscriptions, make the following changes in the namespace
6
+ - `ChartMogul::Metrics::Activity.all('cus_58c7d166-3bd1-4c10-948e-e68bb0fa2478')` should be replaced with `ChartMogul::Metrics::Customers::Activity.all('cus_58c7d166-3bd1-4c10-948e-e68bb0fa2478')`
7
+ - `ChartMogul::Metrics::Subscription.all('cus_3f6f53d3-bca7-4fcd-ad47-345180ef329b')` should be replace with `ChartMogul::Metrics::Customers::Subscription.all('cus_3f6f53d3-bca7-4fcd-ad47-345180ef329b')`
8
+
9
+
data/README.md CHANGED
@@ -8,7 +8,6 @@
8
8
 
9
9
  <p align="center">
10
10
  <a href="https://badge.fury.io/rb/chartmogul-ruby"><img src="https://badge.fury.io/rb/chartmogul-ruby.svg" alt="Gem Version"></a>
11
- <a href="https://travis-ci.org/chartmogul/chartmogul-ruby"><img src="https://travis-ci.org/chartmogul/chartmogul-ruby.svg?branch=main" alt="Travis project"></a>
12
11
  <a href="https://codeclimate.com/github/chartmogul/chartmogul-ruby/test_coverage"><img src="https://api.codeclimate.com/v1/badges/40e8bdff4d1dbf2451de/test_coverage" /></a>
13
12
  </p>
14
13
 
@@ -53,13 +52,20 @@ This gem supports Ruby 2.3 and above.
53
52
  ## Configuration
54
53
 
55
54
  Configure `chartmogul-ruby` with your Account Token and Secret Key, available from the administration section of your ChartMogul account.
55
+ You can either do this in the global scope for the whole runtime (eg. in initializer):
56
56
 
57
+ ```ruby
58
+ ChartMogul.global_account_token = '<Account key goes here>'
59
+ ChartMogul.global_secret_key = '<Secret key goes here>'
60
+ ```
61
+
62
+ Or in a thread-safe scope for the current thread only (eg. different accounts in different async jobs):
57
63
  ```ruby
58
64
  ChartMogul.account_token = '<Account key goes here>'
59
65
  ChartMogul.secret_key = '<Secret key goes here>'
60
66
  ```
61
67
 
62
- Configuration is threadsafe and applied only to the current thread.
68
+ Thread-safe configuration is used if available, otherwise global is used.
63
69
 
64
70
  Test your authentication:
65
71
  ```ruby
data/changelog.md CHANGED
@@ -1,6 +1,20 @@
1
1
  # chartmogul-ruby Change Log
2
2
 
3
- ## Version 1.6.8 -1 November 2020
3
+ ## Version 2.0.0 - 25 June 2021
4
+ - Moves customer scoped Metrics::Activities and Metrics::Subscriptions under Metrics::Customers namespace
5
+ - Adds unscoped activites API endpoint
6
+
7
+ ## Version 1.7.2 - 16 March 2021
8
+ - Fix bug preventing instantiating attributes on ChartMogul::Customers objects
9
+
10
+ ## Version 1.7.1 - 8 March 2021
11
+ - Adds amount_in_cents to payment for partial payments
12
+ - Adds account API endpoint
13
+
14
+ ## Version 1.6.9 - 10 December 2020
15
+ - Fix ChartMogul::Customers class
16
+
17
+ ## Version 1.6.8 - 1 November 2020
4
18
  - Add support for subscription_external_id when listing Activities
5
19
 
6
20
  ## Version 1.6.7 - 8 September 2020
@@ -21,7 +21,7 @@ Gem::Specification.new do |spec|
21
21
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
22
22
  spec.require_paths = ['lib']
23
23
 
24
- spec.add_dependency 'faraday', '~> 1.0.0'
24
+ spec.add_dependency 'faraday', '~> 1.0'
25
25
 
26
26
  spec.add_development_dependency 'bundler', '~> 2'
27
27
  spec.add_development_dependency 'pry', '~> 0.12.2'
@@ -12,7 +12,7 @@ http_interactions:
12
12
  Content-Type:
13
13
  - application/json
14
14
  Authorization:
15
- - Basic aW52YWxpZDppbnZhbGlk
15
+ - Basic hidden
16
16
  response:
17
17
  status:
18
18
  code: 401
@@ -47,7 +47,7 @@ http_interactions:
47
47
  Content-Type:
48
48
  - application/json
49
49
  Authorization:
50
- - Basic ZHVtbXktdG9rZW46ZHVtbXktdG9rZW4=
50
+ - Basic hidden
51
51
  response:
52
52
  status:
53
53
  code: 200
@@ -86,7 +86,7 @@ http_interactions:
86
86
  Content-Type:
87
87
  - application/json
88
88
  Authorization:
89
- - Basic aW52YWxpZDppbnZhbGlk
89
+ - Basic hidden
90
90
  response:
91
91
  status:
92
92
  code: 401
@@ -12,7 +12,7 @@ http_interactions:
12
12
  Content-Type:
13
13
  - application/json
14
14
  Authorization:
15
- - Basic aW52YWxpZDppbnZhbGlk
15
+ - Basic hidden
16
16
  response:
17
17
  status:
18
18
  code: 401
@@ -47,7 +47,7 @@ http_interactions:
47
47
  Content-Type:
48
48
  - application/json
49
49
  Authorization:
50
- - Basic ZHVtbXktdG9rZW46ZHVtbXktdG9rZW4=
50
+ - Basic hidden
51
51
  response:
52
52
  status:
53
53
  code: 200
@@ -0,0 +1,64 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://api.chartmogul.com/v1/account
6
+ body:
7
+ encoding: UTF-8
8
+ string: "{}"
9
+ headers:
10
+ User-Agent:
11
+ - Faraday v1.0.1
12
+ Content-Type:
13
+ - application/json
14
+ Authorization:
15
+ - Basic hidden
16
+ response:
17
+ status:
18
+ code: 200
19
+ message: OK
20
+ headers:
21
+ server:
22
+ - nginx/1.10.1
23
+ date:
24
+ - Wed, 03 Mar 2021 14:09:59 GMT
25
+ content-type:
26
+ - application/json; charset=utf-8
27
+ transfer-encoding:
28
+ - chunked
29
+ connection:
30
+ - keep-alive
31
+ vary:
32
+ - Accept-Encoding, Accept-Encoding
33
+ status:
34
+ - 200 OK
35
+ x-frame-options:
36
+ - SAMEORIGIN
37
+ x-xss-protection:
38
+ - 1; mode=block
39
+ x-content-type-options:
40
+ - nosniff
41
+ x-download-options:
42
+ - noopen
43
+ x-permitted-cross-domain-policies:
44
+ - none
45
+ referrer-policy:
46
+ - strict-origin-when-cross-origin
47
+ etag:
48
+ - W/"40c9400b568f357a5ea27c39820ee12c"
49
+ cache-control:
50
+ - max-age=0, private, must-revalidate
51
+ x-request-id:
52
+ - 40488095-438b-443f-bbce-a5f2c9dc3a07
53
+ x-protected-by:
54
+ - Sqreen
55
+ x-runtime:
56
+ - '0.047066'
57
+ strict-transport-security:
58
+ - max-age=15768000
59
+ body:
60
+ encoding: ASCII-8BIT
61
+ string: '{"name":"Example Test Company","currency":"EUR","time_zone":"Europe/Berlin","week_start_on":"sunday"}'
62
+ http_version:
63
+ recorded_at: Wed, 03 Mar 2021 14:09:59 GMT
64
+ recorded_with: VCR 5.1.0
@@ -12,7 +12,7 @@ http_interactions:
12
12
  Content-Type:
13
13
  - application/json
14
14
  Authorization:
15
- - Basic MDFiNzI2YzI0ZjNiYjhlOTc0MmEwNGZiMDhhZmE3NzQ6NzJlNGMxYTdlZTFiYzlkNGZjMDBlZWUwNWIyN2QzMGY=
15
+ - Basic hidden
16
16
  response:
17
17
  status:
18
18
  code: 200
@@ -52,7 +52,7 @@ http_interactions:
52
52
  Content-Type:
53
53
  - application/json
54
54
  Authorization:
55
- - Basic MDFiNzI2YzI0ZjNiYjhlOTc0MmEwNGZiMDhhZmE3NzQ6NzJlNGMxYTdlZTFiYzlkNGZjMDBlZWUwNWIyN2QzMGY=
55
+ - Basic hidden
56
56
  response:
57
57
  status:
58
58
  code: 200
@@ -12,7 +12,7 @@ http_interactions:
12
12
  Content-Type:
13
13
  - application/json
14
14
  Authorization:
15
- - Basic MDFiNzI2YzI0ZjNiYjhlOTc0MmEwNGZiMDhhZmE3NzQ6NzJlNGMxYTdlZTFiYzlkNGZjMDBlZWUwNWIyN2QzMGY=
15
+ - Basic hidden
16
16
  response:
17
17
  status:
18
18
  code: 200
@@ -51,7 +51,7 @@ http_interactions:
51
51
  Content-Type:
52
52
  - application/json
53
53
  Authorization:
54
- - Basic MDFiNzI2YzI0ZjNiYjhlOTc0MmEwNGZiMDhhZmE3NzQ6NzJlNGMxYTdlZTFiYzlkNGZjMDBlZWUwNWIyN2QzMGY=
54
+ - Basic hidden
55
55
  response:
56
56
  status:
57
57
  code: 200
@@ -12,7 +12,7 @@ http_interactions:
12
12
  Content-Type:
13
13
  - application/json
14
14
  Authorization:
15
- - Basic MDFiNzI2YzI0ZjNiYjhlOTc0MmEwNGZiMDhhZmE3NzQ6NzJlNGMxYTdlZTFiYzlkNGZjMDBlZWUwNWIyN2QzMGY=
15
+ - Basic hidden
16
16
  response:
17
17
  status:
18
18
  code: 200
@@ -12,7 +12,7 @@ http_interactions:
12
12
  Content-Type:
13
13
  - application/json
14
14
  Authorization:
15
- - Basic ODE2MjZkMWFiMzU5NTIwMzY5MjhjNjJjYmJiNDMyN2M6ODY3MDRmMDdkYzQwZmYzYjYyYzRjY2E5OTYxMjk2MzY=
15
+ - Basic hidden
16
16
  response:
17
17
  status:
18
18
  code: 422
@@ -8,99 +8,76 @@ http_interactions:
8
8
  string: '{"name":"Customer Test Data Source"}'
9
9
  headers:
10
10
  User-Agent:
11
- - Faraday v0.9.2
11
+ - Faraday v1.0.1
12
12
  Content-Type:
13
13
  - application/json
14
14
  Authorization:
15
- - Basic ODE2MjZkMWFiMzU5NTIwMzY5MjhjNjJjYmJiNDMyN2M6ODY3MDRmMDdkYzQwZmYzYjYyYzRjY2E5OTYxMjk2MzY=
15
+ - Basic hidden
16
16
  response:
17
17
  status:
18
18
  code: 201
19
- message:
19
+ message: Created
20
20
  headers:
21
21
  server:
22
22
  - nginx/1.10.1
23
23
  date:
24
- - Tue, 08 Nov 2016 08:57:33 GMT
24
+ - Tue, 16 Mar 2021 12:27:18 GMT
25
25
  content-type:
26
- - application/json; charset=utf-8
26
+ - application/json
27
27
  transfer-encoding:
28
28
  - chunked
29
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/"bcfee5f9180970835929930b05411ff4"
39
- cache-control:
40
- - max-age=0, private, must-revalidate
41
- x-request-id:
42
- - 9505cefe-9a7a-46af-a173-7a686cf46800
43
- x-runtime:
44
- - '0.461858'
45
- strict-transport-security:
46
- - max-age=15768000
30
+ - keep-alive
31
+ status:
32
+ - 201 Created
33
+ access-control-allow-credentials:
34
+ - 'true'
47
35
  body:
48
36
  encoding: UTF-8
49
- string: '{"uuid":"ds_632433ee-a591-11e6-aa29-ff9ccc9a74aa","name":"Customer
50
- Test Data Source","created_at":"2016-11-08T08:57:33.304Z","status":"never_imported"}'
37
+ string: '{"uuid":"ds_f2f67ad0-8652-11eb-a9f8-37471a677085","name":"Customer
38
+ Test Data Source","system":"Import API","created_at":"2021-03-16T12:27:18.630Z","status":"idle"}'
51
39
  http_version:
52
- recorded_at: Tue, 08 Nov 2016 08:57:33 GMT
40
+ recorded_at: Tue, 16 Mar 2021 12:27:18 GMT
53
41
  - request:
54
42
  method: post
55
43
  uri: https://api.chartmogul.com/v1/customers
56
44
  body:
57
45
  encoding: UTF-8
58
- string: '{"external_id":"X1234","name":"Test Customer","email":"test@example.com","country":"DE","city":"Berlin","data_source_uuid":"ds_632433ee-a591-11e6-aa29-ff9ccc9a74aa","lead_created_at":"2016-10-01
46
+ string: '{"external_id":"X1234","name":"Test Customer","email":"test@example.com","country":"DE","city":"Berlin","data_source_uuid":"ds_f2f67ad0-8652-11eb-a9f8-37471a677085","lead_created_at":"2016-10-01
59
47
  23:55:00 UTC","free_trial_started_at":"2016-10-12 11:12:00 UTC"}'
60
48
  headers:
61
49
  User-Agent:
62
- - Faraday v0.9.2
50
+ - Faraday v1.0.1
63
51
  Content-Type:
64
52
  - application/json
65
53
  Authorization:
66
- - Basic ODE2MjZkMWFiMzU5NTIwMzY5MjhjNjJjYmJiNDMyN2M6ODY3MDRmMDdkYzQwZmYzYjYyYzRjY2E5OTYxMjk2MzY=
54
+ - Basic hidden
67
55
  response:
68
56
  status:
69
57
  code: 201
70
- message:
58
+ message: Created
71
59
  headers:
72
60
  server:
73
61
  - nginx/1.10.1
74
62
  date:
75
- - Tue, 08 Nov 2016 08:57:33 GMT
63
+ - Tue, 16 Mar 2021 12:27:19 GMT
76
64
  content-type:
77
- - application/json; charset=utf-8
65
+ - application/json
78
66
  transfer-encoding:
79
67
  - chunked
80
68
  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/"edb1e5e3324d47803eccb229a21363df"
90
- cache-control:
91
- - max-age=0, private, must-revalidate
92
- x-request-id:
93
- - bf049e2c-b057-4d90-85bf-f90c9ca98b31
94
- x-runtime:
95
- - '0.158973'
96
- strict-transport-security:
97
- - max-age=15768000
69
+ - keep-alive
70
+ status:
71
+ - 201 Created
72
+ access-control-allow-credentials:
73
+ - 'true'
98
74
  body:
99
75
  encoding: UTF-8
100
- string: '{"uuid":"cus_709bf73d-dc7c-4fb3-825d-a32c7fe5be16","external_id":"X1234","name":"Test
101
- Customer","company":"","email":"test@example.com","city":"Berlin","state":"","country":"DE","zip":"","lead_created_at":"2016-10-01T23:55:00.000Z","free_trial_started_at":"2016-10-12T11:12:00.000Z","data_source_uuid":"ds_632433ee-a591-11e6-aa29-ff9ccc9a74aa"}'
76
+ string: '{"id":93760512,"uuid":"cus_f340970a-8652-11eb-a9f8-cfc7971a103f","external_id":"X1234","name":"Test
77
+ Customer","email":"test@example.com","status":"Lead","customer-since":null,"attributes":{"custom":{},"clearbit":{},"stripe":{},"tags":[]},"data_source_uuid":"ds_f2f67ad0-8652-11eb-a9f8-37471a677085","data_source_uuids":["ds_f2f67ad0-8652-11eb-a9f8-37471a677085"],"external_ids":["X1234"],"company":"","country":"DE","state":null,"city":"Berlin","zip":null,"lead_created_at":"2016-10-01T23:55:00.000Z","free_trial_started_at":"2016-10-12T11:12:00.000Z","address":{"country":"Germany","state":null,"city":"Berlin","address_zip":null},"mrr":0,"arr":0,"billing-system-url":null,"chartmogul-url":"https://app.chartmogul.com/#customers/93760512-Test_Customer","billing-system-type":"Import
78
+ API","currency":"USD","currency-sign":"$"}'
102
79
  http_version:
103
- recorded_at: Tue, 08 Nov 2016 08:57:33 GMT
80
+ recorded_at: Tue, 16 Mar 2021 12:27:19 GMT
104
81
  - request:
105
82
  method: get
106
83
  uri: https://api.chartmogul.com/v1/customers
@@ -109,89 +86,70 @@ http_interactions:
109
86
  string: ''
110
87
  headers:
111
88
  User-Agent:
112
- - Faraday v0.9.2
89
+ - Faraday v1.0.1
113
90
  Content-Type:
114
91
  - application/json
115
92
  Authorization:
116
- - Basic ODE2MjZkMWFiMzU5NTIwMzY5MjhjNjJjYmJiNDMyN2M6ODY3MDRmMDdkYzQwZmYzYjYyYzRjY2E5OTYxMjk2MzY=
93
+ - Basic hidden
117
94
  response:
118
95
  status:
119
96
  code: 200
120
- message:
97
+ message: OK
121
98
  headers:
122
99
  server:
123
100
  - nginx/1.10.1
124
101
  date:
125
- - Tue, 08 Nov 2016 08:57:34 GMT
102
+ - Tue, 16 Mar 2021 12:27:19 GMT
126
103
  content-type:
127
- - application/json; charset=utf-8
104
+ - application/json
128
105
  transfer-encoding:
129
106
  - chunked
130
107
  connection:
131
- - close
132
- x-frame-options:
133
- - SAMEORIGIN
134
- x-xss-protection:
135
- - 1; mode=block
136
- x-content-type-options:
137
- - nosniff
138
- etag:
139
- - W/"eb861872d3bd01a055485e96ccf38898"
140
- cache-control:
141
- - max-age=0, private, must-revalidate
142
- x-request-id:
143
- - 32f87d7c-f944-405d-a87c-2195f175940a
144
- x-runtime:
145
- - '0.022802'
146
- strict-transport-security:
147
- - max-age=15768000
108
+ - keep-alive
109
+ vary:
110
+ - Accept-Encoding, Accept-Encoding
111
+ status:
112
+ - 200 OK
113
+ access-control-allow-credentials:
114
+ - 'true'
148
115
  body:
149
- encoding: UTF-8
150
- string: '{"entries":[{"uuid":"cus_709bf73d-dc7c-4fb3-825d-a32c7fe5be16","external_id":"X1234","name":"Test
151
- Customer","company":"","email":"test@example.com","city":"Berlin","state":"","country":"DE","zip":"","lead_created_at":"2016-10-01T23:55:00.000Z","free_trial_started_at":"2016-10-12T11:12:00.000Z","data_source_uuid":"ds_632433ee-a591-11e6-aa29-ff9ccc9a74aa"}],"current_page":1,"total_pages":1,"has_more":false,"per_page":50,"page":1}'
116
+ encoding: ASCII-8BIT
117
+ string: '{"entries":[{"id":93760512,"uuid":"cus_f340970a-8652-11eb-a9f8-cfc7971a103f","external_id":"X1234","name":"Test
118
+ Customer","email":"test@example.com","status":"Lead","customer-since":null,"attributes":{"custom":{},"clearbit":{},"stripe":{},"tags":[]},"data_source_uuid":"ds_f2f67ad0-8652-11eb-a9f8-37471a677085","data_source_uuids":["ds_f2f67ad0-8652-11eb-a9f8-37471a677085"],"external_ids":["X1234"],"company":"","country":"DE","state":null,"city":"Berlin","zip":null,"lead_created_at":"2016-10-01T23:55:00.000Z","free_trial_started_at":"2016-10-12T11:12:00.000Z","address":{"country":"Germany","state":null,"city":"Berlin","address_zip":null},"mrr":0,"arr":0,"billing-system-url":null,"chartmogul-url":"https://app.chartmogul.com/#customers/93760512-Test_Customer","billing-system-type":"Import
119
+ API","currency":"USD","currency-sign":"$"}],"current_page":1,"total_pages":1,"has_more":false,"per_page":200,"page":1}'
152
120
  http_version:
153
- recorded_at: Tue, 08 Nov 2016 08:57:34 GMT
121
+ recorded_at: Tue, 16 Mar 2021 12:27:19 GMT
154
122
  - request:
155
123
  method: delete
156
- uri: https://api.chartmogul.com/v1/customers/cus_709bf73d-dc7c-4fb3-825d-a32c7fe5be16
124
+ uri: https://api.chartmogul.com/v1/customers/cus_f340970a-8652-11eb-a9f8-cfc7971a103f
157
125
  body:
158
126
  encoding: US-ASCII
159
127
  string: ''
160
128
  headers:
161
129
  User-Agent:
162
- - Faraday v0.9.2
130
+ - Faraday v1.0.1
163
131
  Authorization:
164
- - Basic ODE2MjZkMWFiMzU5NTIwMzY5MjhjNjJjYmJiNDMyN2M6ODY3MDRmMDdkYzQwZmYzYjYyYzRjY2E5OTYxMjk2MzY=
132
+ - Basic hidden
165
133
  response:
166
134
  status:
167
135
  code: 204
168
- message:
136
+ message: No Content
169
137
  headers:
170
138
  server:
171
139
  - nginx/1.10.1
172
140
  date:
173
- - Tue, 08 Nov 2016 08:57:34 GMT
141
+ - Tue, 16 Mar 2021 12:28:19 GMT
174
142
  connection:
175
- - close
176
- x-frame-options:
177
- - SAMEORIGIN
178
- x-xss-protection:
179
- - 1; mode=block
180
- x-content-type-options:
181
- - nosniff
182
- cache-control:
183
- - no-cache
184
- x-request-id:
185
- - f163488f-bbea-4937-897b-ee08b69a4560
186
- x-runtime:
187
- - '0.015696'
188
- strict-transport-security:
189
- - max-age=15768000
143
+ - keep-alive
144
+ status:
145
+ - 204 No Content
146
+ access-control-allow-credentials:
147
+ - 'true'
190
148
  body:
191
149
  encoding: UTF-8
192
150
  string: ''
193
151
  http_version:
194
- recorded_at: Tue, 08 Nov 2016 08:57:34 GMT
152
+ recorded_at: Tue, 16 Mar 2021 12:28:19 GMT
195
153
  - request:
196
154
  method: get
197
155
  uri: https://api.chartmogul.com/v1/customers
@@ -200,45 +158,35 @@ http_interactions:
200
158
  string: ''
201
159
  headers:
202
160
  User-Agent:
203
- - Faraday v0.9.2
161
+ - Faraday v1.0.1
204
162
  Content-Type:
205
163
  - application/json
206
164
  Authorization:
207
- - Basic ODE2MjZkMWFiMzU5NTIwMzY5MjhjNjJjYmJiNDMyN2M6ODY3MDRmMDdkYzQwZmYzYjYyYzRjY2E5OTYxMjk2MzY=
165
+ - Basic hidden
208
166
  response:
209
167
  status:
210
168
  code: 200
211
- message:
169
+ message: OK
212
170
  headers:
213
171
  server:
214
172
  - nginx/1.10.1
215
173
  date:
216
- - Tue, 08 Nov 2016 08:57:34 GMT
174
+ - Tue, 16 Mar 2021 12:28:20 GMT
217
175
  content-type:
218
- - application/json; charset=utf-8
176
+ - application/json
219
177
  transfer-encoding:
220
178
  - chunked
221
179
  connection:
222
- - close
223
- x-frame-options:
224
- - SAMEORIGIN
225
- x-xss-protection:
226
- - 1; mode=block
227
- x-content-type-options:
228
- - nosniff
229
- etag:
230
- - W/"82f80d77a5a88d6de206bb1feeb897cc"
231
- cache-control:
232
- - max-age=0, private, must-revalidate
233
- x-request-id:
234
- - 770d6629-03d8-4f55-8bec-dde047828e7e
235
- x-runtime:
236
- - '0.019712'
237
- strict-transport-security:
238
- - max-age=15768000
180
+ - keep-alive
181
+ vary:
182
+ - Accept-Encoding, Accept-Encoding
183
+ status:
184
+ - 200 OK
185
+ access-control-allow-credentials:
186
+ - 'true'
239
187
  body:
240
- encoding: UTF-8
241
- string: '{"customers":[],"current_page":1,"total_pages":0,"has_more":false,"per_page":50,"page":1}'
188
+ encoding: ASCII-8BIT
189
+ string: '{"entries":[],"current_page":1,"total_pages":1,"has_more":false,"per_page":200,"page":1}'
242
190
  http_version:
243
- recorded_at: Tue, 08 Nov 2016 08:57:34 GMT
244
- recorded_with: VCR 3.0.3
191
+ recorded_at: Tue, 16 Mar 2021 12:28:20 GMT
192
+ recorded_with: VCR 5.1.0