Skip to content

Commit 6f6a488

Browse files
Merge pull request #611 from HubSpot/codegen/associationsV3
Codegen: CRM Associations V3
2 parents d871d6f + 2ea9e66 commit 6f6a488

7 files changed

Lines changed: 1474 additions & 188 deletions

codegen/Crm/Associations/Api/BatchApi.php

Lines changed: 76 additions & 48 deletions
Large diffs are not rendered by default.

codegen/Crm/Associations/Model/AssociatedId.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ public function getId()
316316
/**
317317
* Sets id
318318
*
319-
* @param string $id The ID for the association type.
319+
* @param string $id The unique ID that identifies an object.
320320
*
321321
* @return self
322322
*/
@@ -343,7 +343,7 @@ public function getType()
343343
/**
344344
* Sets type
345345
*
346-
* @param string $type The type of association.
346+
* @param string $type The type of associations.
347347
*
348348
* @return self
349349
*/

codegen/Crm/Associations/Model/BatchResponsePublicAssociation.php

Lines changed: 0 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,7 @@ class BatchResponsePublicAssociation implements ModelInterface, ArrayAccess, \Js
5858
*/
5959
protected static $openAPITypes = [
6060
'completed_at' => '\DateTime',
61-
'errors' => '\HubSpot\Client\Crm\Associations\Model\StandardError[]',
6261
'links' => 'array<string,string>',
63-
'num_errors' => 'int',
6462
'requested_at' => '\DateTime',
6563
'results' => '\HubSpot\Client\Crm\Associations\Model\PublicAssociation[]',
6664
'started_at' => '\DateTime',
@@ -76,9 +74,7 @@ class BatchResponsePublicAssociation implements ModelInterface, ArrayAccess, \Js
7674
*/
7775
protected static $openAPIFormats = [
7876
'completed_at' => 'date-time',
79-
'errors' => null,
8077
'links' => null,
81-
'num_errors' => 'int32',
8278
'requested_at' => 'date-time',
8379
'results' => null,
8480
'started_at' => 'date-time',
@@ -92,9 +88,7 @@ class BatchResponsePublicAssociation implements ModelInterface, ArrayAccess, \Js
9288
*/
9389
protected static array $openAPINullables = [
9490
'completed_at' => false,
95-
'errors' => false,
9691
'links' => false,
97-
'num_errors' => false,
9892
'requested_at' => false,
9993
'results' => false,
10094
'started_at' => false,
@@ -188,9 +182,7 @@ public function isNullableSetToNull(string $property): bool
188182
*/
189183
protected static $attributeMap = [
190184
'completed_at' => 'completedAt',
191-
'errors' => 'errors',
192185
'links' => 'links',
193-
'num_errors' => 'numErrors',
194186
'requested_at' => 'requestedAt',
195187
'results' => 'results',
196188
'started_at' => 'startedAt',
@@ -204,9 +196,7 @@ public function isNullableSetToNull(string $property): bool
204196
*/
205197
protected static $setters = [
206198
'completed_at' => 'setCompletedAt',
207-
'errors' => 'setErrors',
208199
'links' => 'setLinks',
209-
'num_errors' => 'setNumErrors',
210200
'requested_at' => 'setRequestedAt',
211201
'results' => 'setResults',
212202
'started_at' => 'setStartedAt',
@@ -220,9 +210,7 @@ public function isNullableSetToNull(string $property): bool
220210
*/
221211
protected static $getters = [
222212
'completed_at' => 'getCompletedAt',
223-
'errors' => 'getErrors',
224213
'links' => 'getLinks',
225-
'num_errors' => 'getNumErrors',
226214
'requested_at' => 'getRequestedAt',
227215
'results' => 'getResults',
228216
'started_at' => 'getStartedAt',
@@ -306,9 +294,7 @@ public function getStatusAllowableValues()
306294
public function __construct(?array $data = null)
307295
{
308296
$this->setIfExists('completed_at', $data ?? [], null);
309-
$this->setIfExists('errors', $data ?? [], null);
310297
$this->setIfExists('links', $data ?? [], null);
311-
$this->setIfExists('num_errors', $data ?? [], null);
312298
$this->setIfExists('requested_at', $data ?? [], null);
313299
$this->setIfExists('results', $data ?? [], null);
314300
$this->setIfExists('started_at', $data ?? [], null);
@@ -405,33 +391,6 @@ public function setCompletedAt($completed_at)
405391
return $this;
406392
}
407393

408-
/**
409-
* Gets errors
410-
*
411-
* @return \HubSpot\Client\Crm\Associations\Model\StandardError[]|null
412-
*/
413-
public function getErrors()
414-
{
415-
return $this->container['errors'];
416-
}
417-
418-
/**
419-
* Sets errors
420-
*
421-
* @param \HubSpot\Client\Crm\Associations\Model\StandardError[]|null $errors errors
422-
*
423-
* @return self
424-
*/
425-
public function setErrors($errors)
426-
{
427-
if (is_null($errors)) {
428-
throw new \InvalidArgumentException('non-nullable errors cannot be null');
429-
}
430-
$this->container['errors'] = $errors;
431-
432-
return $this;
433-
}
434-
435394
/**
436395
* Gets links
437396
*
@@ -459,33 +418,6 @@ public function setLinks($links)
459418
return $this;
460419
}
461420

462-
/**
463-
* Gets num_errors
464-
*
465-
* @return int|null
466-
*/
467-
public function getNumErrors()
468-
{
469-
return $this->container['num_errors'];
470-
}
471-
472-
/**
473-
* Sets num_errors
474-
*
475-
* @param int|null $num_errors The number of errors encountered during the batch operation.
476-
*
477-
* @return self
478-
*/
479-
public function setNumErrors($num_errors)
480-
{
481-
if (is_null($num_errors)) {
482-
throw new \InvalidArgumentException('non-nullable num_errors cannot be null');
483-
}
484-
$this->container['num_errors'] = $num_errors;
485-
486-
return $this;
487-
}
488-
489421
/**
490422
* Gets requested_at
491423
*

codegen/Crm/Associations/Model/BatchResponsePublicAssociationMulti.php

Lines changed: 0 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,7 @@ class BatchResponsePublicAssociationMulti implements ModelInterface, ArrayAccess
5858
*/
5959
protected static $openAPITypes = [
6060
'completed_at' => '\DateTime',
61-
'errors' => '\HubSpot\Client\Crm\Associations\Model\StandardError[]',
6261
'links' => 'array<string,string>',
63-
'num_errors' => 'int',
6462
'requested_at' => '\DateTime',
6563
'results' => '\HubSpot\Client\Crm\Associations\Model\PublicAssociationMulti[]',
6664
'started_at' => '\DateTime',
@@ -76,9 +74,7 @@ class BatchResponsePublicAssociationMulti implements ModelInterface, ArrayAccess
7674
*/
7775
protected static $openAPIFormats = [
7876
'completed_at' => 'date-time',
79-
'errors' => null,
8077
'links' => null,
81-
'num_errors' => 'int32',
8278
'requested_at' => 'date-time',
8379
'results' => null,
8480
'started_at' => 'date-time',
@@ -92,9 +88,7 @@ class BatchResponsePublicAssociationMulti implements ModelInterface, ArrayAccess
9288
*/
9389
protected static array $openAPINullables = [
9490
'completed_at' => false,
95-
'errors' => false,
9691
'links' => false,
97-
'num_errors' => false,
9892
'requested_at' => false,
9993
'results' => false,
10094
'started_at' => false,
@@ -188,9 +182,7 @@ public function isNullableSetToNull(string $property): bool
188182
*/
189183
protected static $attributeMap = [
190184
'completed_at' => 'completedAt',
191-
'errors' => 'errors',
192185
'links' => 'links',
193-
'num_errors' => 'numErrors',
194186
'requested_at' => 'requestedAt',
195187
'results' => 'results',
196188
'started_at' => 'startedAt',
@@ -204,9 +196,7 @@ public function isNullableSetToNull(string $property): bool
204196
*/
205197
protected static $setters = [
206198
'completed_at' => 'setCompletedAt',
207-
'errors' => 'setErrors',
208199
'links' => 'setLinks',
209-
'num_errors' => 'setNumErrors',
210200
'requested_at' => 'setRequestedAt',
211201
'results' => 'setResults',
212202
'started_at' => 'setStartedAt',
@@ -220,9 +210,7 @@ public function isNullableSetToNull(string $property): bool
220210
*/
221211
protected static $getters = [
222212
'completed_at' => 'getCompletedAt',
223-
'errors' => 'getErrors',
224213
'links' => 'getLinks',
225-
'num_errors' => 'getNumErrors',
226214
'requested_at' => 'getRequestedAt',
227215
'results' => 'getResults',
228216
'started_at' => 'getStartedAt',
@@ -306,9 +294,7 @@ public function getStatusAllowableValues()
306294
public function __construct(?array $data = null)
307295
{
308296
$this->setIfExists('completed_at', $data ?? [], null);
309-
$this->setIfExists('errors', $data ?? [], null);
310297
$this->setIfExists('links', $data ?? [], null);
311-
$this->setIfExists('num_errors', $data ?? [], null);
312298
$this->setIfExists('requested_at', $data ?? [], null);
313299
$this->setIfExists('results', $data ?? [], null);
314300
$this->setIfExists('started_at', $data ?? [], null);
@@ -405,33 +391,6 @@ public function setCompletedAt($completed_at)
405391
return $this;
406392
}
407393

408-
/**
409-
* Gets errors
410-
*
411-
* @return \HubSpot\Client\Crm\Associations\Model\StandardError[]|null
412-
*/
413-
public function getErrors()
414-
{
415-
return $this->container['errors'];
416-
}
417-
418-
/**
419-
* Sets errors
420-
*
421-
* @param \HubSpot\Client\Crm\Associations\Model\StandardError[]|null $errors errors
422-
*
423-
* @return self
424-
*/
425-
public function setErrors($errors)
426-
{
427-
if (is_null($errors)) {
428-
throw new \InvalidArgumentException('non-nullable errors cannot be null');
429-
}
430-
$this->container['errors'] = $errors;
431-
432-
return $this;
433-
}
434-
435394
/**
436395
* Gets links
437396
*
@@ -459,33 +418,6 @@ public function setLinks($links)
459418
return $this;
460419
}
461420

462-
/**
463-
* Gets num_errors
464-
*
465-
* @return int|null
466-
*/
467-
public function getNumErrors()
468-
{
469-
return $this->container['num_errors'];
470-
}
471-
472-
/**
473-
* Sets num_errors
474-
*
475-
* @param int|null $num_errors The number of errors encountered during the batch operation.
476-
*
477-
* @return self
478-
*/
479-
public function setNumErrors($num_errors)
480-
{
481-
if (is_null($num_errors)) {
482-
throw new \InvalidArgumentException('non-nullable num_errors cannot be null');
483-
}
484-
$this->container['num_errors'] = $num_errors;
485-
486-
return $this;
487-
}
488-
489421
/**
490422
* Gets requested_at
491423
*

0 commit comments

Comments
 (0)