Application Load

IInvoiceDirection

The physical TypeScript declaration from the Nuxt starter, with linked types and field comments.

IInvoiceDirection

Invoice funds direction.

interfaces/orionplace/payments/IInvoice.ts
TypeScript
export interface IInvoiceDirection {
  // Funds source: merchant (payment provider), wallet, wallet_adjustment,
  // manager_credit, blog_revenue_pool, promocode_benefit or domain_benefit.
  // Refunds use the original transaction category; interpret together with to
  // and parent_type.
  from: string;
  // Funds destination: wallet, order, paid_sub or deduct for account
  // operations; merchant for a provider refund and blog_revenue_pool for
  // returned author earnings.
  to: string;
  // Ordinary transaction relation: order ID for to: order;
  // purchased-subscription ID for to: paid_sub; revenue-pool ID for from:
  // blog_revenue_pool; manager-credit record ID for from: manager_credit;
  // benefit record ID for a promotion/domain bonus. May be absent or null.
  related_id?: number | null;
  // Present for refunds: category of the original transaction, such as order,
  // paid_sub, wallet or writer_earning.
  parent_type?: string;
  // For a refund: order ID, purchased-subscription ID or author revenue-pool ID
  // according to parent_type. For a wallet payment, an account object with id,
  // is_staff and is_admin. Null when no related record is supplied; use numeric
  // order/subscription IDs only for those links.
  parent_related_id?: number | {
    // Value of id.
    id: number;
    // In a wallet refund’s parent_related_id account object: whether the
    // original account is staff.
    is_staff: boolean;
    // In a wallet refund’s parent_related_id account object: whether the
    // original account is an administrator.
    is_admin: boolean;
  } | null;
  // Subscription-definition ID for a subscription payment or refund. The
  // purchased subscription is identified by related_id or parent_related_id.
  sub_id?: number;
  // Author account ID for earnings or their refund; conditional.
  writer_id?: number;
  // Manager account ID for a manager-funded wallet grant; conditional.
  manager_id?: number;
  // Store domain ID for a manager-funded wallet grant; conditional.
  domain_id?: number;
}