ShipmentInfoDataStore
public protocol ShipmentInfoDataStore
Interface for saving, loading and deleting address
sourcery: StreamWrapped
-
Set the selectedShipmentInfoId. The selected values of
ShipmentInfo
are published throughselectedShipmentInfo
Declaration
Swift
func set(selectedShipmentInfoId: UUID)
Parameters
selectedShipmentInfoId
Identifier of the
ShipmentInfo
to be selected -
Returns the selected
ShipmentInfo
if any has been selected. Returnsnil
if nothing was selectedDeclaration
Swift
var selectedShipmentInfo: AnyPublisher<ShipmentInfo?, LocalStoreError> { get }
-
Fetches a
ShipmentInfo
by it’s identifierDeclaration
Swift
func fetchShipmentInfo(by identifier: UUID) -> AnyPublisher<ShipmentInfo?, LocalStoreError>
Parameters
identifier
Identifier of the
ShipmentInfo
to fetch -
List all
ShipmentInfo
s contained in the storeDeclaration
Swift
func listAllShipmentInfos() -> AnyPublisher<[ShipmentInfo], LocalStoreError>
-
Creates or updates a sequence of
ShipmentInfo
into the store. Updates if the identifier does already exist in store, otherwise creates a new instance.sourcery: SkipStreamWrapped
Declaration
Swift
func save(shipmentInfos: [ShipmentInfo]) -> AnyPublisher<[ShipmentInfo], LocalStoreError>
Parameters
shipmentInfos
Array of
ShipmentInfo
to be saved -
Deletes a sequence of
ShipmentInfo
from the store with the related identifiersourcery: SkipStreamWrapped
Declaration
Swift
func delete(shipmentInfos: [ShipmentInfo]) -> AnyPublisher<[ShipmentInfo], LocalStoreError>
Parameters
shipmentInfos
Array of
ShipmentInfo
to be deleted -
Updates a
ShipmentInfo
sourcery: SkipStreamWrapped
Declaration
Swift
func update( identifier: UUID, mutating: @escaping (inout ShipmentInfo) -> Void ) -> AnyPublisher<ShipmentInfo, LocalStoreError>
Parameters
identifier
Identifier of the
ShipmentInfo
to updatemutating
Closure with the actual
ShipmentInfo
to be updated -
save(shipmentInfo:
Extension method) Creates or updates a
ShipmentInfo
into the store. Updates if the identifier does already exist in storesourcery: SkipStreamWrapped
Declaration
Swift
public func save(shipmentInfo: ShipmentInfo) -> AnyPublisher<ShipmentInfo?, LocalStoreError>
Parameters
shipmentInfo
Instance of
ShipmentInfo
to be saved -
delete(shipmentInfo:
Extension method) Deletes a
ShipmentInfo
into from the store with the related identifiersourcery: SkipStreamWrapped
Declaration
Swift
public func delete(shipmentInfo: ShipmentInfo) -> AnyPublisher<ShipmentInfo?, LocalStoreError>
Parameters
shipmentInfo
Instance of
ShipmentInfo
to be deleted