Skip to content

Conversation

@wscourge
Copy link
Contributor

Update the SDK to use the new API endpoints:

  1. Subscriptions / Connect Subscriptions in ChartMogul::Metrics::Customers::Subscription#connect
  2. Subscriptions / Disconnect Subscriptions in ChartMogul::Metrics::Customers::Subscription#disconnect

Mark the following methods as deprecated:

  1. ChartMogul::Subscription#connect
  2. ChartMogul::Subscription#disconnect

@wscourge wscourge requested a review from Copilot December 26, 2025 09:48
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the SDK to use new ChartMogul API endpoints for connecting and disconnecting customer subscriptions. The changes introduce new methods in ChartMogul::Metrics::Customers::Subscription while deprecating the existing methods in ChartMogul::Subscription.

Key changes:

  • Added connect and disconnect methods to ChartMogul::Metrics::Customers::Subscription that use the new API format with data_source_uuid parameter
  • Deprecated the existing connect and disconnect methods in ChartMogul::Subscription with warning messages
  • Added test coverage for the new connect/disconnect functionality

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
spec/fixtures/vcr_cassettes/ChartMogul_Metrics_Customers_Subscription/should_connect_and_disconnect_subscriptions_.yml VCR cassette recording API interactions for testing connect/disconnect functionality
spec/chartmogul/metrics/customers/subscriptions_spec.rb New test case for connect and disconnect operations
lib/chartmogul/subscription.rb Added deprecation warnings to existing connect and disconnect methods
lib/chartmogul/metrics/customers/subscription.rb Implemented new connect and disconnect methods with data_source_uuid parameter

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants