One Logo Pool Ball
FinanceKit · IOS API REFERENCE

TransactionQuery

struct · iOS 17.4+ · SDK 27.1

struct TransactionQuery

A structure that describes the parameters to use for a transaction query. Use a `TransactionQuery` to find and filter transactions in a person's accounts.

Members (4)

init · iOS 17.4+

init

TypeScript
static init(sortDescriptors?: Array<_Foundation_SortDescriptor<Transaction>>, predicate?: (_Foundation_Predicate<Transaction>) | null, limit?: (number) | null, offset?: (number) | null): TransactionQuery
Swift declaration
init(sortDescriptors: [SortDescriptor<Transaction>] = [], predicate: Predicate<Transaction>? = nil, limit: Int? = nil, offset: Int? = nil)

Creates a new transaction query with the provided sort descriptors, predicate, and limit on the number of records the query should return. - parameters: - sortDescriptors: An array of ``Transaction`` sort descriptors. - predicate: A <doc://com.apple.documentation/documentation/foundation/predicate> to filter the `Transaction` records with. - limit: An integer that indicates the maximum number of `Transaction` records to return. - offset: An integer that indicates the number of records to offset the result by.

static · iOS 17.4+

predicate

TypeScript
static predicateForTransactionTypes(transactionTypes: Array<TransactionType>): _Foundation_Predicate<Transaction>
Swift declaration
static func predicate(forTransactionTypes transactionTypes: [TransactionType]) -> Predicate<Transaction>

Returns a predicate that matches any of the provided transaction types. - Parameter transactionTypes: Transaction types to match against.

static · iOS 17.4+

predicate

TypeScript
static predicateForStatuses(statuses: Array<TransactionStatus>): _Foundation_Predicate<Transaction>
Swift declaration
static func predicate(forStatuses statuses: [TransactionStatus]) -> Predicate<Transaction>

Returns a predicate that matches any of the provided transaction statuses. - Parameter statuses: Transaction statuses to match against.

static · iOS 17.4+

predicate

TypeScript
static predicateForMerchantCategoryCodes(merchantCategoryCodes: Array<MerchantCategoryCode>): _Foundation_Predicate<Transaction>
Swift declaration
static func predicate(forMerchantCategoryCodes merchantCategoryCodes: [MerchantCategoryCode]) -> Predicate<Transaction>

A predicate that returns transactions that match any of the provided merchant category codes. - Parameter merchantCategoryCodes: Merchant category codes to match against.

Skipped declarations

No declarations were skipped in this snapshot.

All FinanceKit types →