Skip to content

Commit 3e3838c

Browse files
Merge pull request #223 from HubSpot/feature/codegen
Regenerate crm properties (Codegen only)
2 parents 7c701be + fa9d2ee commit 3e3838c

File tree

3 files changed

+173
-15
lines changed

3 files changed

+173
-15
lines changed

codegen/Crm/Properties/Model/Property.php

Lines changed: 35 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,8 @@ class Property implements ModelInterface, ArrayAccess, \JsonSerializable
7979
'hubspot_defined' => 'bool',
8080
'show_currency_symbol' => 'bool',
8181
'modification_metadata' => '\HubSpot\Client\Crm\Properties\Model\PropertyModificationMetadata',
82-
'form_field' => 'bool'
82+
'form_field' => 'bool',
83+
'calculation_formula' => 'string'
8384
];
8485

8586
/**
@@ -112,7 +113,8 @@ class Property implements ModelInterface, ArrayAccess, \JsonSerializable
112113
'hubspot_defined' => null,
113114
'show_currency_symbol' => null,
114115
'modification_metadata' => null,
115-
'form_field' => null
116+
'form_field' => null,
117+
'calculation_formula' => null
116118
];
117119

118120
/**
@@ -164,7 +166,8 @@ public static function openAPIFormats()
164166
'hubspot_defined' => 'hubspotDefined',
165167
'show_currency_symbol' => 'showCurrencySymbol',
166168
'modification_metadata' => 'modificationMetadata',
167-
'form_field' => 'formField'
169+
'form_field' => 'formField',
170+
'calculation_formula' => 'calculationFormula'
168171
];
169172

170173
/**
@@ -195,7 +198,8 @@ public static function openAPIFormats()
195198
'hubspot_defined' => 'setHubspotDefined',
196199
'show_currency_symbol' => 'setShowCurrencySymbol',
197200
'modification_metadata' => 'setModificationMetadata',
198-
'form_field' => 'setFormField'
201+
'form_field' => 'setFormField',
202+
'calculation_formula' => 'setCalculationFormula'
199203
];
200204

201205
/**
@@ -226,7 +230,8 @@ public static function openAPIFormats()
226230
'hubspot_defined' => 'getHubspotDefined',
227231
'show_currency_symbol' => 'getShowCurrencySymbol',
228232
'modification_metadata' => 'getModificationMetadata',
229-
'form_field' => 'getFormField'
233+
'form_field' => 'getFormField',
234+
'calculation_formula' => 'getCalculationFormula'
230235
];
231236

232237
/**
@@ -309,6 +314,7 @@ public function __construct(array $data = null)
309314
$this->container['show_currency_symbol'] = $data['show_currency_symbol'] ?? null;
310315
$this->container['modification_metadata'] = $data['modification_metadata'] ?? null;
311316
$this->container['form_field'] = $data['form_field'] ?? null;
317+
$this->container['calculation_formula'] = $data['calculation_formula'] ?? null;
312318
}
313319

314320
/**
@@ -907,6 +913,30 @@ public function setFormField($form_field)
907913

908914
return $this;
909915
}
916+
917+
/**
918+
* Gets calculation_formula
919+
*
920+
* @return string|null
921+
*/
922+
public function getCalculationFormula()
923+
{
924+
return $this->container['calculation_formula'];
925+
}
926+
927+
/**
928+
* Sets calculation_formula
929+
*
930+
* @param string|null $calculation_formula Represents a formula that is used to compute a calculated property.
931+
*
932+
* @return self
933+
*/
934+
public function setCalculationFormula($calculation_formula)
935+
{
936+
$this->container['calculation_formula'] = $calculation_formula;
937+
938+
return $this;
939+
}
910940
/**
911941
* Returns true if offset exists. False otherwise.
912942
*

codegen/Crm/Properties/Model/PropertyCreate.php

Lines changed: 99 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,10 @@ class PropertyCreate implements ModelInterface, ArrayAccess, \JsonSerializable
6767
'display_order' => 'int',
6868
'has_unique_value' => 'bool',
6969
'hidden' => 'bool',
70-
'form_field' => 'bool'
70+
'form_field' => 'bool',
71+
'external_options' => 'bool',
72+
'referenced_object_type' => 'string',
73+
'calculation_formula' => 'string'
7174
];
7275

7376
/**
@@ -88,7 +91,10 @@ class PropertyCreate implements ModelInterface, ArrayAccess, \JsonSerializable
8891
'display_order' => 'int32',
8992
'has_unique_value' => null,
9093
'hidden' => null,
91-
'form_field' => null
94+
'form_field' => null,
95+
'external_options' => null,
96+
'referenced_object_type' => null,
97+
'calculation_formula' => null
9298
];
9399

94100
/**
@@ -128,7 +134,10 @@ public static function openAPIFormats()
128134
'display_order' => 'displayOrder',
129135
'has_unique_value' => 'hasUniqueValue',
130136
'hidden' => 'hidden',
131-
'form_field' => 'formField'
137+
'form_field' => 'formField',
138+
'external_options' => 'externalOptions',
139+
'referenced_object_type' => 'referencedObjectType',
140+
'calculation_formula' => 'calculationFormula'
132141
];
133142

134143
/**
@@ -147,7 +156,10 @@ public static function openAPIFormats()
147156
'display_order' => 'setDisplayOrder',
148157
'has_unique_value' => 'setHasUniqueValue',
149158
'hidden' => 'setHidden',
150-
'form_field' => 'setFormField'
159+
'form_field' => 'setFormField',
160+
'external_options' => 'setExternalOptions',
161+
'referenced_object_type' => 'setReferencedObjectType',
162+
'calculation_formula' => 'setCalculationFormula'
151163
];
152164

153165
/**
@@ -166,7 +178,10 @@ public static function openAPIFormats()
166178
'display_order' => 'getDisplayOrder',
167179
'has_unique_value' => 'getHasUniqueValue',
168180
'hidden' => 'getHidden',
169-
'form_field' => 'getFormField'
181+
'form_field' => 'getFormField',
182+
'external_options' => 'getExternalOptions',
183+
'referenced_object_type' => 'getReferencedObjectType',
184+
'calculation_formula' => 'getCalculationFormula'
170185
];
171186

172187
/**
@@ -215,6 +230,7 @@ public function getModelName()
215230
public const TYPE_DATE = 'date';
216231
public const TYPE_DATETIME = 'datetime';
217232
public const TYPE_ENUMERATION = 'enumeration';
233+
public const TYPE_BOOL = 'bool';
218234
public const FIELD_TYPE_TEXTAREA = 'textarea';
219235
public const FIELD_TYPE_TEXT = 'text';
220236
public const FIELD_TYPE_DATE = 'date';
@@ -224,6 +240,7 @@ public function getModelName()
224240
public const FIELD_TYPE_RADIO = 'radio';
225241
public const FIELD_TYPE_CHECKBOX = 'checkbox';
226242
public const FIELD_TYPE_BOOLEANCHECKBOX = 'booleancheckbox';
243+
public const FIELD_TYPE_CALCULATION_EQUATION = 'calculation_equation';
227244

228245
/**
229246
* Gets allowable values of the enum
@@ -238,6 +255,7 @@ public function getTypeAllowableValues()
238255
self::TYPE_DATE,
239256
self::TYPE_DATETIME,
240257
self::TYPE_ENUMERATION,
258+
self::TYPE_BOOL,
241259
];
242260
}
243261

@@ -258,6 +276,7 @@ public function getFieldTypeAllowableValues()
258276
self::FIELD_TYPE_RADIO,
259277
self::FIELD_TYPE_CHECKBOX,
260278
self::FIELD_TYPE_BOOLEANCHECKBOX,
279+
self::FIELD_TYPE_CALCULATION_EQUATION,
261280
];
262281
}
263282

@@ -287,6 +306,9 @@ public function __construct(array $data = null)
287306
$this->container['has_unique_value'] = $data['has_unique_value'] ?? null;
288307
$this->container['hidden'] = $data['hidden'] ?? null;
289308
$this->container['form_field'] = $data['form_field'] ?? null;
309+
$this->container['external_options'] = $data['external_options'] ?? null;
310+
$this->container['referenced_object_type'] = $data['referenced_object_type'] ?? null;
311+
$this->container['calculation_formula'] = $data['calculation_formula'] ?? null;
290312
}
291313

292314
/**
@@ -629,6 +651,78 @@ public function setFormField($form_field)
629651

630652
return $this;
631653
}
654+
655+
/**
656+
* Gets external_options
657+
*
658+
* @return bool|null
659+
*/
660+
public function getExternalOptions()
661+
{
662+
return $this->container['external_options'];
663+
}
664+
665+
/**
666+
* Sets external_options
667+
*
668+
* @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.
669+
*
670+
* @return self
671+
*/
672+
public function setExternalOptions($external_options)
673+
{
674+
$this->container['external_options'] = $external_options;
675+
676+
return $this;
677+
}
678+
679+
/**
680+
* Gets referenced_object_type
681+
*
682+
* @return string|null
683+
*/
684+
public function getReferencedObjectType()
685+
{
686+
return $this->container['referenced_object_type'];
687+
}
688+
689+
/**
690+
* Sets referenced_object_type
691+
*
692+
* @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.
693+
*
694+
* @return self
695+
*/
696+
public function setReferencedObjectType($referenced_object_type)
697+
{
698+
$this->container['referenced_object_type'] = $referenced_object_type;
699+
700+
return $this;
701+
}
702+
703+
/**
704+
* Gets calculation_formula
705+
*
706+
* @return string|null
707+
*/
708+
public function getCalculationFormula()
709+
{
710+
return $this->container['calculation_formula'];
711+
}
712+
713+
/**
714+
* Sets calculation_formula
715+
*
716+
* @param string|null $calculation_formula Represents a formula that is used to compute a calculated property.
717+
*
718+
* @return self
719+
*/
720+
public function setCalculationFormula($calculation_formula)
721+
{
722+
$this->container['calculation_formula'] = $calculation_formula;
723+
724+
return $this;
725+
}
632726
/**
633727
* Returns true if offset exists. False otherwise.
634728
*

codegen/Crm/Properties/Model/PropertyUpdate.php

Lines changed: 39 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,8 @@ class PropertyUpdate implements ModelInterface, ArrayAccess, \JsonSerializable
6565
'options' => '\HubSpot\Client\Crm\Properties\Model\OptionInput[]',
6666
'display_order' => 'int',
6767
'hidden' => 'bool',
68-
'form_field' => 'bool'
68+
'form_field' => 'bool',
69+
'calculation_formula' => 'string'
6970
];
7071

7172
/**
@@ -84,7 +85,8 @@ class PropertyUpdate implements ModelInterface, ArrayAccess, \JsonSerializable
8485
'options' => null,
8586
'display_order' => 'int32',
8687
'hidden' => null,
87-
'form_field' => null
88+
'form_field' => null,
89+
'calculation_formula' => null
8890
];
8991

9092
/**
@@ -122,7 +124,8 @@ public static function openAPIFormats()
122124
'options' => 'options',
123125
'display_order' => 'displayOrder',
124126
'hidden' => 'hidden',
125-
'form_field' => 'formField'
127+
'form_field' => 'formField',
128+
'calculation_formula' => 'calculationFormula'
126129
];
127130

128131
/**
@@ -139,7 +142,8 @@ public static function openAPIFormats()
139142
'options' => 'setOptions',
140143
'display_order' => 'setDisplayOrder',
141144
'hidden' => 'setHidden',
142-
'form_field' => 'setFormField'
145+
'form_field' => 'setFormField',
146+
'calculation_formula' => 'setCalculationFormula'
143147
];
144148

145149
/**
@@ -156,7 +160,8 @@ public static function openAPIFormats()
156160
'options' => 'getOptions',
157161
'display_order' => 'getDisplayOrder',
158162
'hidden' => 'getHidden',
159-
'form_field' => 'getFormField'
163+
'form_field' => 'getFormField',
164+
'calculation_formula' => 'getCalculationFormula'
160165
];
161166

162167
/**
@@ -205,6 +210,7 @@ public function getModelName()
205210
public const TYPE_DATE = 'date';
206211
public const TYPE_DATETIME = 'datetime';
207212
public const TYPE_ENUMERATION = 'enumeration';
213+
public const TYPE_BOOL = 'bool';
208214
public const FIELD_TYPE_TEXTAREA = 'textarea';
209215
public const FIELD_TYPE_TEXT = 'text';
210216
public const FIELD_TYPE_DATE = 'date';
@@ -214,6 +220,7 @@ public function getModelName()
214220
public const FIELD_TYPE_RADIO = 'radio';
215221
public const FIELD_TYPE_CHECKBOX = 'checkbox';
216222
public const FIELD_TYPE_BOOLEANCHECKBOX = 'booleancheckbox';
223+
public const FIELD_TYPE_CALCULATION_EQUATION = 'calculation_equation';
217224

218225
/**
219226
* Gets allowable values of the enum
@@ -228,6 +235,7 @@ public function getTypeAllowableValues()
228235
self::TYPE_DATE,
229236
self::TYPE_DATETIME,
230237
self::TYPE_ENUMERATION,
238+
self::TYPE_BOOL,
231239
];
232240
}
233241

@@ -248,6 +256,7 @@ public function getFieldTypeAllowableValues()
248256
self::FIELD_TYPE_RADIO,
249257
self::FIELD_TYPE_CHECKBOX,
250258
self::FIELD_TYPE_BOOLEANCHECKBOX,
259+
self::FIELD_TYPE_CALCULATION_EQUATION,
251260
];
252261
}
253262

@@ -275,6 +284,7 @@ public function __construct(array $data = null)
275284
$this->container['display_order'] = $data['display_order'] ?? null;
276285
$this->container['hidden'] = $data['hidden'] ?? null;
277286
$this->container['form_field'] = $data['form_field'] ?? null;
287+
$this->container['calculation_formula'] = $data['calculation_formula'] ?? null;
278288
}
279289

280290
/**
@@ -554,6 +564,30 @@ public function setFormField($form_field)
554564

555565
return $this;
556566
}
567+
568+
/**
569+
* Gets calculation_formula
570+
*
571+
* @return string|null
572+
*/
573+
public function getCalculationFormula()
574+
{
575+
return $this->container['calculation_formula'];
576+
}
577+
578+
/**
579+
* Sets calculation_formula
580+
*
581+
* @param string|null $calculation_formula Represents a formula that is used to compute a calculated property.
582+
*
583+
* @return self
584+
*/
585+
public function setCalculationFormula($calculation_formula)
586+
{
587+
$this->container['calculation_formula'] = $calculation_formula;
588+
589+
return $this;
590+
}
557591
/**
558592
* Returns true if offset exists. False otherwise.
559593
*

0 commit comments

Comments
 (0)