Hierarchy

  • OrderReturns

Properties

impersonating: boolean = false

Methods

  • Description

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

    Example

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

    Returns OrderReturns

  • Complete an OrderReturn. Use only when an order return won't have an associated payment. You will not to reopen an order return after completing it. Check out the docs for more info

    Type Parameters

    Parameters

    • returnID: string

      ID of the return.

    • requestOptions: RequestOptions = {}

    Returns Promise<RequiredDeep<TOrderReturn>>

  • Delete an order return item. Check out the docs for more info

    Type Parameters

    Parameters

    • returnID: string

      ID of the return.

    • lineItemID: string

      ID of the line item.

    • requestOptions: RequestOptions = {}

    Returns Promise<RequiredDeep<TOrderReturn>>

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

    Type Parameters

    Parameters

    • listOptions: {
          approvable?: boolean;
          filters?: Filters;
          page?: number;
          pageSize?: number;
          search?: string;
          searchOn?: ("ID" | "OrderID")[];
          sortBy?: ("ID" | "OrderID" | "DateCreated" | "!ID" | "!DateCreated" | "DateSubmitted" | "DateApproved" | "DateDeclined" | "DateCanceled" | "DateCompleted" | "LastUpdated" | "!DateSubmitted" | "!DateApproved" | "!DateDeclined" | "!DateCanceled" | "!DateCompleted" | "!LastUpdated" | "!OrderID")[];
      } = {}
      • Optional approvable?: boolean

        Only returns orders awaiting the user's approval if true.

      • 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" | "OrderID")[]

        Comma-delimited list of fields to search on.

      • Optional sortBy?: ("ID" | "OrderID" | "DateCreated" | "!ID" | "!DateCreated" | "DateSubmitted" | "DateApproved" | "DateDeclined" | "DateCanceled" | "DateCompleted" | "LastUpdated" | "!DateSubmitted" | "!DateApproved" | "!DateDeclined" | "!DateCanceled" | "!DateCompleted" | "!LastUpdated" | "!OrderID")[]

        Comma-delimited list of fields to sort by.

    • requestOptions: RequestOptions = {}

    Returns Promise<RequiredObjectDeep<ListPage<TOrderReturn>>>

  • Get a list of order return approvals. Returns all Approvals associated with the Order Return. Check out the docs for more info

    Type Parameters

    Parameters

    • returnID: string

      ID of the return.

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

        Comma-delimited list of fields to search on.

      • Optional sortBy?: ("ApprovalRuleID" | "ApprovingGroupID" | "Approver" | "DateCreated" | "!DateCreated" | "!ApprovingGroupID" | "Status" | "DateCompleted" | "!Status" | "!DateCompleted" | "!ApprovalRuleID" | "!Approver")[]

        Comma-delimited list of fields to sort by.

    • requestOptions: RequestOptions = {}

    Returns Promise<RequiredObjectDeep<ListPage<TOrderReturnApproval>>>

  • Get a list of order return eligible approvers. Returns all Users who can approve or decline this order return (but have not done so). Check out the docs for more info

    Type Parameters

    • TUser extends User<any, TUser>

    Parameters

    • returnID: string

      ID of the return.

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

        Comma-delimited list of fields to search on.

      • Optional sortBy?: ("ID" | "LastName" | "FirstName" | "Username" | "Email" | "DateCreated" | "!ID" | "!DateCreated" | "!FirstName" | "!LastName" | "PasswordLastSetDate" | "!Username" | "!Email" | "!PasswordLastSetDate")[]

        Comma-delimited list of fields to sort by.

    • requestOptions: RequestOptions = {}

    Returns Promise<RequiredObjectDeep<ListPage<TUser>>>

Generated using TypeDoc