Skip to content

Commit 60cb40e

Browse files
Merge pull request #470 from HubSpot/feature/codegenCrmExtensions
Codegen: CRM Extensions
2 parents 0782435 + f18f468 commit 60cb40e

59 files changed

Lines changed: 3743 additions & 455 deletions

Some content is hidden

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

codegen/Crm/Extensions/Calling/Api/ChannelConnectionSettingsApi.php

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

codegen/Crm/Extensions/Calling/Api/RecordingSettingsApi.php

Lines changed: 57 additions & 66 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 RecordingSettingsApi
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
}
@@ -134,7 +134,7 @@ public function getConfig()
134134
/**
135135
* Operation getUrlFormat
136136
*
137-
* Read calling app recording settings
137+
* Retrieve recording settings
138138
*
139139
* @param int $app_id The ID of the app. (required)
140140
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['getUrlFormat'] to see the possible values for this operation
@@ -152,7 +152,7 @@ public function getUrlFormat($app_id, string $contentType = self::contentTypes['
152152
/**
153153
* Operation getUrlFormatWithHttpInfo
154154
*
155-
* Read calling app recording settings
155+
* Retrieve recording settings
156156
*
157157
* @param int $app_id The ID of the app. (required)
158158
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['getUrlFormat'] to see the possible values for this operation
@@ -187,18 +187,6 @@ public function getUrlFormatWithHttpInfo($app_id, string $contentType = self::co
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
case 200:
@@ -257,6 +245,19 @@ public function getUrlFormatWithHttpInfo($app_id, string $contentType = self::co
257245
];
258246
}
259247

248+
if ($statusCode < 200 || $statusCode > 299) {
249+
throw new ApiException(
250+
sprintf(
251+
'[%d] Error connecting to the API (%s)',
252+
$statusCode,
253+
(string) $request->getUri()
254+
),
255+
$statusCode,
256+
$response->getHeaders(),
257+
(string) $response->getBody()
258+
);
259+
}
260+
260261
$returnType = '\HubSpot\Client\Crm\Extensions\Calling\Model\RecordingSettingsResponse';
261262
if ($returnType === '\SplFileObject') {
262263
$content = $response->getBody(); //stream goes to serializer
@@ -311,7 +312,7 @@ public function getUrlFormatWithHttpInfo($app_id, string $contentType = self::co
311312
/**
312313
* Operation getUrlFormatAsync
313314
*
314-
* Read calling app recording settings
315+
* Retrieve recording settings
315316
*
316317
* @param int $app_id The ID of the app. (required)
317318
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['getUrlFormat'] to see the possible values for this operation
@@ -332,7 +333,7 @@ function ($response) {
332333
/**
333334
* Operation getUrlFormatAsyncWithHttpInfo
334335
*
335-
* Read calling app recording settings
336+
* Retrieve recording settings
336337
*
337338
* @param int $app_id The ID of the app. (required)
338339
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['getUrlFormat'] to see the possible values for this operation
@@ -533,18 +534,6 @@ public function markAsReadyWithHttpInfo($mark_recording_as_ready_request, string
533534

534535
$statusCode = $response->getStatusCode();
535536

536-
if ($statusCode < 200 || $statusCode > 299) {
537-
throw new ApiException(
538-
sprintf(
539-
'[%d] Error connecting to the API (%s)',
540-
$statusCode,
541-
(string) $request->getUri()
542-
),
543-
$statusCode,
544-
$response->getHeaders(),
545-
(string) $response->getBody()
546-
);
547-
}
548537

549538
return [null, $statusCode, $response->getHeaders()];
550539

@@ -721,7 +710,7 @@ public function markAsReadyRequest($mark_recording_as_ready_request, string $con
721710
/**
722711
* Operation registerUrlFormat
723712
*
724-
* Register calling app for recording
713+
* Enable the app for call recording
725714
*
726715
* @param int $app_id The ID of the app. (required)
727716
* @param \HubSpot\Client\Crm\Extensions\Calling\Model\RecordingSettingsRequest $recording_settings_request recording_settings_request (required)
@@ -740,7 +729,7 @@ public function registerUrlFormat($app_id, $recording_settings_request, string $
740729
/**
741730
* Operation registerUrlFormatWithHttpInfo
742731
*
743-
* Register calling app for recording
732+
* Enable the app for call recording
744733
*
745734
* @param int $app_id The ID of the app. (required)
746735
* @param \HubSpot\Client\Crm\Extensions\Calling\Model\RecordingSettingsRequest $recording_settings_request (required)
@@ -776,18 +765,6 @@ public function registerUrlFormatWithHttpInfo($app_id, $recording_settings_reque
776765

777766
$statusCode = $response->getStatusCode();
778767

779-
if ($statusCode < 200 || $statusCode > 299) {
780-
throw new ApiException(
781-
sprintf(
782-
'[%d] Error connecting to the API (%s)',
783-
$statusCode,
784-
(string) $request->getUri()
785-
),
786-
$statusCode,
787-
$response->getHeaders(),
788-
(string) $response->getBody()
789-
);
790-
}
791768

792769
switch($statusCode) {
793770
case 200:
@@ -846,6 +823,19 @@ public function registerUrlFormatWithHttpInfo($app_id, $recording_settings_reque
846823
];
847824
}
848825

826+
if ($statusCode < 200 || $statusCode > 299) {
827+
throw new ApiException(
828+
sprintf(
829+
'[%d] Error connecting to the API (%s)',
830+
$statusCode,
831+
(string) $request->getUri()
832+
),
833+
$statusCode,
834+
$response->getHeaders(),
835+
(string) $response->getBody()
836+
);
837+
}
838+
849839
$returnType = '\HubSpot\Client\Crm\Extensions\Calling\Model\RecordingSettingsResponse';
850840
if ($returnType === '\SplFileObject') {
851841
$content = $response->getBody(); //stream goes to serializer
@@ -900,7 +890,7 @@ public function registerUrlFormatWithHttpInfo($app_id, $recording_settings_reque
900890
/**
901891
* Operation registerUrlFormatAsync
902892
*
903-
* Register calling app for recording
893+
* Enable the app for call recording
904894
*
905895
* @param int $app_id The ID of the app. (required)
906896
* @param \HubSpot\Client\Crm\Extensions\Calling\Model\RecordingSettingsRequest $recording_settings_request (required)
@@ -922,7 +912,7 @@ function ($response) {
922912
/**
923913
* Operation registerUrlFormatAsyncWithHttpInfo
924914
*
925-
* Register calling app for recording
915+
* Enable the app for call recording
926916
*
927917
* @param int $app_id The ID of the app. (required)
928918
* @param \HubSpot\Client\Crm\Extensions\Calling\Model\RecordingSettingsRequest $recording_settings_request (required)
@@ -1087,7 +1077,7 @@ public function registerUrlFormatRequest($app_id, $recording_settings_request, s
10871077
/**
10881078
* Operation updateUrlFormat
10891079
*
1090-
* Update calling app&#39;s recording settings
1080+
* Update recording settings
10911081
*
10921082
* @param int $app_id The ID of the app. (required)
10931083
* @param \HubSpot\Client\Crm\Extensions\Calling\Model\RecordingSettingsPatchRequest $recording_settings_patch_request recording_settings_patch_request (required)
@@ -1106,7 +1096,7 @@ public function updateUrlFormat($app_id, $recording_settings_patch_request, stri
11061096
/**
11071097
* Operation updateUrlFormatWithHttpInfo
11081098
*
1109-
* Update calling app&#39;s recording settings
1099+
* Update recording settings
11101100
*
11111101
* @param int $app_id The ID of the app. (required)
11121102
* @param \HubSpot\Client\Crm\Extensions\Calling\Model\RecordingSettingsPatchRequest $recording_settings_patch_request (required)
@@ -1142,18 +1132,6 @@ public function updateUrlFormatWithHttpInfo($app_id, $recording_settings_patch_r
11421132

11431133
$statusCode = $response->getStatusCode();
11441134

1145-
if ($statusCode < 200 || $statusCode > 299) {
1146-
throw new ApiException(
1147-
sprintf(
1148-
'[%d] Error connecting to the API (%s)',
1149-
$statusCode,
1150-
(string) $request->getUri()
1151-
),
1152-
$statusCode,
1153-
$response->getHeaders(),
1154-
(string) $response->getBody()
1155-
);
1156-
}
11571135

11581136
switch($statusCode) {
11591137
case 200:
@@ -1212,6 +1190,19 @@ public function updateUrlFormatWithHttpInfo($app_id, $recording_settings_patch_r
12121190
];
12131191
}
12141192

1193+
if ($statusCode < 200 || $statusCode > 299) {
1194+
throw new ApiException(
1195+
sprintf(
1196+
'[%d] Error connecting to the API (%s)',
1197+
$statusCode,
1198+
(string) $request->getUri()
1199+
),
1200+
$statusCode,
1201+
$response->getHeaders(),
1202+
(string) $response->getBody()
1203+
);
1204+
}
1205+
12151206
$returnType = '\HubSpot\Client\Crm\Extensions\Calling\Model\RecordingSettingsResponse';
12161207
if ($returnType === '\SplFileObject') {
12171208
$content = $response->getBody(); //stream goes to serializer
@@ -1266,7 +1257,7 @@ public function updateUrlFormatWithHttpInfo($app_id, $recording_settings_patch_r
12661257
/**
12671258
* Operation updateUrlFormatAsync
12681259
*
1269-
* Update calling app&#39;s recording settings
1260+
* Update recording settings
12701261
*
12711262
* @param int $app_id The ID of the app. (required)
12721263
* @param \HubSpot\Client\Crm\Extensions\Calling\Model\RecordingSettingsPatchRequest $recording_settings_patch_request (required)
@@ -1288,7 +1279,7 @@ function ($response) {
12881279
/**
12891280
* Operation updateUrlFormatAsyncWithHttpInfo
12901281
*
1291-
* Update calling app&#39;s recording settings
1282+
* Update recording settings
12921283
*
12931284
* @param int $app_id The ID of the app. (required)
12941285
* @param \HubSpot\Client\Crm\Extensions\Calling\Model\RecordingSettingsPatchRequest $recording_settings_patch_request (required)

0 commit comments

Comments
 (0)