1 <?php
2 namespace OpenDNS\MES\Trident;
3 use OpenDNS\MES\Request as BaseRequest;
4
5 /**
6 * Base abstract for Trident API operations
7 */
8 abstract class Request extends BaseRequest
9 {
10 /** @var string The path to an API's endpoints on the server */
11 protected $apiBasePath = '/mes-api/tridentApi';
12
13 /** @var string Transaction type to send in the request */
14 protected $transactionType;
15
16 public function __construct($environment)
17 {
18 parent::__construct($environment);
19 $this->setField('transaction_type', $this->transactionType);
20 }
21
22 /**
23 * Sets authentication info for the request
24 *
25 * This is required before calling execute()
26 *
27 * @param string $profileId Your MeS Profile ID
28 * @param string $profileKey Your MeS Profile Key
29 * @return self The current class instance for chaining
30 */
31 public function setAuthenticationInfo($profileId, $profileKey)
32 {
33 return $this->setField('profile_id', $profileId)
34 ->setField('profile_key', $profileKey);
35 }
36 }
37