ScheduledTransactionService
public struct ScheduledTransactionService
Provides access to scheduled transaction operations
-
scheduledTransaction(budgetId:
AsynchronoustransactionId: ) Returns a single scheduled transaction for a budget.
Declaration
Swift
public func scheduledTransaction( budgetId: String, transactionId: String ) async throws -> ScheduledTransactionDetail
Parameters
budgetId
The id of the budget (last_used can also be used to specify the last used budget).
transactionId
Id of the transaction.
Return Value
A single scheduled transaction
-
Returns all scheduled transactions for a budget.
Declaration
Swift
public func scheduledTransactions( budgetId: String, lastKnowledgeOfServer: ServerKnowledge? = nil ) async throws -> ([ScheduledTransactionDetail], ServerKnowledge)
Parameters
budgetId
The id of the budget (last_used can also be used to specify the last used budget).
lastKnowledgeOfServer
The starting server knowledge. If provided, only entities that have changed since
lastKnowledgeOfServer
will be included.Return Value
A tuple containing a list of scheduled transactions and server knowledge
-
createScheduledTransaction(budgetId:
Asynchronoustransaction: ) Creates a new scheduled transaction.
Declaration
Swift
public func createScheduledTransaction( budgetId: String, transaction: SaveScheduledTransaction ) async throws -> ScheduledTransactionDetail
Parameters
budgetId
The id of the budget (last_used can also be used to specify the last used budget)
transaction
The scheduled transaction data to create
Return Value
The created scheduled transaction
-
Updates an existing scheduled transaction.
Declaration
Swift
public func updateScheduledTransaction( budgetId: String, transactionId _: String, transaction: SaveScheduledTransaction ) async throws -> ScheduledTransactionDetail
Parameters
budgetId
The id of the budget (last_used can also be used to specify the last used budget)
transactionId
The id of the scheduled transaction to update
transaction
The updated scheduled transaction data
Return Value
The updated scheduled transaction
-
deleteScheduledTransaction(budgetId:
AsynchronoustransactionId: ) Deletes a scheduled transaction.
Declaration
Swift
public func deleteScheduledTransaction( budgetId: String, transactionId: String ) async throws -> ScheduledTransactionDetail
Parameters
budgetId
The id of the budget (last_used can also be used to specify the last used budget)
transactionId
The id of the scheduled transaction to delete
Return Value
The deleted scheduled transaction