Hierarchy

  • LineItems

Properties

impersonating: boolean = false

Methods

  • Description

    enables impersonation by calling the subsequent method with the stored impersonation token

    Example

    LineItems.As().List() // lists LineItems using the impersonated users' token
    

    Returns LineItems

  • Create a new line item. If ID is provided and an object with that ID already exists, a 409 (conflict) error is returned. Check out the docs for more info

    Type Parameters

    • TLineItem extends LineItem<any, any, any, any, any, TLineItem>

    Parameters

    • direction: OrderDirection

      Direction of the order, from the current user's perspective. Possible values: incoming, outgoing, all.

    • orderID: string

      ID of the order.

    • lineItem: LineItem<any, any, any, any, any>

      Required fields: ProductID

    • requestOptions: RequestOptions = {}

    Returns Promise<RequiredDeep<TLineItem>>

  • Delete a line item. Check out the docs for more info

    Parameters

    • direction: OrderDirection

      Direction of the order, from the current user's perspective. Possible values: incoming, outgoing, all.

    • orderID: string

      ID of the order.

    • lineItemID: string

      ID of the line item.

    • requestOptions: RequestOptions = {}

    Returns Promise<void>

  • Get a single line item. Check out the docs for more info

    Type Parameters

    • TLineItem extends LineItem<any, any, any, any, any, TLineItem>

    Parameters

    • direction: OrderDirection

      Direction of the order, from the current user's perspective. Possible values: incoming, outgoing, all.

    • orderID: string

      ID of the order.

    • lineItemID: string

      ID of the line item.

    • requestOptions: RequestOptions = {}

    Returns Promise<RequiredDeep<TLineItem>>

  • Get a list of line items. Check out the docs for more info

    Type Parameters

    • TLineItem extends LineItem<any, any, any, any, any, TLineItem>

    Parameters

    • direction: OrderDirection

      Direction of the order, from the current user's perspective. Possible values: incoming, outgoing, all.

    • orderID: string

      ID of the order.

    • listOptions: {
          filters?: Filters;
          page?: number;
          pageSize?: number;
          search?: string;
          searchOn?: ("ID" | "ProductID")[];
          sortBy?: ("ID" | "ProductID" | "!ID" | "DateAdded" | "!DateAdded" | "!ProductID")[];
      } = {}
      • Optional filters?: Filters

        An object or dictionary representing key/value pairs to apply as filters. Valid keys are top-level properties of the returned model or 'xp.???'

      • Optional page?: number

        Page of results to return. Default: 1. When paginating through many items (> page 30), we recommend the "Last ID" method, as outlined in the Advanced Querying documentation.

      • Optional pageSize?: number

        Number of results to return per page. Default: 20, max: 100.

      • Optional search?: string

        Word or phrase to search for.

      • Optional searchOn?: ("ID" | "ProductID")[]

        Comma-delimited list of fields to search on.

      • Optional sortBy?: ("ID" | "ProductID" | "!ID" | "DateAdded" | "!DateAdded" | "!ProductID")[]

        Comma-delimited list of fields to sort by.

    • requestOptions: RequestOptions = {}

    Returns Promise<RequiredObjectDeep<ListPage<TLineItem>>>

  • Get a list of line item across orders. Check out the docs for more info

    Type Parameters

    • TExtendedLineItem extends ExtendedLineItem<any, any, any, any, any, any, any, any, TExtendedLineItem>

    Parameters

    • direction: OrderDirection

      Direction of the order, from the current user's perspective. Possible values: incoming, outgoing, all.

    • listOptions: {
          buyerID?: string;
          filters?: Filters;
          from?: string;
          page?: number;
          pageSize?: number;
          search?: string;
          searchOn?: ("ID" | "ProductID")[];
          searchType?: SearchType;
          sortBy?: ("ID" | "ProductID" | "!ID" | "DateAdded" | "!DateAdded" | "!ProductID")[];
          supplierID?: string;
          to?: string;
      } = {}
      • Optional buyerID?: string

        ID of the buyer.

      • Optional filters?: Filters

        An object or dictionary representing key/value pairs to apply as filters. Valid keys are top-level properties of the returned model or 'xp.???'

      • Optional from?: string

        Lower bound of date range that the order was created.

      • Optional page?: number

        Page of results to return. Default: 1. When paginating through many items (> page 30), we recommend the "Last ID" method, as outlined in the Advanced Querying documentation.

      • Optional pageSize?: number

        Number of results to return per page. Default: 20, max: 100.

      • Optional search?: string

        Word or phrase to search for.

      • Optional searchOn?: ("ID" | "ProductID")[]

        Comma-delimited list of fields to search on.

      • Optional searchType?: SearchType

        Type of search to perform. Possible values: AnyTerm (default), AllTermsAnyField, AllTermsSameField, ExactPhrase, ExactPhrasePrefix.

      • Optional sortBy?: ("ID" | "ProductID" | "!ID" | "DateAdded" | "!DateAdded" | "!ProductID")[]

        Comma-delimited list of fields to sort by.

      • Optional supplierID?: string

        ID of the supplier.

      • Optional to?: string

        Upper bound of date range that the order was created.

    • requestOptions: RequestOptions = {}

    Returns Promise<RequiredObjectDeep<ListPage<TExtendedLineItem>>>

  • Partially update a line item shipping address. Partially update the Shipping Address of the Line Item. Not allowed on unsubmitted Line Items where ShippingAddressID has been set. In that case, use the Addresses resource to update the Saved Address. Check out the docs for more info

    Type Parameters

    • TLineItem extends LineItem<any, any, any, any, any, TLineItem>

    Parameters

    • direction: OrderDirection

      Direction of the order, from the current user's perspective. Possible values: incoming, outgoing, all.

    • orderID: string

      ID of the order.

    • lineItemID: string

      ID of the line item.

    • address: PartialObjectDeep<Address<any>>
    • requestOptions: RequestOptions = {}

    Returns Promise<RequiredDeep<TLineItem>>

  • Create or update a line item. If an object with the same ID already exists, it will be overwritten. Check out the docs for more info

    Type Parameters

    • TLineItem extends LineItem<any, any, any, any, any, TLineItem>

    Parameters

    • direction: OrderDirection

      Direction of the order, from the current user's perspective. Possible values: incoming, outgoing, all.

    • orderID: string

      ID of the order.

    • lineItemID: string

      ID of the line item.

    • lineItem: LineItem<any, any, any, any, any>

      Required fields: ProductID

    • requestOptions: RequestOptions = {}

    Returns Promise<RequiredDeep<TLineItem>>

  • Set a shipping address. Set the Shipping Address of the Line Item. Appropriate only when the Address is not to be saved/reused. To use a Saved Address (i.e. from the Addresses resource), PATCH the Line Item's ShippingAddressID property instead. Check out the docs for more info

    Type Parameters

    • TLineItem extends LineItem<any, any, any, any, any, TLineItem>

    Parameters

    • direction: OrderDirection

      Direction of the order, from the current user's perspective. Possible values: incoming, outgoing, all.

    • orderID: string

      ID of the order.

    • lineItemID: string

      ID of the line item.

    • address: Address<any>

      Required fields: Street1, City, State, Zip, Country

    • requestOptions: RequestOptions = {}

    Returns Promise<RequiredDeep<TLineItem>>

Generated using TypeDoc