PayeeService

public struct PayeeService

Provides access to payee operations

  • Creates a single payee.

    Declaration

    Swift

    public func createPayee(
        planId: String,
        payee: SavePayee
    ) async throws -> (Payee, ServerKnowledge)

    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 last server knowledge

  • Returns all payees

    Declaration

    Swift

    public func payees(
        planId: String,
        lastKnowledgeOfServer: ServerKnowledge? = nil
    ) async throws -> ([Payee], ServerKnowledge)

    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 last server knowledge

  • payee(planId:payeeId:) Asynchronous

    Returns a single payee.

    Declaration

    Swift

    public 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)

    lastKnowledgeOfServer

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

    Return Value

    A single payee

  • Updates a single payee.

    Declaration

    Swift

    public func updatePayee(
        planId: String,
        payeeId: String,
        payee: SavePayee
    ) async throws -> (Payee, ServerKnowledge)

    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 last server knowledge