Skip to content

Include Subscription Data in response from Customer.retrieve #61

@TheBitShepherd

Description

@TheBitShepherd

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions