Shipping domain model
This section describes the domain model that represents shipping objects where the following three assertions hold true:
-
The domain model primarily serves as DTO objects for transferring information between the external commerce system and Sitecore.
-
The domain model contains the minimum required information as contracts and will typically be extended when integrated with a specific commerce system.
-
The domain model is used when a Sitecore developer needs to retrieve shipping data with the external commerce system.
The following class diagram shows the domain model.
The domain model consists of abstract classes that make up the contracts with the external system. The contracts are defined as abstract classes instead of interfaces to allow the model to be easily extended later if needed. This follows the best practice guidelines defined in the Framework Design Guidelines.
Default implementation of the contracts are delivered as part of Connect. If an actual Connect provider with an external commerce system contains more functionality than that provided by default, the implementation can be replaced. All instantiation of actual classes will be handled through dependency injection.
Class: ShippingMethod
The ShippingMethod class is responsible for representing a type of shipping option, for example, FedEx is a ShipToAddress type option.
|
Name |
Type |
Description |
|---|---|---|
|
ExternalId |
String |
Unique identifier for the shipment method in the commerce system. |
|
Description |
String |
A description of the shipment method. |
|
Name |
String |
The name of the shipment method. |
|
Shipping OptionId |
String |
The shipment option associated with this shipment method. |
|
ShopName |
String |
The shop name if any associated with this shipment method. |
Class: ShippingMethodPerItem
The ShippingMethodPerItem class is used to return the valid shipping options on a per cart line item basis.
|
Name |
Type |
Description |
|---|---|---|
|
LineId |
String |
The line item identifier. |
|
ShippingMethods |
List<ShippingMethod> |
The list of allowable shipping methods for the line item. |
Class: ShippingOptionType
The ShippingOptionType class is a virtual enum class that is responsible for representing known shipping option types, for example, pick up from store, electronic delivery, and so on.
|
Name |
Type |
Description |
|---|---|---|
|
None |
ShippingOptionType |
An unassigned shipping option. |
|
ElectronicDelivery |
ShippingOptionType |
Downloadable content. |
|
PickupFromStore |
ShippingOptionType |
Buy on the site and pick from a specific store. |
|
ShipToAddress |
ShippingOptionType |
Ship to a physical address. |
Class: ShippingOption
The ShippingOption class is responsible for representing different shipping option types, for example, ShipToAddress.
|
Name |
Type |
Description |
|---|---|---|
|
ExternalId |
String |
Unique identifier for the shipping option in the commerce system. |
|
Description |
String |
A description of the shipping option. |
|
Name |
String |
Name of the shipping option. |
|
ShopName |
String |
The shop name, if any, associated with the shipping option. |
Class: LineShippingOption
The LineShippingOption class is used to hold shipping information for a particular line item.
|
Name |
Type |
Description |
|---|---|---|
|
LineId |
String |
The ID of the line item this is associated to. |
|
ShippingOptions |
List<ShippingOption> |
The shipping options associated to this line item. |
Class: ShippingLookup
The ShippingLookup class is used to hold the information required to look up shipping prices for a collection of line items.
|
Name |
Type |
Description |
|---|---|---|
|
OptionId |
String |
The ID of the desired shipping option. |
|
MethodId |
String |
The ID of the desired shipping method. |
|
LineItemIds |
List<string> |
The collection of line item IDs to look up the shipping costs for. |
Class: ShippingPrice
The ShippingPrice class inherits from the Price object and is used to hold the pricing information for a shipping option, method, and list of line items.
|
Name |
Type |
Description |
|---|---|---|
|
OptionId |
String |
The ID of the shipping option. |
|
MethodId |
String |
The ID of the shipping method. |
|
LineItemIds |
List<string> |
The collection of line item IDs that the price is for. |
