chargebee / chargebee-typescript

Typescript library for the Chargebee API.
https://apidocs.chargebee.com/docs/api?lang=typescript
MIT License
22 stars 16 forks source link

Object returned by chargebee.customer.create has extra result #34

Closed DrChrispoper closed 1 year ago

DrChrispoper commented 1 year ago

When I call

    const response = await chargebee.customer.create({
      first_name : user.firstName,
     ...
    }).request()

We expect it to be response.customer but customer is in an extra result object like response.result.customer.id. I guess that is an API issue itself but not sure where is the best place to log the issue.

I'm just doing this in the meantime ((response as any).result as Result).customer.id