-
Notifications
You must be signed in to change notification settings - Fork 14
Add fetching additional DataSource fields #179
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
e35614e to
22516d0
Compare
There was a problem hiding this 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 adds support for fetching additional DataSource fields through query parameters when listing or retrieving data sources. The implementation allows users to request processing_status, auto_churn_subscription_setting, and invoice_handling_setting by passing boolean flags to the API methods.
Key changes:
- Added three new query parameters to support requesting additional fields
- Introduced new model classes to represent the additional field structures
- Updated the test suite to verify the new functionality
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| spec/spec_helper.rb | Added pry debugging tool to test dependencies |
| spec/fixtures/vcr_cassettes/ChartMogul_DataSource/API_Interactions/correctly_interracts_with_the_API.yml | Updated VCR cassette with new API responses containing additional fields |
| spec/chartmogul/data_source_spec.rb | Added comprehensive test coverage for the new query parameters and response fields |
| lib/chartmogul/data_source_settings/processing_status.rb | Created model for processing status with processed, pending, and failed counts |
| lib/chartmogul/data_source_settings/invoice_handling_settings.rb | Created model for invoice handling configuration options |
| lib/chartmogul/data_source_settings/invoice_handling_setting.rb | Created model wrapping manual and automatic invoice handling settings |
| lib/chartmogul/data_source.rb | Added support for new fields and overrode retrieve method to pass query parameters |
| lib/chartmogul/concerns/processing_status.rb | Created concern for including processing_status attribute in models |
| lib/chartmogul/concerns/invoice_handling_setting.rb | Created concern for including invoice_handling_setting attribute in models |
| lib/chartmogul.rb | Added requires for new model and concern files |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
22516d0 to
c1db724
Compare
|
During the tests it turned out that response format for Example: I spoke with Dijana and we agreed that the invoice_handling_setting must instead be as forgiving as possible so it is fully backwards-compatible. |
Updates the List Sources and Retrieve a Source to support requesting additional fields with the following query params:
with_processing_status=truewith_auto_churn_subscription_setting=truewith_invoice_handling_setting=trueUsing SDK code:
1) List Sources
2) Retrieve a Source