chartmogul-ruby 1.6.7 → 1.7.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (101) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +8 -1
  3. data/changelog.md +13 -0
  4. data/chartmogul-ruby.gemspec +1 -1
  5. data/fixtures/vcr_cassettes/ChartMogul_APIResource/connection/works_in_a_threaded_environment.yml +3 -3
  6. data/fixtures/vcr_cassettes/ChartMogul_APIResource/connection/works_when_credentials_are_updated.yml +2 -2
  7. data/fixtures/vcr_cassettes/ChartMogul_Account/returns_details_of_current_account.yml +64 -0
  8. data/fixtures/vcr_cassettes/ChartMogul_Customer/API_Interactions/adds_custom_attributes.yml +2 -2
  9. data/fixtures/vcr_cassettes/ChartMogul_Customer/API_Interactions/adds_required_tags.yml +2 -2
  10. data/fixtures/vcr_cassettes/ChartMogul_Customer/API_Interactions/can_page_through_search_endpoint.yml +1 -1
  11. data/fixtures/vcr_cassettes/ChartMogul_Customer/API_Interactions/correctly_handles_a_422_response.yml +1 -1
  12. data/fixtures/vcr_cassettes/ChartMogul_Customer/API_Interactions/correctly_interracts_with_the_API.yml +72 -124
  13. data/fixtures/vcr_cassettes/ChartMogul_Customer/API_Interactions/merges_customers.yml +5 -5
  14. data/fixtures/vcr_cassettes/ChartMogul_Customer/API_Interactions/raises_401_if_invalid_credentials.yml +1 -1
  15. data/fixtures/vcr_cassettes/ChartMogul_Customer/API_Interactions/raises_404_if_no_customers_found.yml +1 -1
  16. data/fixtures/vcr_cassettes/ChartMogul_Customer/API_Interactions/raises_422_for_update_with_invalid_data.yml +2 -2
  17. data/fixtures/vcr_cassettes/ChartMogul_Customer/API_Interactions/removes_custom_attributes.yml +2 -2
  18. data/fixtures/vcr_cassettes/ChartMogul_Customer/API_Interactions/removes_tags.yml +2 -2
  19. data/fixtures/vcr_cassettes/ChartMogul_Customer/API_Interactions/respects_camel_case_for_all_customers_endpoint.yml +45 -0
  20. data/fixtures/vcr_cassettes/ChartMogul_Customer/API_Interactions/returns_all_customers_through_list_all_endpoint.yml +1 -1
  21. data/fixtures/vcr_cassettes/ChartMogul_Customer/API_Interactions/returns_customer_through_retrieve_endpoint.yml +1 -1
  22. data/fixtures/vcr_cassettes/ChartMogul_Customer/API_Interactions/returns_right_customers_through_search_endpoint.yml +1 -1
  23. data/fixtures/vcr_cassettes/ChartMogul_Customer/API_Interactions/updates_custom_attributes.yml +2 -2
  24. data/fixtures/vcr_cassettes/ChartMogul_Customer/API_Interactions/updates_customer.yml +3 -3
  25. data/fixtures/vcr_cassettes/ChartMogul_Customer/API_Interactions/updates_customer_using_class_method.yml +1 -1
  26. data/fixtures/vcr_cassettes/ChartMogul_Customer/_find_by_external_id/when_external_id_is_provided/returns_matching_user_if_exists.yml +2 -2
  27. 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
  28. data/fixtures/vcr_cassettes/ChartMogul_CustomerInvoices/API_Interactions/correctly_interracts_with_the_API.yml +7 -7
  29. data/fixtures/vcr_cassettes/ChartMogul_DataSource/API_Interactions/correctly_interracts_with_the_API.yml +4 -4
  30. data/fixtures/vcr_cassettes/ChartMogul_DataSource/API_Interactions/correctly_raises_errors_on_404.yml +1 -1
  31. data/fixtures/vcr_cassettes/ChartMogul_DataSource/API_Interactions/correctly_raises_errors_on_422.yml +1 -1
  32. data/fixtures/vcr_cassettes/ChartMogul_DataSource/API_Interactions/retrieves_existing_data_source_matching_uuid.yml +2 -2
  33. data/fixtures/vcr_cassettes/ChartMogul_Invoice/API_Interactions/deletes_an_invoice.yml +1 -1
  34. data/fixtures/vcr_cassettes/ChartMogul_Invoice/API_Interactions/deletes_an_invoice_with_class_method.yml +1 -1
  35. data/fixtures/vcr_cassettes/ChartMogul_Invoice/API_Interactions/raises_error_on_deleting_non-existing_invoice.yml +1 -1
  36. data/fixtures/vcr_cassettes/ChartMogul_Invoice/API_Interactions/retrieves_existing_invoice_by_uuid.yml +1 -1
  37. data/fixtures/vcr_cassettes/ChartMogul_Invoice/API_Interactions/returns_all_invoices_through_list_all_endpoint.yml +1 -1
  38. data/fixtures/vcr_cassettes/ChartMogul_Metrics_ARPA/behaves_like_Metrics_API_resource/behaves_like_Summary/should_have_summary.yml +1 -1
  39. data/fixtures/vcr_cassettes/ChartMogul_Metrics_ARPA/behaves_like_Metrics_API_resource/should_have_entries.yml +1 -1
  40. data/fixtures/vcr_cassettes/ChartMogul_Metrics_ARR/behaves_like_Metrics_API_resource/behaves_like_Summary/should_have_summary.yml +1 -1
  41. data/fixtures/vcr_cassettes/ChartMogul_Metrics_ARR/behaves_like_Metrics_API_resource/should_have_entries.yml +1 -1
  42. data/fixtures/vcr_cassettes/ChartMogul_Metrics_ASP/behaves_like_Metrics_API_resource/behaves_like_Summary/should_have_summary.yml +1 -1
  43. data/fixtures/vcr_cassettes/ChartMogul_Metrics_ASP/behaves_like_Metrics_API_resource/should_have_entries.yml +1 -1
  44. data/fixtures/vcr_cassettes/ChartMogul_Metrics_Activity/behaves_like_Pageable/should_be_pageable.yml +2 -2
  45. data/fixtures/vcr_cassettes/ChartMogul_Metrics_Activity/should_have_Activity_entries.yml +2 -2
  46. data/fixtures/vcr_cassettes/ChartMogul_Metrics_AllKeyMetric/should_have_entries.yml +1 -1
  47. data/fixtures/vcr_cassettes/ChartMogul_Metrics_CustomerChurnRate/behaves_like_Metrics_API_resource/behaves_like_Summary/should_have_summary.yml +1 -1
  48. data/fixtures/vcr_cassettes/ChartMogul_Metrics_CustomerChurnRate/behaves_like_Metrics_API_resource/should_have_entries.yml +1 -1
  49. data/fixtures/vcr_cassettes/ChartMogul_Metrics_CustomerCount/behaves_like_Metrics_API_resource/behaves_like_Summary/should_have_summary.yml +1 -1
  50. data/fixtures/vcr_cassettes/ChartMogul_Metrics_CustomerCount/behaves_like_Metrics_API_resource/should_have_entries.yml +1 -1
  51. data/fixtures/vcr_cassettes/ChartMogul_Metrics_LTV/behaves_like_Metrics_API_resource/behaves_like_Summary/should_have_summary.yml +1 -1
  52. data/fixtures/vcr_cassettes/ChartMogul_Metrics_LTV/behaves_like_Metrics_API_resource/should_have_entries.yml +1 -1
  53. data/fixtures/vcr_cassettes/ChartMogul_Metrics_MRR/behaves_like_Summary/should_have_summary.yml +1 -1
  54. data/fixtures/vcr_cassettes/ChartMogul_Metrics_MRR/should_have_entries.yml +1 -1
  55. data/fixtures/vcr_cassettes/ChartMogul_Metrics_MRRChurnRate/behaves_like_Metrics_API_resource/behaves_like_Summary/should_have_summary.yml +1 -1
  56. data/fixtures/vcr_cassettes/ChartMogul_Metrics_MRRChurnRate/behaves_like_Metrics_API_resource/should_have_entries.yml +1 -1
  57. data/fixtures/vcr_cassettes/ChartMogul_Metrics_Subscription/behaves_like_Pageable/should_be_pageable.yml +1 -1
  58. data/fixtures/vcr_cassettes/ChartMogul_Metrics_Subscription/should_have_Subscription_entries.yml +1 -1
  59. data/fixtures/vcr_cassettes/ChartMogul_Ping/pings/and_fails_on_incorrect_credentials.yml +1 -1
  60. data/fixtures/vcr_cassettes/ChartMogul_Ping/pings/and_fails_with_500_internal_server_error.yml +1 -1
  61. data/fixtures/vcr_cassettes/ChartMogul_Ping/pings/and_fails_with_504_gateway_timeout_error.yml +1 -1
  62. data/fixtures/vcr_cassettes/ChartMogul_Ping/pings/when_credentials_correct.yml +1 -1
  63. data/fixtures/vcr_cassettes/ChartMogul_Plan/API_Interactions/correctly_handles_a_422_error.yml +1 -1
  64. data/fixtures/vcr_cassettes/ChartMogul_Plan/API_Interactions/correctly_interacts_with_the_API.yml +3 -3
  65. data/fixtures/vcr_cassettes/ChartMogul_Plan/API_Interactions/deletes_existing_plan.yml +4 -4
  66. data/fixtures/vcr_cassettes/ChartMogul_Plan/API_Interactions/retrieves_existing_plan_by_uuid.yml +3 -3
  67. data/fixtures/vcr_cassettes/ChartMogul_Plan/API_Interactions/updates_existing_plan.yml +4 -4
  68. data/fixtures/vcr_cassettes/ChartMogul_Plan/API_Interactions/updates_existing_plan_using_class_method.yml +3 -3
  69. data/fixtures/vcr_cassettes/ChartMogul_PlanGroup/API_interactions/correctly_handles_a_422_error.yml +1 -1
  70. data/fixtures/vcr_cassettes/ChartMogul_PlanGroup/API_interactions/deletes_a_plan_group.yml +6 -6
  71. data/fixtures/vcr_cassettes/ChartMogul_PlanGroup/API_interactions/retrieves_existing_plan_group_by_uuid.yml +5 -5
  72. data/fixtures/vcr_cassettes/ChartMogul_PlanGroup/API_interactions/returns_an_array_of_plan_groups.yml +7 -7
  73. data/fixtures/vcr_cassettes/ChartMogul_PlanGroup/API_interactions/updates_existing_plan_group_name.yml +6 -6
  74. data/fixtures/vcr_cassettes/ChartMogul_PlanGroup/API_interactions/updates_existing_plan_group_name_via_class_method.yml +5 -5
  75. data/fixtures/vcr_cassettes/ChartMogul_PlanGroup/API_interactions/updates_existing_plan_group_plans.yml +8 -8
  76. 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
  77. data/fixtures/vcr_cassettes/ChartMogul_Subscription/API_Interactions/connects_subscriptions.yml +10 -10
  78. data/fixtures/vcr_cassettes/ChartMogul_Subscription/API_Interactions/correctly_interracts_with_the_API.yml +7 -7
  79. data/fixtures/vcr_cassettes/ChartMogul_Subscription/API_Interactions/has_multiple_aliases.yml +2 -2
  80. 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
  81. data/fixtures/vcr_cassettes/ChartMogul_Subscription/_update_cancellation_dates/when_array_includes_invalid_entries/raises_an_exception.yml +2 -2
  82. 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
  83. 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
  84. data/fixtures/vcr_cassettes/ChartMogul_Transactions_Payment/API_Interactions/correctly_interracts_with_the_API.yml +5 -5
  85. data/lib/chartmogul.rb +7 -2
  86. data/lib/chartmogul/account.rb +19 -0
  87. data/lib/chartmogul/api/actions/all.rb +2 -1
  88. data/lib/chartmogul/api/actions/create.rb +2 -2
  89. data/lib/chartmogul/api/actions/custom.rb +1 -1
  90. data/lib/chartmogul/api/actions/retrieve.rb +2 -1
  91. data/lib/chartmogul/api/actions/update.rb +2 -2
  92. data/lib/chartmogul/api_resource.rb +8 -4
  93. data/lib/chartmogul/config_attributes.rb +17 -1
  94. data/lib/chartmogul/customer.rb +2 -1
  95. data/lib/chartmogul/metrics/activity.rb +1 -0
  96. data/lib/chartmogul/transactions/payment.rb +1 -1
  97. data/lib/chartmogul/transactions/refund.rb +1 -1
  98. data/lib/chartmogul/utils/hash_snake_caser.rb +9 -2
  99. data/lib/chartmogul/utils/json_parser.rb +2 -4
  100. data/lib/chartmogul/version.rb +1 -1
  101. metadata +7 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7217ec585904be468d9fc18d74c84a783803ca3d0bcf5e3e2f6f916012131a4f
4
- data.tar.gz: d28cf68e49a9f7da6bb39cb2d1cb1fa49c93d9337296d87e1f96a9aa1b5daecd
3
+ metadata.gz: 3b73de02f8130e5d5e2c132e89bed5575fed0c501c194586255629b46f7acc0e
4
+ data.tar.gz: efc54b760b1ca2fa40f949ab30fc78f9ca16970a7aaadbfc7963d93ce0e6d503
5
5
  SHA512:
6
- metadata.gz: f0e1a312266b32b8a50309c92999f09047ad64f3de5539f7c468dd1b2d29ca47469322ef38ab1bcd19bd16c8aad175a018f0886129b1b64a2b2275ccfee79ca8
7
- data.tar.gz: 66d4079794ddddba66de3236217fc432ccaeba90f338789e2d158d23c23e687f5cbd05f111498b977becde0497ade73d97a9659244bfc29ded921342fc27065e
6
+ metadata.gz: e7add992a1e3a5f421f27331c837b2d174bc0935ff935a9fd2e018061e1d129ad3d3fe13fa9f8fc10cf84adf245340075ed5db71766f15ede64ce5d8eadf7573
7
+ data.tar.gz: f45d866b83041a3695f8addb971cd083636b39cea420b5080ed1bc3e0cf3a96a8829c835f4ff83c9b0324b163506a2ceec01d3cf37d8f9477f336270cd16c32f
data/README.md CHANGED
@@ -53,13 +53,20 @@ This gem supports Ruby 2.3 and above.
53
53
  ## Configuration
