Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
CRAP | |
0.00% |
0 / 1 |
| Update_Exchange_Rate_Result | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 1 |
| __construct | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| 1 | <?php |
| 2 | /** |
| 3 | * Details the requested exchange rate currency and the updated value. |
| 4 | * |
| 5 | * @package brianhenryie/bh-wp-bitcoin-gateway |
| 6 | */ |
| 7 | |
| 8 | namespace BrianHenryIE\WP_Bitcoin_Gateway\API\Model\Results; |
| 9 | |
| 10 | use BrianHenryIE\WP_Bitcoin_Gateway\Action_Scheduler\Background_Jobs_Actions_Handler; |
| 11 | use BrianHenryIE\WP_Bitcoin_Gateway\API\Services\Results\Exchange_Rate_Service_Result; |
| 12 | |
| 13 | /** |
| 14 | * Exchange rate update result model. |
| 15 | * |
| 16 | * @used-by API::update_exchange_rate() |
| 17 | * @see Background_Jobs_Actions_Handler::update_exchange_rate() |
| 18 | */ |
| 19 | readonly class Update_Exchange_Rate_Result extends Exchange_Rate_Service_Result { |
| 20 | |
| 21 | /** |
| 22 | * Constructor |
| 23 | * |
| 24 | * @param string $requested_exchange_rate_currency The currency as string, "USD" etc. |
| 25 | * @param string $source Where the currency to query was determined. |
| 26 | * @param Exchange_Rate_Service_Result $updated_exchange_rate The rate/classname/date/previous from the service. |
| 27 | */ |
| 28 | public function __construct( |
| 29 | public string $requested_exchange_rate_currency, |
| 30 | public string $source, |
| 31 | public Exchange_Rate_Service_Result $updated_exchange_rate, |
| 32 | ) { |
| 33 | parent::__construct( ...(array) $updated_exchange_rate ); |
| 34 | } |
| 35 | } |