Skip to content

Commit ddb2882

Browse files
authored
Merge pull request #594 from HubSpot/fix/AssociationsV4
Codegen: CRM Associations V4
2 parents 97177fc + 807a96e commit ddb2882

7 files changed

Lines changed: 176 additions & 247 deletions

File tree

codegen/Crm/Associations/V4/Api/BasicApi.php

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

codegen/Crm/Associations/V4/Api/BatchApi.php

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

codegen/Crm/Associations/V4/Api/ReportApi.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ public function getConfig()
130130
*
131131
* Report
132132
*
133-
* @param int $user_id The user for the report (required)
133+
* @param int $user_id (required)
134134
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['request'] to see the possible values for this operation
135135
*
136136
* @throws \HubSpot\Client\Crm\Associations\V4\ApiException on non-2xx response or if the response body is not in the expected format
@@ -148,7 +148,7 @@ public function request($user_id, string $contentType = self::contentTypes['requ
148148
*
149149
* Report
150150
*
151-
* @param int $user_id The user for the report (required)
151+
* @param int $user_id (required)
152152
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['request'] to see the possible values for this operation
153153
*
154154
* @throws \HubSpot\Client\Crm\Associations\V4\ApiException on non-2xx response or if the response body is not in the expected format
@@ -247,7 +247,7 @@ public function requestWithHttpInfo($user_id, string $contentType = self::conten
247247
*
248248
* Report
249249
*
250-
* @param int $user_id The user for the report (required)
250+
* @param int $user_id (required)
251251
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['request'] to see the possible values for this operation
252252
*
253253
* @throws \InvalidArgumentException
@@ -268,7 +268,7 @@ function ($response) {
268268
*
269269
* Report
270270
*
271-
* @param int $user_id The user for the report (required)
271+
* @param int $user_id (required)
272272
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['request'] to see the possible values for this operation
273273
*
274274
* @throws \InvalidArgumentException
@@ -318,7 +318,7 @@ function ($exception) {
318318
/**
319319
* Create request for operation 'request'
320320
*
321-
* @param int $user_id The user for the report (required)
321+
* @param int $user_id (required)
322322
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['request'] to see the possible values for this operation
323323
*
324324
* @throws \InvalidArgumentException

codegen/Crm/Associations/V4/Model/AssociationSpec.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,7 @@ public function getModelName()
238238
public const ASSOCIATION_CATEGORY_HUBSPOT_DEFINED = 'HUBSPOT_DEFINED';
239239
public const ASSOCIATION_CATEGORY_INTEGRATOR_DEFINED = 'INTEGRATOR_DEFINED';
240240
public const ASSOCIATION_CATEGORY_USER_DEFINED = 'USER_DEFINED';
241+
public const ASSOCIATION_CATEGORY_WORK = 'WORK';
241242

242243
/**
243244
* Gets allowable values of the enum
@@ -250,6 +251,7 @@ public function getAssociationCategoryAllowableValues()
250251
self::ASSOCIATION_CATEGORY_HUBSPOT_DEFINED,
251252
self::ASSOCIATION_CATEGORY_INTEGRATOR_DEFINED,
252253
self::ASSOCIATION_CATEGORY_USER_DEFINED,
254+
self::ASSOCIATION_CATEGORY_WORK,
253255
];
254256
}
255257

codegen/Crm/Associations/V4/Model/AssociationSpecWithLabel.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,7 @@ public function getModelName()
244244
public const CATEGORY_HUBSPOT_DEFINED = 'HUBSPOT_DEFINED';
245245
public const CATEGORY_INTEGRATOR_DEFINED = 'INTEGRATOR_DEFINED';
246246
public const CATEGORY_USER_DEFINED = 'USER_DEFINED';
247+
public const CATEGORY_WORK = 'WORK';
247248

248249
/**
249250
* Gets allowable values of the enum
@@ -256,6 +257,7 @@ public function getCategoryAllowableValues()
256257
self::CATEGORY_HUBSPOT_DEFINED,
257258
self::CATEGORY_INTEGRATOR_DEFINED,
258259
self::CATEGORY_USER_DEFINED,
260+
self::CATEGORY_WORK,
259261
];
260262
}
261263

codegen/Crm/Associations/V4/Model/CollectionResponseMultiAssociatedObjectWithLabel.php renamed to codegen/Crm/Associations/V4/Model/CollectionResponseMultiAssociatedObjectWithLabelForwardPaging.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22
/**
3-
* CollectionResponseMultiAssociatedObjectWithLabel
3+
* CollectionResponseMultiAssociatedObjectWithLabelForwardPaging
44
*
55
* PHP version 8.1
66
*
@@ -32,15 +32,15 @@
3232
use \HubSpot\Client\Crm\Associations\V4\ObjectSerializer;
3333

3434
/**
35-
* CollectionResponseMultiAssociatedObjectWithLabel Class Doc Comment
35+
* CollectionResponseMultiAssociatedObjectWithLabelForwardPaging Class Doc Comment
3636
*
3737
* @category Class
3838
* @package HubSpot\Client\Crm\Associations\V4
3939
* @author OpenAPI Generator team
4040
* @link https://openapi-generator.tech
4141
* @implements \ArrayAccess<string, mixed>
4242
*/
43-
class CollectionResponseMultiAssociatedObjectWithLabel implements ModelInterface, ArrayAccess, \JsonSerializable
43+
class CollectionResponseMultiAssociatedObjectWithLabelForwardPaging implements ModelInterface, ArrayAccess, \JsonSerializable
4444
{
4545
public const DISCRIMINATOR = null;
4646

@@ -49,15 +49,15 @@ class CollectionResponseMultiAssociatedObjectWithLabel implements ModelInterface
4949
*
5050
* @var string
5151
*/
52-
protected static $openAPIModelName = 'CollectionResponseMultiAssociatedObjectWithLabel';
52+
protected static $openAPIModelName = 'CollectionResponseMultiAssociatedObjectWithLabelForwardPaging';
5353

5454
/**
5555
* Array of property to type mappings. Used for (de)serialization
5656
*
5757
* @var string[]
5858
*/
5959
protected static $openAPITypes = [
60-
'paging' => '\HubSpot\Client\Crm\Associations\V4\Model\Paging',
60+
'paging' => '\HubSpot\Client\Crm\Associations\V4\Model\ForwardPaging',
6161
'results' => '\HubSpot\Client\Crm\Associations\V4\Model\MultiAssociatedObjectWithLabel[]'
6262
];
6363

@@ -302,7 +302,7 @@ public function valid()
302302
/**
303303
* Gets paging
304304
*
305-
* @return \HubSpot\Client\Crm\Associations\V4\Model\Paging|null
305+
* @return \HubSpot\Client\Crm\Associations\V4\Model\ForwardPaging|null
306306
*/
307307
public function getPaging()
308308
{
@@ -312,7 +312,7 @@ public function getPaging()
312312
/**
313313
* Sets paging
314314
*
315-
* @param \HubSpot\Client\Crm\Associations\V4\Model\Paging|null $paging paging
315+
* @param \HubSpot\Client\Crm\Associations\V4\Model\ForwardPaging|null $paging paging
316316
*
317317
* @return self
318318
*/

codegen/Crm/Associations/V4/Model/CreatedResponseLabelsBetweenObjectPair.php renamed to codegen/Crm/Associations/V4/Model/ForwardPaging.php

Lines changed: 21 additions & 96 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22
/**
3-
* CreatedResponseLabelsBetweenObjectPair
3+
* ForwardPaging
44
*
55
* PHP version 8.1
66
*
@@ -32,16 +32,15 @@
3232
use \HubSpot\Client\Crm\Associations\V4\ObjectSerializer;
3333

3434
/**
35-
* CreatedResponseLabelsBetweenObjectPair Class Doc Comment
35+
* ForwardPaging Class Doc Comment
3636
*
3737
* @category Class
38-
* @description Contains the details of the labels that were created to define associations between a specific pair of objects.
3938
* @package HubSpot\Client\Crm\Associations\V4
4039
* @author OpenAPI Generator team
4140
* @link https://openapi-generator.tech
4241
* @implements \ArrayAccess<string, mixed>
4342
*/
44-
class CreatedResponseLabelsBetweenObjectPair implements ModelInterface, ArrayAccess, \JsonSerializable
43+
class ForwardPaging implements ModelInterface, ArrayAccess, \JsonSerializable
4544
{
4645
public const DISCRIMINATOR = null;
4746

@@ -50,17 +49,15 @@ class CreatedResponseLabelsBetweenObjectPair implements ModelInterface, ArrayAcc
5049
*
5150
* @var string
5251
*/
53-
protected static $openAPIModelName = 'CreatedResponseLabelsBetweenObjectPair';
52+
protected static $openAPIModelName = 'ForwardPaging';
5453

5554
/**
5655
* Array of property to type mappings. Used for (de)serialization
5756
*
5857
* @var string[]
5958
*/
6059
protected static $openAPITypes = [
61-
'created_resource_id' => 'string',
62-
'entity' => '\HubSpot\Client\Crm\Associations\V4\Model\LabelsBetweenObjectPair',
63-
'location' => 'string'
60+
'next' => '\HubSpot\Client\Crm\Associations\V4\Model\NextPage'
6461
];
6562

6663
/**
@@ -71,9 +68,7 @@ class CreatedResponseLabelsBetweenObjectPair implements ModelInterface, ArrayAcc
7168
* @psalm-var array<string, string|null>
7269
*/
7370
protected static $openAPIFormats = [
74-
'created_resource_id' => null,
75-
'entity' => null,
76-
'location' => null
71+
'next' => null
7772
];
7873

7974
/**
@@ -82,9 +77,7 @@ class CreatedResponseLabelsBetweenObjectPair implements ModelInterface, ArrayAcc
8277
* @var boolean[]
8378
*/
8479
protected static array $openAPINullables = [
85-
'created_resource_id' => false,
86-
'entity' => false,
87-
'location' => false
80+
'next' => false
8881
];
8982

9083
/**
@@ -173,9 +166,7 @@ public function isNullableSetToNull(string $property): bool
173166
* @var string[]
174167
*/
175168
protected static $attributeMap = [
176-
'created_resource_id' => 'createdResourceId',
177-
'entity' => 'entity',
178-
'location' => 'location'
169+
'next' => 'next'
179170
];
180171

181172
/**
@@ -184,9 +175,7 @@ public function isNullableSetToNull(string $property): bool
184175
* @var string[]
185176
*/
186177
protected static $setters = [
187-
'created_resource_id' => 'setCreatedResourceId',
188-
'entity' => 'setEntity',
189-
'location' => 'setLocation'
178+
'next' => 'setNext'
190179
];
191180

192181
/**
@@ -195,9 +184,7 @@ public function isNullableSetToNull(string $property): bool
195184
* @var string[]
196185
*/
197186
protected static $getters = [
198-
'created_resource_id' => 'getCreatedResourceId',
199-
'entity' => 'getEntity',
200-
'location' => 'getLocation'
187+
'next' => 'getNext'
201188
];
202189

203190
/**
@@ -257,9 +244,7 @@ public function getModelName()
257244
*/
258245
public function __construct(?array $data = null)
259246
{
260-
$this->setIfExists('created_resource_id', $data ?? [], null);
261-
$this->setIfExists('entity', $data ?? [], null);
262-
$this->setIfExists('location', $data ?? [], null);
247+
$this->setIfExists('next', $data ?? [], null);
263248
}
264249

265250
/**
@@ -289,12 +274,6 @@ public function listInvalidProperties()
289274
{
290275
$invalidProperties = [];
291276

292-
if ($this->container['created_resource_id'] === null) {
293-
$invalidProperties[] = "'created_resource_id' can't be null";
294-
}
295-
if ($this->container['entity'] === null) {
296-
$invalidProperties[] = "'entity' can't be null";
297-
}
298277
return $invalidProperties;
299278
}
300279

@@ -311,82 +290,28 @@ public function valid()
311290

312291

313292
/**
314-
* Gets created_resource_id
315-
*
316-
* @return string
317-
*/
318-
public function getCreatedResourceId()
319-
{
320-
return $this->container['created_resource_id'];
321-
}
322-
323-
/**
324-
* Sets created_resource_id
325-
*
326-
* @param string $created_resource_id The unique identifier of the newly created resource.
327-
*
328-
* @return self
329-
*/
330-
public function setCreatedResourceId($created_resource_id)
331-
{
332-
if (is_null($created_resource_id)) {
333-
throw new \InvalidArgumentException('non-nullable created_resource_id cannot be null');
334-
}
335-
$this->container['created_resource_id'] = $created_resource_id;
336-
337-
return $this;
338-
}
339-
340-
/**
341-
* Gets entity
342-
*
343-
* @return \HubSpot\Client\Crm\Associations\V4\Model\LabelsBetweenObjectPair
344-
*/
345-
public function getEntity()
346-
{
347-
return $this->container['entity'];
348-
}
349-
350-
/**
351-
* Sets entity
352-
*
353-
* @param \HubSpot\Client\Crm\Associations\V4\Model\LabelsBetweenObjectPair $entity entity
354-
*
355-
* @return self
356-
*/
357-
public function setEntity($entity)
358-
{
359-
if (is_null($entity)) {
360-
throw new \InvalidArgumentException('non-nullable entity cannot be null');
361-
}
362-
$this->container['entity'] = $entity;
363-
364-
return $this;
365-
}
366-
367-
/**
368-
* Gets location
293+
* Gets next
369294
*
370-
* @return string|null
295+
* @return \HubSpot\Client\Crm\Associations\V4\Model\NextPage|null
371296
*/
372-
public function getLocation()
297+
public function getNext()
373298
{
374-
return $this->container['location'];
299+
return $this->container['next'];
375300
}
376301

377302
/**
378-
* Sets location
303+
* Sets next
379304
*
380-
* @param string|null $location The URL location of the newly created resource.
305+
* @param \HubSpot\Client\Crm\Associations\V4\Model\NextPage|null $next next
381306
*
382307
* @return self
383308
*/
384-
public function setLocation($location)
309+
public function setNext($next)
385310
{
386-
if (is_null($location)) {
387-
throw new \InvalidArgumentException('non-nullable location cannot be null');
311+
if (is_null($next)) {
312+
throw new \InvalidArgumentException('non-nullable next cannot be null');
388313
}
389-
$this->container['location'] = $location;
314+
$this->container['next'] = $next;
390315

391316
return $this;
392317
}

0 commit comments

Comments
 (0)