Source of file Address.php
Size: 2,189 Bytes - Last Modified: 2021-12-23T10:20:09+00:00
/var/www/docs.ssmods.com/process/src/src/Ctct/Components/Contacts/Address.php
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697 | <?php namespace Ctct\Components\Contacts; use Ctct\Components\Component; /** * Represents a single Address of a Contact * * @package Components * @subpackage Contacts * @author Constant Contact */ class Address extends Component { /** * Id of the address * @var string */ public $id; /** * Line 1 of the address * @var string */ public $line1; /** * Line 2 of the address * @var string */ public $line2; /** * Line 3 of the address * @var string */ public $line3; /** * City info for this address * @var string */ public $city; /** * Address type, must be one of "BUSINESS", "PERSONAL", or "UNKNOWN" * @var string */ public $address_type; /** * The state code for this address * @var string */ public $state_code; /** * The country code for this address * @var string */ public $country_code; /** * The postal code for this address * @var string */ public $postal_code; /** * The sub postal code for this address * @var string */ public $sub_postal_code; /** * Factory method to create an Address object from an array * @array $props - Associative array of initial properties to set * @return Address */ public static function create(array $props) { $address = new Address(); $address->id = parent::getValue($props, "id"); $address->line1 = parent::getValue($props, "line1"); $address->line2 = parent::getValue($props, "line2"); $address->line3 = parent::getValue($props, "line3"); $address->city = parent::getValue($props, "city"); $address->address_type = parent::getValue($props, "address_type"); $address->state_code = parent::getValue($props, "state_code"); $address->country_code = parent::getValue($props, "country_code"); $address->postal_code = parent::getValue($props, "postal_code"); $address->sub_postal_code = parent::getValue($props, "sub_postal_code"); return $address; } } |