Options
All
  • Public
  • Public/Protected
  • All
Menu

Class PaymentManager

Hierarchy

Index

Constructors

Properties

Methods

Constructors

constructor

Properties

Readonly cache

cache: Map<string, Payment> = ...

The cache of the manager.

Readonly client

client: Client

Protected Optional Readonly extras

extras: []

Protected Readonly hold

hold: typeof Payment

Methods

add

  • add(data: APIPayment, cache?: boolean): Payment

fetch

  • fetch(id: string, cache?: boolean, checkCache?: boolean): Promise<Payment>
  • Fetch the payment by its id in the cache or from the Pi Network Platform API.

    Parameters

    • id: string

      The payment id to fetch.

    • Optional cache: boolean

      If the payment should be cached (or cached payment patched), true by default.

    • checkCache: boolean = true

      If the payment should be fetched in the cache, true by default.

    Returns Promise<Payment>

    • The fetched payment.

resolve

  • resolve(key: string): undefined | Payment

Generated using TypeDoc