add request methods to it's interface
This commit is contained in:
parent
229d961bb8
commit
3338d70562
@ -16,6 +16,7 @@ declare(strict_types=1);
|
||||
namespace D3\LinkmobilityClient\Request;
|
||||
|
||||
use D3\LinkmobilityClient\Client;
|
||||
use D3\LinkmobilityClient\RecipientsList\RecipientsListInterface;
|
||||
use D3\LinkmobilityClient\ValueObject\SmsMessageInterface;
|
||||
use InvalidArgumentException;
|
||||
use Psr\Http\Message\ResponseInterface as PsrResponseInterface;
|
||||
@ -42,9 +43,18 @@ interface RequestInterface
|
||||
public const SENDERADDRESSTYPE_ALPHANUMERIC = 'alphanumeric';
|
||||
public const SENDERADDRESSTYPE_SHORTCODE = 'shortcode';
|
||||
|
||||
/**
|
||||
* @param SmsMessageInterface $message
|
||||
* @param Client $client
|
||||
*/
|
||||
public function __construct(SmsMessageInterface $message, Client $client);
|
||||
|
||||
public function setMethod(string $method);
|
||||
/**
|
||||
* @param string $method
|
||||
*
|
||||
* @return Request
|
||||
*/
|
||||
public function setMethod(string $method): Request;
|
||||
|
||||
/**
|
||||
* Must return the HTTP verb for this request, i.e. GET, POST, PUT
|
||||
@ -53,6 +63,18 @@ interface RequestInterface
|
||||
*/
|
||||
public function getMethod(): string;
|
||||
|
||||
/**
|
||||
* @param bool $test
|
||||
*
|
||||
* @return Request
|
||||
*/
|
||||
public function setTestMode(bool $test): Request;
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
*/
|
||||
public function getTestMode(): bool;
|
||||
|
||||
/**
|
||||
* Must return the URI for the request with a leading slash, i.e. /messages.json
|
||||
*
|
||||
@ -81,6 +103,11 @@ interface RequestInterface
|
||||
*/
|
||||
public function getResponseInstance(PsrResponseInterface $rawResponse): LMResponseInterface;
|
||||
|
||||
/**
|
||||
* @return RecipientsListInterface
|
||||
*/
|
||||
public function getRecipientsList(): RecipientsListInterface;
|
||||
|
||||
/**
|
||||
* Must return the options for this request. If there are none, return [] (empty array)
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user