Webiant Logo Webiant Logo
  1. No results found.

    Try your search with a different keyword or use * as a wildcard.

IOrderService.cs

using Nop.Core;
using Nop.Core.Domain.Catalog;
using Nop.Core.Domain.Orders;

namespace Nop.Services.Orders;

/// 
/// Order service interface
/// 
public partial interface IOrderService
{
    #region Orders

    /// 
    /// Gets an order
    /// 
    /// The order identifier
    /// 
    /// A task that represents the asynchronous operation
    /// The task result contains the order
    /// 
    Task GetOrderByIdAsync(int orderId);

    /// 
    /// Gets an order
    /// 
    /// The custom order number
    /// 
    /// A task that represents the asynchronous operation
    /// The task result contains the order
    /// 
    Task GetOrderByCustomOrderNumberAsync(string customOrderNumber);

    /// 
    /// Gets an order by order item identifier
    /// 
    /// The order item identifier
    /// 
    /// A task that represents the asynchronous operation
    /// The task result contains the order
    /// 
    Task GetOrderByOrderItemAsync(int orderItemId);

    /// 
    /// Get orders by identifiers
    /// 
    /// Order identifiers
    /// 
    /// A task that represents the asynchronous operation
    /// The task result contains the order
    /// 
    Task> GetOrdersByIdsAsync(int[] orderIds);

    /// 
    /// Get orders by guids
    /// 
    /// Order guids
    /// 
    /// A task that represents the asynchronous operation
    /// The task result contains the orders
    /// 
    Task> GetOrdersByGuidsAsync(Guid[] orderGuids);

    /// 
    /// Gets an order
    /// 
    /// The order identifier
    /// 
    /// A task that represents the asynchronous operation
    /// The task result contains the order
    /// 
    Task GetOrderByGuidAsync(Guid orderGuid);

    /// 
    /// Deletes an order
    /// 
    /// The order
    /// A task that represents the asynchronous operation
    Task DeleteOrderAsync(Order order);

    /// 
    /// Search orders
    /// 
    /// Store identifier; null to load all orders
    /// Vendor identifier; null to load all orders
    /// Customer identifier; null to load all orders
    /// Product identifier which was purchased in an order; 0 to load all orders
    /// Affiliate identifier; 0 to load all orders
    /// Billing country identifier; 0 to load all orders
    /// Warehouse identifier, only orders with products from a specified warehouse will be loaded; 0 to load all orders
    /// Payment method system name; null to load all records
    /// Created date from (UTC); null to load all records
    /// Created date to (UTC); null to load all records
    /// Order status identifiers; null to load all orders
    /// Payment status identifiers; null to load all orders
    /// Shipping status identifiers; null to load all orders
    /// Billing phone. Leave empty to load all records.
    /// Billing email. Leave empty to load all records.
    /// Billing last name. Leave empty to load all records.
    /// Search in order notes. Leave empty to load all records.
    /// Page index
    /// Page size
    /// A value in indicating whether you want to load only total number of records. Set to "true" if you don't want to load data from database
    /// 
    /// A task that represents the asynchronous operation
    /// The task result contains the orders
    /// 
    Task> SearchOrdersAsync(int storeId = 0,
        int vendorId = 0, int customerId = 0,
        int productId = 0, int affiliateId = 0, int warehouseId = 0,
        int billingCountryId = 0, string paymentMethodSystemName = null,
        DateTime? createdFromUtc = null, DateTime? createdToUtc = null,
        List osIds = null, List psIds = null, List ssIds = null,
        string billingPhone = null, string billingEmail = null, string billingLastName = "",
        string orderNotes = null, int pageIndex = 0, int pageSize = int.MaxValue, bool getOnlyTotalCount = false);

    /// 
    /// Inserts an order
    /// 
    /// Order
    /// A task that represents the asynchronous operation
    Task InsertOrderAsync(Order order);

    /// 
    /// Updates the order
    /// 
    /// The order
    /// A task that represents the asynchronous operation
    Task UpdateOrderAsync(Order order);

    /// 
    /// Parse tax rates
    /// 
    /// Order
    /// 
    /// Rates
    SortedDictionary ParseTaxRates(Order order, string taxRatesStr);

    /// 
    /// Gets a value indicating whether an order has items to be added to a shipment
    /// 
    /// Order
    /// 
    /// A task that represents the asynchronous operation
    /// The task result contains a value indicating whether an order has items to be added to a shipment
    /// 
    Task HasItemsToAddToShipmentAsync(Order order);

    /// 
    /// Gets a value indicating whether an order has items to ship
    /// 
    /// Order
    /// 
    /// A task that represents the asynchronous operation
    /// The task result contains a value indicating whether an order has items to ship
    /// 
    Task HasItemsToShipAsync(Order order);

    /// 
    /// Gets a value indicating whether there are shipment items to mark as 'ready for pickup' in order shipments.
    /// 
    /// Order
    /// 
    /// A task that represents the asynchronous operation
    /// The task result contains a value indicating whether there are shipment items to mark as 'ready for pickup' in order shipments.
    /// 
    Task HasItemsToReadyForPickupAsync(Order order);

    /// 
    /// Gets a value indicating whether an order has items to deliver
    /// 
    /// Order
    /// 
    /// A task that represents the asynchronous operation
    /// The task result contains a value indicating whether an order has items to deliver
    /// 
    Task HasItemsToDeliverAsync(Order order);

    #endregion

    #region Orders items

    /// 
    /// Gets an order item
    /// 
    /// Order item identifier
    /// 
    /// A task that represents the asynchronous operation
    /// The task result contains the order item
    /// 
    Task GetOrderItemByIdAsync(int orderItemId);

    /// 
    /// Gets a product of specify order item
    /// 
    /// Order item identifier
    /// 
    /// A task that represents the asynchronous operation
    /// The task result contains the product
    /// 
    Task GetProductByOrderItemIdAsync(int orderItemId);

    /// 
    /// Gets a list items of order
    /// 
    /// Order identifier
    /// Value indicating whether this product is returnable; pass null to ignore
    /// Value indicating whether the entity is ship enabled; pass null to ignore
    /// Vendor identifier; pass 0 to ignore
    /// 
    /// A task that represents the asynchronous operation
    /// The task result contains the result
    /// 
    Task> GetOrderItemsAsync(int orderId, bool? isNotReturnable = null, bool? isShipEnabled = null, int vendorId = 0);

    /// 
    /// Gets an order item
    /// 
    /// Order item identifier
    /// 
    /// A task that represents the asynchronous operation
    /// The task result contains the order item
    /// 
    Task GetOrderItemByGuidAsync(Guid orderItemGuid);

    /// 
    /// Gets all downloadable order items
    /// 
    /// Customer identifier; null to load all records
    /// 
    /// A task that represents the asynchronous operation
    /// The task result contains the order items
    /// 
    Task> GetDownloadableOrderItemsAsync(int customerId);

    /// 
    /// Delete an order item
    /// 
    /// The order item
    /// A task that represents the asynchronous operation
    Task DeleteOrderItemAsync(OrderItem orderItem);

    /// 
    /// Gets a total number of items in all shipments
    /// 
    /// Order item
    /// 
    /// A task that represents the asynchronous operation
    /// The task result contains the total number of items in all shipments
    /// 
    Task GetTotalNumberOfItemsInAllShipmentsAsync(OrderItem orderItem);

    /// 
    /// Gets a total number of already items which can be added to new shipments
    /// 
    /// Order item
    /// 
    /// A task that represents the asynchronous operation
    /// The task result contains the total number of already delivered items which can be added to new shipments
    /// 
    Task GetTotalNumberOfItemsCanBeAddedToShipmentAsync(OrderItem orderItem);

    /// 
    /// Gets a value indicating whether download is allowed
    /// 
    /// Order item to check
    /// 
    /// A task that represents the asynchronous operation
    /// The task result contains the true if download is allowed; otherwise, false.
    /// 
    Task IsDownloadAllowedAsync(OrderItem orderItem);

