/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import { digitalWalletsCreate } from "../funcs/digitalWalletsCreate.js"; import { digitalWalletsDelete } from "../funcs/digitalWalletsDelete.js"; import { digitalWalletsGet } from "../funcs/digitalWalletsGet.js"; import { digitalWalletsList } from "../funcs/digitalWalletsList.js"; import { digitalWalletsUpdate } from "../funcs/digitalWalletsUpdate.js"; import { ClientSDK, RequestOptions } from "../lib/sdks.js"; import * as components from "../models/components/index.js"; import { unwrapAsync } from "../types/fp.js"; import { Domains } from "./domains.js"; import { Sessions } from "./sessions.js"; export class DigitalWallets extends ClientSDK { private _sessions?: Sessions; get sessions(): Sessions { return (this._sessions ??= new Sessions(this._options)); } private _domains?: Domains; get domains(): Domains { return (this._domains ??= new Domains(this._options)); } /** * Register digital wallet * * @remarks * Register a digital wallet like Apple Pay, Google Pay, or Click to Pay. */ async create( digitalWalletCreate: components.DigitalWalletCreate, merchantAccountId?: string | null | undefined, options?: RequestOptions, ): Promise { return unwrapAsync(digitalWalletsCreate( this, digitalWalletCreate, merchantAccountId, options, )); } /** * List digital wallets * * @remarks * List configured digital wallets. */ async list( merchantAccountId?: string | null | undefined, options?: RequestOptions, ): Promise { return unwrapAsync(digitalWalletsList( this, merchantAccountId, options, )); } /** * Get digital wallet * * @remarks * Fetch the details a digital wallet. */ async get( digitalWalletId: string, merchantAccountId?: string | null | undefined, options?: RequestOptions, ): Promise { return unwrapAsync(digitalWalletsGet( this, digitalWalletId, merchantAccountId, options, )); } /** * Delete digital wallet * * @remarks * Delete a configured digital wallet. */ async delete( digitalWalletId: string, merchantAccountId?: string | null | undefined, options?: RequestOptions, ): Promise { return unwrapAsync(digitalWalletsDelete( this, digitalWalletId, merchantAccountId, options, )); } /** * Update digital wallet * * @remarks * Update a digital wallet. */ async update( digitalWalletUpdate: components.DigitalWalletUpdate, digitalWalletId: string, merchantAccountId?: string | null | undefined, options?: RequestOptions, ): Promise { return unwrapAsync(digitalWalletsUpdate( this, digitalWalletUpdate, digitalWalletId, merchantAccountId, options, )); } }