Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | n/a |
0 / 0 |
n/a |
0 / 0 |
CRAP | n/a |
0 / 0 |
|||
| 1 | <?php |
| 2 | /** |
| 3 | * Functions implemented by Background_Jobs class, used by API class and others to schedule jobs. |
| 4 | * |
| 5 | * @package brianhenryie/bh-wp-bitcoin-gateway |
| 6 | */ |
| 7 | |
| 8 | namespace BrianHenryIE\WP_Bitcoin_Gateway\Action_Scheduler; |
| 9 | |
| 10 | use BrianHenryIE\WP_Bitcoin_Gateway\API\Model\Wallet\Bitcoin_Wallet; |
| 11 | use DateTimeInterface; |
| 12 | |
| 13 | interface Background_Jobs_Scheduler_Interface { |
| 14 | /** |
| 15 | * Schedule a recurring job to ensure there are unused addresses available for orders. |
| 16 | */ |
| 17 | public function schedule_recurring_ensure_unused_addresses(): void; |
| 18 | |
| 19 | /** |
| 20 | * Schedule a single job to ensure unused addresses for a specific wallet. |
| 21 | * |
| 22 | * @param Bitcoin_Wallet $wallet The wallet to check. |
| 23 | */ |
| 24 | public function schedule_single_ensure_unused_addresses( Bitcoin_Wallet $wallet ): void; |
| 25 | |
| 26 | /** |
| 27 | * Schedule a single job to check assigned addresses for transactions. |
| 28 | * |
| 29 | * @param ?DateTimeInterface $date_time Optional datetime to schedule the job. |
| 30 | */ |
| 31 | public function schedule_single_check_assigned_addresses_for_transactions( ?DateTimeInterface $date_time = null ): void; |
| 32 | |
| 33 | /** |
| 34 | * Schedule a job to generate new addresses. |
| 35 | */ |
| 36 | #[\Deprecated( message: 'In favour of ensure-unused-addresses functions.' )] |
| 37 | public function schedule_generate_new_addresses(): void; |
| 38 | |
| 39 | /** |
| 40 | * Schedule a job to check newly generated Bitcoin addresses for transactions. |
| 41 | * |
| 42 | * @param ?DateTimeInterface $datetime Optional datetime to schedule the job. |
| 43 | */ |
| 44 | public function schedule_check_newly_generated_bitcoin_addresses_for_transactions( ?DateTimeInterface $datetime = null ): void; |
| 45 | |
| 46 | /** |
| 47 | * Schedule a recurring job to update the exchange rate. |
| 48 | */ |
| 49 | public function schedule_recurring_update_exchange_rate(): void; |
| 50 | } |