Class IOrderGroupExtensions
Extension methods for IOrderGroup.
Inheritance
Inherited Members
Namespace: EPiServer.Commerce.Order
Assembly: EPiServer.Business.Commerce.dll
Version: 10.8.0Syntax
public static class IOrderGroupExtensions
Methods
AddLineItem(IOrderGroup, ILineItem)
Adds the line item to the order group.
Will use the first IOrderForm on orderGroup
and create one if it does not exist.
Will use the first IShipment on orderGroup
.Forms and create one if it does not exist.
Declaration
public static void AddLineItem(this IOrderGroup orderGroup, ILineItem lineItem)
Parameters
Type | Name | Description |
---|---|---|
IOrderGroup | orderGroup | The order group. |
ILineItem | lineItem | The line item. |
AddLineItem(IOrderGroup, ILineItem, IOrderFactory)
Adds the line item to the order group.
Will use the first IOrderForm on orderGroup
and create one if it does not exist.
Will use the first IShipment on orderGroup
.Forms and create one if it does not exist.
Declaration
[Obsolete("The orderFactory parameter is not used anymore. Use the overload with orderGroupFactory. This method will remain at least until January 2018.")]
public static void AddLineItem(this IOrderGroup orderGroup, ILineItem lineItem, IOrderFactory orderFactory)
Parameters
Type | Name | Description |
---|---|---|
IOrderGroup | orderGroup | The order group. |
ILineItem | lineItem | The line item. |
IOrderFactory | orderFactory | Ignored. |
AddLineItem(IOrderGroup, ILineItem, IOrderGroupFactory)
Adds the line item to the order group.
Will use the first IOrderForm on orderGroup
and create one if it does not exist.
Will use the first IShipment on orderGroup
.Forms and create one if it does not exist.
Declaration
public static void AddLineItem(this IOrderGroup orderGroup, ILineItem lineItem, IOrderGroupFactory orderGroupFactory)
Parameters
Type | Name | Description |
---|---|---|
IOrderGroup | orderGroup | The order group. |
ILineItem | lineItem | The line item. |
IOrderGroupFactory | orderGroupFactory | The builder to use for creating an order form and/or shipment (if needed). |
AddLineItem(IOrderGroup, IOrderForm, ILineItem)
Adds the line item to the specified order form.
Will use the first IShipment on orderForm
.Shipments and create one if it does not exist.
Declaration
public static void AddLineItem(this IOrderGroup orderGroup, IOrderForm orderForm, ILineItem lineItem)
Parameters
Type | Name | Description |
---|---|---|
IOrderGroup | orderGroup | The order group. |
IOrderForm | orderForm | The order form. |
ILineItem | lineItem | The line item. |
AddLineItem(IOrderGroup, IOrderForm, ILineItem, IOrderFactory)
Adds the line item to the order group.
Will use the first IShipment on orderForm
and create one if it does not exist.
Declaration
[Obsolete("The orderFactory parameter is not used anymore. Use the overload with orderGroupFactory. This method will remain at least until January 2018.")]
public static void AddLineItem(this IOrderGroup orderGroup, IOrderForm orderForm, ILineItem lineItem, IOrderFactory orderFactory)
Parameters
Type | Name | Description |
---|---|---|
IOrderGroup | orderGroup | The order group. |
IOrderForm | orderForm | The order form. |
ILineItem | lineItem | The line item. |
IOrderFactory | orderFactory | Ignored. |
AddLineItem(IOrderGroup, IOrderForm, ILineItem, IOrderGroupFactory)
Adds the line item to the specified order form.
Will use the first IShipment on orderForm
.Shipments and create one if it does not exist.
Declaration
public static void AddLineItem(this IOrderGroup orderGroup, IOrderForm orderForm, ILineItem lineItem, IOrderGroupFactory orderGroupFactory)
Parameters
Type | Name | Description |
---|---|---|
IOrderGroup | orderGroup | The order group. |
IOrderForm | orderForm | The order form. |
ILineItem | lineItem | The line item. |
IOrderGroupFactory | orderGroupFactory | The builder to use for creating an order form and/or shipment (if needed). |
AddLineItem(IOrderGroup, IShipment, ILineItem)
Adds the line item to the order group for the specified shipment.
Declaration
public static void AddLineItem(this IOrderGroup orderGroup, IShipment shipment, ILineItem lineItem)
Parameters
Type | Name | Description |
---|---|---|
IOrderGroup | orderGroup | The order group. |
IShipment | shipment | The shipment. |
ILineItem | lineItem | The line item. |
AddPayment(IOrderGroup, IOrderForm, IPayment)
Adds the shipment to the specified order form.
Declaration
public static void AddPayment(this IOrderGroup orderGroup, IOrderForm orderForm, IPayment payment)
Parameters
Type | Name | Description |
---|---|---|
IOrderGroup | orderGroup | The order group. |
IOrderForm | orderForm | The order form. |
IPayment | payment | The payment. |
AddPayment(IOrderGroup, IOrderForm, IPayment, IOrderFactory)
Adds the payment to the order group.
Declaration
[Obsolete("The orderFactory parameter is not used anymore. Use the overload with orderGroupFactory. This method will remain at least until January 2018.")]
public static void AddPayment(this IOrderGroup orderGroup, IOrderForm orderForm, IPayment payment, IOrderFactory orderFactory)
Parameters
Type | Name | Description |
---|---|---|
IOrderGroup | orderGroup | The order group. |
IOrderForm | orderForm | The order form. |
IPayment | payment | The payment. |
IOrderFactory | orderFactory | Ignored. |
AddPayment(IOrderGroup, IPayment)
Adds the payment to the order group.
Will use the first IOrderForm on orderGroup
and create one if it does not exist.
Declaration
public static void AddPayment(this IOrderGroup orderGroup, IPayment payment)
Parameters
Type | Name | Description |
---|---|---|
IOrderGroup | orderGroup | The order group. |
IPayment | payment | The payment. |
AddPayment(IOrderGroup, IPayment, IOrderFactory)
Adds the payment to the order group.
Will use the first IOrderForm on orderGroup
and create one if it does not exist.
Declaration
[Obsolete("The orderFactory parameter is not used anymore. Use the overload with orderGroupFactory. This method will remain at least until January 2018.")]
public static void AddPayment(this IOrderGroup orderGroup, IPayment payment, IOrderFactory orderFactory)
Parameters
Type | Name | Description |
---|---|---|
IOrderGroup | orderGroup | The order group. |
IPayment | payment | The payment. |
IOrderFactory | orderFactory | Ignored. |
AddPayment(IOrderGroup, IPayment, IOrderGroupFactory)
Adds the payment to the order group.
Will use the first IOrderForm on orderGroup
and create one if it does not exist.
Declaration
public static void AddPayment(this IOrderGroup orderGroup, IPayment payment, IOrderGroupFactory orderGroupFactory)
Parameters
Type | Name | Description |
---|---|---|
IOrderGroup | orderGroup | The order group. |
IPayment | payment | The payment. |
IOrderGroupFactory | orderGroupFactory | The builder to use for creating an order form (if needed). |
AddShipment(IOrderGroup, IOrderForm, IShipment)
Adds the shipment to the specified order form.
Declaration
public static void AddShipment(this IOrderGroup orderGroup, IOrderForm orderForm, IShipment shipment)
Parameters
Type | Name | Description |
---|---|---|
IOrderGroup | orderGroup | The order group. |
IOrderForm | orderForm | The order form. |
IShipment | shipment | The shipment. |
AddShipment(IOrderGroup, IShipment)
Adds the line item to the order group.
Will use the first IOrderForm on orderGroup
and create one if it does not exist.
Declaration
public static void AddShipment(this IOrderGroup orderGroup, IShipment shipment)
Parameters
Type | Name | Description |
---|---|---|
IOrderGroup | orderGroup | The order group. |
IShipment | shipment | The shipment. |
AddShipment(IOrderGroup, IShipment, IOrderFactory)
Adds the line item to the order group.
Will use the first IOrderForm on orderGroup
and create one if it does not exist.
Declaration
[Obsolete("The orderFactory parameter is not used anymore. Use the overload with orderGroupFactory. This method will remain at least until January 2018.")]
public static void AddShipment(this IOrderGroup orderGroup, IShipment shipment, IOrderFactory orderFactory)
Parameters
Type | Name | Description |
---|---|---|
IOrderGroup | orderGroup | The order group. |
IShipment | shipment | The shipment. |
IOrderFactory | orderFactory | Ignored. |
AddShipment(IOrderGroup, IShipment, IOrderGroupFactory)
Adds the line item to the order group.
Will use the first IOrderForm on orderGroup
and create one if it does not exist.
Declaration
public static void AddShipment(this IOrderGroup orderGroup, IShipment shipment, IOrderGroupFactory orderGroupFactory)
Parameters
Type | Name | Description |
---|---|---|
IOrderGroup | orderGroup | The order group. |
IShipment | shipment | The shipment. |
IOrderGroupFactory | orderGroupFactory | The builder to use for creating an order form (if needed). |
AdjustInventoryOrRemoveLineItems(IOrderGroup, Action<ILineItem, ValidationIssue>)
Adjusts the inventory for IOrderGroup or removes the line item if no available inventory.
Declaration
public static void AdjustInventoryOrRemoveLineItems(this IOrderGroup orderGroup, Action<ILineItem, ValidationIssue> onValidationError)
Parameters
Type | Name | Description |
---|---|---|
IOrderGroup | orderGroup | The order group. |
System.Action<ILineItem, ValidationIssue> | onValidationError | A callback that is invoked if a validation issue is detected. |
AdjustInventoryOrRemoveLineItems(IOrderGroup, Action<ILineItem, ValidationIssue>, IInventoryProcessor)
Adjusts the inventory.
Declaration
public static void AdjustInventoryOrRemoveLineItems(this IOrderGroup orderGroup, Action<ILineItem, ValidationIssue> onValidationError, IInventoryProcessor inventoryProcessor)
Parameters
Type | Name | Description |
---|---|---|
IOrderGroup | orderGroup | The order group. |
System.Action<ILineItem, ValidationIssue> | onValidationError | A callback that is invoked if a validation issue is detected. |
IInventoryProcessor | inventoryProcessor | The inventory processor. |
ApplyDiscounts(IOrderGroup)
Applies the discounts.
Declaration
public static IEnumerable<RewardDescription> ApplyDiscounts(this IOrderGroup orderGroup)
Parameters
Type | Name | Description |
---|---|---|
IOrderGroup | orderGroup | The order group. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<RewardDescription> | An System.Collections.Generic.IEnumerable<T> |
ApplyDiscounts(IOrderGroup, IPromotionEngine, PromotionEngineSettings)
Applies the discounts.
Declaration
public static IEnumerable<RewardDescription> ApplyDiscounts(this IOrderGroup orderGroup, IPromotionEngine promotionEngine, PromotionEngineSettings settings)
Parameters
Type | Name | Description |
---|---|---|
IOrderGroup | orderGroup | The order group. |
IPromotionEngine | promotionEngine | The promotion engine. |
PromotionEngineSettings | settings | The settings. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<RewardDescription> | An System.Collections.Generic.IEnumerable<T> |
ApplyDiscounts(IOrderGroup, PromotionEngineSettings)
Applies the discounts.
Declaration
public static IEnumerable<RewardDescription> ApplyDiscounts(this IOrderGroup orderGroup, PromotionEngineSettings settings)
Parameters
Type | Name | Description |
---|---|---|
IOrderGroup | orderGroup | The order group. |
PromotionEngineSettings | settings | The settings. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<RewardDescription> | An System.Collections.Generic.IEnumerable<T> |
CopyFrom(IOrderGroup, IOrderGroup, IOrderGroupFactory)
Copies all components from an IOrderGroup with a specified IOrderGroupFactory.
Declaration
public static void CopyFrom(this IOrderGroup orderGroup, IOrderGroup sourceOrderGroup, IOrderGroupFactory orderGroupFactory)
Parameters
Type | Name | Description |
---|---|---|
IOrderGroup | orderGroup | The destination order group. |
IOrderGroup | sourceOrderGroup | The source order group. |
IOrderGroupFactory | orderGroupFactory | The factory to use for creating sub-objects to the destination order group. |
CreateCardPayment(IOrderGroup)
Creates the card payment.
Declaration
public static ICreditCardPayment CreateCardPayment(this IOrderGroup orderGroup)
Parameters
Type | Name | Description |
---|---|---|
IOrderGroup | orderGroup | The order group to create object for. |
Returns
Type | Description |
---|---|
ICreditCardPayment |
Remarks
This is a convenience method that will use the appropriate order group factory registered in the container. Since it depends on container registration it is not recommended to use in code you intend to have unit tests for.
CreateCardPayment(IOrderGroup, IOrderGroupFactory)
Creates the card payment.
Declaration
public static ICreditCardPayment CreateCardPayment(this IOrderGroup orderGroup, IOrderGroupFactory orderGroupFactory)
Parameters
Type | Name | Description |
---|---|---|
IOrderGroup | orderGroup | The order group to create object for. |
IOrderGroupFactory | orderGroupFactory | The order group factory. |
Returns
Type | Description |
---|---|
ICreditCardPayment |
CreateLineItem(IOrderGroup, String)
Creates the line item.
Declaration
public static ILineItem CreateLineItem(this IOrderGroup orderGroup, string code)
Parameters
Type | Name | Description |
---|---|---|
IOrderGroup | orderGroup | The order group to create object for. |
System.String | code | The line item code. |
Returns
Type | Description |
---|---|
ILineItem | An ILineItem |
Remarks
This is a convenience method that will use the appropriate order group factory registered in the container. Since it depends on container registration it is not recommended to use in code you intend to have unit tests for.
CreateLineItem(IOrderGroup, String, IOrderGroupFactory)
Creates the line item.
Declaration
public static ILineItem CreateLineItem(this IOrderGroup orderGroup, string code, IOrderGroupFactory orderGroupFactory)
Parameters
Type | Name | Description |
---|---|---|
IOrderGroup | orderGroup | The order group to create object for. |
System.String | code | The line item code. |
IOrderGroupFactory | orderGroupFactory | The order group factory. |
Returns
Type | Description |
---|---|
ILineItem | An ILineItem |
CreateOrderAddress(IOrderGroup)
Creates the order address.
Declaration
public static IOrderAddress CreateOrderAddress(this IOrderGroup orderGroup)
Parameters
Type | Name | Description |
---|---|---|
IOrderGroup | orderGroup | The order group to create object for. |
Returns
Type | Description |
---|---|
IOrderAddress |
Remarks
This is a convenience method that will use the appropriate order group factory registered in the container. Since it depends on container registration it is not recommended to use in code you intend to have unit tests for.
CreateOrderAddress(IOrderGroup, IOrderGroupFactory)
Creates the order address.
Declaration
public static IOrderAddress CreateOrderAddress(this IOrderGroup orderGroup, IOrderGroupFactory orderGroupFactory)
Parameters
Type | Name | Description |
---|---|---|
IOrderGroup | orderGroup | The order group to create object for. |
IOrderGroupFactory | orderGroupFactory | The order group factory. |
Returns
Type | Description |
---|---|
IOrderAddress |
CreateOrderForm(IOrderGroup)
Creates the order form.
Declaration
public static IOrderForm CreateOrderForm(this IOrderGroup orderGroup)
Parameters
Type | Name | Description |
---|---|---|
IOrderGroup | orderGroup | The order group to create object for. |
Returns
Type | Description |
---|---|
IOrderForm | An IOrderForm |
Remarks
This is a convenience method that will use the appropriate order group factory registered in the container. Since it depends on container registration it is not recommended to use in code you intend to have unit tests for.
CreateOrderForm(IOrderGroup, IOrderGroupFactory)
Creates the order form.
Declaration
public static IOrderForm CreateOrderForm(this IOrderGroup orderGroup, IOrderGroupFactory orderGroupFactory)
Parameters
Type | Name | Description |
---|---|---|
IOrderGroup | orderGroup | The order group to create object for. |
IOrderGroupFactory | orderGroupFactory | The order group factory. |
Returns
Type | Description |
---|---|
IOrderForm | An IOrderForm |
CreateOrderNote(IOrderGroup)
Creates the order note.
Declaration
public static IOrderNote CreateOrderNote(this IOrderGroup orderGroup)
Parameters
Type | Name | Description |
---|---|---|
IOrderGroup | orderGroup | The order group to create object for. |
Returns
Type | Description |
---|---|
IOrderNote | An IOrderNote |
Remarks
This is a convenience method that will use the appropriate order group factory registered in the container. Since it depends on container registration it is not recommended to use in code you intend to have unit tests for.
CreateOrderNote(IOrderGroup, IOrderGroupFactory)
Creates the order note.
Declaration
public static IOrderNote CreateOrderNote(this IOrderGroup orderGroup, IOrderGroupFactory orderGroupFactory)
Parameters
Type | Name | Description |
---|---|---|
IOrderGroup | orderGroup | The order group to create object for. |
IOrderGroupFactory | orderGroupFactory | The order group factory. |
Returns
Type | Description |
---|---|
IOrderNote | An IOrderNote |
CreatePayment(IOrderGroup)
Creates the payment.
Declaration
public static IPayment CreatePayment(this IOrderGroup orderGroup)
Parameters
Type | Name | Description |
---|---|---|
IOrderGroup | orderGroup | The order group to create object for. |
Returns
Type | Description |
---|---|
IPayment | An IPayment |
Remarks
This is a convenience method that will use the appropriate order group factory registered in the container. Since it depends on container registration it is not recommended to use in code you intend to have unit tests for.
CreatePayment(IOrderGroup, IOrderGroupFactory)
Creates the payment.
Declaration
public static IPayment CreatePayment(this IOrderGroup orderGroup, IOrderGroupFactory orderGroupFactory)
Parameters
Type | Name | Description |
---|---|---|
IOrderGroup | orderGroup | The order group to create object for. |
IOrderGroupFactory | orderGroupFactory | The order group factory. |
Returns
Type | Description |
---|---|
IPayment | An IPayment |
CreatePayment(IOrderGroup, IOrderGroupFactory, Type)
Creates the payment with a specified payment implementation.
Declaration
public static IPayment CreatePayment(this IOrderGroup orderGroup, IOrderGroupFactory orderGroupFactory, Type paymentType)
Parameters
Type | Name | Description |
---|---|---|
IOrderGroup | orderGroup | The order group to create object for. |
IOrderGroupFactory | orderGroupFactory | The order group factory. |
System.Type | paymentType | The payment implementation class type. |
Returns
Type | Description |
---|---|
IPayment | An IPayment. |
CreateShipment(IOrderGroup)
Creates the shipment.
Declaration
public static IShipment CreateShipment(this IOrderGroup orderGroup)
Parameters
Type | Name | Description |
---|---|---|
IOrderGroup | orderGroup | The order group to create object for. |
Returns
Type | Description |
---|---|
IShipment | An IShipment |
Remarks
This is a convenience method that will use the appropriate order group factory registered in the container. Since it depends on container registration it is not recommended to use in code you intend to have unit tests for.
CreateShipment(IOrderGroup, IOrderGroupFactory)
Creates the shipment.
Declaration
public static IShipment CreateShipment(this IOrderGroup orderGroup, IOrderGroupFactory orderGroupFactory)
Parameters
Type | Name | Description |
---|---|---|
IOrderGroup | orderGroup | The order group to create object for. |
IOrderGroupFactory | orderGroupFactory | The order group factory. |
Returns
Type | Description |
---|---|
IShipment | An IShipment |
CreateTaxValue(IOrderGroup)
Creates the tax value.
Declaration
public static ITaxValue CreateTaxValue(this IOrderGroup orderGroup)
Parameters
Type | Name | Description |
---|---|---|
IOrderGroup | orderGroup | The order group to create object for. |
Returns
Type | Description |
---|---|
ITaxValue | An ITaxValue |
Remarks
This is a convenience method that will use the appropriate order group factory registered in the container. Since it depends on container registration it is not recommended to use in code you intend to have unit tests for.
CreateTaxValue(IOrderGroup, IOrderGroupFactory)
Creates the tax value.
Declaration
public static ITaxValue CreateTaxValue(this IOrderGroup orderGroup, IOrderGroupFactory orderGroupFactory)
Parameters
Type | Name | Description |
---|---|---|
IOrderGroup | orderGroup | The order group to create object for. |
IOrderGroupFactory | orderGroupFactory | The order group factory. |
Returns
Type | Description |
---|---|
ITaxValue | An ITaxValue |
GetAllLineItems(IOrderGroup)
Gets all line items for the IOrderGroup.
Declaration
public static IEnumerable<ILineItem> GetAllLineItems(this IOrderGroup orderGroup)
Parameters
Type | Name | Description |
---|---|---|
IOrderGroup | orderGroup | The order group. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<ILineItem> | An System.Collections.Generic.IEnumerable<T>. |
GetFirstForm(IOrderGroup)
Gets the first order form from the order group. Returns null if none exists.
Declaration
public static IOrderForm GetFirstForm(this IOrderGroup orderGroup)
Parameters
Type | Name | Description |
---|---|---|
IOrderGroup | orderGroup | The order group. |
Returns
Type | Description |
---|---|
IOrderForm | The IOrderForm. |
GetFirstShipment(IOrderGroup)
Gets the first shipment from the first order form. Returns null if none exists.
Declaration
public static IShipment GetFirstShipment(this IOrderGroup orderGroup)
Parameters
Type | Name | Description |
---|---|---|
IOrderGroup | orderGroup | The order group. |
Returns
Type | Description |
---|---|
IShipment | The IShipment. |
GetHandlingTotal(IOrderGroup)
Gets the handling total for the order.
Declaration
public static Money GetHandlingTotal(this IOrderGroup orderGroup)
Parameters
Type | Name | Description |
---|---|---|
IOrderGroup | orderGroup | The order group. |
Returns
Type | Description |
---|---|
Money | The handling total for the order group. |
GetHandlingTotal(IOrderGroup, IOrderGroupCalculator)
Gets the handling total for the order.
Declaration
public static Money GetHandlingTotal(this IOrderGroup orderGroup, IOrderGroupCalculator orderGroupCalculator)
Parameters
Type | Name | Description |
---|---|---|
IOrderGroup | orderGroup | The order group. |
IOrderGroupCalculator | orderGroupCalculator | The order group calculator. |
Returns
Type | Description |
---|---|
Money | The handling total for the order group. |
GetOrderDiscountTotal(IOrderGroup, Currency)
Gets the order discount price.
Declaration
public static Money GetOrderDiscountTotal(this IOrderGroup orderGroup, Currency currency)
Parameters
Type | Name | Description |
---|---|---|
IOrderGroup | orderGroup | The order group. |
Currency | currency | The currency. |
Returns
Type | Description |
---|---|
Money | The order discount price. |
GetOrderDiscountTotal(IOrderGroup, Currency, IOrderGroupCalculator)
Gets the order discount price.
Declaration
public static Money GetOrderDiscountTotal(this IOrderGroup orderGroup, Currency currency, IOrderGroupCalculator orderGroupCalculator)
Parameters
Type | Name | Description |
---|---|---|
IOrderGroup | orderGroup | The order group. |
Currency | currency | The currency. |
IOrderGroupCalculator | orderGroupCalculator | The order group calculator. |
Returns
Type | Description |
---|---|
Money | The order discount price. |
GetShippingDiscountTotal(IOrderGroup)
Gets the shipping subtotal for the order group.
Declaration
public static Money GetShippingDiscountTotal(this IOrderGroup orderGroup)
Parameters
Type | Name | Description |
---|---|---|
IOrderGroup | orderGroup | The order group. |
Returns
Type | Description |
---|---|
Money | The shipping subtotal. |
GetShippingDiscountTotal(IOrderGroup, IShippingCalculator)
Gets the shipping subtotal for the order group.
Declaration
public static Money GetShippingDiscountTotal(this IOrderGroup orderGroup, IShippingCalculator shippingCalculator)
Parameters
Type | Name | Description |
---|---|---|
IOrderGroup | orderGroup | The order group. |
IShippingCalculator | shippingCalculator | The shipping calculator. |
Returns
Type | Description |
---|---|
Money | The shipping subtotal. |
GetShippingSubTotal(IOrderGroup)
Gets the shipping subtotal for the order group.
Declaration
public static Money GetShippingSubTotal(this IOrderGroup orderGroup)
Parameters
Type | Name | Description |
---|---|---|
IOrderGroup | orderGroup | The order group. |
Returns
Type | Description |
---|---|
Money | The shipping subtotal. |
GetShippingSubTotal(IOrderGroup, IShippingCalculator)
Gets the shipping subtotal for the order group.
Declaration
public static Money GetShippingSubTotal(this IOrderGroup orderGroup, IShippingCalculator shippingCalculator)
Parameters
Type | Name | Description |
---|---|---|
IOrderGroup | orderGroup | The order group. |
IShippingCalculator | shippingCalculator | The shipping calculator. |
Returns
Type | Description |
---|---|
Money | The shipping subtotal. |
GetSubTotal(IOrderGroup)
Gets the total of extended prices for all line items in the order.
Declaration
public static Money GetSubTotal(this IOrderGroup orderGroup)
Parameters
Type | Name | Description |
---|---|---|
IOrderGroup | orderGroup | The order group. |
Returns
Type | Description |
---|---|
Money | The total of extended prices for all line items in the order. |
GetSubTotal(IOrderGroup, IOrderGroupCalculator)
Gets the total of extended prices for all line items in the order.
Declaration
public static Money GetSubTotal(this IOrderGroup orderGroup, IOrderGroupCalculator orderGroupCalculator)
Parameters
Type | Name | Description |
---|---|---|
IOrderGroup | orderGroup | The order group. |
IOrderGroupCalculator | orderGroupCalculator | The order group calculator. |
Returns
Type | Description |
---|---|
Money | The total of extended prices for all line items in the order. |
GetTotal(IOrderGroup)
Gets the total for the order.
Declaration
public static Money GetTotal(this IOrderGroup orderGroup)
Parameters
Type | Name | Description |
---|---|---|
IOrderGroup | orderGroup | The order group. |
Returns
Type | Description |
---|---|
Money | The total for the order group. |
GetTotal(IOrderGroup, IOrderGroupCalculator)
Gets the total for the order.
Declaration
public static Money GetTotal(this IOrderGroup orderGroup, IOrderGroupCalculator orderGroupCalculator)
Parameters
Type | Name | Description |
---|---|---|
IOrderGroup | orderGroup | The order group. |
IOrderGroupCalculator | orderGroupCalculator | The order group calculator. |
Returns
Type | Description |
---|---|
Money | The total for the order group. |
ProcessPayments(IOrderGroup)
Processes the payments.
Declaration
public static void ProcessPayments(this IOrderGroup orderGroup)
Parameters
Type | Name | Description |
---|---|---|
IOrderGroup | orderGroup | The order group. |
ProcessPayments(IOrderGroup, IPaymentProcessor, IOrderGroupCalculator)
Processes the payments.
Declaration
public static void ProcessPayments(this IOrderGroup orderGroup, IPaymentProcessor paymentProcessor, IOrderGroupCalculator orderGroupCalculator)
Parameters
Type | Name | Description |
---|---|---|
IOrderGroup | orderGroup | The order group. |
IPaymentProcessor | paymentProcessor | The payment processor. |
IOrderGroupCalculator | orderGroupCalculator | The order group calculator. |
UpdateInventoryOrRemoveLineItems(IOrderGroup, Action<ILineItem, ValidationIssue>)
Updates the inventory for the IOrderGroup or removes the line item if no available inventory.
Declaration
public static void UpdateInventoryOrRemoveLineItems(this IOrderGroup orderGroup, Action<ILineItem, ValidationIssue> onValidationError)
Parameters
Type | Name | Description |
---|---|---|
IOrderGroup | orderGroup | The order group. |
System.Action<ILineItem, ValidationIssue> | onValidationError | The on validation error. |
UpdateInventoryOrRemoveLineItems(IOrderGroup, Action<ILineItem, ValidationIssue>, IInventoryProcessor)
Updates the inventory for the IOrderGroup or removes the line item if no available inventory.
Declaration
public static void UpdateInventoryOrRemoveLineItems(this IOrderGroup orderGroup, Action<ILineItem, ValidationIssue> onValidationError, IInventoryProcessor inventoryProcessor)
Parameters
Type | Name | Description |
---|---|---|
IOrderGroup | orderGroup | The order group. |
System.Action<ILineItem, ValidationIssue> | onValidationError | A callback that is invoked if a validation issue is detected. |
IInventoryProcessor | inventoryProcessor | The inventory processor. |
UpdateLineItemQuantity(IOrderGroup, IShipment, ILineItem, Decimal)
Updates quantity of a line item in a shipment.
Declaration
public static void UpdateLineItemQuantity(this IOrderGroup orderGroup, IShipment shipment, ILineItem lineItem, decimal quantity)
Parameters
Type | Name | Description |
---|---|---|
IOrderGroup | orderGroup | The order group. |
IShipment | shipment | The shipment where the line item belongs to. |
ILineItem | lineItem | The line item that needs to change the quantity. |
System.Decimal | quantity | The new quantity. |
UpdatePlacedPriceOrRemoveLineItems(IOrderGroup, CustomerContact, Action<ILineItem, ValidationIssue>, IPlacedPriceProcessor)
Updates all of the line item placed prices for the specified IOrderGroup or removes the line item if their is no valid price.
Declaration
public static void UpdatePlacedPriceOrRemoveLineItems(this IOrderGroup orderGroup, CustomerContact customerContact, Action<ILineItem, ValidationIssue> onValidationError, IPlacedPriceProcessor placedPriceUpdater)
Parameters
Type | Name | Description |
---|---|---|
IOrderGroup | orderGroup | The order group. |
CustomerContact | customerContact | |
System.Action<ILineItem, ValidationIssue> | onValidationError | A callback that is invoked if a validation issue is detected. |
IPlacedPriceProcessor | placedPriceUpdater | The placed price updater. |
UpdatePlacedPriceOrRemoveLineItems(IOrderGroup, Action<ILineItem, ValidationIssue>)
Updates all of the line item placed prices for the specified IOrderGroup or removes the line item if their is no valid price.
Declaration
public static void UpdatePlacedPriceOrRemoveLineItems(this IOrderGroup orderGroup, Action<ILineItem, ValidationIssue> onValidationError)
Parameters
Type | Name | Description |
---|---|---|
IOrderGroup | orderGroup | The order group. |
System.Action<ILineItem, ValidationIssue> | onValidationError | A callback that is invoked if a validation issue is detected. |
ValidateOrRemoveLineItems(IOrderGroup, Action<ILineItem, ValidationIssue>)
Validates the line items and removes from the IOrderGroup if they are invalid.
Declaration
public static void ValidateOrRemoveLineItems(this IOrderGroup orderGroup, Action<ILineItem, ValidationIssue> onValidationError)
Parameters
Type | Name | Description |
---|---|---|
IOrderGroup | orderGroup | The order group. |
System.Action<ILineItem, ValidationIssue> | onValidationError | A callback that is invoked if a validation issue is detected. |
ValidateOrRemoveLineItems(IOrderGroup, Action<ILineItem, ValidationIssue>, ILineItemValidator)
Validates the line items and removes from the IOrderGroup if they are invalid..
Declaration
public static void ValidateOrRemoveLineItems(this IOrderGroup orderGroup, Action<ILineItem, ValidationIssue> onValidationError, ILineItemValidator lineItemValidator)
Parameters
Type | Name | Description |
---|---|---|
IOrderGroup | orderGroup | The order group. |
System.Action<ILineItem, ValidationIssue> | onValidationError | A callback that is invoked if a validation issue is detected. |
ILineItemValidator | lineItemValidator | The line item validator. |