import { Resource } from "../resource"; import { StoreCheckout, APICheckout, CheckoutItem, CheckoutStatus, Provider, PaymentGateway, CheckoutExtra } from "./interfaces"; import { Response } from "src/server"; export declare class Checkout extends Resource { /** * The id of the user who owns the checkout */ userId?: string; /** * Items in the checkout */ items: Array; /** * Extra items to charge in the checkout. */ extras: Array; /** * The checkout's Status */ status?: CheckoutStatus; /** * The checkout's Provider */ provider: Provider; /** * The checkout's Payment gateway provider */ paymentGateway: PaymentGateway; /** * Invoice generated for the checkout */ invoice?: string; constructor(items: Array, extras: Array, provider: Provider, paymentGateway: PaymentGateway, status?: CheckoutStatus, user_id?: string, invoice?: string); /** * The name of the Checkout resource on the API server. */ static get resourceName(): string; /** * The name of the service containing the checkout resource. */ static get serviceName(): string; /** * Convert the checkout into a JSON serializable object for the API server. */ serializeAPI(): APICheckout; /** * Deserialize the data from the API server. * * @param data The checkout data from the API server. */ deserializeAPI(data: APICheckout): void; /** * Serialize the checkout into a format for storing in the Redux store. */ serializeRedux(): StoreCheckout; /** * Handle any http errors. * * @param response The response. * * @returns `null`. */ protected static handleError(response: Response): null; /** * Create a checkout from the API server data. * * @param data Data from the api server. * * @returns The checkout object. */ static apiFactory(data: APICheckout): Checkout; /** * Create a checkout from the Redux store data. * * @param data Data from the api server. * * @returns The checkout object. */ static reduxFactory(data: StoreCheckout): Checkout; /** * Additional action to confirm the checkout. */ confirm(): Promise; }