Try your search with a different keyword or use * as a wildcard.
using Nop.Core.Domain.Catalog;
using Nop.Core.Domain.Common;
using Nop.Core.Domain.Customers;
using Nop.Core.Domain.Orders;
using Nop.Core.Domain.Shipping;
using Nop.Services.Shipping.Pickup;
namespace Nop.Services.Shipping;
///
/// Shipping service interface
///
public partial interface IShippingService
{
#region Shipping methods
///
/// Deletes a shipping method
///
/// The shipping method
/// A task that represents the asynchronous operation
Task DeleteShippingMethodAsync(ShippingMethod shippingMethod);
///
/// Gets a shipping method
///
/// The shipping method identifier
///
/// A task that represents the asynchronous operation
/// The task result contains the shipping method
///
Task GetShippingMethodByIdAsync(int shippingMethodId);
///
/// Gets all shipping methods
///
/// The country identifier to filter by
///
/// A task that represents the asynchronous operation
/// The task result contains the shipping methods
///
Task> GetAllShippingMethodsAsync(int? filterByCountryId = null);
///
/// Inserts a shipping method
///
/// Shipping method
/// A task that represents the asynchronous operation
Task InsertShippingMethodAsync(ShippingMethod shippingMethod);
///
/// Updates the shipping method
///
/// Shipping method
/// A task that represents the asynchronous operation
Task UpdateShippingMethodAsync(ShippingMethod shippingMethod);
///
/// Does country restriction exist
///
/// Shipping method
/// Country identifier
///
/// A task that represents the asynchronous operation
/// The task result contains the result
///
Task CountryRestrictionExistsAsync(ShippingMethod shippingMethod, int countryId);
///
/// Gets shipping country mappings
///
/// The shipping method identifier
/// Country identifier
///
/// A task that represents the asynchronous operation
/// The task result contains the shipping country mappings
///
Task> GetShippingMethodCountryMappingAsync(int shippingMethodId, int countryId);
///
/// Inserts a shipping country mapping
///
/// Shipping country mapping
/// A task that represents the asynchronous operation
Task InsertShippingMethodCountryMappingAsync(ShippingMethodCountryMapping shippingMethodCountryMapping);
///
/// Delete the shipping country mapping
///
/// Shipping country mapping
/// A task that represents the asynchronous operation
Task DeleteShippingMethodCountryMappingAsync(ShippingMethodCountryMapping shippingMethodCountryMapping);
#endregion
#region Warehouses
///
/// Deletes a warehouse
///
/// The warehouse
/// A task that represents the asynchronous operation
Task DeleteWarehouseAsync(Warehouse warehouse);
///
/// Gets a warehouse
///
/// The warehouse identifier
///
/// A task that represents the asynchronous operation
/// The task result contains the warehouse
///
Task GetWarehouseByIdAsync(int warehouseId);
///
/// Gets all warehouses
///
/// Warehouse name
///
/// A task that represents the asynchronous operation
/// The task result contains the warehouses
///
Task> GetAllWarehousesAsync(string name = null);
///
/// Inserts a warehouse
///
/// Warehouse
/// A task that represents the asynchronous operation
Task InsertWarehouseAsync(Warehouse warehouse);
///
/// Updates the warehouse
///
/// Warehouse
/// A task that represents the asynchronous operation
Task UpdateWarehouseAsync(Warehouse warehouse);
///
/// Get the nearest warehouse for the specified address
///
/// Address
/// List of warehouses, if null all warehouses are used.
///
/// A task that represents the asynchronous operation
/// The task result contains the
///
Task GetNearestWarehouseAsync(Address address, IList warehouses = null);
#endregion
#region Workflow
///
/// Gets shopping cart item weight (of one item)
///
/// Shopping cart item
/// Whether to ignore the weight of the products marked as "Free shipping"
///
/// A task that represents the asynchronous operation
/// The task result contains the shopping cart item weight
///
Task GetShoppingCartItemWeightAsync(ShoppingCartItem shoppingCartItem, bool ignoreFreeShippedItems = false);
///
/// Gets product item weight (of one item)
///
/// Product
/// Selected product attributes in XML
/// Whether to ignore the weight of the products marked as "Free shipping"
///
/// A task that represents the asynchronous operation
/// The task result contains the item weight
///
Task GetShoppingCartItemWeightAsync(Product product, string attributesXml, bool ignoreFreeShippedItems = false);
///
/// Gets shopping cart weight
///
/// Request
/// A value indicating whether we should calculate weights of selected checkout attributes
/// Whether to ignore the weight of the products marked as "Free shipping"
///
/// A task that represents the asynchronous operation
/// The task result contains the otal weight
///
Task GetTotalWeightAsync(GetShippingOptionRequest request, bool includeCheckoutAttributes = true, bool ignoreFreeShippedItems = false);
///
/// Get total dimensions
///
/// Package items
/// Whether to ignore the weight of the products marked as "Free shipping"
///
/// A task that represents the asynchronous operation
/// The task result contains the width. Length. Height
///
Task<(decimal width, decimal length, decimal height)> GetDimensionsAsync(IList packageItems, bool ignoreFreeShippedItems = false);
///
/// Create shipment packages (requests) from shopping cart
///
/// Shopping cart
/// Shipping address
/// Load records allowed only in a specified store; pass 0 to load all records
///
/// A task that represents the asynchronous operation
/// The task result contains the shipment packages (requests). Value indicating whether shipping is done from multiple locations (warehouses)
///
Task<(IList shipmentPackages, bool shippingFromMultipleLocations)> CreateShippingOptionRequestsAsync(IList cart,
Address shippingAddress, int storeId);
///
/// Gets available shipping options
///
/// Shopping cart
/// Shipping address
/// Load records allowed only to a specified customer; pass null to ignore ACL permissions
/// Filter by shipping rate computation method identifier; null to load shipping options of all shipping rate computation methods
/// Load records allowed only in a specified store; pass 0 to load all records
///
/// A task that represents the asynchronous operation
/// The task result contains the shipping options
///
Task GetShippingOptionsAsync(IList cart, Address shippingAddress,
Customer customer = null, string allowedShippingRateComputationMethodSystemName = "", int storeId = 0);
///
/// Gets available pickup points
///
/// Shopping Cart
/// Address
/// Load records allowed only to a specified customer; pass null to ignore ACL permissions
/// Filter by provider identifier; null to load pickup points of all providers
/// Load records allowed only in a specified store; pass 0 to load all records
///
/// A task that represents the asynchronous operation
/// The task result contains the pickup points
///
Task GetPickupPointsAsync(IList cart, Address address,
Customer customer = null, string providerSystemName = null, int storeId = 0);
///
/// Whether the shopping cart item is ship enabled
///
/// Shopping cart item
///
/// A task that represents the asynchronous operation
/// The task result contains true if the shopping cart item requires shipping; otherwise false
///
Task IsShipEnabledAsync(ShoppingCartItem shoppingCartItem);
///
/// Whether the shopping cart item is free shipping
///
/// Shopping cart item
///
/// A task that represents the asynchronous operation
/// The task result contains true if the shopping cart item is free shipping; otherwise false
///
Task IsFreeShippingAsync(ShoppingCartItem shoppingCartItem);
///
/// Get the additional shipping charge
///
/// Shopping cart item
///
/// A task that represents the asynchronous operation
/// The task result contains the additional shipping charge of the shopping cart item
///
Task GetAdditionalShippingChargeAsync(ShoppingCartItem shoppingCartItem);
#endregion
}