Try our conversational search powered by Generative AI!

Class PurchaseOrderManager

Inheritance
System.Object
PurchaseOrderManager
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: Mediachase.Commerce.Orders.Managers
Assembly: Mediachase.Commerce.dll
Version: 10.8.0
Syntax
public static class PurchaseOrderManager

Methods

AddLineItemToFirstShipmentInOrder(PaymentPlan, Int32, Decimal)

Adds the line item to first shipment in order.

Declaration
public static void AddLineItemToFirstShipmentInOrder(PaymentPlan plan, int lineItemId, decimal quantity)
Parameters
Type Name Description
PaymentPlan plan

The plan.

System.Int32 lineItemId

The line item id.

System.Decimal quantity

The quantity.

AddLineItemToFirstShipmentInOrder(PurchaseOrder, Int32, Decimal)

Adds the line item to first shipment in order.

Declaration
public static void AddLineItemToFirstShipmentInOrder(PurchaseOrder purchaseOrder, int lineItemId, decimal quantity)
Parameters
Type Name Description
PurchaseOrder purchaseOrder

The purchase order.

System.Int32 lineItemId

The line item id.

System.Decimal quantity

The quantity.

AddLineItemToShipment(OrderGroup, Int32, Shipment, Decimal)

Adds the line item to shipment.

Declaration
public static void AddLineItemToShipment(OrderGroup orderGroup, int lineItemId, Shipment shipment, decimal quantity)
Parameters
Type Name Description
OrderGroup orderGroup

The order group.

System.Int32 lineItemId

The line item identifier.

Shipment shipment

The shipment.

System.Decimal quantity

The quantity.

Exceptions
Type Condition
System.ArgumentNullException

The orderGroup is null.

System.NullReferenceException

The shipment is null, or the line item with lineItemId is not found.

AddLineItemToShipment(PaymentPlan, Int32, Shipment, Decimal)

Adds the line item to shipment.

Declaration
public static void AddLineItemToShipment(PaymentPlan plan, int lineItemId, Shipment shipment, decimal quantity)
Parameters
Type Name Description
PaymentPlan plan

The plan.

System.Int32 lineItemId

The line item id.

Shipment shipment

The shipment.

System.Decimal quantity

The quantity.

AddLineItemToShipment(PurchaseOrder, Int32, Shipment, Decimal)

Adds the line item to shipment.

Declaration
public static void AddLineItemToShipment(PurchaseOrder purchaseOrder, int lineItemId, Shipment shipment, decimal quantity)
Parameters
Type Name Description
PurchaseOrder purchaseOrder

The purchase order.

System.Int32 lineItemId

The line item id.

Shipment shipment

The shipment.

System.Decimal quantity

The quantity.

AddLineItemToShipmentDetectedByLineItemShipmentInfo(PaymentPlan, Int32, Decimal)

Adds the line item to shipment detected by line item shipment info.

Declaration
public static void AddLineItemToShipmentDetectedByLineItemShipmentInfo(PaymentPlan plan, int lineItemId, decimal quantity)
Parameters
Type Name Description
PaymentPlan plan

The plan.

System.Int32 lineItemId

The line item id.

System.Decimal quantity

The quantity.

AddLineItemToShipmentDetectedByLineItemShipmentInfo(PurchaseOrder, Int32, Decimal)

Adds the line item to shipment detected by line item shipment info.

Declaration
public static void AddLineItemToShipmentDetectedByLineItemShipmentInfo(PurchaseOrder purchaseOrder, int lineItemId, decimal quantity)
Parameters
Type Name Description
PurchaseOrder purchaseOrder

The purchase order.

System.Int32 lineItemId

The line item id.

System.Decimal quantity

The quantity.

GetFulfilledReturnItemCodes(PurchaseOrder)

Get codes of line items in the order which have been returned all quantity.

Declaration
public static IEnumerable<string> GetFulfilledReturnItemCodes(PurchaseOrder purchaseOrder)
Parameters
Type Name Description
PurchaseOrder purchaseOrder

The purchase order.

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

The list of item codes.

GetFulfilledReturnItemCodes(PurchaseOrder, IShipment)

Get codes of line items in the shipment which have been returned all quantity.

Declaration
public static IEnumerable<string> GetFulfilledReturnItemCodes(PurchaseOrder purchaseOrder, IShipment originalShipment)
Parameters
Type Name Description
PurchaseOrder purchaseOrder

The purchase order.

IShipment originalShipment

The original shipment.

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

The list of item codes.

