Hierarchy

  • Payments

Properties

impersonating: boolean = false

Methods

  • Description

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

    Example

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

    Returns Payments

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

    • TPayment extends Payment<any, any, TPayment>

    Parameters

    • direction: OrderDirection

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

    • orderID: string

      ID of the order.

    • payment: Payment<any, any>
    • requestOptions: RequestOptions = {}

    Returns Promise<RequiredDeep<TPayment>>

  • Delete a payment. 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.

    • paymentID: string

      ID of the payment.

    • requestOptions: RequestOptions = {}

    Returns Promise<void>

  • Delete a payment transaction. 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.

    • paymentID: string

      ID of the payment.

    • transactionID: string

      ID of the transaction.

    • requestOptions: RequestOptions = {}

    Returns Promise<void>

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

    Type Parameters

    • TPayment extends Payment<any, any, TPayment>

    Parameters

    • direction: OrderDirection

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

    • orderID: string

      ID of the order.

    • paymentID: string

      ID of the payment.

    • requestOptions: RequestOptions = {}

    Returns Promise<RequiredDeep<TPayment>>

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

    Type Parameters

    • TPayment extends Payment<any, any, TPayment>

    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" | "Description")[];
          sortBy?: ("ID" | "DateCreated" | "!ID" | "!DateCreated" | "Type" | "CreditCardID" | "SpendingAccountID" | "!Type" | "!CreditCardID" | "!SpendingAccountID")[];
      } = {}
      • 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" | "Description")[]

        Comma-delimited list of fields to search on.

      • Optional sortBy?: ("ID" | "DateCreated" | "!ID" | "!DateCreated" | "Type" | "CreditCardID" | "SpendingAccountID" | "!Type" | "!CreditCardID" | "!SpendingAccountID")[]

        Comma-delimited list of fields to sort by.

    • requestOptions: RequestOptions = {}

    Returns Promise<RequiredObjectDeep<ListPage<TPayment>>>

  • Partially update a payment. PUT is not a supported method for payments due to the implications associated with modifying certain properties. Patch is only permitted on certain properties that vary depending on order status Check out the docs for more info

    Type Parameters

    • TPayment extends Payment<any, any, TPayment>

    Parameters

    • direction: OrderDirection

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

    • orderID: string

      ID of the order.

    • paymentID: string

      ID of the payment.

    • payment: PartialObjectDeep<Payment<any, any>>
    • requestOptions: RequestOptions = {}

    Returns Promise<RequiredDeep<TPayment>>

Generated using TypeDoc