Initializer

init(from:to:transactionAmount:transactionScheduledDate:transactionNote:)

Initializes the intent object with the specified transaction details.

Declaration

init(from fromAccount: INPaymentAccount?, to toAccount: INPaymentAccount?, transactionAmount: INPaymentAmount?, transactionScheduledDate: INDateComponentsRange?, transactionNote: String?)

Parameters

fromAccount

The account containing the funds to be transferred.

toAccount

The account to receive the funds.

transactionAmount

The amount of money to transfer between the accounts. When transferring money between accounts, you typically specify a fixed amount of money to transfer.

transactionScheduledDate

The date on which to transfer the money.

transactionNote

An optional note to include with the transaction.

Return Value

An initialized intent object or nil if the object could not be created.

Discussion

Normally, you do not create instances of this class yourself. Instead, SiriKit creates instances when the user asks to transfer money between accounts. However, you can use this method during testing to create intent objects in order to validate your intent handling code paths.