|
16 | 16 | * |
17 | 17 | * The version of the OpenAPI document: v3 |
18 | 18 | * Generated by: https://openapi-generator.tech |
19 | | - * OpenAPI Generator version: 7.3.0 |
| 19 | + * Generator version: 7.12.0 |
20 | 20 | */ |
21 | 21 |
|
22 | 22 | /** |
@@ -101,13 +101,13 @@ class RowsBatchApi |
101 | 101 | * @param int $hostIndex (Optional) host index to select the list of hosts if defined in the OpenAPI spec |
102 | 102 | */ |
103 | 103 | public function __construct( |
104 | | - ClientInterface $client = null, |
105 | | - Configuration $config = null, |
106 | | - HeaderSelector $selector = null, |
107 | | - $hostIndex = 0 |
| 104 | + ?ClientInterface $client = null, |
| 105 | + ?Configuration $config = null, |
| 106 | + ?HeaderSelector $selector = null, |
| 107 | + int $hostIndex = 0 |
108 | 108 | ) { |
109 | 109 | $this->client = $client ?: new Client(); |
110 | | - $this->config = $config ?: new Configuration(); |
| 110 | + $this->config = $config ?: Configuration::getDefaultConfiguration(); |
111 | 111 | $this->headerSelector = $selector ?: new HeaderSelector(); |
112 | 112 | $this->hostIndex = $hostIndex; |
113 | 113 | } |
@@ -198,18 +198,6 @@ public function cloneDraftTableRowsWithHttpInfo($table_id_or_name, $batch_input_ |
198 | 198 |
|
199 | 199 | $statusCode = $response->getStatusCode(); |
200 | 200 |
|
201 | | - if ($statusCode < 200 || $statusCode > 299) { |
202 | | - throw new ApiException( |
203 | | - sprintf( |
204 | | - '[%d] Error connecting to the API (%s)', |
205 | | - $statusCode, |
206 | | - (string) $request->getUri() |
207 | | - ), |
208 | | - $statusCode, |
209 | | - $response->getHeaders(), |
210 | | - (string) $response->getBody() |
211 | | - ); |
212 | | - } |
213 | 201 |
|
214 | 202 | switch($statusCode) { |
215 | 203 | case 200: |
@@ -268,6 +256,19 @@ public function cloneDraftTableRowsWithHttpInfo($table_id_or_name, $batch_input_ |
268 | 256 | ]; |
269 | 257 | } |
270 | 258 |
|
| 259 | + if ($statusCode < 200 || $statusCode > 299) { |
| 260 | + throw new ApiException( |
| 261 | + sprintf( |
| 262 | + '[%d] Error connecting to the API (%s)', |
| 263 | + $statusCode, |
| 264 | + (string) $request->getUri() |
| 265 | + ), |
| 266 | + $statusCode, |
| 267 | + $response->getHeaders(), |
| 268 | + (string) $response->getBody() |
| 269 | + ); |
| 270 | + } |
| 271 | + |
271 | 272 | $returnType = '\HubSpot\Client\Cms\Hubdb\Model\BatchResponseHubDbTableRowV3'; |
272 | 273 | if ($returnType === '\SplFileObject') { |
273 | 274 | $content = $response->getBody(); //stream goes to serializer |
@@ -563,18 +564,6 @@ public function createDraftTableRowsWithHttpInfo($table_id_or_name, $batch_input |
563 | 564 |
|
564 | 565 | $statusCode = $response->getStatusCode(); |
565 | 566 |
|
566 | | - if ($statusCode < 200 || $statusCode > 299) { |
567 | | - throw new ApiException( |
568 | | - sprintf( |
569 | | - '[%d] Error connecting to the API (%s)', |
570 | | - $statusCode, |
571 | | - (string) $request->getUri() |
572 | | - ), |
573 | | - $statusCode, |
574 | | - $response->getHeaders(), |
575 | | - (string) $response->getBody() |
576 | | - ); |
577 | | - } |
578 | 567 |
|
579 | 568 | switch($statusCode) { |
580 | 569 | case 201: |
@@ -660,6 +649,19 @@ public function createDraftTableRowsWithHttpInfo($table_id_or_name, $batch_input |
660 | 649 | ]; |
661 | 650 | } |
662 | 651 |
|
| 652 | + if ($statusCode < 200 || $statusCode > 299) { |
| 653 | + throw new ApiException( |
| 654 | + sprintf( |
| 655 | + '[%d] Error connecting to the API (%s)', |
| 656 | + $statusCode, |
| 657 | + (string) $request->getUri() |
| 658 | + ), |
| 659 | + $statusCode, |
| 660 | + $response->getHeaders(), |
| 661 | + (string) $response->getBody() |
| 662 | + ); |
| 663 | + } |
| 664 | + |
663 | 665 | $returnType = '\HubSpot\Client\Cms\Hubdb\Model\BatchResponseHubDbTableRowV3'; |
664 | 666 | if ($returnType === '\SplFileObject') { |
665 | 667 | $content = $response->getBody(); //stream goes to serializer |
@@ -962,18 +964,6 @@ public function purgeDraftTableRowsWithHttpInfo($table_id_or_name, $batch_input_ |
962 | 964 |
|
963 | 965 | $statusCode = $response->getStatusCode(); |
964 | 966 |
|
965 | | - if ($statusCode < 200 || $statusCode > 299) { |
966 | | - throw new ApiException( |
967 | | - sprintf( |
968 | | - '[%d] Error connecting to the API (%s)', |
969 | | - $statusCode, |
970 | | - (string) $request->getUri() |
971 | | - ), |
972 | | - $statusCode, |
973 | | - $response->getHeaders(), |
974 | | - (string) $response->getBody() |
975 | | - ); |
976 | | - } |
977 | 967 |
|
978 | 968 | return [null, $statusCode, $response->getHeaders()]; |
979 | 969 |
|
@@ -1223,18 +1213,6 @@ public function readDraftTableRowsWithHttpInfo($table_id_or_name, $batch_input_s |
1223 | 1213 |
|
1224 | 1214 | $statusCode = $response->getStatusCode(); |
1225 | 1215 |
|
1226 | | - if ($statusCode < 200 || $statusCode > 299) { |
1227 | | - throw new ApiException( |
1228 | | - sprintf( |
1229 | | - '[%d] Error connecting to the API (%s)', |
1230 | | - $statusCode, |
1231 | | - (string) $request->getUri() |
1232 | | - ), |
1233 | | - $statusCode, |
1234 | | - $response->getHeaders(), |
1235 | | - (string) $response->getBody() |
1236 | | - ); |
1237 | | - } |
1238 | 1216 |
|
1239 | 1217 | switch($statusCode) { |
1240 | 1218 | case 200: |
@@ -1320,6 +1298,19 @@ public function readDraftTableRowsWithHttpInfo($table_id_or_name, $batch_input_s |
1320 | 1298 | ]; |
1321 | 1299 | } |
1322 | 1300 |
|
| 1301 | + if ($statusCode < 200 || $statusCode > 299) { |
| 1302 | + throw new ApiException( |
| 1303 | + sprintf( |
| 1304 | + '[%d] Error connecting to the API (%s)', |
| 1305 | + $statusCode, |
| 1306 | + (string) $request->getUri() |
| 1307 | + ), |
| 1308 | + $statusCode, |
| 1309 | + $response->getHeaders(), |
| 1310 | + (string) $response->getBody() |
| 1311 | + ); |
| 1312 | + } |
| 1313 | + |
1323 | 1314 | $returnType = '\HubSpot\Client\Cms\Hubdb\Model\BatchResponseHubDbTableRowV3'; |
1324 | 1315 | if ($returnType === '\SplFileObject') { |
1325 | 1316 | $content = $response->getBody(); //stream goes to serializer |
@@ -1623,18 +1614,6 @@ public function readTableRowsWithHttpInfo($table_id_or_name, $batch_input_string |
1623 | 1614 |
|
1624 | 1615 | $statusCode = $response->getStatusCode(); |
1625 | 1616 |
|
1626 | | - if ($statusCode < 200 || $statusCode > 299) { |
1627 | | - throw new ApiException( |
1628 | | - sprintf( |
1629 | | - '[%d] Error connecting to the API (%s)', |
1630 | | - $statusCode, |
1631 | | - (string) $request->getUri() |
1632 | | - ), |
1633 | | - $statusCode, |
1634 | | - $response->getHeaders(), |
1635 | | - (string) $response->getBody() |
1636 | | - ); |
1637 | | - } |
1638 | 1617 |
|
1639 | 1618 | switch($statusCode) { |
1640 | 1619 | case 200: |
@@ -1720,6 +1699,19 @@ public function readTableRowsWithHttpInfo($table_id_or_name, $batch_input_string |
1720 | 1699 | ]; |
1721 | 1700 | } |
1722 | 1701 |
|
| 1702 | + if ($statusCode < 200 || $statusCode > 299) { |
| 1703 | + throw new ApiException( |
| 1704 | + sprintf( |
| 1705 | + '[%d] Error connecting to the API (%s)', |
| 1706 | + $statusCode, |
| 1707 | + (string) $request->getUri() |
| 1708 | + ), |
| 1709 | + $statusCode, |
| 1710 | + $response->getHeaders(), |
| 1711 | + (string) $response->getBody() |
| 1712 | + ); |
| 1713 | + } |
| 1714 | + |
1723 | 1715 | $returnType = '\HubSpot\Client\Cms\Hubdb\Model\BatchResponseHubDbTableRowV3'; |
1724 | 1716 | if ($returnType === '\SplFileObject') { |
1725 | 1717 | $content = $response->getBody(); //stream goes to serializer |
@@ -2023,18 +2015,6 @@ public function replaceDraftTableRowsWithHttpInfo($table_id_or_name, $batch_inpu |
2023 | 2015 |
|
2024 | 2016 | $statusCode = $response->getStatusCode(); |
2025 | 2017 |
|
2026 | | - if ($statusCode < 200 || $statusCode > 299) { |
2027 | | - throw new ApiException( |
2028 | | - sprintf( |
2029 | | - '[%d] Error connecting to the API (%s)', |
2030 | | - $statusCode, |
2031 | | - (string) $request->getUri() |
2032 | | - ), |
2033 | | - $statusCode, |
2034 | | - $response->getHeaders(), |
2035 | | - (string) $response->getBody() |
2036 | | - ); |
2037 | | - } |
2038 | 2018 |
|
2039 | 2019 | switch($statusCode) { |
2040 | 2020 | case 200: |
@@ -2120,6 +2100,19 @@ public function replaceDraftTableRowsWithHttpInfo($table_id_or_name, $batch_inpu |
2120 | 2100 | ]; |
2121 | 2101 | } |
2122 | 2102 |
|
| 2103 | + if ($statusCode < 200 || $statusCode > 299) { |
| 2104 | + throw new ApiException( |
| 2105 | + sprintf( |
| 2106 | + '[%d] Error connecting to the API (%s)', |
| 2107 | + $statusCode, |
| 2108 | + (string) $request->getUri() |
| 2109 | + ), |
| 2110 | + $statusCode, |
| 2111 | + $response->getHeaders(), |
| 2112 | + (string) $response->getBody() |
| 2113 | + ); |
| 2114 | + } |
| 2115 | + |
2123 | 2116 | $returnType = '\HubSpot\Client\Cms\Hubdb\Model\BatchResponseHubDbTableRowV3'; |
2124 | 2117 | if ($returnType === '\SplFileObject') { |
2125 | 2118 | $content = $response->getBody(); //stream goes to serializer |
@@ -2423,18 +2416,6 @@ public function updateDraftTableRowsWithHttpInfo($table_id_or_name, $batch_input |
2423 | 2416 |
|
2424 | 2417 | $statusCode = $response->getStatusCode(); |
2425 | 2418 |
|
2426 | | - if ($statusCode < 200 || $statusCode > 299) { |
2427 | | - throw new ApiException( |
2428 | | - sprintf( |
2429 | | - '[%d] Error connecting to the API (%s)', |
2430 | | - $statusCode, |
2431 | | - (string) $request->getUri() |
2432 | | - ), |
2433 | | - $statusCode, |
2434 | | - $response->getHeaders(), |
2435 | | - (string) $response->getBody() |
2436 | | - ); |
2437 | | - } |
2438 | 2419 |
|
2439 | 2420 | switch($statusCode) { |
2440 | 2421 | case 200: |
@@ -2520,6 +2501,19 @@ public function updateDraftTableRowsWithHttpInfo($table_id_or_name, $batch_input |
2520 | 2501 | ]; |
2521 | 2502 | } |
2522 | 2503 |
|
| 2504 | + if ($statusCode < 200 || $statusCode > 299) { |
| 2505 | + throw new ApiException( |
| 2506 | + sprintf( |
| 2507 | + '[%d] Error connecting to the API (%s)', |
| 2508 | + $statusCode, |
| 2509 | + (string) $request->getUri() |
| 2510 | + ), |
| 2511 | + $statusCode, |
| 2512 | + $response->getHeaders(), |
| 2513 | + (string) $response->getBody() |
| 2514 | + ); |
| 2515 | + } |
| 2516 | + |
2523 | 2517 | $returnType = '\HubSpot\Client\Cms\Hubdb\Model\BatchResponseHubDbTableRowV3'; |
2524 | 2518 | if ($returnType === '\SplFileObject') { |
2525 | 2519 | $content = $response->getBody(); //stream goes to serializer |
|
0 commit comments