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