    /// 
    /// Gets a value indicating whether license download is allowed
    /// 
    /// Order item to check
    /// 
    /// A task that represents the asynchronous operation
    /// The task result contains the true if license download is allowed; otherwise, false.
    /// 
    Task IsLicenseDownloadAllowedAsync(OrderItem orderItem);

    /// 
    /// Inserts a order item
    /// 
    /// Order item
    /// A task that represents the asynchronous operation
    Task InsertOrderItemAsync(OrderItem orderItem);

    /// 
    /// Updates a order item
    /// 
    /// Order item
    /// A task that represents the asynchronous operation
    Task UpdateOrderItemAsync(OrderItem orderItem);

    #endregion

    #region Order notes

    /// 
    /// Gets an order note
    /// 
    /// The order note identifier
    /// 
    /// A task that represents the asynchronous operation
    /// The task result contains the order note
    /// 
    Task GetOrderNoteByIdAsync(int orderNoteId);

    /// 
    /// Gets a list notes of order
    /// 
    /// Order identifier
    /// Value indicating whether a customer can see a note; pass null to ignore
    /// 
    /// A task that represents the asynchronous operation
    /// The task result contains the result
    /// 
    Task> GetOrderNotesByOrderIdAsync(int orderId, bool? displayToCustomer = null);

    /// 
    /// Deletes an order note
    /// 
    /// The order note
    /// A task that represents the asynchronous operation
    Task DeleteOrderNoteAsync(OrderNote orderNote);

    /// 
    /// Formats the order note text
    /// 
    /// Order note
    /// Formatted text
    string FormatOrderNoteText(OrderNote orderNote);

    /// 
    /// Inserts an order note
    /// 
    /// The order note
    /// A task that represents the asynchronous operation
    Task InsertOrderNoteAsync(OrderNote orderNote);

    #endregion

    #region Recurring payments

    /// 
    /// Deletes a recurring payment
    /// 
    /// Recurring payment
    /// A task that represents the asynchronous operation
    Task DeleteRecurringPaymentAsync(RecurringPayment recurringPayment);

    /// 
    /// Gets a recurring payment
    /// 
    /// The recurring payment identifier
    /// 
    /// A task that represents the asynchronous operation
    /// The task result contains the recurring payment
    /// 
    Task GetRecurringPaymentByIdAsync(int recurringPaymentId);

    /// 
    /// Inserts a recurring payment
    /// 
    /// Recurring payment
    /// A task that represents the asynchronous operation
    Task InsertRecurringPaymentAsync(RecurringPayment recurringPayment);

    /// 
    /// Updates the recurring payment
    /// 
    /// Recurring payment
    /// A task that represents the asynchronous operation
    Task UpdateRecurringPaymentAsync(RecurringPayment recurringPayment);

    /// 
    /// Search recurring payments
    /// 
    /// The store identifier; 0 to load all records
    /// The customer identifier; 0 to load all records
    /// The initial order identifier; 0 to load all records
    /// Initial order status identifier; null to load all records
    /// Page index
    /// Page size
    /// A value indicating whether to show hidden records
    /// 
    /// A task that represents the asynchronous operation
    /// The task result contains the recurring payments
    /// 
    Task> SearchRecurringPaymentsAsync(int storeId = 0,
        int customerId = 0, int initialOrderId = 0, OrderStatus? initialOrderStatus = null,
        int pageIndex = 0, int pageSize = int.MaxValue, bool showHidden = false);

    #endregion

    #region Recurring payment history

    /// 
    /// Inserts a recurring payment history entry
    /// 
    /// Recurring payment history entry
    /// A task that represents the asynchronous operation
    Task InsertRecurringPaymentHistoryAsync(RecurringPaymentHistory recurringPaymentHistory);

    /// 
    /// Gets a recurring payment history
    /// 
    /// The recurring payment
    /// 
    /// A task that represents the asynchronous operation
    /// The task result contains the result
    /// 
    Task> GetRecurringPaymentHistoryAsync(RecurringPayment recurringPayment);

    #endregion
}