Hierarchy

  • CreditCards

Properties

impersonating: boolean = false

Methods

  • Description

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

    Example

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

    Returns CreditCards

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

    Parameters

    Returns Promise<RequiredDeep<TCreditCard>>

  • Delete a credit card. Check out the docs for more info

    Parameters

    • buyerID: string

      ID of the buyer.

    • creditCardID: string

      ID of the credit card.

    • requestOptions: RequestOptions = {}

    Returns Promise<void>

  • Delete a credit card assignment. Check out the docs for more info

    Parameters

    • buyerID: string

      ID of the buyer.

    • creditCardID: string

      ID of the credit card.

    • listOptions: {
          userGroupID?: string;
          userID?: string;
      } = {}
      • Optional userGroupID?: string

        ID of the user group.

      • Optional userID?: string

        ID of the user.

    • requestOptions: RequestOptions = {}

    Returns Promise<void>

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

    Type Parameters

    Parameters

    • buyerID: string

      ID of the buyer.

    • creditCardID: string

      ID of the credit card.

    • requestOptions: RequestOptions = {}

    Returns Promise<RequiredDeep<TCreditCard>>

  • Get a list of credit cards. 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" | "CardholderName" | "CardType" | "ExpirationDate")[];
          sortBy?: ("ID" | "CardholderName" | "CardType" | "ExpirationDate" | "DateCreated" | "!ID" | "!DateCreated" | "!CardholderName" | "!CardType" | "!ExpirationDate")[];
      } = {}
      • 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" | "CardholderName" | "CardType" | "ExpirationDate")[]

        Comma-delimited list of fields to search on.

      • Optional sortBy?: ("ID" | "CardholderName" | "CardType" | "ExpirationDate" | "DateCreated" | "!ID" | "!DateCreated" | "!CardholderName" | "!CardType" | "!ExpirationDate")[]

        Comma-delimited list of fields to sort by.

    • requestOptions: RequestOptions = {}

    Returns Promise<RequiredObjectDeep<ListPage<TCreditCard>>>

  • Get a list of credit card assignments. Check out the docs for more info

    Type Parameters

    Parameters

    • buyerID: string

      ID of the buyer.

    • listOptions: {
          creditCardID?: string;
          level?: PartyType;
          page?: number;
          pageSize?: number;
          userGroupID?: string;
          userID?: string;
      } = {}
      • Optional creditCardID?: string

        ID of the credit card.

      • Optional level?: PartyType

        Level of the credit card assignment. Possible values: User, Group, Company.

      • 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 userGroupID?: string

        ID of the user group.

      • Optional userID?: string

        ID of the user.

    • requestOptions: RequestOptions = {}

    Returns Promise<RequiredObjectDeep<ListPage<TCreditCardAssignment>>>

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

    Type Parameters

    Parameters

    • buyerID: string

      ID of the buyer.

    • creditCardID: string

      ID of the credit card.

    • creditCard: CreditCard<any>
    • requestOptions: RequestOptions = {}

    Returns Promise<RequiredDeep<TCreditCard>>

Generated using TypeDoc