54
54
 
55
55
  Configure `chartmogul-ruby` with your Account Token and Secret Key, available from the administration section of your ChartMogul account.
56
+ You can either do this in the global scope for the whole runtime (eg. in initializer):
56
57
 
58
+ ```ruby
59
+ ChartMogul.global_account_token = '<Account key goes here>'
60
+ ChartMogul.global_secret_key = '<Secret key goes here>'
61
+ ```
62
+
63
+ Or in a thread-safe scope for the current thread only (eg. different accounts in different async jobs):
57
64
  ```ruby
58
65
  ChartMogul.account_token = '<Account key goes here>'
59
66
  ChartMogul.secret_key = '<Secret key goes here>'
60
67
  ```
61
68
 
62
- Configuration is threadsafe and applied only to the current thread.
69
+ Thread-safe configuration is used if available, otherwise global is used.
63
70
 
64
71
  Test your authentication:
65
72
  ```ruby
data/changelog.md CHANGED
@@ -1,5 +1,18 @@
1
1
  # chartmogul-ruby Change Log
2
2
 
3
+ ## Version 1.7.2 - 16 March 2021
4
+ - Fix bug preventing instantiating attributes on ChartMogul::Customers objects
5
+
6
+ ## Version 1.7.1 - 8 March 2021
7
+ - Adds amount_in_cents to payment for partial payments
8
+ - Adds account API endpoint
9
+
10
+ ## Version 1.6.9 - 10 December 2020
11
+ - Fix ChartMogul::Customers class
12
+
13
+ ## Version 1.6.8 - 1 November 2020
14
+ - Add support for subscription_external_id when listing Activities
15
+
3
16
  ## Version 1.6.7 - 8 September 2020
4
17
  - Allow adding Customer custom attributes in camel case
5
18
 
@@ -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