Skip to content

Commit ec1f69b

Browse files
Merge pull request #605 from HubSpot/codegen/crmCustomObjects
Codegen: CRM Custom Objects
2 parents f027b52 + 86437f7 commit ec1f69b

16 files changed

Lines changed: 2021 additions & 290 deletions

CHANGELOG.md

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,21 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8-
## [Unreleased](https://github.com/HubSpot/hubspot-api-php/compare/14.0.5...HEAD)
8+
## [Unreleased](https://github.com/HubSpot/hubspot-api-php/compare/14.0.6...HEAD)
9+
10+
## [14.0.6](https://github.com/HubSpot/hubspot-api-php/releases/tag/14.0.6) - 2026-04-22
11+
12+
### CRM Objects
13+
14+
- `crm()->objects()->basicApi()->create()` now returns HTTP 201 instead of 200.
15+
- `crm()->objects()->basicApi()->getPage()` return type changed from `CollectionResponseSimplePublicObjectWithAssociations` to `CollectionResponseSimplePublicObjectWithAssociationsForwardPaging`.
16+
- `crm()->objects()->batchApi()->create()` now returns HTTP 201 instead of 200, and handles HTTP 207 (partial success) responses with new `BatchResponseSimplePublicObjectWithErrors` model.
17+
- `crm()->objects()->batchApi()->read()` and `update()` now handle HTTP 207 (partial success) responses, returning `BatchResponseSimplePublicObjectWithErrors`.
18+
- `crm()->objects()->batchApi()->upsert()` now handles HTTP 207 (partial success) responses, returning `BatchResponseSimplePublicUpsertObjectWithErrors`.
19+
- `HubSpot\Client\Crm\Objects\Model\BatchResponseSimplePublicObject` no longer includes `errors` and `numErrors` fields — those are available on the new `BatchResponseSimplePublicObjectWithErrors` model.
20+
- `HubSpot\Client\Crm\Objects\Model\BatchResponseSimplePublicUpsertObject` no longer includes `errors` and `numErrors` fields — those are available on the new `BatchResponseSimplePublicUpsertObjectWithErrors` model.
21+
- Renamed model `CollectionResponseSimplePublicObjectWithAssociations` to `CollectionResponseSimplePublicObjectWithAssociationsForwardPaging`.
22+
- Added new models: `BatchResponseSimplePublicObjectWithErrors`, `BatchResponseSimplePublicUpsertObjectWithErrors`, `ForwardPaging`.
923

1024
## [14.0.5](https://github.com/HubSpot/hubspot-api-php/releases/tag/14.0.5) - 2026-04-02
1125

@@ -1230,7 +1244,7 @@ to
12301244
25. getSubscriptions => getAll (webhooks()->subscriptionsApi())
12311245
26. updateSubscription => update (webhooks()->subscriptionsApi())
12321246

1233-
[Unreleased]: https://github.com/HubSpot/hubspot-api-php/compare/14.0.5...HEAD
1247+
[Unreleased]: https://github.com/HubSpot/hubspot-api-php/compare/14.0.6...HEAD
12341248
[1.0.0-beta]: https://github.com/HubSpot/hubspot-api-php/releases/tag/v1.0.0-beta
12351249
[1.1.0]: https://github.com/HubSpot/hubspot-api-php/releases/tag/1.1.0
12361250
[1.2.0]: https://github.com/HubSpot/hubspot-api-php/releases/tag/1.2.0
@@ -1302,3 +1316,4 @@ to
13021316
[14.0.3]: https://github.com/HubSpot/hubspot-api-php/releases/tag/14.0.3
13031317
[14.0.4]: https://github.com/HubSpot/hubspot-api-php/releases/tag/14.0.4
13041318
[14.0.5]: https://github.com/HubSpot/hubspot-api-php/releases/tag/14.0.5
1319+
[14.0.6]: https://github.com/HubSpot/hubspot-api-php/releases/tag/14.0.6

codegen/Crm/Objects/Api/BasicApi.php

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

codegen/Crm/Objects/Api/BatchApi.php

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

