From fa9d2ee685eec40cf00902ec0c9e00ee173a239c Mon Sep 17 00:00:00 2001 From: ksvirkou-hubspot Date: Thu, 2 Mar 2023 14:36:50 +0300 Subject: [PATCH] Regenerate crm properties --- codegen/Crm/Properties/Model/Property.php | 40 ++++++- .../Crm/Properties/Model/PropertyCreate.php | 104 +++++++++++++++++- .../Crm/Properties/Model/PropertyUpdate.php | 44 +++++++- 3 files changed, 173 insertions(+), 15 deletions(-) diff --git a/codegen/Crm/Properties/Model/Property.php b/codegen/Crm/Properties/Model/Property.php index 3ab0203c..1e538438 100644 --- a/codegen/Crm/Properties/Model/Property.php +++ b/codegen/Crm/Properties/Model/Property.php @@ -79,7 +79,8 @@ class Property implements ModelInterface, ArrayAccess, \JsonSerializable 'hubspot_defined' => 'bool', 'show_currency_symbol' => 'bool', 'modification_metadata' => '\HubSpot\Client\Crm\Properties\Model\PropertyModificationMetadata', - 'form_field' => 'bool' + 'form_field' => 'bool', + 'calculation_formula' => 'string' ]; /** @@ -112,7 +113,8 @@ class Property implements ModelInterface, ArrayAccess, \JsonSerializable 'hubspot_defined' => null, 'show_currency_symbol' => null, 'modification_metadata' => null, - 'form_field' => null + 'form_field' => null, + 'calculation_formula' => null ]; /** @@ -164,7 +166,8 @@ public static function openAPIFormats() 'hubspot_defined' => 'hubspotDefined', 'show_currency_symbol' => 'showCurrencySymbol', 'modification_metadata' => 'modificationMetadata', - 'form_field' => 'formField' + 'form_field' => 'formField', + 'calculation_formula' => 'calculationFormula' ]; /** @@ -195,7 +198,8 @@ public static function openAPIFormats() 'hubspot_defined' => 'setHubspotDefined', 'show_currency_symbol' => 'setShowCurrencySymbol', 'modification_metadata' => 'setModificationMetadata', - 'form_field' => 'setFormField' + 'form_field' => 'setFormField', + 'calculation_formula' => 'setCalculationFormula' ]; /** @@ -226,7 +230,8 @@ public static function openAPIFormats() 'hubspot_defined' => 'getHubspotDefined', 'show_currency_symbol' => 'getShowCurrencySymbol', 'modification_metadata' => 'getModificationMetadata', - 'form_field' => 'getFormField' + 'form_field' => 'getFormField', + 'calculation_formula' => 'getCalculationFormula' ]; /** @@ -309,6 +314,7 @@ public function __construct(array $data = null) $this->container['show_currency_symbol'] = $data['show_currency_symbol'] ?? null; $this->container['modification_metadata'] = $data['modification_metadata'] ?? null; $this->container['form_field'] = $data['form_field'] ?? null; + $this->container['calculation_formula'] = $data['calculation_formula'] ?? null; } /** @@ -907,6 +913,30 @@ public function setFormField($form_field) return $this; } + + /** + * Gets calculation_formula + * + * @return string|null + */ + public function getCalculationFormula() + { + return $this->container['calculation_formula']; + } + + /** + * Sets calculation_formula + * + * @param string|null $calculation_formula Represents a formula that is used to compute a calculated property. + * + * @return self + */ + public function setCalculationFormula($calculation_formula) + { + $this->container['calculation_formula'] = $calculation_formula; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/codegen/Crm/Properties/Model/PropertyCreate.php b/codegen/Crm/Properties/Model/PropertyCreate.php index 803bffd9..7c603c12 100644 --- a/codegen/Crm/Properties/Model/PropertyCreate.php +++ b/codegen/Crm/Properties/Model/PropertyCreate.php @@ -67,7 +67,10 @@ class PropertyCreate implements ModelInterface, ArrayAccess, \JsonSerializable 'display_order' => 'int', 'has_unique_value' => 'bool', 'hidden' => 'bool', - 'form_field' => 'bool' + 'form_field' => 'bool', + 'external_options' => 'bool', + 'referenced_object_type' => 'string', + 'calculation_formula' => 'string' ]; /** @@ -88,7 +91,10 @@ class PropertyCreate implements ModelInterface, ArrayAccess, \JsonSerializable 'display_order' => 'int32', 'has_unique_value' => null, 'hidden' => null, - 'form_field' => null + 'form_field' => null, + 'external_options' => null, + 'referenced_object_type' => null, + 'calculation_formula' => null ]; /** @@ -128,7 +134,10 @@ public static function openAPIFormats() 'display_order' => 'displayOrder', 'has_unique_value' => 'hasUniqueValue', 'hidden' => 'hidden', - 'form_field' => 'formField' + 'form_field' => 'formField', + 'external_options' => 'externalOptions', + 'referenced_object_type' => 'referencedObjectType', + 'calculation_formula' => 'calculationFormula' ]; /** @@ -147,7 +156,10 @@ public static function openAPIFormats() 'display_order' => 'setDisplayOrder', 'has_unique_value' => 'setHasUniqueValue', 'hidden' => 'setHidden', - 'form_field' => 'setFormField' + 'form_field' => 'setFormField', + 'external_options' => 'setExternalOptions', + 'referenced_object_type' => 'setReferencedObjectType', + 'calculation_formula' => 'setCalculationFormula' ]; /** @@ -166,7 +178,10 @@ public static function openAPIFormats() 'display_order' => 'getDisplayOrder', 'has_unique_value' => 'getHasUniqueValue', 'hidden' => 'getHidden', - 'form_field' => 'getFormField' + 'form_field' => 'getFormField', + 'external_options' => 'getExternalOptions', + 'referenced_object_type' => 'getReferencedObjectType', + 'calculation_formula' => 'getCalculationFormula' ]; /** @@ -215,6 +230,7 @@ public function getModelName() public const TYPE_DATE = 'date'; public const TYPE_DATETIME = 'datetime'; public const TYPE_ENUMERATION = 'enumeration'; + public const TYPE_BOOL = 'bool'; public const FIELD_TYPE_TEXTAREA = 'textarea'; public const FIELD_TYPE_TEXT = 'text'; public const FIELD_TYPE_DATE = 'date'; @@ -224,6 +240,7 @@ public function getModelName() public const FIELD_TYPE_RADIO = 'radio'; public const FIELD_TYPE_CHECKBOX = 'checkbox'; public const FIELD_TYPE_BOOLEANCHECKBOX = 'booleancheckbox'; + public const FIELD_TYPE_CALCULATION_EQUATION = 'calculation_equation'; /** * Gets allowable values of the enum @@ -238,6 +255,7 @@ public function getTypeAllowableValues() self::TYPE_DATE, self::TYPE_DATETIME, self::TYPE_ENUMERATION, + self::TYPE_BOOL, ]; } @@ -258,6 +276,7 @@ public function getFieldTypeAllowableValues() self::FIELD_TYPE_RADIO, self::FIELD_TYPE_CHECKBOX, self::FIELD_TYPE_BOOLEANCHECKBOX, + self::FIELD_TYPE_CALCULATION_EQUATION, ]; } @@ -287,6 +306,9 @@ public function __construct(array $data = null) $this->container['has_unique_value'] = $data['has_unique_value'] ?? null; $this->container['hidden'] = $data['hidden'] ?? null; $this->container['form_field'] = $data['form_field'] ?? null; + $this->container['external_options'] = $data['external_options'] ?? null; + $this->container['referenced_object_type'] = $data['referenced_object_type'] ?? null; + $this->container['calculation_formula'] = $data['calculation_formula'] ?? null; } /** @@ -629,6 +651,78 @@ public function setFormField($form_field) return $this; } + + /** + * Gets external_options + * + * @return bool|null + */ + public function getExternalOptions() + { + return $this->container['external_options']; + } + + /** + * Sets external_options + * + * @param bool|null $external_options Applicable only for 'enumeration' type properties. Should be set to true in conjunction with a 'referencedObjectType' of 'OWNER'. Otherwise false. + * + * @return self + */ + public function setExternalOptions($external_options) + { + $this->container['external_options'] = $external_options; + + return $this; + } + + /** + * Gets referenced_object_type + * + * @return string|null + */ + public function getReferencedObjectType() + { + return $this->container['referenced_object_type']; + } + + /** + * Sets referenced_object_type + * + * @param string|null $referenced_object_type Should be set to 'OWNER' when 'externalOptions' is true, which causes the property to dynamically pull option values from the current HubSpot users. + * + * @return self + */ + public function setReferencedObjectType($referenced_object_type) + { + $this->container['referenced_object_type'] = $referenced_object_type; + + return $this; + } + + /** + * Gets calculation_formula + * + * @return string|null + */ + public function getCalculationFormula() + { + return $this->container['calculation_formula']; + } + + /** + * Sets calculation_formula + * + * @param string|null $calculation_formula Represents a formula that is used to compute a calculated property. + * + * @return self + */ + public function setCalculationFormula($calculation_formula) + { + $this->container['calculation_formula'] = $calculation_formula; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/codegen/Crm/Properties/Model/PropertyUpdate.php b/codegen/Crm/Properties/Model/PropertyUpdate.php index 15b06889..c82832e4 100644 --- a/codegen/Crm/Properties/Model/PropertyUpdate.php +++ b/codegen/Crm/Properties/Model/PropertyUpdate.php @@ -65,7 +65,8 @@ class PropertyUpdate implements ModelInterface, ArrayAccess, \JsonSerializable 'options' => '\HubSpot\Client\Crm\Properties\Model\OptionInput[]', 'display_order' => 'int', 'hidden' => 'bool', - 'form_field' => 'bool' + 'form_field' => 'bool', + 'calculation_formula' => 'string' ]; /** @@ -84,7 +85,8 @@ class PropertyUpdate implements ModelInterface, ArrayAccess, \JsonSerializable 'options' => null, 'display_order' => 'int32', 'hidden' => null, - 'form_field' => null + 'form_field' => null, + 'calculation_formula' => null ]; /** @@ -122,7 +124,8 @@ public static function openAPIFormats() 'options' => 'options', 'display_order' => 'displayOrder', 'hidden' => 'hidden', - 'form_field' => 'formField' + 'form_field' => 'formField', + 'calculation_formula' => 'calculationFormula' ]; /** @@ -139,7 +142,8 @@ public static function openAPIFormats() 'options' => 'setOptions', 'display_order' => 'setDisplayOrder', 'hidden' => 'setHidden', - 'form_field' => 'setFormField' + 'form_field' => 'setFormField', + 'calculation_formula' => 'setCalculationFormula' ]; /** @@ -156,7 +160,8 @@ public static function openAPIFormats() 'options' => 'getOptions', 'display_order' => 'getDisplayOrder', 'hidden' => 'getHidden', - 'form_field' => 'getFormField' + 'form_field' => 'getFormField', + 'calculation_formula' => 'getCalculationFormula' ]; /** @@ -205,6 +210,7 @@ public function getModelName() public const TYPE_DATE = 'date'; public const TYPE_DATETIME = 'datetime'; public const TYPE_ENUMERATION = 'enumeration'; + public const TYPE_BOOL = 'bool'; public const FIELD_TYPE_TEXTAREA = 'textarea'; public const FIELD_TYPE_TEXT = 'text'; public const FIELD_TYPE_DATE = 'date'; @@ -214,6 +220,7 @@ public function getModelName() public const FIELD_TYPE_RADIO = 'radio'; public const FIELD_TYPE_CHECKBOX = 'checkbox'; public const FIELD_TYPE_BOOLEANCHECKBOX = 'booleancheckbox'; + public const FIELD_TYPE_CALCULATION_EQUATION = 'calculation_equation'; /** * Gets allowable values of the enum @@ -228,6 +235,7 @@ public function getTypeAllowableValues() self::TYPE_DATE, self::TYPE_DATETIME, self::TYPE_ENUMERATION, + self::TYPE_BOOL, ]; } @@ -248,6 +256,7 @@ public function getFieldTypeAllowableValues() self::FIELD_TYPE_RADIO, self::FIELD_TYPE_CHECKBOX, self::FIELD_TYPE_BOOLEANCHECKBOX, + self::FIELD_TYPE_CALCULATION_EQUATION, ]; } @@ -275,6 +284,7 @@ public function __construct(array $data = null) $this->container['display_order'] = $data['display_order'] ?? null; $this->container['hidden'] = $data['hidden'] ?? null; $this->container['form_field'] = $data['form_field'] ?? null; + $this->container['calculation_formula'] = $data['calculation_formula'] ?? null; } /** @@ -554,6 +564,30 @@ public function setFormField($form_field) return $this; } + + /** + * Gets calculation_formula + * + * @return string|null + */ + public function getCalculationFormula() + { + return $this->container['calculation_formula']; + } + + /** + * Sets calculation_formula + * + * @param string|null $calculation_formula Represents a formula that is used to compute a calculated property. + * + * @return self + */ + public function setCalculationFormula($calculation_formula) + { + $this->container['calculation_formula'] = $calculation_formula; + + return $this; + } /** * Returns true if offset exists. False otherwise. *