Skip to content

Commit 8104abd

Browse files
Codegen: Marketing Events
1 parent da992a1 commit 8104abd

65 files changed

Lines changed: 770 additions & 747 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

codegen/Marketing/Events/Api/AddEventAttendeesApi.php

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

codegen/Marketing/Events/Api/BasicApi.php

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

codegen/Marketing/Events/Api/BatchApi.php

Lines changed: 45 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
*
1717
* The version of the OpenAPI document: v3
1818
* Generated by: https://openapi-generator.tech
19-
* OpenAPI Generator version: 7.3.0
19+
* Generator version: 7.12.0
2020
*/
2121

2222
/**
@@ -92,13 +92,13 @@ class BatchApi
9292
* @param int $hostIndex (Optional) host index to select the list of hosts if defined in the OpenAPI spec
9393
*/
9494
public function __construct(
95-
ClientInterface $client = null,
96-
Configuration $config = null,
97-
HeaderSelector $selector = null,
98-
$hostIndex = 0
95+
?ClientInterface $client = null,
96+
?Configuration $config = null,
97+
?HeaderSelector $selector = null,
98+
int $hostIndex = 0
9999
) {
100100
$this->client = $client ?: new Client();
101-
$this->config = $config ?: new Configuration();
101+
$this->config = $config ?: Configuration::getDefaultConfiguration();
102102
$this->headerSelector = $selector ?: new HeaderSelector();
103103
$this->hostIndex = $hostIndex;
104104
}
@@ -187,18 +187,6 @@ public function archiveWithHttpInfo($batch_input_marketing_event_external_unique
187187

188188
$statusCode = $response->getStatusCode();
189189

190-
if ($statusCode < 200 || $statusCode > 299) {
191-
throw new ApiException(
192-
sprintf(
193-
'[%d] Error connecting to the API (%s)',
194-
$statusCode,
195-
(string) $request->getUri()
196-
),
197-
$statusCode,
198-
$response->getHeaders(),
199-
(string) $response->getBody()
200-
);
201-
}
202190

203191
switch($statusCode) {
204192
default:
@@ -230,6 +218,19 @@ public function archiveWithHttpInfo($batch_input_marketing_event_external_unique
230218
];
231219
}
232220

221+
if ($statusCode < 200 || $statusCode > 299) {
222+
throw new ApiException(
223+
sprintf(
224+
'[%d] Error connecting to the API (%s)',
225+
$statusCode,
226+
(string) $request->getUri()
227+
),
228+
$statusCode,
229+
$response->getHeaders(),
230+
(string) $response->getBody()
231+
);
232+
}
233+
233234
$returnType = '\HubSpot\Client\Marketing\Events\Model\Error';
234235
if ($returnType === '\SplFileObject') {
235236
$content = $response->getBody(); //stream goes to serializer
@@ -496,18 +497,6 @@ public function archiveByObjectIdWithHttpInfo($batch_input_marketing_event_publi
496497

497498
$statusCode = $response->getStatusCode();
498499

499-
if ($statusCode < 200 || $statusCode > 299) {
500-
throw new ApiException(
501-
sprintf(
502-
'[%d] Error connecting to the API (%s)',
503-
$statusCode,
504-
(string) $request->getUri()
505-
),
506-
$statusCode,
507-
$response->getHeaders(),
508-
(string) $response->getBody()
509-
);
510-
}
511500

512501
return [null, $statusCode, $response->getHeaders()];
513502

@@ -737,18 +726,6 @@ public function updateByObjectIdWithHttpInfo($batch_input_marketing_event_public
737726

738727
$statusCode = $response->getStatusCode();
739728

740-
if ($statusCode < 200 || $statusCode > 299) {
741-
throw new ApiException(
742-
sprintf(
743-
'[%d] Error connecting to the API (%s)',
744-
$statusCode,
745-
(string) $request->getUri()
746-
),
747-
$statusCode,
748-
$response->getHeaders(),
749-
(string) $response->getBody()
750-
);
751-
}
752729

753730
switch($statusCode) {
754731
case 200:
@@ -834,6 +811,19 @@ public function updateByObjectIdWithHttpInfo($batch_input_marketing_event_public
834811
];
835812
}
836813

814+
if ($statusCode < 200 || $statusCode > 299) {
815+
throw new ApiException(
816+
sprintf(
817+
'[%d] Error connecting to the API (%s)',
818+
$statusCode,
819+
(string) $request->getUri()
820+
),
821+
$statusCode,
822+
$response->getHeaders(),
823+
(string) $response->getBody()
824+
);
825+
}
826+
837827
$returnType = '\HubSpot\Client\Marketing\Events\Model\BatchResponseMarketingEventPublicDefaultResponseV2';
838828
if ($returnType === '\SplFileObject') {
839829
$content = $response->getBody(); //stream goes to serializer
@@ -1117,18 +1107,6 @@ public function upsertWithHttpInfo($batch_input_marketing_event_create_request_p
11171107

11181108
$statusCode = $response->getStatusCode();
11191109

1120-
if ($statusCode < 200 || $statusCode > 299) {
1121-
throw new ApiException(
1122-
sprintf(
1123-
'[%d] Error connecting to the API (%s)',
1124-
$statusCode,
1125-
(string) $request->getUri()
1126-
),
1127-
$statusCode,
1128-
$response->getHeaders(),
1129-
(string) $response->getBody()
1130-
);
1131-
}
11321110

11331111
switch($statusCode) {
11341112
case 200:
@@ -1187,6 +1165,19 @@ public function upsertWithHttpInfo($batch_input_marketing_event_create_request_p
11871165
];
11881166
}
11891167

1168+
if ($statusCode < 200 || $statusCode > 299) {
1169+
throw new ApiException(
1170+
sprintf(
1171+
'[%d] Error connecting to the API (%s)',
1172+
$statusCode,
1173+
(string) $request->getUri()
1174+
),
1175+
$statusCode,
1176+
$response->getHeaders(),
1177+
(string) $response->getBody()
1178+
);
1179+
}
1180+
11901181
$returnType = '\HubSpot\Client\Marketing\Events\Model\BatchResponseMarketingEventPublicDefaultResponse';
11911182
if ($returnType === '\SplFileObject') {
11921183
$content = $response->getBody(); //stream goes to serializer

codegen/Marketing/Events/Api/ChangePropertyApi.php

Lines changed: 32 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
*
1717
* The version of the OpenAPI document: v3
1818
* Generated by: https://openapi-generator.tech
19-
* OpenAPI Generator version: 7.3.0
19+
* Generator version: 7.12.0
2020
*/
2121

2222
/**
@@ -86,13 +86,13 @@ class ChangePropertyApi
8686
* @param int $hostIndex (Optional) host index to select the list of hosts if defined in the OpenAPI spec
8787
*/
8888
public function __construct(
89-
ClientInterface $client = null,
90-
Configuration $config = null,
91-
HeaderSelector $selector = null,
92-
$hostIndex = 0
89+
?ClientInterface $client = null,
90+
?Configuration $config = null,
91+
?HeaderSelector $selector = null,
92+
int $hostIndex = 0
9393
) {
9494
$this->client = $client ?: new Client();
95-
$this->config = $config ?: new Configuration();
95+
$this->config = $config ?: Configuration::getDefaultConfiguration();
9696
$this->headerSelector = $selector ?: new HeaderSelector();
9797
$this->hostIndex = $hostIndex;
9898
}
@@ -183,18 +183,6 @@ public function cancelWithHttpInfo($external_event_id, $external_account_id, str
183183

184184
$statusCode = $response->getStatusCode();
185185

186-
if ($statusCode < 200 || $statusCode > 299) {
187-
throw new ApiException(
188-
sprintf(
189-
'[%d] Error connecting to the API (%s)',
190-
$statusCode,
191-
(string) $request->getUri()
192-
),
193-
$statusCode,
194-
$response->getHeaders(),
195-
(string) $response->getBody()
196-
);
197-
}
198186

199187
switch($statusCode) {
200188
case 200:
@@ -253,6 +241,19 @@ public function cancelWithHttpInfo($external_event_id, $external_account_id, str
253241
];
254242
}
255243

244+
if ($statusCode < 200 || $statusCode > 299) {
245+
throw new ApiException(
246+
sprintf(
247+
'[%d] Error connecting to the API (%s)',
248+
$statusCode,
249+
(string) $request->getUri()
250+
),
251+
$statusCode,
252+
$response->getHeaders(),
253+
(string) $response->getBody()
254+
);
255+
}
256+
256257
$returnType = '\HubSpot\Client\Marketing\Events\Model\MarketingEventDefaultResponse';
257258
if ($returnType === '\SplFileObject') {
258259
$content = $response->getBody(); //stream goes to serializer
@@ -552,18 +553,6 @@ public function completeWithHttpInfo($external_event_id, $external_account_id, $
552553

553554
$statusCode = $response->getStatusCode();
554555

555-
if ($statusCode < 200 || $statusCode > 299) {
556-
throw new ApiException(
557-
sprintf(
558-
'[%d] Error connecting to the API (%s)',
559-
$statusCode,
560-
(string) $request->getUri()
561-
),
562-
$statusCode,
563-
$response->getHeaders(),
564-
(string) $response->getBody()
565-
);
566-
}
567556

568557
switch($statusCode) {
569558
case 200:
@@ -622,6 +611,19 @@ public function completeWithHttpInfo($external_event_id, $external_account_id, $
622611
];
623612
}
624613

614+
if ($statusCode < 200 || $statusCode > 299) {
615+
throw new ApiException(
616+
sprintf(
617+
'[%d] Error connecting to the API (%s)',
618+
$statusCode,
619+
(string) $request->getUri()
620+
),
621+
$statusCode,
622+
$response->getHeaders(),
623+
(string) $response->getBody()
624+
);
625+
}
626+
625627
$returnType = '\HubSpot\Client\Marketing\Events\Model\MarketingEventDefaultResponse';
626628
if ($returnType === '\SplFileObject') {
627629
$content = $response->getBody(); //stream goes to serializer

codegen/Marketing/Events/Api/IdentifiersApi.php

Lines changed: 32 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
*
1717
* The version of the OpenAPI document: v3
1818
* Generated by: https://openapi-generator.tech
19-
* OpenAPI Generator version: 7.3.0
19+
* Generator version: 7.12.0
2020
*/
2121

2222
/**
@@ -86,13 +86,13 @@ class IdentifiersApi
8686
* @param int $hostIndex (Optional) host index to select the list of hosts if defined in the OpenAPI spec
8787
*/
8888
public function __construct(
89-
ClientInterface $client = null,
90-
Configuration $config = null,
91-
HeaderSelector $selector = null,
92-
$hostIndex = 0
89+
?ClientInterface $client = null,
90+
?Configuration $config = null,
91+
?HeaderSelector $selector = null,
92+
int $hostIndex = 0
9393
) {
9494
$this->client = $client ?: new Client();
95-
$this->config = $config ?: new Configuration();
95+
$this->config = $config ?: Configuration::getDefaultConfiguration();
9696
$this->headerSelector = $selector ?: new HeaderSelector();
9797
$this->hostIndex = $hostIndex;
9898
}
@@ -181,18 +181,6 @@ public function doSearchWithHttpInfo($q, string $contentType = self::contentType
181181

182182
$statusCode = $response->getStatusCode();
183183

184-
if ($statusCode < 200 || $statusCode > 299) {
185-
throw new ApiException(
186-
sprintf(
187-
'[%d] Error connecting to the API (%s)',
188-
$statusCode,
189-
(string) $request->getUri()
190-
),
191-
$statusCode,
192-
$response->getHeaders(),
193-
(string) $response->getBody()
194-
);
195-
}
196184

197185
switch($statusCode) {
198186
case 200:
@@ -251,6 +239,19 @@ public function doSearchWithHttpInfo($q, string $contentType = self::contentType
251239
];
252240
}
253241

242+
if ($statusCode < 200 || $statusCode > 299) {
243+
throw new ApiException(
244+
sprintf(
245+
'[%d] Error connecting to the API (%s)',
246+
$statusCode,
247+
(string) $request->getUri()
248+
),
249+
$statusCode,
250+
$response->getHeaders(),
251+
(string) $response->getBody()
252+
);
253+
}
254+
254255
$returnType = '\HubSpot\Client\Marketing\Events\Model\CollectionResponseSearchPublicResponseWrapperNoPaging';
255256
if ($returnType === '\SplFileObject') {
256257
$content = $response->getBody(); //stream goes to serializer
@@ -528,18 +529,6 @@ public function searchPortalEventsWithHttpInfo($external_event_id, string $conte
528529

529530
$statusCode = $response->getStatusCode();
530531

531-
if ($statusCode < 200 || $statusCode > 299) {
532-
throw new ApiException(
533-
sprintf(
534-
'[%d] Error connecting to the API (%s)',
535-
$statusCode,
536-
(string) $request->getUri()
537-
),
538-
$statusCode,
539-
$response->getHeaders(),
540-
(string) $response->getBody()
541-
);
542-
}
543532

544533
switch($statusCode) {
545534
case 200:
@@ -598,6 +587,19 @@ public function searchPortalEventsWithHttpInfo($external_event_id, string $conte
598587
];
599588
}
600589

590+
if ($statusCode < 200 || $statusCode > 299) {
591+
throw new ApiException(
592+
sprintf(
593+
'[%d] Error connecting to the API (%s)',
594+
$statusCode,
595+
(string) $request->getUri()
596+
),
597+
$statusCode,
598+
$response->getHeaders(),
599+
(string) $response->getBody()
600+
);
601+
}
602+
601603
$returnType = '\HubSpot\Client\Marketing\Events\Model\CollectionResponseWithTotalMarketingEventIdentifiersResponseNoPaging';
602604
if ($returnType === '\SplFileObject') {
603605
$content = $response->getBody(); //stream goes to serializer

0 commit comments

Comments
 (0)