Overview

Namespaces

  • Ctct
    • Auth
    • Components
      • Account
      • Activities
      • Contacts
      • EmailMarketing
      • Tracking
    • Exceptions
    • Services
  • PHP

Classes

  • AccountService
  • ActivityService
  • BaseService
  • CampaignScheduleService
  • CampaignTrackingService
  • ContactService
  • ContactTrackingService
  • EmailMarketingService
  • ListService
  • Overview
  • Namespace
  • Class
  • Tree
 1: <?php
 2: namespace Ctct\Services;
 3: 
 4: use Ctct\Util\RestClient;
 5: use Ctct\Util\Config;
 6: use Ctct\Components\Account\VerifiedEmailAddress;
 7: 
 8: /**
 9:  * Performs all actions pertaining to scheduling Constant Contact Account's
10:  *
11:  * @package Services
12:  * @author Constant Contact
13:  */
14: class AccountService extends BaseService
15: {
16:     /**
17:      * Get all verified email addresses associated with an account
18:      * @param string $accessToken - Constant Contact OAuth2 Access Token
19:      * @param array $params - array of query parameters/values to append to the request
20:      * @return array of VerifiedEmailAddress 
21:      */
22:     public function getVerifiedEmailAddresses($accessToken, Array $params)
23:     {
24:         $baseUrl = Config::get('endpoints.base_url')
25:             . sprintf(Config::get('endpoints.account_verified_addresses'));
26: 
27:         $url = $this->buildUrl($baseUrl, $params);
28:         $response = parent::getRestClient()->get($url, parent::getHeaders($accessToken));
29:         $verifiedAddresses = array();
30:         
31:         foreach (json_decode($response->body, true) as $verifiedAddress) {
32:             $verifiedAddresses[] = VerifiedEmailAddress::create($verifiedAddress);
33:         }
34:         
35:         return $verifiedAddresses;
36:     }
37: }
38: 
Appconnect PHP SDK API documentation generated by ApiGen 2.8.0