Try our conversational search powered by Generative AI!

Class ShippingManager

Shipping manager acts as proxy between methods that call data layer functions and the facade layer. The methods here check if the appropriate security is set and that the data is cached.

Inheritance
System.Object
ShippingManager
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 ShippingManager

Fields

DeliveryShippingMethodName

Declaration
public const string DeliveryShippingMethodName = "Store Delivery"
Field Value
Type Description
System.String

DeliveryShippingMethodPrefix

Declaration
public const string DeliveryShippingMethodPrefix = "StoreDelivery-"
Field Value
Type Description
System.String

PickupShippingMethodName

Declaration
public const string PickupShippingMethodName = "In Store Pickup"
Field Value
Type Description
System.String

PickupShippingMethodPrefix

Declaration
public const string PickupShippingMethodPrefix = "InStorePickup-"
Field Value
Type Description
System.String

Methods

AddressIsHandoffLocation(CustomerAddress)

Checks an address to determine whether it matches a pickup warehouse

Declaration
public static bool AddressIsHandoffLocation(CustomerAddress custAddr)
Parameters
Type Name Description
CustomerAddress custAddr
Returns
Type Description
System.Boolean
Remarks

Will return a warehouse match even if it is inactive

AddressIsHandoffLocation(OrderAddress)

Checks an address to determine whether it matches a pickup warehouse

Declaration
public static bool AddressIsHandoffLocation(OrderAddress orderAddr)
Parameters
Type Name Description
OrderAddress orderAddr
Returns
Type Description
System.Boolean
Remarks

Will return a warehouse match even if it is inactive

AddressIsHandoffLocation(String)

Checks an address name to determine whether it matches a pickup warehouse

Declaration
public static bool AddressIsHandoffLocation(string addrName)
Parameters
Type Name Description
System.String addrName
Returns
Type Description
System.Boolean
Remarks

Will return a warehouse match even if it is inactive

GetDefinedShipmentStatuses()

Gets the defined shipment statuses.

Declaration
public static IEnumerable<string> GetDefinedShipmentStatuses()
Returns
Type Description
System.Collections.Generic.IEnumerable<System.String>

GetHandoffLocationFromAddressName(String)

Matches an address name to the available pickup warehouses and returns the match (if any)

Declaration
public static IWarehouse GetHandoffLocationFromAddressName(string addrName)
Parameters
Type Name Description
System.String addrName
Returns
Type Description
IWarehouse

The matching IWarehouse, or null if there is no match

Remarks

Will return a warehouse match even if it is inactive

GetShipments(SearchParameters, SearchOptions, out Int32)

Return shipments by paging.

Declaration
public static DataTable GetShipments(SearchParameters searchParameters, SearchOptions searchOptions, out int totalRecords)
Parameters
Type Name Description
SearchParameters searchParameters
SearchOptions searchOptions
System.Int32 totalRecords
Returns
Type Description
System.Data.DataTable

GetShippingMethod(Guid)

Returns active shippping method by shipping method id.

Declaration
public static ShippingMethodDto GetShippingMethod(Guid shippingMethodId)
Parameters
Type Name Description
System.Guid shippingMethodId

The shipping method id.

Returns
Type Description
ShippingMethodDto

GetShippingMethod(Guid, Boolean)

Returns shippping method by shipping method id.

Declaration
public static ShippingMethodDto GetShippingMethod(Guid shippingMethodId, bool returnInactive)
Parameters
Type Name Description
System.Guid shippingMethodId

The shipping method id.

System.Boolean returnInactive

If true, return inactive shipping methods

Returns
Type Description
ShippingMethodDto

GetShippingMethodCases(Guid)

Returns shippping method cases by shipping method id.

Declaration
public static DataTable GetShippingMethodCases(Guid shippingMethodId)
Parameters
Type Name Description
System.Guid shippingMethodId
Returns
Type Description
System.Data.DataTable

GetShippingMethodCases(Guid, String, String, String, String, String, String, Nullable<Decimal>)

