Class PaymentPlanProvider
Provider for PaymentPlan
Inheritance
Inherited Members
Namespace: EPiServer.Commerce.Order.Internal
Assembly: EPiServer.Business.Commerce.dll
Version: 12.17.2Syntax
public class PaymentPlanProvider : IPaymentPlanProvider, IOrderProvider<IPaymentPlan>
Constructors
PaymentPlanProvider(ICurrentMarket, IOrderGroupCalculator, ReferenceConverter, IContentLoader, ICatalogSystem, IRelationRepository, ServiceAccessor<SiteContext>, LanguageResolver, CustomerContext)
Creates an instance of PaymentPlanProvider
Declaration
public PaymentPlanProvider(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 an IPaymentPlan for a specific customer.
Declaration
public IPaymentPlan Create(Guid customerId, string name)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Guid | customerId | The customer id |
| System.String | name | The order name |
Returns
| Type | Description |
|---|---|
| IPaymentPlan | An IPaymentPlan |
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 payment plans.
Declaration
public IEnumerable<IPaymentPlan> 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<IPaymentPlan> | The System.Collections.Generic.IEnumerable<T>. |
Remarks
If the name is null or empty, it returns all payment plans of the customer.
Load(Int32)
Loads the order
Declaration
public IPaymentPlan Load(int orderGroupId)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | orderGroupId | The order group id |
Returns
| Type | Description |
|---|---|
| IPaymentPlan | The IPaymentPlan. |
Save(IPaymentPlan)
Saves the specified IPaymentPlan.
Declaration
public OrderReference Save(IPaymentPlan paymentPlan)
Parameters
| Type | Name | Description |
|---|---|---|
| IPaymentPlan | paymentPlan | The payment plan. |
Returns
| Type | Description |
|---|---|
| OrderReference | An OrderReference. |
SaveAsPurchaseOrder(IPaymentPlan)
Declaration
public IPurchaseOrder SaveAsPurchaseOrder(IPaymentPlan paymentPlan)
Parameters
| Type | Name | Description |
|---|---|---|
| IPaymentPlan | paymentPlan |
Returns
| Type | Description |
|---|---|
| IPurchaseOrder |