GetNewPaymentPlanFromCart(Cart)

Gets the new payment plan from cart.

Declaration
public static PaymentPlan GetNewPaymentPlanFromCart(Cart cart)
Parameters
Type Name Description
Cart cart

The cart.

Returns
Type Description
PaymentPlan

GetNewPurchaseOrderFromCart(Cart)

Gets the new purchase order from cart.

Declaration
public static PurchaseOrder GetNewPurchaseOrderFromCart(Cart cart)
Parameters
Type Name Description
Cart cart

The cart.

Returns
Type Description
PurchaseOrder

MoveLineItemToShipment(PaymentPlan, Int32, Shipment, Shipment, Decimal)

Moves the line item to shipment.

Declaration
public static void MoveLineItemToShipment(PaymentPlan plan, int lineItemId, Shipment srcShipment, Shipment dstShipment, decimal quantity)
Parameters
Type Name Description
PaymentPlan plan

The plan.

System.Int32 lineItemId

The line item id.

Shipment srcShipment

The SRC shipment.

Shipment dstShipment

The DST shipment.

System.Decimal quantity

The quantity.

MoveLineItemToShipment(PurchaseOrder, Int32, Shipment, Shipment, Decimal)

Moves the line item to shipment.

Declaration
public static void MoveLineItemToShipment(PurchaseOrder purchaseOrder, int lineItemId, Shipment srcShipment, Shipment dstShipment, decimal quantity)
Parameters
Type Name Description
PurchaseOrder purchaseOrder

The purchase order.

System.Int32 lineItemId

The line item id.

Shipment srcShipment

The SRC shipment.

Shipment dstShipment

The DST shipment.

System.Decimal quantity

The quantity.

RemoveLineItemFromOrder(IOrderGroup, Int32, Int32)

Removes the line item from shipment of order group.

Declaration
public static void RemoveLineItemFromOrder(IOrderGroup orderGroup, int shipmentId, int lineItemId)
Parameters
Type Name Description
IOrderGroup orderGroup

The order group.

System.Int32 shipmentId

The shipment identifier.

System.Int32 lineItemId

The line item identifier.

RemoveLineItemFromOrder(OrderGroup, Int32)

Removes the line item from order group.

Declaration
public static void RemoveLineItemFromOrder(OrderGroup orderGroup, int lineItemId)
Parameters
Type Name Description
OrderGroup orderGroup

The order group.

System.Int32 lineItemId

The line item identifier.

RemoveLineItemFromOrder(PaymentPlan, Int32)

Removes the line item from order.

Declaration
public static void RemoveLineItemFromOrder(PaymentPlan plan, int lineItemId)
Parameters
Type Name Description
PaymentPlan plan

The plan.

System.Int32 lineItemId

The line item id.

RemoveLineItemFromOrder(PurchaseOrder, Int32)

Removes the line item from order.

Declaration
public static void RemoveLineItemFromOrder(PurchaseOrder purchaseOrder, int lineItemId)
Parameters
Type Name Description
PurchaseOrder purchaseOrder

The purchase order.

System.Int32 lineItemId

The line item id.

RemoveLineItemFromShipment(OrderGroup, Int32, Shipment)

Removes the line item from shipment.

Declaration
public static void RemoveLineItemFromShipment(OrderGroup orderGroup, int lineItemId, Shipment shipment)
Parameters
Type Name Description
OrderGroup orderGroup

The purchase order.

System.Int32 lineItemId

The line item id.

Shipment shipment

The shipment.

RemoveLineItemFromShipment(OrderGroup, Int32, Shipment, Decimal)

Removes the line item from shipment.

Declaration
public static void RemoveLineItemFromShipment(OrderGroup orderGroup, int lineItemId, Shipment shipment, decimal quantity)
Parameters
Type Name Description
OrderGroup orderGroup

The order group.

System.Int32 lineItemId

The line item identifier.

Shipment shipment

The shipment.

System.Decimal quantity

The quantity.

Exceptions
Type Condition
System.ArgumentNullException

The orderGroup or shipment is null.

RemoveLineItemFromShipment(OrderGroup, Int32, Int32)

Removes the line item from shipment.

Declaration
public static void RemoveLineItemFromShipment(OrderGroup orderGroup, int lineItemId, int shipmentId)
Parameters
Type Name Description
OrderGroup orderGroup

The order group.

System.Int32 lineItemId

The line item id.

System.Int32 shipmentId

The shipment id.

RemoveLineItemFromShipment(PaymentPlan, Int32, Shipment)

