1: <?php
2: namespace Ctct\Components\Account;
3:
4: use Ctct\Components\Component;
5:
6: 7: 8: 9: 10: 11: 12:
13: class AccountInfo extends Component
14: {
15: 16: 17: 18:
19: public $website;
20:
21: 22: 23: 24:
25: public $organization_name;
26:
27: 28: 29: 30:
31: public $time_zone;
32:
33: 34: 35: 36:
37: public $first_name;
38:
39: 40: 41: 42:
43: public $last_name;
44:
45: 46: 47: 48:
49: public $email;
50:
51: 52: 53: 54:
55: public $phone;
56:
57: 58: 59: 60:
61: public $company_logo;
62:
63: 64: 65: 66:
67: public $country_code;
68:
69: 70: 71: 72:
73: public $state_code;
74:
75: 76: 77: 78:
79: public $organization_addresses;
80:
81: 82: 83: 84: 85:
86: public static function create(array $props)
87: {
88: $accountInfo = new AccountInfo();
89: $accountInfo->website = parent::getValue($props, "website");
90: $accountInfo->organization_name = parent::getValue($props, "organization_name");
91: $accountInfo->time_zone = parent::getValue($props, "time_zone");
92: $accountInfo->first_name = parent::getValue($props, "first_name");
93: $accountInfo->last_name = parent::getValue($props, "last_name");
94: $accountInfo->email = parent::getValue($props, "email");
95: $accountInfo->phone = parent::getValue($props, "phone");
96: $accountInfo->company_logo = parent::getValue($props, "company_logo");
97: $accountInfo->country_code = parent::getValue($props, "country_code");
98: $accountInfo->state_code = parent::getValue($props, "state_code");
99: $accountInfo->organization_addresses = parent::getValue($props, "organization_addresses");
100:
101: return $accountInfo;
102: }
103:
104: public function toJson() {
105: return json_encode($this);
106: }
107: }
108: