public function setOffer(\Api\StructType\ApiOffer $offer = null) { if (is_null($offer) || is_array($offer) && empty($offer)) { unset($this->offer); } else { $this->offer = $offer; } return $this; }