Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Payments

Hierarchy

Index

Constructors

  • new Payments(gp: GamePush, syncManager: SyncManager, adapter: default, config: PlayerProjectConfig): Payments

Properties

#consumeTransactions: Record<string, Transaction<ConsumePlayerPurchaseOutput>> = {}
#productsList: Product[] = []
#productsMapID: Record<number, Product> = {}
#productsMapTag: Record<string, Product> = {}
#purchaseTransactions: Record<string, Transaction<PurchasePlayerPurchaseOutput>> = {}
#purchasedList: PlayerPurchase[] = []
#purchasedMap: Record<number, PlayerPurchase> = {}
#syncManager: SyncManager
_events: EventLite = ...

Accessors

  • get isAvailable(): boolean
  • get isSubscriptionsAvailable(): boolean
  • get products(): Product[]
  • get purchases(): PlayerPurchase[]

Methods

  • #getPlayerPurchase(id: number): PlayerPurchase
  • #getProduct(idOrTag: string | number): Product
  • #getPurchaseInfo(idOrTag: string | number): PlayerPurchaseInfo
  • #refreshProductsMap(): void
  • #refreshPurchasedMap(): void
  • #setPurchasedList(purchases: PlayerPurchase[]): void
  • #sync(): Promise<void>
  • consume(input: Omit<ConsumePlayerPurchaseInput, "platformData" | "payload">): Promise<PurchasePlayerPurchaseResult>
  • Parameters

    • input: Omit<ConsumePlayerPurchaseInput, "platformData" | "payload">

    Returns Promise<PurchasePlayerPurchaseResult>

  • fetchProducts(): Promise<PlayerPurchasesOutput>
  • getProduct(idOrTag: string | number): Product
  • getPurchase(idOrTag: string | number): PlayerPurchase
  • has(idOrTag: string | number): boolean
  • off<ET>(type: ET, handler: ((event: PaymentsEvents[ET]) => void)): void
  • on<ET>(type: ET, handler: ((event: PaymentsEvents[ET]) => void)): void
  • once<ET>(type: ET, handler: ((event: PaymentsEvents[ET]) => void)): void
  • purchase(input: Omit<PurchasePlayerPurchaseInput, "platformData" | "payload">): Promise<PurchasePlayerPurchaseResult>
  • Parameters

    • input: Omit<PurchasePlayerPurchaseInput, "platformData" | "payload">

    Returns Promise<PurchasePlayerPurchaseResult>

  • subscribe(input: Omit<PurchasePlayerPurchaseInput, "platformData" | "payload">): Promise<Transaction<PurchasePlayerPurchaseOutput> | PurchasePlayerPurchaseResult>
  • Parameters

    • input: Omit<PurchasePlayerPurchaseInput, "platformData" | "payload">

    Returns Promise<Transaction<PurchasePlayerPurchaseOutput> | PurchasePlayerPurchaseResult>

  • unsubscribe(input: Omit<PurchasePlayerPurchaseInput, "platformData" | "payload">): Promise<Transaction<PurchasePlayerPurchaseOutput> | PurchasePlayerPurchaseResult>
  • Parameters

    • input: Omit<PurchasePlayerPurchaseInput, "platformData" | "payload">

    Returns Promise<Transaction<PurchasePlayerPurchaseOutput> | PurchasePlayerPurchaseResult>

Generated using TypeDoc