Skip to content
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

Include Subscription Data in response from Customer.retrieve #61

Open
TheBitShepherd opened this issue Feb 16, 2024 · 1 comment
Open

Comments

@TheBitShepherd
Copy link

TheBitShepherd commented Feb 16, 2024

What problem does your feature request address?

Currently the only way to retrieve a list of subscriptions related to a single customer is through chargebee.Subscription.list({"customer_id[is]": "<customer-id>"}). This returns a ListResult response which includes duplicative customer information for each item in the list result. This ultimately makes parsing the response into something like a dataclass more difficult than it should be.

Describe the desired solution

It would be more convenient to have Customer.retrieve({"id[is]": "<customer_id>"}) return subscriptions along with the customer information in the following format:

{
    "customer": {
        "id": "<id>",
        ...
        "subscriptions": [
              { <subscription-one> },
              { <subscription-two> },
              ...
         ]
{

Alternatives Considered

I'd love to know if there is a way to include additional info from the Customer.retrieve method; however, documentation states that this call only returns the Customer and (an optional) Card objects.

Copy link

Hello @TheBitShepherd, thank you for raising the issue. Your contribution is greatly appreciated and we look forward to addressing it.

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

No branches or pull requests

1 participant