import { Resource } from "../resource"; import { Response } from "../server"; import { APIItem, StoreItem } from "./interfaces"; export declare class Item extends Resource { /** * The name of the supplier */ supplier: string; /** * The number of the item in the supplier catalogue */ supplierItemNumber: string; /** * The description of the item */ description: string; /** * The name of the item */ name: string; /** * The price of the item in cents */ price: number; constructor(supplier: string, supplier_item_number: string, description: string, name: string, price: number); /** * The name of the DNAKit resource on the API server. */ static get resourceName(): string; /** * The name of the service containing the DNAKit resource. */ static get serviceName(): string; /** * Convert the Item into a JSON serializable object for the API server. */ serializeAPI(): APIItem; /** * Deserialize the data from the API server. * * @param data The item data from the API server. */ deserializeAPI(data: APIItem): void; /** * Serialize the item into a format for storing in the Redux store. */ serializeRedux(): StoreItem; /** * Handle any http errors. * * @param response The response. * * @returns `null`. */ protected static handleError(response: Response): null; /** * Create an item from the API server data. * * @param data Data from the api server. * * @returns The Item object. */ static apiFactory(data: APIItem): Item; /** * Create an item from the Redux store data. * * @param data Data from the api server. * * @returns The Item object. */ static reduxFactory(data: StoreItem): Item; }