Search Results for

    Show / Hide Table of Contents

    Class RmaService

    Inheritance
    System.Object
    RmaService
    Implements
    IRmaService
    Namespace: DirectScale.Disco.Extension.Services
    Assembly: DirectScale.Disco.Extension.Abstractions.dll
    Syntax
    public class RmaService : Object, IRmaService

    Constructors

    RmaService(IApiService)

    Declaration
    public RmaService(IApiService apiService)
    Parameters
    Type Name Description
    IApiService apiService

    Methods

    CanOrderGenerateRma(Order)

    Indicates if order can be returned.

    Declaration
    public Task<bool> CanOrderGenerateRma(Order order)
    Parameters
    Type Name Description
    Order order

    Order to return.

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

    True: order still has items left that can be returned. False: order has already been completely returned.

    Remarks

    The only values used are OrderNumber and LineItems

    CreateRma(Rma)

    Creates a new Rma DB record.

    Declaration
    public Task<int> CreateRma(Rma rma)
    Parameters
    Type Name Description
    Rma rma

    New Rma to insert.

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

    new Id.

    Exceptions
    Type Condition
    System.InvalidOperationException

    Invalid Rma information.

    DeleteRma(Int32)

    Delete Rma DB record by rmaId.

    Declaration
    public Task DeleteRma(int rmaId)
    Parameters
    Type Name Description
    System.Int32 rmaId

    The Rma recordnumber.

    Returns
    Type Description
    System.Threading.Tasks.Task
    Exceptions
    Type Condition
    System.Exception

    Rma not found.

    GetOrderRmas(Int32)

    Find any Rmas that have occurred for orderNumber.

    Declaration
    public Task<Rma[]> GetOrderRmas(int orderNumber)
    Parameters
    Type Name Description
    System.Int32 orderNumber

    Order number to search.

    Returns
    Type Description
    System.Threading.Tasks.Task<Rma[]>

    Order number for order. Empty array if none.

    GetRma(Int32)

    Find an Rma based on it's id.

    Declaration
    public Task<Rma> GetRma(int rmaId)
    Parameters
    Type Name Description
    System.Int32 rmaId

    The Rma's DB recordnumber.

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

    Specified Rma, or null.

    GetRmas(DateTime, DateTime, String, Nullable<Int32>, Nullable<Int32>)

    Find Rma requests between begin and end dates.

    Declaration
    public Task<Rma[]> GetRmas(DateTime begin, DateTime end, string filter, Nullable<int> warehouseId, Nullable<int> statusId)
    Parameters
    Type Name Description
    System.DateTime begin

    Include RMAs after begin date.

    System.DateTime end

    Include RMAs before end date.

    System.String filter

    Optional. Provided value will be compared to RMA recordnumber, associate's first name, last name, and backoffice id.

    System.Nullable<System.Int32> warehouseId

    Optionally filter by warehouseId.

    System.Nullable<System.Int32> statusId

    Optionally filter by status. 1: New, 2: Shipped, 3: Received.

    Returns
    Type Description
    System.Threading.Tasks.Task<Rma[]>

    Returns Rmas that meet filtering criteria.

    MarkRmaShipped(Int32, String)

    Updates specified Rma record to set specified trackingNumber and set DateShipped to now.

    Declaration
    public Task MarkRmaShipped(int rmaId, string trackingNumber)
    Parameters
    Type Name Description
    System.Int32 rmaId

    The Rma recordnumber to update.

    System.String trackingNumber

    The Rma shipping tracking number.

    Returns
    Type Description
    System.Threading.Tasks.Task
    Exceptions
    Type Condition
    System.Exception

    Rma already shipped or not found.

    ReceiveRma(Int32)

    Updates rmaId record to set DateReceived to today.

    Declaration
    public Task ReceiveRma(int rmaId)
    Parameters
    Type Name Description
    System.Int32 rmaId

    Rma which has been received.

    Returns
    Type Description
    System.Threading.Tasks.Task

    Implements

    IRmaService
    In This Article
    Back to top Copyright © 2022 DirectScale
    Generated by DocFX