File tree Expand file tree Collapse file tree 2 files changed +0
-25
lines changed
Yosemite/Yosemite/PointOfSale Expand file tree Collapse file tree 2 files changed +0
-25
lines changed Original file line number Diff line number Diff line change @@ -100,30 +100,6 @@ public final class PointOfSaleItemService: PointOfSaleItemServiceProtocol {
100100 }
101101 }
102102
103- public func providePointOfSaleCoupons( ) throws -> PagedItems < POSItem > {
104- guard let storage = storage else {
105- throw PointOfSaleItemServiceError . storageFailure
106- }
107- let predicate = NSPredicate ( format: " siteID == %lld " , siteID)
108- let descriptor = NSSortDescriptor ( keyPath: \StorageCoupon . dateCreated,
109- ascending: false )
110-
111- let resultsController = ResultsController < StorageCoupon > ( storageManager: storage,
112- matching: predicate,
113- sortedBy: [ descriptor] )
114-
115- try resultsController. performFetch ( )
116- let storeCoupons = resultsController. fetchedObjects
117- let posCoupons = mapCouponsToPOSItems ( coupons: storeCoupons)
118- return . init( items: posCoupons, hasMorePages: false )
119- }
120-
121- private func mapCouponsToPOSItems( coupons: [ Coupon ] ) -> [ POSItem ] {
122- coupons. compactMap { coupon in
123- . coupon( POSCoupon ( id: UUID ( ) , couponID: coupon. couponID) )
124- }
125- }
126-
127103 // Maps result to POSItem, and populate the output with:
128104 // - Formatted price based on store's currency settings.
129105 // - Product thumbnail, if any.
Original file line number Diff line number Diff line change @@ -58,7 +58,6 @@ public extension Sequence where Element == POSOrderableItem {
5858public protocol PointOfSaleItemServiceProtocol {
5959 func providePointOfSaleItems( pageNumber: Int ) async throws -> PagedItems < POSItem >
6060 func providePointOfSaleVariationItems( for parentProduct: POSVariableParentProduct , pageNumber: Int ) async throws -> PagedItems < POSItem >
61- func providePointOfSaleCoupons( ) throws -> PagedItems < POSItem >
6261}
6362
6463// Default implementation for convenience, so we do not need to pass the first page explicitly
You can’t perform that action at this time.
0 commit comments