Skip to content

Add fetching additional DataSource fields#147

Merged
wscourge merged 2 commits intomainfrom
wiktor/ome-356-expose-source-settings-via-api
Dec 17, 2025
Merged

Add fetching additional DataSource fields#147
wscourge merged 2 commits intomainfrom
wiktor/ome-356-expose-source-settings-via-api

Conversation

@wscourge
Copy link
Contributor

@wscourge wscourge commented Dec 1, 2025

Updates the List Sources and Retrieve a Source to support requesting additional fields with the following query params:

  • with_processing_status=true
  • with_auto_churn_subscription_setting=true
  • with_invoice_handling_setting=true

Using SDK code:

1) List Sources

ChartMogul\DataSource::all([
    'with_processing_status' => true,
    'with_auto_churn_subscription_setting_setting' => true,
    'with_invoice_handling_setting_setting' => true
]);

2) Retrieve a Source

ChartMogul\DataSource::retrieve($uuid, [
    'with_processing_status' => true,
    'with_auto_churn_subscription_setting_setting' => true,
    'with_invoice_handling_setting_setting' => true
]);

@wscourge wscourge requested a review from Copilot December 1, 2025 12:59
Copy link

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 adds support for fetching additional DataSource fields (processing_status, auto_churn_subscription_setting, and invoice_handling_setting) when listing or retrieving data sources via query parameters.

Key changes:

  • Added a new getWithQuery() method to RequestService to support passing query parameters to GET requests
  • Modified DataSource class to include new read-only properties and custom retrieve()/get() methods that accept query parameters
  • Added comprehensive test coverage for the new functionality

Reviewed changes

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

File Description
src/Service/RequestService.php Added getWithQuery() method to support GET requests with query parameters
src/DataSource.php Added new read-only properties and overridden retrieve()/get() methods to accept query parameters instead of using GetTrait
tests/Unit/DataSourceTest.php Added comprehensive test suite covering all DataSource operations including the new query parameter functionality
README.md Updated documentation with examples showing how to use the new query parameters

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

@wscourge wscourge force-pushed the wiktor/ome-356-expose-source-settings-via-api branch from 843343a to 337b3ba Compare December 2, 2025 08:55
@wscourge wscourge marked this pull request as ready for review December 3, 2025 09:23
@wscourge wscourge merged commit c4b8f27 into main Dec 17, 2025
6 checks passed
@wscourge wscourge deleted the wiktor/ome-356-expose-source-settings-via-api branch December 17, 2025 14:31
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.

3 participants