import { Resource } from "../resource"; import { StorePaymentSource, APIPaymentSource, ChargebeeHostedPage } from "./interfaces"; import { Response } from "src/server"; export declare class PaymentSource extends Resource { /** * The id of the user with the payment method */ userId: string; /** * If the payment method is valid */ validPaymentSource: boolean; /** * The hosted page to manage the payment method */ hostedPage: ChargebeeHostedPage | null; constructor(user_id: string, valid_payment_source: boolean, hosted_page: ChargebeeHostedPage | null); /** * The name of the PaymentMethod resource on the API server. */ static get resourceName(): string; /** * The name of the service containing the payment source resource. */ static get serviceName(): string; /** * Convert the payment source into a JSON serializable object for the API server. */ serializeAPI(): APIPaymentSource; /** * Deserialize the data from the API server. * * @param data The payment source data from the API server. */ deserializeAPI(data: APIPaymentSource): void; /** * Serialize the payment source into a format for storing in the Redux store. */ serializeRedux(): StorePaymentSource; /** * Handle any http errors. * * @param response The response. * * @returns `null`. */ protected static handleError(response: Response): null; /** * Create a payment source from the API server data. * * @param data Data from the api server. * * @returns The payment source object. */ static apiFactory(data: APIPaymentSource): PaymentSource; /** * Create a payment source from the Redux store data. * * @param data Data from the api server. * * @returns The payment source object. */ static reduxFactory(data: StorePaymentSource): PaymentSource; }