Hierarchy

  • Buyers

Properties

impersonating: boolean = false

Methods

  • Description

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

    Example

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

    Returns Buyers

  • Create a new buyer. 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

    • TBuyer extends Buyer<any, TBuyer>

    Parameters

    Returns Promise<RequiredDeep<TBuyer>>

  • Delete a buyer. Check out the docs for more info

    Parameters

    Returns Promise<void>

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

    Type Parameters

    • TBuyer extends Buyer<any, TBuyer>

    Parameters

    • listOptions: {
          filters?: Filters;
          page?: number;
          pageSize?: number;
          search?: string;
          searchOn?: ("ID" | "Name")[];
          sortBy?: ("ID" | "Name" | "DateCreated" | "!ID" | "!DateCreated" | "!Name")[];
      } = {}
      • 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" | "Name")[]

        Comma-delimited list of fields to search on.

      • Optional sortBy?: ("ID" | "Name" | "DateCreated" | "!ID" | "!DateCreated" | "!Name")[]

        Comma-delimited list of fields to sort by.

    • requestOptions: RequestOptions = {}

    Returns Promise<RequiredObjectDeep<ListPage<TBuyer>>>

  • Get a list of buyer buyer sellers. Check out the docs for more info

    Type Parameters

    Parameters

    • buyerID: string

      ID of the buyer.

    • listOptions: {
          filters?: Filters;
          page?: number;
          pageSize?: number;
          search?: string;
          searchOn?: ("ID" | "Name")[];
          sortBy?: ("ID" | "Name" | "!ID" | "!Name")[];
      } = {}
      • 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" | "Name")[]

        Comma-delimited list of fields to search on.

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

        Comma-delimited list of fields to sort by.

    • requestOptions: RequestOptions = {}

    Returns Promise<RequiredObjectDeep<ListPage<TBuyerSupplier>>>

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

    Type Parameters

    • TBuyer extends Buyer<any, TBuyer>

    Parameters

    • buyerID: string

      ID of the buyer.

    • buyer: Buyer<any>

      Required fields: Name

    • requestOptions: RequestOptions = {}

    Returns Promise<RequiredDeep<TBuyer>>

Generated using TypeDoc