Hierarchy

  • Subscriptions

Properties

impersonating: boolean = false

Methods

  • Description

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

    Example

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

    Returns Subscriptions

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

    Parameters

    • subscriptionID: string

      ID of the subscription.

    • requestOptions: RequestOptions = {}

    Returns Promise<void>

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

    Type Parameters

    Parameters

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

        Comma-delimited list of fields to search on.

      • Optional sortBy?: ("ID" | "FromCompanyID" | "ToCompanyID" | "Interval" | "DateCreated" | "!ID" | "!DateCreated" | "FromUserID" | "!FromCompanyID" | "!ToCompanyID" | "!FromUserID" | "NextOrderDate" | "LastOrderDate" | "EndDate" | "!NextOrderDate" | "!LastOrderDate" | "!Interval" | "!EndDate")[]

        Comma-delimited list of fields to sort by.

    • requestOptions: RequestOptions = {}

    Returns Promise<RequiredObjectDeep<ListPage<TSubscription>>>

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

    Type Parameters

    Parameters

    • subscriptionID: string

      ID of the subscription.

    • subscription: Subscription<any>

      Required fields: Frequency, Interval, NextOrderDate

    • requestOptions: RequestOptions = {}

    Returns Promise<RequiredDeep<TSubscription>>

Generated using TypeDoc