/** * Copyright (c) 2020 The Nuinalp Authors. All rights reserved. * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ import { Model } from '@nuinalp/api-core/browser'; import IPayment from '../types/payments.interface'; import { IInvoiceChargeType } from '../types/invoice.charge.type'; import { TInvoiceHistoryType } from '../types/invoice.history.type'; import Customer from './customers'; import InvoiceHistory from './invoice.history'; import Subscriptions from './subscriptions'; import Products from './products'; export default class Invoices extends Model { protected static adapter: any; id: string; code: string; amount: number; one_time_items?: { id: string; description?: string | undefined; quantity: number; price: number; }[]; products?: { id: string; product: Products; id_price?: string; quantity: number; price: number; }[]; send_pdf?: boolean; card?: { id: string; create_token?: boolean; auto_capture?: boolean; holder_name: string; due_date: string; number: number; cvv: number; }; charge_type: IInvoiceChargeType; date_due: Date; note: string; id_payment: string; payment_method: string; status: TInvoiceHistoryType; subscription: Subscriptions; payment: IPayment; customer: Customer; history: InvoiceHistory[]; created_at: Date; updated_at: Date; deleted_at: Date; due_date: Date; }