/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import { digitalWalletsSessionsApplePay } from "../funcs/digitalWalletsSessionsApplePay.js"; import { digitalWalletsSessionsClickToPay } from "../funcs/digitalWalletsSessionsClickToPay.js"; import { digitalWalletsSessionsGooglePay } from "../funcs/digitalWalletsSessionsGooglePay.js"; import { digitalWalletsSessionsPaze } from "../funcs/digitalWalletsSessionsPaze.js"; import { digitalWalletsSessionsPazeMobileSessionComplete } from "../funcs/digitalWalletsSessionsPazeMobileSessionComplete.js"; import { digitalWalletsSessionsPazeMobileSessionCreate } from "../funcs/digitalWalletsSessionsPazeMobileSessionCreate.js"; import { digitalWalletsSessionsPazeMobileSessionReview } from "../funcs/digitalWalletsSessionsPazeMobileSessionReview.js"; import { ClientSDK, RequestOptions } from "../lib/sdks.js"; import * as components from "../models/components/index.js"; import * as operations from "../models/operations/index.js"; import { unwrapAsync } from "../types/fp.js"; export class Sessions extends ClientSDK { /** * Create a Google Pay session * * @remarks * Create a session for use with Google Pay. */ async googlePay( googlePaySessionRequest: components.GooglePaySessionRequest, merchantAccountId?: string | null | undefined, options?: RequestOptions, ): Promise { return unwrapAsync(digitalWalletsSessionsGooglePay( this, googlePaySessionRequest, merchantAccountId, options, )); } /** * Create a Apple Pay session * * @remarks * Create a session for use with Apple Pay. */ async applePay( applePaySessionRequest: components.ApplePaySessionRequest, merchantAccountId?: string | null | undefined, options?: RequestOptions, ): Promise<{ [k: string]: any }> { return unwrapAsync(digitalWalletsSessionsApplePay( this, applePaySessionRequest, merchantAccountId, options, )); } /** * Create a Paze mobile session * * @remarks * Create a mobile session for use with Paze. */ async pazeMobileSessionCreate( pazeMobileSessionCreateRequest: components.PazeMobileSessionCreateRequest, merchantAccountId?: string | null | undefined, options?: RequestOptions, ): Promise { return unwrapAsync(digitalWalletsSessionsPazeMobileSessionCreate( this, pazeMobileSessionCreateRequest, merchantAccountId, options, )); } /** * Create a Paze session * * @remarks * Create a session for use with Paze. */ async paze( pazeSessionRequest: components.PazeSessionRequest, merchantAccountId?: string | null | undefined, options?: RequestOptions, ): Promise< operations.CreatePazeDigitalWalletSessionResponseCreatePazeDigitalWalletSession > { return unwrapAsync(digitalWalletsSessionsPaze( this, pazeSessionRequest, merchantAccountId, options, )); } /** * Review a Paze session * * @remarks * Review a Paze checkout session and retrieve the selected card, consumer, and shipping address details. */ async pazeMobileSessionReview( pazeSessionReviewRequest: components.PazeSessionReviewRequest, merchantAccountId?: string | null | undefined, options?: RequestOptions, ): Promise { return unwrapAsync(digitalWalletsSessionsPazeMobileSessionReview( this, pazeSessionReviewRequest, merchantAccountId, options, )); } /** * Complete a Paze session * * @remarks * Complete a Paze checkout session and retrieve the secure payload required to settle the payment. */ async pazeMobileSessionComplete( pazeSessionCompleteRequest: components.PazeSessionCompleteRequest, merchantAccountId?: string | null | undefined, options?: RequestOptions, ): Promise { return unwrapAsync(digitalWalletsSessionsPazeMobileSessionComplete( this, pazeSessionCompleteRequest, merchantAccountId, options, )); } /** * Create a Click to Pay session * * @remarks * Create a session for use with Click to Pay. */ async clickToPay( request: components.ClickToPaySessionRequest, options?: RequestOptions, ): Promise { return unwrapAsync(digitalWalletsSessionsClickToPay( this, request, options, )); } }