Returns shippping method cases by shipping method id.

Declaration
public static DataTable GetShippingMethodCases(Guid shippingMethodId, string countryCode, string stateProvinceCode, string zipPostalCode, string district, string county, string city, decimal? total)
Parameters
Type Name Description
System.Guid shippingMethodId
System.String countryCode
System.String stateProvinceCode
System.String zipPostalCode
System.String district
System.String county
System.String city
System.Nullable<System.Decimal> total
Returns
Type Description
System.Data.DataTable

GetShippingMethods(String)

Returns list of active shipping methods.

Declaration
public static ShippingMethodDto GetShippingMethods(string languageid)
Parameters
Type Name Description
System.String languageid

The languageid.

Returns
Type Description
ShippingMethodDto

GetShippingMethods(String, Boolean)

Gets the shipping methods.

Declaration
public static ShippingMethodDto GetShippingMethods(string languageid, bool returnInactive)
Parameters
Type Name Description
System.String languageid

The languageid.

System.Boolean returnInactive

if set to true [return inactive].

Returns
Type Description
ShippingMethodDto

GetShippingMethodsByMarket(String, Boolean)

Gets all the shipping methods that are available for a Market.

Declaration
public static ShippingMethodDto GetShippingMethodsByMarket(string marketid, bool returnInactive)
Parameters
Type Name Description
System.String marketid

The Market ID.

System.Boolean returnInactive

if set to true [return inactive].

Returns
Type Description
ShippingMethodDto
Remarks

Note that shipping methods are not directly associated to Markets. We use language as a proxy by checking all languages that are available to the passed Market. This is likely to change in a future pass.

GetShippingOption(Guid)

Returns shippping option by shipping option id.

Declaration
public static ShippingMethodDto GetShippingOption(Guid shippingOptionId)
Parameters
Type Name Description
System.Guid shippingOptionId

The shipping option id.

Returns
Type Description
ShippingMethodDto

GetShippingOption(Guid, Boolean)

Returns shippping option by shipping option id.

Declaration
public static ShippingMethodDto GetShippingOption(Guid shippingOptionId, bool returnInactive)
Parameters
Type Name Description
System.Guid shippingOptionId

The shipping option id.

System.Boolean returnInactive

If true, return inactive shipping methods based on specified ShippingOption

Returns
Type Description
ShippingMethodDto

GetShippingPackage(Int32)

Returns shippping package by packageId.

Declaration
public static ShippingMethodDto GetShippingPackage(int packageId)
Parameters
Type Name Description
System.Int32 packageId

The packageId.

Returns
Type Description
ShippingMethodDto

GetShippingPackage(String)

Returns shippping package by package name.

Declaration
public static ShippingMethodDto GetShippingPackage(string name)
Parameters
Type Name Description
System.String name

The package name.

Returns
Type Description
ShippingMethodDto

GetShippingPackageIdByName(String)

Gets the ShippingPackage id by name.

Declaration
public static int GetShippingPackageIdByName(string name)
Parameters
Type Name Description
System.String name
Returns
Type Description
System.Int32

GetShippingPackages()

Returns shippping package by shipping option id.

Declaration
public static ShippingMethodDto GetShippingPackages()
Returns
Type Description
ShippingMethodDto

IsHandoffShippingMethod(String)

Checks a shipping method name to see if it matches one of the (predefined) pickup shipping methods

Declaration
public static bool IsHandoffShippingMethod(string shippingMethodName)
Parameters
Type Name Description
System.String shippingMethodName
Returns
Type Description
System.Boolean

SavePackage(ShippingMethodDto)

Saves the package.

Declaration
public static void SavePackage(ShippingMethodDto dto)
Parameters
Type Name Description
ShippingMethodDto dto

The dto.

SaveShipping(ShippingMethodDto)

Saves the shipping.

Declaration
public static void SaveShipping(ShippingMethodDto dto)
Parameters
Type Name Description
ShippingMethodDto dto

The dto.