Search Results for

    Show / Hide Table of Contents

    Interface ITaxService

    Service for calculating or processing sales tax.

    Namespace: DirectScale.Disco.Extension.Services
    Assembly: DirectScale.Disco.Extension.Abstractions.dll
    Syntax
    public interface ITaxService

    Methods

    GetOrderTax(Int32)

    Gets detailed tax information for specified orderNumber.

    Declaration
    Task<TaxResult> GetOrderTax(int orderNumber)
    Parameters
    Type Name Description
    System.Int32 orderNumber

    The order to look up.

    Returns
    Type Description
    System.Threading.Tasks.Task<TaxResult>

    Tax deteails.

    GetOrderTaxUsd(TaxLineItem[], Decimal, Int32, Address, Int32, DateTime)

    Calls GetTax(TaxLineItem[], Decimal, Int32, Address, Int32, DateTime, String) with a currencyCode of "USD".

    Declaration
    Task<TaxResult> GetOrderTaxUsd(TaxLineItem[] items, Decimal shipping, int warehouseId, Address address, int associateId, DateTime saleDate)
    Parameters
    Type Name Description
    TaxLineItem[] items
    System.Decimal shipping
    System.Int32 warehouseId
    Address address
    System.Int32 associateId
    System.DateTime saleDate
    Returns
    Type Description
    System.Threading.Tasks.Task<TaxResult>

    GetTax(TaxLineItem[], Decimal, Int32, Address, Int32, DateTime, String)

    Calculate tax for associateId to purchase items.

    Declaration
    Task<TaxResult> GetTax(TaxLineItem[] items, Decimal shipping, int warehouseId, Address address, int associateId, DateTime saleDate, string currencyCode)
    Parameters
    Type Name Description
    TaxLineItem[] items

    Items the associate is purchasing.

    System.Decimal shipping

    Shipping cost (sometimes taxable).

    System.Int32 warehouseId

    The warehouse the items will ship from.

    Address address

    The address items are being shipped to.

    System.Int32 associateId

    Associate placing an order.

    System.DateTime saleDate

    Should be now.

    System.String currencyCode

    The currency being used.

    Returns
    Type Description
    System.Threading.Tasks.Task<TaxResult>

    Detailed tax amount and tax provider implemenation.

    MarkTaxCommitted(Order)

    Calls specific tax provider's implementation of marking tax committed for order.

    Declaration
    Task MarkTaxCommitted(Order order)
    Parameters
    Type Name Description
    Order order

    The order to committ tax on.

    Returns
    Type Description
    System.Threading.Tasks.Task

    MarkTaxRefunded(Order)

    Calls specific tax provider's implementation of marking tax refunded for order.

    Declaration
    Task MarkTaxRefunded(Order order)
    Parameters
    Type Name Description
    Order order

    The order to mark tax refunded on.

    Returns
    Type Description
    System.Threading.Tasks.Task
    In This Article
    Back to top Copyright © 2022 DirectScale
    Generated by DocFX