UNPKG

inventora-shopify-admin-api

Version:

Shopify Admin API is a NodeJS library built to help developers easily authenticate and make calls against the Shopify API. It was inspired by and borrows heavily from ShopifySharp.

40 lines (39 loc) 1.29 kB
import * as Options from "../options"; import { BaseService } from "../infrastructure"; import { DraftOrder } from "../interfaces"; /** * A service for manipulating Shopify draft orders. */ export declare class DraftOrders extends BaseService { constructor(shopDomain: string, accessToken: string); /** * Creates a new draft order. */ create(order: Partial<DraftOrder>, useCustomerDefaultAddress?: boolean): Promise<DraftOrder>; /** * Updates the draft order with the given id. */ update(id: number, order: Partial<DraftOrder>): Promise<DraftOrder>; /** * Gets a list of up to 250 of the shop's draft orders. * @param options Options for filtering the results. */ list(options?: Options.ListOptions): Promise<DraftOrder[]>; /** * Counts the draft orders on the shop. */ count(options?: any): Promise<number>; /** * Retrieves the draft order with the given id. */ get(id: number): Promise<DraftOrder>; /** * Deletes the draft order with the given id. */ delete(id: number): Promise<void>; /** * Completes the draft order, transitioning it to a full order. */ complete(id: number, paymentPending?: boolean): Promise<DraftOrder>; } export default DraftOrders;