Removes the line item from shipment.

Declaration
public static void RemoveLineItemFromShipment(PaymentPlan plan, int lineItemId, Shipment shipment)
Parameters
Type Name Description
PaymentPlan plan

The plan.

System.Int32 lineItemId

The line item id.

Shipment shipment

The shipment.

RemoveLineItemFromShipment(PaymentPlan, Int32, Shipment, Decimal)

Removes the line item from shipment.

Declaration
public static void RemoveLineItemFromShipment(PaymentPlan plan, int lineItemId, Shipment shipment, decimal quantity)
Parameters
Type Name Description
PaymentPlan plan

The plan.

System.Int32 lineItemId

The line item id.

Shipment shipment

The shipment.

System.Decimal quantity

The quantity.

RemoveLineItemFromShipment(PaymentPlan, Int32, Int32)

Removes the line item from shipment.

Declaration
public static void RemoveLineItemFromShipment(PaymentPlan plan, int lineItemId, int shipmentId)
Parameters
Type Name Description
PaymentPlan plan

The plan.

System.Int32 lineItemId

The line item id.

System.Int32 shipmentId

The shipment id.

RemoveLineItemFromShipment(PurchaseOrder, Int32, Shipment)

Removes the line item from shipment.

Declaration
public static void RemoveLineItemFromShipment(PurchaseOrder purchaseOrder, int lineItemId, Shipment shipment)
Parameters
Type Name Description
PurchaseOrder purchaseOrder

The purchase order.

System.Int32 lineItemId

The line item id.

Shipment shipment

The shipment.

RemoveLineItemFromShipment(PurchaseOrder, Int32, Shipment, Decimal)

Removes the line item from shipment.

Declaration
public static void RemoveLineItemFromShipment(PurchaseOrder purchaseOrder, int lineItemId, Shipment shipment, decimal quantity)
Parameters
Type Name Description
PurchaseOrder purchaseOrder

The purchase order.

System.Int32 lineItemId

The line item id.

Shipment shipment

The shipment.

System.Decimal quantity

The quantity.

RemoveLineItemFromShipment(PurchaseOrder, Int32, Int32)

Removes the line item from shipment.

Declaration
public static void RemoveLineItemFromShipment(PurchaseOrder purchaseOrder, int lineItemId, int shipmentId)
Parameters
Type Name Description
PurchaseOrder purchaseOrder

The purchase order.

System.Int32 lineItemId

The line item id.

System.Int32 shipmentId

The shipment id.

SetPromotionUsageStatus(PurchaseOrder, PromotionUsageStatus)

Updates the promotion usage status for a purchase order. Please note that ALL promotion usage records are updated.

Declaration
public static void SetPromotionUsageStatus(PurchaseOrder purchaseOrder, PromotionUsageStatus status)
Parameters
Type Name Description
PurchaseOrder purchaseOrder

Purchase order for which to update promotion usage records.

PromotionUsageStatus status

Promotion usage status.

UpdatePromotionUsage(OrderGroup, OrderGroup)

Updates promotion usage records to get a new OrderGroupId. Please note that ALL promotion usage records are updated. The intended use is to update promotion usage records after a new purchase order has been created from a cart.

Declaration
public static void UpdatePromotionUsage(OrderGroup order, OrderGroup newOrder)
Parameters
Type Name Description
OrderGroup order

Purchase order for which to update promotion usage records.

OrderGroup newOrder

The new purchase order that usage records belong to when creating a new order from a cart. Use the same purchase order as the previous purchase if only updating.

UpdateShipmentLineItemQuantity(PaymentPlan, Int32, Shipment, Decimal)

Updates the shipment line item quantity.

Declaration
public static void UpdateShipmentLineItemQuantity(PaymentPlan plan, int lineItemId, Shipment shipment, decimal quantity)
Parameters
Type Name Description
PaymentPlan plan

The plan.

System.Int32 lineItemId

The line item id.

Shipment shipment

The shipment.

System.Decimal quantity

The quantity.

UpdateShipmentLineItemQuantity(PurchaseOrder, Int32, Shipment, Decimal)

Updates the shipment line item quantity.

Declaration
public static void UpdateShipmentLineItemQuantity(PurchaseOrder purchaseOrder, int lineItemId, Shipment shipment, decimal quantity)
Parameters
Type Name Description
PurchaseOrder purchaseOrder

The purchase order.

System.Int32 lineItemId

The line item id.

Shipment shipment

The shipment.

System.Decimal quantity

The quantity.