1: <?php
2: namespace Ctct\Components\Tracking;
3:
4: use Ctct\Components\Component;
5:
6: 7: 8: 9: 10: 11: 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: 25: 26: 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: