import { Json, Resource } from "../../common";
import { APIPaymentSource, StoreAfterpayPaymentIntent, StoreMinimalPaymentMethod, StorePayPalPaymentMethod, StorePaymentSource, StoreStripePaymentMethod } from "./interfaces";
export declare class PaymentSource extends Resource {
    /**
     * Payment methods store in Stripe
     */
    stripe: Array<StoreStripePaymentMethod>;
    /**
     * Payment methods store in PayPal
     */
    paypal: Array<StorePayPalPaymentMethod>;
    /**
     * The chargebee data to manage the payment method
     */
    isChargebee: boolean;
    constructor(
    /**
     * Payment methods store in Stripe
     */
    stripe: Array<StoreStripePaymentMethod>, 
    /**
     * Payment methods store in PayPal
     */
    paypal: Array<StorePayPalPaymentMethod>, 
    /**
     * The chargebee data to manage the payment method
     */
    isChargebee: boolean);
    /**
     * 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;
    /**
     * 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;
    /**
     * Convert the Stripe payment source into a JSON serializable object for the API server.
     * @private
     */
    private serializeStripeAPI;
    /**
     * Convert the PayPal payment source into a JSON serializable object for the API server.
     * @private
     */
    private serializePayPalAPI;
    /**
     * Deserialize the Stripe payment source data from the API server.
     * @param data The Stripe payment source data from the API server.
     * @private
     */
    private static deserializeStripeAPI;
    /**
     * Deserialize the PayPal payment source data from the API server.
     * @param data The PayPal payment source data from the API server.
     * @private
     */
    private static deserializePayPalAPI;
    /**
     * Method that creates the Stripe setup intent to start
     * the process to save the user's credit card.
     *
     * @returns The stripe client secret as { client_secret: "clientSecret" }
     */
    static createStripeSetupIntent(): Promise<Json>;
    /**
     * Method that creates a payment intent in Stripe to start
     * the process of Afterpay payment.
     *
     * @returns The afterpay redirect URL as { redirect_url: "redirectUrl" }
     */
    static createAfterpayPaymentIntent(afterpayPaymentIntent: StoreAfterpayPaymentIntent): Promise<Json>;
    /**
     * Creates a PayPal token in an approval flow to vault (save) the
     * user's PayPal account and use it for future payments
     *
     * @returns url to take the user through a PayPal hosted authorization flow
     */
    static createPayPalToken(): Promise<string>;
    /**
     * Confirms a PayPal approval token after the user completes the approval flow
     * to convert it into a payment token
     */
    static confirmPayPalToken(approvalTokenId: string): Promise<boolean>;
    /**
     * Method to set a new default payment method for the user
     * @param paymentMethod The new default payment method
     */
    static updateDefaultPaymentMethod(paymentMethod: StoreMinimalPaymentMethod): Promise<StoreMinimalPaymentMethod>;
    /**
     * Method to delete a payment method from the user's accounts
     * @param paymentMethod The payment method to delete
     *
     * @returns 204 No content
     */
    static deletePaymentMethod(paymentMethod: StoreMinimalPaymentMethod): Promise<Json>;
    /**
     * Serialize the payment method from the redux store to the API for the server
     * @param storePaymentMethod Payment method from the redux store
     * @private
     */
    private static serializeMinimalPaymentMethod;
    /**
     * Deserialize the payment method from the server to the redux store
     * @param storePaymentMethod Payment method from the redux store
     * @private
     */
    private static deserializeMinimalPaymentMethod;
    /**
     * Serialize the Afterpay shipping details from the redux store to the API
     * for the server
     * @param afterpayShippingDetails Afterpay shipping details from the store
     * @private
     */
    private static serializeAfterpayShippingDetails;
    /**
     * Serialize the Afterpay payment intent payload from the redux store to the API
     * @param afterpayPaymentIntent Afterpay payment intent from the store
     * @private
     */
    private static serializeAfterpayPaymentIntent;
}
