woocommerce-rest-api-ts-lib icon indicating copy to clipboard operation
woocommerce-rest-api-ts-lib copied to clipboard

get('orders') accepts parameter "customer" instead of "customer_id"

Open dmoebius opened this issue 2 years ago • 1 comments

The GET orders endpoint accepts a "customer" parameter instead of "customer_id". The typescript definitions need to reflect this.

I think this can most easily achieved by changing:

export type OrdersParams = Partial<Orders>;

to

export type OrdersParams = Partial<Omit<Orders, 'customer_id'> & {'customer': number}>;

dmoebius avatar Sep 07 '23 16:09 dmoebius

Hi, @dmoebius, i have assigned you to this issue, if you have a chance to create a PR, would be very helpfull. Thank in advance.

Yuri-Lima avatar Oct 22 '23 21:10 Yuri-Lima