SaaS CMS has officially launched! Learn more now.

Class IPurchaseOrderExtensions

NOTE: This is a pre-release API that is UNSTABLE and might not satisfy the compatibility requirements as denoted by its associated normal version.

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: 11.8.3
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.

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.

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.

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>.

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)

Determines whether an IPurchaseOrder is paid.

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

The purchase order.

IOrderGroupCalculator orderGroupCalculator

The order group calculator.

Returns
Type Description
System.Boolean

true if order is paid; otherwise, false.