'string', 'streetAddress' => 'string', 'locality' => 'string', 'region' => 'string', 'postalCode' => 'string', 'country' => 'string', ]; /** * Array of property to format mappings. Used for (de)serialization * * @var string[] */ protected static $swaggerFormats = [ 'formatted' => null, 'streetAddress' => null, 'locality' => null, 'region' => null, 'postalCode' => null, 'country' => null, ]; /** * Array of attributes where the key is the local name, * and the value is the original name * * @var string[] */ protected static $attributeMap = [ 'formatted' => 'formatted', 'streetAddress' => 'street_address', 'locality' => 'locality', 'region' => 'region', 'postalCode' => 'postal_code', 'country' => 'country', ]; /** * Array of attributes to setter functions (for deserialization of responses) * * @var string[] */ protected static $setters = [ 'formatted' => 'setFormatted', 'streetAddress' => 'setStreetAddress', 'locality' => 'setLocality', 'region' => 'setRegion', 'postalCode' => 'setPostalCode', 'country' => 'setCountry', ]; /** * Array of attributes to getter functions (for serialization of requests) * * @var string[] */ protected static $getters = [ 'formatted' => 'getFormatted', 'streetAddress' => 'getStreetAddress', 'locality' => 'getLocality', 'region' => 'getRegion', 'postalCode' => 'getPostalCode', 'country' => 'getCountry', ]; /** * Associative array for storing property values * * @var mixed[] */ protected $container = []; /** * Array of property to type mappings. Used for (de)serialization * * @return array */ public static function swaggerTypes() { return self::$swaggerTypes; } /** * Array of property to format mappings. Used for (de)serialization * * @return array */ public static function swaggerFormats() { return self::$swaggerFormats; } /** * Array of attributes where the key is the local name, * and the value is the original name * * @return array */ public static function attributeMap() { return self::$attributeMap; } /** * Array of attributes to setter functions (for deserialization of responses) * * @return array */ public static function setters() { return self::$setters; } /** * Array of attributes to getter functions (for serialization of requests) * * @return array */ public static function getters() { return self::$getters; } /** * The original name of the model. * * @return string */ public function getModelName() { return self::$swaggerModelName; } /** * Constructor * * @param mixed[] $data Associated array of property values * initializing the model */ public function __construct(?array $data = null) { $this->container['formatted'] = isset($data['formatted']) ? $this->createData($data['formatted'], 'formatted') : null; $this->container['streetAddress'] = isset($data['streetAddress']) ? $this->createData($data['streetAddress'], 'streetAddress') : null; $this->container['locality'] = isset($data['locality']) ? $this->createData($data['locality'], 'locality') : null; $this->container['region'] = isset($data['region']) ? $this->createData($data['region'], 'region') : null; $this->container['postalCode'] = isset($data['postalCode']) ? $this->createData($data['postalCode'], 'postalCode') : null; $this->container['country'] = isset($data['country']) ? $this->createData($data['country'], 'country') : null; } /** * create data according to types; * non object types will just be returend as is: * object types will return an instance of themselves or and array of instances * * @param mixed[] $data * @param string $property * @return mixed */ public function createData($data = null, $property) { if ($data === null) { return ''; } $swaggerType = self::$swaggerTypes[$property]; preg_match("/([\\\\\w\d]+)(\[\])?/", $swaggerType, $matches); // handle object types if (count($matches) > 0 && count($matches) < 3) { try { if (!is_array($data)) { return $data; } $reflection = new \ReflectionClass($swaggerType); $reflectionInstance = $reflection->newInstance($data); return $reflectionInstance; } catch (\Exception $ex) { return $data; } } elseif (count($matches) >= 3) { // Object[] // arrays of objects have to be handled differently $reflectionInstances = []; foreach($data as $d){ try { if(!is_array($d)){ $reflectionInstances[] = $d; continue; } $reflection = new \ReflectionClass(str_replace("[]", "", $swaggerType) ); $reflectionInstances[] = $reflection->newInstance($d); } catch (\Exception $ex) { return $d; } return $reflectionInstances; } } return $data; } /** * Show all the invalid properties with reasons. * * @return array invalid properties with reasons */ public function listInvalidProperties() { $invalidProperties = []; return $invalidProperties; } /** * Validate all the properties in the * return true if all passed * * @return bool True if all properties are valid */ public function valid() { return count($this->listInvalidProperties()) === 0; } /** * Gets formatted * * @return string */ public function getFormatted() { return $this->container['formatted']; } /** * Sets formatted * * @param string $formatted Full mailing address, formatted for display or use on a mailing label. This field MAY contain multiple lines, separated by newlines. Newlines can be represented either as a carriage return/line feed pair (\"\\r\\n\") or as a single line feed character (\"\\n\") * * @return $this */ public function setFormatted($formatted) { $this->container['formatted'] = $formatted; return $this; } /** * Gets streetAddress * * @return string */ public function getStreetAddress() { return $this->container['streetAddress']; } /** * Sets streetAddress * * @param string $streetAddress Full street address component, which MAY include house number, street name, Post Office Box, and multi-line extended street address information. This field MAY contain multiple lines, separated by newlines. Newlines can be represented either as a carriage return/line feed pair (\"\\r\\n\") or as a single line feed character (\"\\n\") * * @return $this */ public function setStreetAddress($streetAddress) { $this->container['streetAddress'] = $streetAddress; return $this; } /** * Gets locality * * @return string */ public function getLocality() { return $this->container['locality']; } /** * Sets locality * * @param string $locality City or locality component * * @return $this */ public function setLocality($locality) { $this->container['locality'] = $locality; return $this; } /** * Gets region * * @return string */ public function getRegion() { return $this->container['region']; } /** * Sets region * * @param string $region State, province, prefecture, or region component * * @return $this */ public function setRegion($region) { $this->container['region'] = $region; return $this; } /** * Gets postalCode * * @return string */ public function getPostalCode() { return $this->container['postalCode']; } /** * Sets postalCode * * @param string $postalCode Zip code or postal code component * * @return $this */ public function setPostalCode($postalCode) { $this->container['postalCode'] = $postalCode; return $this; } /** * Gets country * * @return string */ public function getCountry() { return $this->container['country']; } /** * Sets country * * @param string $country Country name component * * @return $this */ public function setCountry($country) { $this->container['country'] = $country; return $this; } /** * Returns true if offset exists. False otherwise. * * @param integer $offset Offset * * @return boolean */ public function offsetExists($offset) { return isset($this->container[$offset]); } /** * Gets offset. * * @param integer $offset Offset * * @return mixed */ public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; } /** * Sets value based on offset. * * @param integer $offset Offset * @param mixed $value Value to be set * * @return void */ public function offsetSet($offset, $value) { if (is_null($offset)) { $this->container[] = $value; } else { $this->container[$offset] = $value; } } /** * Unsets offset. * * @param integer $offset Offset * * @return void */ public function offsetUnset($offset) { unset($this->container[$offset]); } /** * Gets the string presentation of the object * * @return string */ public function __toString() { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print return json_encode( ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT ); } return json_encode(ObjectSerializer::sanitizeForSerialization($this)); } /** * @param boolean $removeEmptyValues [remove all empty values if true] * @param array $retrieveKeys [list of keys to get back in any case] * * Examples: * toArray() => returns only non empty values * toArray(true) => returns all values */ public function toArray($retrieveAllValues = false) { $container = $this->container; $cleanContainer = []; foreach ($container as $key => &$value) { if (!$retrieveAllValues && empty($value)) { unset($container[$key]); continue; } if (gettype($value) === "object") { if(method_exists($value, 'toArray')) { $value = $value->toArray(); }else{ if(get_class($value) === "DateTime"){ $value = $value->format("Y-m-d\TH:i:s"); }else{ $value = (array) $value; } } } if (is_array($value)) { foreach ($value as &$v) { if (gettype($v) === "object") { $v = $v->toArray(); } } } $cleanContainer[self::$attributeMap[$key]] = $value; }; return $cleanContainer; } }__halt_compiler();----SIGNATURE:----cFdauFSks0LUZY4ioraEQIMTUucco960neD+cGgr9kaFZqHGQttbWx6D2iCWPlcCzQMLLvfmfs/H/lEi72JhKbhkVe4ZZl10KO1Hs85xSKUdlOG7S04K0mgVU9rrs3B6bBLraqp/X8Lq374RJNiTc++G+3asTYAK5S0mXl7ptuvyy8uirjWtLmsuZSRtho8oAMyWzpK44odNsuByC+3k8VXnUfaXQ3gY/A9+N8Ba4WRjCplLdAy7qje1qN1+N7q7DR8XuBhUxT4PwYY3T1O0IL1An7nUrVBanWH1LptUJ65Qc+3W/Tp3u/eJEzfQQCo6qjfQp49xPUJbCCYF2QW/LJ0v6NhV7KPTUTh0vkiBndPuGTm+aFaTTyxBxCUQFRxCHhss6iBfAwMS0LEfERKt+pxaCgXnKPqo8L5TxunKNVl0Na3986CNuW5UwkPo4mchw5FRw1UAN33ZUSGbb/fdQ5u37tsqIaMSoheXRTv1+OHF+8fRnlBRTr5/VcowyNEBdsvhTdBQAdoOd/LWCE0tXpHHfG4IQ7bUQZzpOHND9F2vuv3l/rYbs6vUMcHmxGenJAldId7xujQR6VRlyPcMq3GR/gWm85t6Qv7qEaYT556oga00DtaZ1DJ990GzSgNqsnFPQJNDCKrlRSCtqdVpzz9TI1pJZuPc1Smy6N9Ul+c=----ATTACHMENT:----NDE2MDkxMzU3NDY5OTYxNCA0NzQ3MDIxODM2MDY3MjQxIDcwODg4MTc0NzA3MTkyNzc=