xxxxxxxxxx
use \WsdlToPhp\PackageBase\AbstractStructBase;
/**
* This class stands for costPosition Structure
* @subpackage Structs
*/
class CostPosition extends AbstractStructBase
{
/**
* The description
* Meta information extracted from the WSDL
* - minOccurs: 0
* @var string
*/
public $description;
/**
* The cost
* @var float
*/
public $cost;
/**
* Constructor method for costPosition
* @uses CostPosition::setDescription()
* @uses CostPosition::setCost()
* @param string $description
* @param float $cost
*/
public function __construct($description = null, $cost = null)
{
$this
->setDescription($description)
->setCost($cost);
}
/**
* Get description value
* @return string|null
*/
public function getDescription()
{
return $this->description;
}
/**
* Set description value
* @param string $description
* @return CostPosition
*/
public function setDescription($description = null)
{
// validation for constraint: string
if (!is_null($description) && !is_string($description)) {
throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($description, true), gettype($description)), __LINE__);
}
$this->description = $description;
return $this;
}
/**
* Get cost value
* @return float|null
*/
public function getCost()
{
return $this->cost;
}
/**
* Set cost value
* @param float $cost
* @return CostPosition
*/
public function setCost($cost = null)
{
// validation for constraint: float
if (!is_null($cost) && !(is_float($cost) || is_numeric($cost))) {
throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a float value, %s given', var_export($cost, true), gettype($cost)), __LINE__);
}
$this->cost = $cost;
return $this;
}
}
Don't be shy, don't hesitate to contact us for any subject, we'll be glad to help.
This platform is provided to give developpers and non developpers a way to easily consume SOAP Web Services or share their own SOAP Web Services with extra features powered by the platform.
© 2025 Providr.IO