ScannedErxTask

public struct ScannedErxTask : Identifiable, Hashable

Represents a scanned eRx task holding the information of its ID and accessCode

  • id

    Id of the task

    Declaration

    Swift

    public let id: String
  • Access code authorizing for the task

    Declaration

    Swift

    public let accessCode: String
  • Initialize with an URL token e.g. “Task/4711/$accept?ac=777bea0e13cc9c42ceec14aec3ddee2263325dc2c6c699db115f58fe423607ea”

    Declaration

    Swift

    public init(taskString: String) throws

    Parameters

    taskString

    URL token string conforming to specification “Datenmodell E-Rezept”

  • Error cases for the ScannedErxTask

    See more

    Declaration

    Swift

    public enum Error : Swift.Error, LocalizedError, Equatable
  • Initialize from an json of (an array of) URL tokens of form {“urls”: [“Task/4711/$accept?ac=777bea0e13cc9c42ceec14aec3ddee2263325dc2c6c699db115f58fe423607ea”]}

    Declaration

    Swift

    public static func from(
        tasks codeContent: String,
        jsonDecoder: JSONDecoder = JSONDecoder()
    ) throws -> [ScannedErxTask]

    Parameters

    tasks

    token of above mentioned form

    Return Value

    Array of ScannedErxTasks parsed from given URLs.