codegen/Crm/Objects/Api/SearchApi.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ public function getConfig()
128128
/**
129129
* Operation doSearch
130130
*
131-
* @param string $object_type object_type (required)
131+
* @param string $object_type (required)
132132
* @param \HubSpot\Client\Crm\Objects\Model\PublicObjectSearchRequest $public_object_search_request public_object_search_request (required)
133133
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['doSearch'] to see the possible values for this operation
134134
*
@@ -145,7 +145,7 @@ public function doSearch($object_type, $public_object_search_request, string $co
145145
/**
146146
* Operation doSearchWithHttpInfo
147147
*
148-
* @param string $object_type (required)
148+
* @param string $object_type (required)
149149
* @param \HubSpot\Client\Crm\Objects\Model\PublicObjectSearchRequest $public_object_search_request (required)
150150
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['doSearch'] to see the possible values for this operation
151151
*
@@ -243,7 +243,7 @@ public function doSearchWithHttpInfo($object_type, $public_object_search_request
243243
/**
244244
* Operation doSearchAsync
245245
*
246-
* @param string $object_type (required)
246+
* @param string $object_type (required)
247247
* @param \HubSpot\Client\Crm\Objects\Model\PublicObjectSearchRequest $public_object_search_request (required)
248248
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['doSearch'] to see the possible values for this operation
249249
*
@@ -263,7 +263,7 @@ function ($response) {
263263
/**
264264
* Operation doSearchAsyncWithHttpInfo
265265
*
266-
* @param string $object_type (required)
266+
* @param string $object_type (required)
267267
* @param \HubSpot\Client\Crm\Objects\Model\PublicObjectSearchRequest $public_object_search_request (required)
268268
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['doSearch'] to see the possible values for this operation
269269
*
@@ -314,7 +314,7 @@ function ($exception) {
314314
/**
315315
* Create request for operation 'doSearch'
316316
*
317-
* @param string $object_type (required)
317+
* @param string $object_type (required)
318318
* @param \HubSpot\Client\Crm\Objects\Model\PublicObjectSearchRequest $public_object_search_request (required)
319319
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['doSearch'] to see the possible values for this operation
320320
*

codegen/Crm/Objects/Model/BatchResponseSimplePublicObject.php

Lines changed: 0 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,7 @@ class BatchResponseSimplePublicObject implements ModelInterface, ArrayAccess, \J
5959
*/
6060
protected static $openAPITypes = [
6161
'completed_at' => '\DateTime',
62-
'errors' => '\HubSpot\Client\Crm\Objects\Model\StandardError[]',
6362
'links' => 'array<string,string>',
64-
'num_errors' => 'int',
6563
'requested_at' => '\DateTime',
6664
'results' => '\HubSpot\Client\Crm\Objects\Model\SimplePublicObject[]',
6765
'started_at' => '\DateTime',
@@ -77,9 +75,7 @@ class BatchResponseSimplePublicObject implements ModelInterface, ArrayAccess, \J
7775
*/
7876
protected static $openAPIFormats = [
7977
'completed_at' => 'date-time',
80-
'errors' => null,
8178
'links' => null,
82-
'num_errors' => 'int32',
8379
'requested_at' => 'date-time',
8480
'results' => null,
8581
'started_at' => 'date-time',
@@ -93,9 +89,7 @@ class BatchResponseSimplePublicObject implements ModelInterface, ArrayAccess, \J
9389
*/
9490
protected static array $openAPINullables = [
9591
'completed_at' => false,
96-
'errors' => false,
9792
'links' => false,
98-
'num_errors' => false,
9993
'requested_at' => false,
10094
'results' => false,
10195
'started_at' => false,
@@ -189,9 +183,7 @@ public function isNullableSetToNull(string $property): bool
189183
*/
190184
protected static $attributeMap = [
191185
'completed_at' => 'completedAt',
192-
'errors' => 'errors',
193186
'links' => 'links',
194-
'num_errors' => 'numErrors',
195187
'requested_at' => 'requestedAt',
196188
'results' => 'results',
197189
'started_at' => 'startedAt',
@@ -205,9 +197,7 @@ public function isNullableSetToNull(string $property): bool
205197
*/
206198
protected static $setters = [
207199
'completed_at' => 'setCompletedAt',
208-
'errors' => 'setErrors',
209200
'links' => 'setLinks',
210-
'num_errors' => 'setNumErrors',
211201
'requested_at' => 'setRequestedAt',
212202
'results' => 'setResults',
213203
'started_at' => 'setStartedAt',
@@ -221,9 +211,7 @@ public function isNullableSetToNull(string $property): bool
221211
*/
222212
protected static $getters = [
223213
'completed_at' => 'getCompletedAt',
224-
'errors' => 'getErrors',
225214
'links' => 'getLinks',
226-
'num_errors' => 'getNumErrors',
227215
'requested_at' => 'getRequestedAt',
228216
'results' => 'getResults',
229217
'started_at' => 'getStartedAt',
@@ -307,9 +295,7 @@ public function getStatusAllowableValues()
307295
public function __construct(?array $data = null)
308296
{
309297
$this->setIfExists('completed_at', $data ?? [], null);
310-
$this->setIfExists('errors', $data ?? [], null);
311298
$this->setIfExists('links', $data ?? [], null);
312-
$this->setIfExists('num_errors', $data ?? [], null);
313299
$this->setIfExists('requested_at', $data ?? [], null);
314300
$this->setIfExists('results', $data ?? [], null);
315301
$this->setIfExists('started_at', $data ?? [], null);
@@ -406,33 +392,6 @@ public function setCompletedAt($completed_at)
406392
return $this;
407393
}
408394

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

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

0 commit comments

Comments
 (0)