xxxxxxxxxx
namespace GLS;
use \WsdlToPhp\PackageBase\AbstractStructBase;
/**
* This class stands for cWeightExt Struct
* @subpackage Structs
*/
class CWeightExt extends AbstractStructBase
{
/**
* The amount
* Meta information extracted from the WSDL
* - maxOccurs: 1
* - minOccurs: 1
* @var float
*/
public $amount;
/**
* The unit
* Meta information extracted from the WSDL
* - maxOccurs: 1
* - minOccurs: 1
* @var string
*/
public $unit;
/**
* Constructor method for cWeightExt
* @uses CWeightExt::setAmount()
* @uses CWeightExt::setUnit()
* @param float $amount
* @param string $unit
*/
public function __construct($amount = null, $unit = null)
{
$this
->setAmount($amount)
->setUnit($unit);
}
/**
* Get amount value
* @return float
*/
public function getAmount()
{
return $this->amount;
}
/**
* Set amount value
* @param float $amount
* @return \GLS\CWeightExt
*/
public function setAmount($amount = null)
{
// validation for constraint: float
if (!is_null($amount) && !(is_float($amount) || is_numeric($amount))) {
throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a float value, %s given', var_export($amount, true), gettype($amount)), __LINE__);
}
$this->amount = $amount;
return $this;
}
/**
* Get unit value
* @return string
*/
public function getUnit()
{
return $this->unit;
}
/**
* Set unit value
* @param string $unit
* @return \GLS\CWeightExt
*/
public function setUnit($unit = null)
{
// validation for constraint: string
if (!is_null($unit) && !is_string($unit)) {
throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($unit, true), gettype($unit)), __LINE__);
}
$this->unit = $unit;
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