ScheduledTransactionServiceType

public protocol ScheduledTransactionServiceType : Sendable

Provides access to scheduled transaction operations

  • Returns a single scheduled transaction for a plan.

    Declaration

    Swift

    func scheduledTransaction(
        planId: String,
        transactionId: String
    ) async throws -> ScheduledTransactionDetail

    Parameters

    planId

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

    transactionId

    Id of the transaction.

    Return Value

    A single scheduled transaction

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

    Returns all scheduled transactions for a plan.

    Default Implementation

    Returns all scheduled transactions for a plan, with optional parameters defaulted.

    Declaration

    Swift

    func scheduledTransactions(
        planId: String,
        lastKnowledgeOfServer: ServerKnowledge?
    ) async throws -> ScheduledTransactionsResponse

    Parameters

    planId

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

    lastKnowledgeOfServer

    The starting server knowledge. If provided, only entities that have changed since lastKnowledgeOfServer will be included.

    Return Value

    A list of scheduled transactions and the knowledge of the server

  • Creates a new scheduled transaction.

    Declaration

    Swift

    func createScheduledTransaction(
        planId: String,
        transaction: SaveScheduledTransaction
    ) async throws -> ScheduledTransactionDetail

    Parameters

    planId

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

    transaction

    The scheduled transaction data to create

    Return Value

    The created scheduled transaction

  • Updates an existing scheduled transaction.

    Declaration

    Swift

    func updateScheduledTransaction(
        planId: String,
        transactionId: String,
        transaction: SaveScheduledTransaction
    ) async throws -> ScheduledTransactionDetail

    Parameters

    planId

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

    transactionId

    The id of the scheduled transaction to update

    transaction

    The updated scheduled transaction data

    Return Value

    The updated scheduled transaction

  • Deletes a scheduled transaction.

    Declaration

    Swift

    func deleteScheduledTransaction(
        planId: String,
        transactionId: String
    ) async throws -> ScheduledTransactionDetail

    Parameters

    planId

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

    transactionId

    The id of the scheduled transaction to delete

    Return Value

    The deleted scheduled transaction