Api\StructType\ApiHouseProfileData::setThermal_normative_expense PHP Method

setThermal_normative_expense() public method

Set thermal_normative_expense value
public setThermal_normative_expense ( float $thermal_normative_expense = null ) : ApiHouseProfileData
$thermal_normative_expense float
return ApiHouseProfileData
    public function setThermal_normative_expense($thermal_normative_expense = null)
    {
        // validation for constraint: fractionDigits
        if (is_float($thermal_normative_expense) && strlen(substr($thermal_normative_expense, strpos($thermal_normative_expense, '.'))) !== 2) {
            throw new \InvalidArgumentException(sprintf('Invalid value, the value must at most contain 2 fraction digits, "%d" given', strlen(substr($thermal_normative_expense, strpos($thermal_normative_expense, '.')))), __LINE__);
        }
        // validation for constraint: totalDigits
        if (is_float($thermal_normative_expense) && strlen(str_replace(array(' ', '.', ',', '-', '+'), '', $thermal_normative_expense)) !== 15) {
            throw new \InvalidArgumentException(sprintf('Invalid value, the value must at most contain 15 digits, "%d" given', strlen(substr($thermal_normative_expense, strpos($thermal_normative_expense, '.')))), __LINE__);
        }
        $this->thermal_normative_expense = $thermal_normative_expense;
        return $this;
    }
ApiHouseProfileData