Overview

Namespaces

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

Classes

  • BounceActivity
  • ClickActivity
  • ForwardActivity
  • OpenActivity
  • SendActivity
  • TrackingActivity
  • TrackingSummary
  • UnsubscribeActivity
  • Overview
  • Namespace
  • Class
  • Tree
 1: <?php
 2: namespace Ctct\Components\Tracking;
 3: 
 4: use Ctct\Components\Component;
 5: 
 6: /**
 7:  * Represents a single Opt Out Activity
 8:  *
 9:  * @package     Components
10:  * @subpackage     CampaignTracking
11:  * @author         Constant Contact
12:  */
13: class UnsubscribeActivity extends Component
14: {
15:     public $activity_type;
16:     public $campaign_id;
17:     public $contact_id;
18:     public $email_address;
19:     public $unsubscribe_date;
20:     public $unsubscribe_source;
21:     public $unsubscribe_reason;
22: 
23:     /**
24:      * Factory method to create an OptOutActivity object from an array
25:      * @param array $props - array of properties to create object from
26:      * @return ClickActivity
27:      */
28:     public static function create(array $props)
29:     {
30:         $opt_out_activity = new UnsubscribeActivity();
31:         $opt_out_activity->activity_type = parent::getValue($props, "activity_type");
32:         $opt_out_activity->unsubscribe_date = parent::getValue($props, "unsubscribe_date");
33:         $opt_out_activity->unsubscribe_source = parent::getValue($props, "unsubscribe_source");
34:         $opt_out_activity->unsubscribe_reason = parent::getValue($props, "unsubscribe_reason");
35:         $opt_out_activity->contact_id = parent::getValue($props, "contact_id");
36:         $opt_out_activity->email_address = parent::getValue($props, "email_address");
37:         $opt_out_activity->campaign_id = parent::getValue($props, "campaign_id");
38:         return $opt_out_activity;
39:     }
40: }
41: 
Appconnect PHP SDK API documentation generated by ApiGen 2.8.0