| 1 |
<?php |
| 2 |
|
| 3 |
namespace Texty\Gateways; |
| 4 |
|
| 5 |
interface GatewayInterface { |
| 6 |
|
| 7 |
/** |
| 8 |
* Send a text |
| 9 |
* |
| 10 |
* @param string $to |
| 11 |
* @param string $message |
| 12 |
* |
| 13 |
* @return mixed |
| 14 |
*/ |
| 15 |
public function send( $to, $message ); |
| 16 |
|
| 17 |
/** |
| 18 |
* Returns URL to the logo |
| 19 |
* |
| 20 |
* @return string |
| 21 |
*/ |
| 22 |
public function logo(); |
| 23 |
|
| 24 |
/** |
| 25 |
* Get the gateway name |
| 26 |
* |
| 27 |
* @return string |
| 28 |
*/ |
| 29 |
public function name(); |
| 30 |
|
| 31 |
/** |
| 32 |
* Get the gateway description |
| 33 |
* |
| 34 |
* @return string |
| 35 |
*/ |
| 36 |
public function description(); |
| 37 |
|
| 38 |
/** |
| 39 |
* Get gateway credential |
| 40 |
* |
| 41 |
* @return array |
| 42 |
*/ |
| 43 |
public function get_settings(); |
| 44 |
|
| 45 |
/** |
| 46 |
* Validate a REST API request |
| 47 |
* |
| 48 |
* @param WP_REST_Request $request |
| 49 |
* |
| 50 |
* @return WP_Error|true |
| 51 |
*/ |
| 52 |
public function validate( $request ); |
| 53 |
} |
| 54 |
|