C# Class Kona.Model.Order

Mostra file Open project: BenHall/Kona Class Usage Examples

Public Methods

Method Description
AddItem ( Product product ) : void

Adds a product to the cart

AddItem ( Product product, int quantity ) : void

Adds a product to the cart

AdjustQuantity ( Product product, int newQuantity ) : void

Adjusts the quantity of an item in the cart

ClearItems ( ) : void

Removes all items from cart

Equals ( object obj ) : bool
FindItem ( Product product ) : OrderItem

Finds an item in the cart

FindItem ( string sku ) : OrderItem

Finds an item in the cart

GetHashCode ( ) : int
RemoveItem ( Product product ) : void

Remmoves a product from the cart

RemoveItem ( string sku ) : void

Remmoves a product from the cart

RepriceItems ( ) : bool

Reprices all items in the cart to reflect update item prices.

ToString ( ) : string
ValidateForCheckout ( ) : void

Method Details

AddItem() public method

Adds a product to the cart
public AddItem ( Product product ) : void
product Product
return void

AddItem() public method

Adds a product to the cart
public AddItem ( Product product, int quantity ) : void
product Product
quantity int
return void

AdjustQuantity() public method

Adjusts the quantity of an item in the cart
public AdjustQuantity ( Product product, int newQuantity ) : void
product Product
newQuantity int
return void

ClearItems() public method

Removes all items from cart
public ClearItems ( ) : void
return void

Equals() public method

public Equals ( object obj ) : bool
obj object
return bool

FindItem() public method

Finds an item in the cart
public FindItem ( Product product ) : OrderItem
product Product
return OrderItem

FindItem() public method

Finds an item in the cart
public FindItem ( string sku ) : OrderItem
sku string
return OrderItem

GetHashCode() public method

public GetHashCode ( ) : int
return int

RemoveItem() public method

Remmoves a product from the cart
public RemoveItem ( Product product ) : void
product Product
return void

RemoveItem() public method

Remmoves a product from the cart
public RemoveItem ( string sku ) : void
sku string
return void

RepriceItems() public method

Reprices all items in the cart to reflect update item prices.
/// Throws an InvalidOperationException if the cart /// has been checked out. ///
public RepriceItems ( ) : bool
return bool

ToString() public method

public ToString ( ) : string
return string

ValidateForCheckout() public method

public ValidateForCheckout ( ) : void
return void