Options
All
  • Public
  • Public/Protected
  • All
Menu

Class WcOrders

Hierarchy

  • WcOrders

Index

Constructors

Methods

  • createDocumentLink(orderId: string | number, storefrontUrl: string, orderKey: string): string
  • Parameters

    • orderId: string | number
    • storefrontUrl: string
    • orderKey: string

    Returns string

  • getCurrencyRateFromStripeMetaData(stripeFee: string | number, stripeNet: string | number, total: number): number
  • Parameters

    • stripeFee: string | number
    • stripeNet: string | number
    • total: number

    Returns number

  • getDocumentSource(order: WcOrder): null | string
  • getInvoiceReference(order: WcOrder): undefined | string
  • getPaymentDate(order: WcOrder): string
  • getRefunds(order: WcOrder): undefined | RefundElement[] | Refund[]
  • getShippingTax(order: WcOrder): number
  • getShippingTotal(order: WcOrder): number
  • getStorefrontPrefix(order: WcOrder): undefined | string
  • getStorefrontUrl(order: WcOrder): undefined | string
  • hasGiftCardsRedeem(order: WcOrder): boolean
  • hasInvoiceReference(order: WcOrder): boolean
  • hasPaymentFee(order: WcOrder, paymentMethod: string): boolean
  • hasPaymentMethod(order: WcOrder): boolean
  • isPartiallyRefunded(order: WcOrder): boolean
  • tryCanBeRefunded(order: WcOrder): boolean
  • tryCreatePaymentFeeExpense(order: WcOrder, currencyRate: number, paymentMethod: "PayPal" | "Stripe"): Expense
  • tryGetAccurateTotal(order: WcOrder, epsilon?: number): number
  • tryGetBillingName(order: WcOrder): string
  • tryGetCurrency(order: WcOrder): "SEK" | "EUR" | "USD"
  • tryGetCurrencyRate(order: WcOrder, stripeFee: string | number, stripeNet: string | number, accurateTotal?: number): number
  • static
    memberof

    WcOrders

    Parameters

    • order: WcOrder
    • stripeFee: string | number
    • stripeNet: string | number
    • Optional accurateTotal: number

    Returns number

    {number}

  • tryGetCustomerEmail(order: WcOrder): string
  • tryGetCustomerName(order: WcOrder): string
  • tryGetDeliveryName(order: WcOrder): string
  • tryGetDocumentLink(order: WcOrder, storefrontUrl?: string): string
  • tryGetGiftCardsPurchases(order: WcOrder): { amountCurrency: number; containsOnlyGiftCards: boolean; giftCards: WcOrderLineItem[]; hasGiftCards: boolean }
  • Parameters

    Returns { amountCurrency: number; containsOnlyGiftCards: boolean; giftCards: WcOrderLineItem[]; hasGiftCards: boolean }

    • amountCurrency: number
    • containsOnlyGiftCards: boolean
    • giftCards: WcOrderLineItem[]
    • hasGiftCards: boolean
  • tryGetInvoiceReference(order: WcOrder): number
  • tryGetPaymentFee(order: WcOrder, paymentMethod: string): number
  • tryVerifyCurrencyRate(order: WcOrder, currencyRate: number): undefined | number
  • tryVerifyOrder(order: WcOrder): void

Generated using TypeDoc