UNPKG

@square/web-payments-sdk-types

Version:

Types for Square's Web Payments SDK

50 lines (49 loc) 1.67 kB
import { SqError } from './types'; /** * Occurs when the developer passes an invalid type in the Cash App Pay button options */ export declare class InvalidCashAppPayOptionsFieldTypes extends SqError { /** * @param {string[][]} invalidFields - an array of string tuples describing the missing property and its type */ constructor(invalidFields: [string, string][]); } /** * Occurs when the developer passes an invalid value in the Cash App Pay button options */ export declare class InvalidCashAppPayOptionsFieldValues extends SqError { /** * @param {string[][]} invalidFields - an array of string tuples describing the missing property and its type */ constructor(invalidFields: [string, string][]); } /** * Exception thrown when a Payment Request is invalid for Cash App Pay. * This can happen when an unsupported currency code is provided or an invalid payment request is used. */ export declare class CashAppPayInvalidPaymentRequestError extends SqError { /** * @inheritDoc */ constructor(message: string); } /** * Exception thrown when a redirect url is not provided on initialization. * This can happen when the user calls `cashAppPay` without the necessary options. */ export declare class CashAppPayMissingRedirectUrlError extends SqError { /** * @inheritDoc */ constructor(); } /** * Exception thrown when a tokenize validator is not a function. * This can happen when a user passes a non-function to the cashAppPay shouldTokenize option. */ export declare class CashAppPayInvalidShouldTokenizeError extends SqError { /** * @inheritDoc */ constructor(); }