Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Invoices

Hierarchy

  • Invoices

Index

Constructors

Methods

  • hasGiftCardRedeem(invoice: Invoice): boolean
  • tryAddPaymentFeeCost(invoiceRows: InvoiceRow[], order: WcOrder, currencyRate: number, paymentMethod: "PayPal" | "Stripe"): void
  • tryAddRounding(invoiceRows: InvoiceRow[], order: WcOrder, expectedTotal?: number): void
  • tryCanBeRefunded(invoice: Invoice): boolean
  • tryCreateGiftCardRedeemArticles(invoice: Invoice, allowEmpty?: boolean): Article[]
  • tryCreateInvoice(order: WcOrder, currencyRate: number, storefrontPrefix: "GB" | "ND", expectedOrderStatus?: string, expectedTotal?: number): Invoice
  • Parameters

    • order: WcOrder
    • currencyRate: number
    • storefrontPrefix: "GB" | "ND"
    • expectedOrderStatus: string = "completed"
    • Optional expectedTotal: number

    Returns Invoice

  • tryCreateInvoicePayment(invoice: Invoice, currencyRate: undefined | null | number, paymentDate: Date, paymentStatus: string): InvoicePayment
  • tryCreatePartialRefund(creditInvoice: Partial<Invoice>, refunds: Refund[] | RefundElement[]): Partial<Invoice>
  • tryGenerateCashPaymentInvoice(order: WcOrder, storefrontPrefix: "GB" | "ND", containsOnlyGiftCards?: boolean): Omit<Invoice, "CurrencyRate" | "InvoiceRows">
  • Parameters

    • order: WcOrder
    • storefrontPrefix: "GB" | "ND"
    • containsOnlyGiftCards: boolean = false

    Returns Omit<Invoice, "CurrencyRate" | "InvoiceRows">

  • tryGenerateInvoiceRows(order: WcOrder, paymentMethod: "PayPal" | "Stripe" | "GiftCard", expectedTotal?: number): InvoiceRow[]
  • tryGetHighestVATAccount(invoice: Invoice): { AccountNumber: number; VAT: number }
  • Parameters

    Returns { AccountNumber: number; VAT: number }

    • AccountNumber: number
    • VAT: number
  • tryGetInvoiceCurrencyAmount(invoice: Invoice): number

Generated using TypeDoc