import { Resource } from "../resource"; import { StoreProduct, APIProduct, ProductType, ProductProvider, ReportType } from "./interfaces"; import { Response } from "src/server"; export declare class Product extends Resource { /** * The name of the product. */ name: string; /** * Unique string identifier for the product. */ slug: string; /** * Price to charge for the product. */ price: number; /** * Price to charge a member for the product. */ memberPrice: number; /** * Whether the product is active or not. */ isActive: boolean; /** * From which provider the product comes. */ provider: ProductProvider; /** * Type of the product. */ productType: ProductType; /** * Item id from the orders service for DNA Kits. */ itemId?: string; /** * Report type for legacy wellness reports. */ reportType?: ReportType; /** * Interval for subscription products. */ interval?: number; constructor(name: string, slug: string, price: number, member_price: number, is_active: boolean, provider: ProductProvider, product_type: ProductType, item_id?: string, report_type?: ReportType, interval?: number); /** * The name of the product resource on the API server. */ static get resourceName(): string; /** * The name of the service containing the product resource. */ static get serviceName(): string; /** * Convert the product into a JSON serializable object for the API server. */ serializeAPI(): APIProduct; /** * Deserialize the data from the API server. * * @param data The product data from the API server. */ deserializeAPI(data: APIProduct): void; /** * Serialize the product into a format for storing in the Redux store. */ serializeRedux(): StoreProduct; /** * Handle any http errors. * * @param response The response. * * @returns `null`. */ protected static handleError(response: Response): null; /** * Create a product from the API server data. * * @param data Data from the api server. * * @returns The product object. */ static apiFactory(data: APIProduct): Product; /** * Create a product from the Redux store data. * * @param data Data from the api server. * * @returns The product object. */ static reduxFactory(data: StoreProduct): Product; }