Skip to content

Subscription returned as empty object #43

Description

Version: chargebee-typescript@2.25.0

Using this

const response = await this.chargebee.subscription
  .list({
    'sort_by[desc]': 'created_at',
    customer_id: {
      is: customerId,
    },
  })
  .request();
return response.list;

it returns an array of empty objects of type Result

Example of console.info(response) from the request above:

ListResult {
  list: [ Result {}, Result {}, Result {}, Result {} ],
  next_offset: undefined,
  responseHeaders: {
    date: 'Thu, 26 Oct 2023 10:59:56 GMT',
    'content-type': 'application/json;charset=utf-8',
    'transfer-encoding': 'chunked',
    connection: 'keep-alive',
    'cache-control': 'no-store, no-cache, must-revalidate',
    expires: 'Thu, 01 Jan 1970 00:00:00 UTC',
    'strict-transport-security': 'max-age=31536000; includeSubDomains; preload',
    pragma: 'no-cache',
    vary: 'Accept-Encoding',
    server: 'ChargeBee'
  }
}

So it seems that subscriptions are getting read, but actual data is not projected.

Chargebee is being instantiated the way it is displayed in docs:

this.chargebee = new ChargeBee();
this.chargebee.configure({
  site: this.resolveName(),
  api_key: this.resolveApiKey(),
});

Am I doing something wrong? is it a bug?

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