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

Incorrect types on order change requests #982

Open
ryanmogk opened this issue Nov 12, 2024 · 1 comment
Open

Incorrect types on order change requests #982

ryanmogk opened this issue Nov 12, 2024 · 1 comment

Comments

@ryanmogk
Copy link

The return type of a get on duffel.orderChanges.get(...) is incorrect at src/booking/OrderChanges/OrderChanges.ts.

It's set to OrderChangeOfferSlice when the response should be OrderChangeOffer

Current code:

/**
    * Retrieves an order change by its ID
    * @param {string} id - Duffel's unique identifier for the order change
    * @link https://duffel.com/docs/api/order-changes/get-order-change-by-id
    */
get: (id: string) => Promise<DuffelResponse<OrderChangeOfferSlice>>;

Corrected:

/**
    * Retrieves an order change by its ID
    * @param {string} id - Duffel's unique identifier for the order change
    * @link https://duffel.com/docs/api/order-changes/get-order-change-by-id
    */
get: (id: string) => Promise<DuffelResponse<OrderChangeOffer>>;
@andrejak
Copy link
Contributor

Thank you for reporting! We welcome contributions - would you be able to submit a pull request?

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

2 participants