November Happy Hour will be moved to Thursday December 5th.

Class IPurchaseOrderExtensions

Extension methods for IPurchaseOrder.

Inheritance
System.Object
IPurchaseOrderExtensions
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: EPiServer.Commerce.Order
Assembly: EPiServer.Business.Commerce.dll
Version: 13.30.0
Syntax
public static class IPurchaseOrderExtensions

Methods

CanBeCancelled(IPurchaseOrder)

Determines whether an IPurchaseOrder can be cancelled.

Declaration
public static bool CanBeCancelled(this IPurchaseOrder purchaseOrder)
Parameters
Type Name Description
IPurchaseOrder purchaseOrder

The purchase order.

Returns
Type Description
System.Boolean

true if order can be cancelled; otherwise, false.

CanBeCancelled(IPurchaseOrder, OrderShipmentStatusService)

Determines whether an IPurchaseOrder can be cancelled.

Declaration
public static bool CanBeCancelled(this IPurchaseOrder purchaseOrder, OrderShipmentStatusService orderShipmentStatusService)
Parameters
Type Name Description
IPurchaseOrder purchaseOrder

The purchase order.

OrderShipmentStatusService orderShipmentStatusService

The order shipment status service.

Returns
Type Description
System.Boolean

true if order can be cancelled; otherwise, false.

CanBePutOnHold(IPurchaseOrder)

Determines whether an IPurchaseOrder can be put on hold.

Declaration
public static bool CanBePutOnHold(this IPurchaseOrder purchaseOrder)
Parameters
Type Name Description
IPurchaseOrder purchaseOrder

The purchase order.

Returns
Type Description
System.Boolean

true if order can be put on hold; otherwise, false.

CanCancelShipment(IPurchaseOrder, IShipment)

Determines whether an IShipment can be cancelled.

Declaration
public static bool CanCancelShipment(this IPurchaseOrder order, IShipment shipment)
Parameters
Type Name Description
IPurchaseOrder order

The order containing the shipment.

IShipment shipment

The shipment.

Returns
Type Description
System.Boolean

true if the shipment can be cancelled; otherwise, false.

CanCancelShipment(IPurchaseOrder, IShipment, OrderShipmentStatusService)

Determines whether an IShipment can be cancelled.

Declaration
public static bool CanCancelShipment(this IPurchaseOrder order, IShipment shipment, OrderShipmentStatusService orderShipmentStatusService)
Parameters
Type Name Description
IPurchaseOrder order

The order containing the shipment.

IShipment shipment

The shipment.

OrderShipmentStatusService orderShipmentStatusService

The order shipment status service

Returns
Type Description
System.Boolean

true if the shipment can be cancelled; otherwise, false.

CanCompleteShipment(IPurchaseOrder, IShipment)

Determines whether an IShipment can be completed.

Declaration
public static bool CanCompleteShipment(this IPurchaseOrder order, IShipment shipment)
Parameters
Type Name Description
IPurchaseOrder order

The order containing the shipment.

IShipment shipment

The shipment.

Returns
Type Description
System.Boolean

true if the shipment can be completed, i.e. when it is already shipped; otherwise, false.

CanReleaseShipment(IPurchaseOrder, IShipment)

Determines whether an IShipment can be released.

Declaration
public static bool CanReleaseShipment(this IPurchaseOrder order, IShipment shipment)
Parameters
Type Name Description
IPurchaseOrder order

The order containing the shipment.

IShipment shipment

The shipment.

Returns
Type Description
System.Boolean

true if the shipment can be released; otherwise, false.

CanReleaseShipment(IPurchaseOrder, IShipment, OrderShipmentStatusService)

Determines whether an IShipment can be released.

Declaration
public static bool CanReleaseShipment(this IPurchaseOrder order, IShipment shipment, OrderShipmentStatusService orderShipmentStatusService)
Parameters
Type Name Description
IPurchaseOrder order

The order containing the shipment.

IShipment shipment

The shipment.

OrderShipmentStatusService orderShipmentStatusService

The order shipment status service.

Returns
Type Description
System.Boolean

true if the shipment can be cancelled; otherwise, false.

CanReturnShipment(IPurchaseOrder, IShipment)

Determines whether an IShipment can be returned.

Declaration
public static bool CanReturnShipment(this IPurchaseOrder order, IShipment shipment)
Parameters
Type Name Description
IPurchaseOrder order

The order containing the shipment.

IShipment shipment

The shipment.

Returns
Type Description
System.Boolean

true if the shipment can be returned; otherwise, false.

GetActiveReturnForms(IPurchaseOrder)

Gets the active return forms.

Declaration
public static IEnumerable<IReturnOrderForm> GetActiveReturnForms(this IPurchaseOrder order)
Parameters
Type Name Description
IPurchaseOrder order

The order containing the return form.

Returns
Type Description
System.Collections.Generic.IEnumerable<IReturnOrderForm>

An System.Collections.Generic.IEnumerable<T>.

GetAvailableForReturnLineItems(IPurchaseOrder, IShipment)

Get line items available for return for an IShipment.

Declaration
public static IEnumerable<ILineItem> GetAvailableForReturnLineItems(this IPurchaseOrder order, IShipment shipment)
Parameters
Type Name Description
IPurchaseOrder order

The order containing the shipment.

IShipment shipment

The shipment.

Returns
Type Description
System.Collections.Generic.IEnumerable<ILineItem>

HasAwaitingReturnCompletable(IPurchaseOrder)

Determines whether an IPurchaseOrder has any awaiting completion return form.

Declaration
public static bool HasAwaitingReturnCompletable(this IPurchaseOrder purchaseOrder)
Parameters
Type Name Description
IPurchaseOrder purchaseOrder

The purchase order.

Returns
Type Description
System.Boolean

true if order has any awaiting completion return form; otherwise, false.

HasAwaitingStockReturns(IPurchaseOrder)

Determines whether an IPurchaseOrder has any waiting stock return form.

Declaration
public static bool HasAwaitingStockReturns(this IPurchaseOrder purchaseOrder)
Parameters
Type Name Description
IPurchaseOrder purchaseOrder

The purchase order.

Returns
Type Description
System.Boolean

true if order has any waiting stock return form; otherwise, false.

IsPaid(IPurchaseOrder)

Determines whether an IPurchaseOrder is paid.

Declaration
public static bool IsPaid(this IPurchaseOrder purchaseOrder)
Parameters
Type Name Description
IPurchaseOrder purchaseOrder

The purchase order.

Returns
Type Description
System.Boolean

true if order is paid; otherwise, false.

IsPaid(IPurchaseOrder, IOrderGroupCalculator, IReturnOrderFormCalculator, IMarketService)

Determines whether an IPurchaseOrder is paid.

Declaration
public static bool IsPaid(this IPurchaseOrder purchaseOrder, IOrderGroupCalculator orderGroupCalculator, IReturnOrderFormCalculator returnOrderFormCalculator, IMarketService marketService)
Parameters
Type Name Description
IPurchaseOrder purchaseOrder

The purchase order.

IOrderGroupCalculator orderGroupCalculator

The order group calculator.

IReturnOrderFormCalculator returnOrderFormCalculator

The return order form calculator.

IMarketService marketService

The market service.

Returns
Type Description
System.Boolean

true if order is paid; otherwise, false.