import ITranslation from '../Translation'; import { BankTypeAssociationEnum, IBankRule } from './BankType'; export default interface IPromiseToPurchase { readonly id?: string; readonly promise_unique_id: string; readonly customer_id: string; readonly deposit_percent?: number; readonly deposit_amount?: number; readonly banks: IBank[]; readonly starting_date: Date; readonly ending_date?: Date | null; readonly archived: boolean; readonly closed_with_season?: boolean; readonly created_date?: Date; readonly created_by?: string; readonly last_update?: Date; readonly last_update_by?: string; readonly other_notes?: string; } export interface IBank { readonly bank_type_id: string; readonly version: number; readonly name: ITranslation[]; readonly association_type: BankTypeAssociationEnum; readonly initial_amount: number | null; readonly remaining_amount: number | null; readonly reductions: IBankReduction[]; readonly adjustments?: IBankAdjustment[]; readonly active?: boolean; } export interface IBankAdjustment { readonly amount: number; readonly reason: string; readonly issued_at: Date; readonly issued_by: string; readonly issued_by_name?: string; } export interface IBankReduction extends IBankRule { readonly default_promo: number | null; readonly additionnal_promo: number | null; } export declare enum ApplyBanksToCartErrorsEnum { ONLY_ITEMS_WITH_MULTI_ASSOCIATED_BANKS = "ONLY_ITEMS_WITH_MULTI_ASSOCIATED_BANKS", BANK_NOT_FOUND = "BANK_NOT_FOUND", NO_ITEMS_FOUND_FOR_BANKS = "NO_ITEMS_FOR_BANKS", EMPTY_BANK = "EMPTY_BANK", NOT_ENOUGH_REMAINING = "NOT_ENOUGH_REMAINING", CUSTOM_PRICE_LIST_UNDEFINED = "CUSTOM_PRICE_LIST_UNDEFINED", PA_IS_INACTIVE = "PA_IS_INACTIVE" }