Api\StructType\ApiFareItinerary::setKey PHP Method

setKey() public method

Set key value
public setKey ( string $key = null ) : ApiFareItinerary
$key string
return ApiFareItinerary
    public function setKey($key = null)
    {
        // validation for constraint: string
        if (!is_null($key) && !is_string($key)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($key)), __LINE__);
        }
        $this->key = $key;
        return $this;
    }