PayeeServiceType

public protocol PayeeServiceType : Sendable

Provides access to payee operations

  • Creates a single payee.

    Declaration

    Swift

    func createPayee(planId: String, payee: SavePayee) async throws -> PayeeResponse

    Parameters

    planId

    The id of the plan (last_used can also be used to specify the last used plan)

    payee

    The payee to create

    Return Value

    A single payee and the knowledge of the server

  • payees(planId:lastKnowledgeOfServer:) Default implementation, asynchronous

    Returns all payees

    Default Implementation

    Returns all payees, with optional parameters defaulted.

    Declaration

    Swift

    func payees(
        planId: String,
        lastKnowledgeOfServer: ServerKnowledge?
    ) async throws -> PayeesResponse

    Parameters

    planId

    The id of the plan (last_used can also be used to specify the last used plan)

    lastKnowledgeOfServer

    If provided, only entities that have changed since lastKnowledgeOfServer will be included.

    Return Value

    A list of payees and the knowledge of the server

  • payee(planId:payeeId:) Asynchronous

    Returns a single payee.

    Declaration

    Swift

    func payee(planId: String, payeeId: String) async throws -> Payee

    Parameters

    planId

    The id of the plan (last_used can also be used to specify the last used plan)

    payeeId

    The id of the payee

    Return Value

    A single payee

  • Updates a single payee.

    Declaration

    Swift

    func updatePayee(
        planId: String,
        payeeId: String,
        payee: SavePayee
    ) async throws -> PayeeResponse

    Parameters

    planId

    The id of the plan (last_used can also be used to specify the last used plan)

    payeeId

    The id of the payee being update

    payee

    The details of the payee that need to be updated

    Return Value

    A single payee and the knowledge of the server