Try our conversational search powered by Generative AI!

Class PurchaseOrderProvider

Provider for PurchaseOrder

Inheritance
System.Object
PurchaseOrderProvider
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.Internal
Assembly: EPiServer.Business.Commerce.dll
Version: 13.30.0
Syntax
public class PurchaseOrderProvider : IPurchaseOrderProvider, IOrderProvider<IPurchaseOrder>

Constructors

PurchaseOrderProvider(ICurrentMarket, IOrderGroupCalculator, ReferenceConverter, IContentLoader, ICatalogSystem, IRelationRepository, ServiceAccessor<SiteContext>, LanguageResolver, CustomerContext)

Creates an instance of PurchaseOrderProvider

Declaration
public PurchaseOrderProvider(ICurrentMarket currentMarket, IOrderGroupCalculator orderGroupCalculator, ReferenceConverter referenceConverter, IContentLoader contentLoader, ICatalogSystem catalogSystem, IRelationRepository relationRepository, ServiceAccessor<SiteContext> siteContextAccessor, LanguageResolver languageResolver, CustomerContext customerContext)
Parameters
Type Name Description
ICurrentMarket currentMarket

The current market service

IOrderGroupCalculator orderGroupCalculator

The calculator that used to calculate the totals for an order group.

ReferenceConverter referenceConverter

The reference converter.

EPiServer.IContentLoader contentLoader

The content loader.

ICatalogSystem catalogSystem

The catalog system.

IRelationRepository relationRepository

The relation repository.

EPiServer.ServiceLocation.ServiceAccessor<SiteContext> siteContextAccessor

The site context accessor.

EPiServer.Globalization.LanguageResolver languageResolver

The language resolved.

CustomerContext customerContext

The customer context.

Methods

Create(Guid, String)

Creates and IPurchaseOrder for a specific customer.

Declaration
public IPurchaseOrder Create(Guid customerId, string name)
Parameters
Type Name Description
System.Guid customerId

The customer identifier.

System.String name

The name.

Returns
Type Description
IPurchaseOrder

An IPurchaseOrder.

Delete(OrderReference)

Deletes an order using an order reference.

Declaration
public void Delete(OrderReference orderLink)
Parameters
Type Name Description
OrderReference orderLink

The order link.

Load(Guid, String)

Loads orders.

Declaration
public IEnumerable<IPurchaseOrder> Load(Guid customerId, string name)
Parameters
Type Name Description
System.Guid customerId

The customer id.

System.String name

The name of the order. The name is not unique for each order, instead it's suppose to differentiate orders of the same type.

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

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

Remarks

If the name is null or empty, it returns all orders of the customer.

Load(Int32)

Loads the order

Declaration
public IPurchaseOrder Load(int orderGroupId)
Parameters
Type Name Description
System.Int32 orderGroupId

The order group id

Returns
Type Description
IPurchaseOrder

The IPurchaseOrder.

Save(IPurchaseOrder)

Saves the specified IPurchaseOrder.

Declaration
public OrderReference Save(IPurchaseOrder purchaseOrder)
Parameters
Type Name Description
IPurchaseOrder purchaseOrder

The purchase order.

Returns
Type Description
OrderReference
Exceptions
Type Condition
System.NotImplementedException

Implements