OrderInteractor

public protocol OrderInteractor

Order interactor protocol that can manipulate and do business logic around orders functionality.

  • Data manager used to establish network communication and retrieve data.

    Declaration

    Swift

    var dataManager: DataManagerType
  • Associated order detail type.

    Declaration

    Swift

    associatedtype OrderDetailType: OrderDetail
  • Associated order type.

    Declaration

    Swift

    associatedtype OrderType: Order
  • Order data manager generic type.

    Declaration

    Swift

    associatedtype DataManagerType: OrderDataManager
  • orders(completion:) Default implementation

    Gets all the orders from the order history.

    Parameter

    Parameter completion: The completion block.

    Default Implementation

    Declaration

    Swift

    func orders(completion: @escaping (_ orders: [OrderType], _ error: Swift.Error?) -> Void)

    Parameters

    completion

    The completion block.

  • orderDetail(forOrderId:completion:) Default implementation

    Get the order based on the given id.

    • Parameters:
      • orderId: The order id to use.
      • completion: The completion block.

    Default Implementation

    Declaration

    Swift

    func orderDetail(forOrderId orderId: String,

    Parameters

    orderId

    The order id to use.

    completion

    The completion block.