<?php
namespace App\Amadeus\StructureParser\Types;

/**
 * Helper structure for the passenger classes
 * @author Lucian
 */
class Passenger extends \App\Amadeus\StructureParser\Types\CompressedSerializableObject
{
	public $amadeusId = null;
	public $isOwner = 	true;

	public $title = 	null;
	public $type = 		null;
	public $firstName = null;
	public $lastName = 	null;

	public $companyName = 	null;
	public $companyId = 	null;

	public $address = 	null;
	public $zipCode = 	null;
	public $city = 		null;
	public $state = 	null;
	public $country = 	null;
	public $dateOfBirth=null;
	public $nationality=null;
	public $emails = 	[];
	public $telephones = [];

	public $FFCards = 	[];
	public $passports= 	[];

	/**
	 * (non-PHPdoc)
	 * @see \Engine\Serializer\MagicMethods\CustomAbstract::serializeUnknownObject()
	 */
	protected function serializeUnknownObject($ret, $object)
	{
		if ($ret['$%c*'] == 'stdClass') {
			$ret['data'] = serialize($object);
			return $ret;
		}

		return parent::serializeUnknownObject($ret, $object);
	}
}
