* * @since 0.1.0 */ public function find_by_order_intent_id( int $order_intent_id ): array; /** * Find by idempotency key. * * @param string $key Idempotency key. * * @since 0.1.0 */ public function find_by_idempotency_key( string $key ): ?TransactionIntent; /** * Find by gateway intent id. * * @param string $gateway Gateway key. * @param string $gateway_intent_id Provider id. * * @since 0.1.0 */ public function find_by_gateway_intent_id( string $gateway, string $gateway_intent_id ): ?TransactionIntent; /** * Persist the entity. * * @param TransactionIntent $intent Entity. * * @since 0.1.0 */ public function save( TransactionIntent $intent ): void; /** * Delete all transaction intents for an order intent. * * @param int $order_intent_id Parent intent id. * * @since 0.1.0 */ public function delete_for_order_intent( int $order_intent_id ): void; }