Interface IRmaService
Return merchandise authorization
Namespace: DirectScale.Disco.Extension.Services
Assembly: DirectScale.Disco.Extension.Abstractions.dll
Syntax
public interface IRmaService
Methods
CanOrderGenerateRma(Order)
Indicates if order
can be returned.
Declaration
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
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
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
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
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
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
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
Task ReceiveRma(int rmaId)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | rmaId | Rma which has been received. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |