|
10 | 10 | */ |
11 | 11 |
|
12 | 12 | /** |
13 | | - * Communication Preferences Subscriptions |
| 13 | + * Subscriptions |
14 | 14 | * |
15 | 15 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) |
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 | /** |
@@ -89,13 +89,13 @@ class StatusApi |
89 | 89 | * @param int $hostIndex (Optional) host index to select the list of hosts if defined in the OpenAPI spec |
90 | 90 | */ |
91 | 91 | public function __construct( |
92 | | - ClientInterface $client = null, |
93 | | - Configuration $config = null, |
94 | | - HeaderSelector $selector = null, |
95 | | - $hostIndex = 0 |
| 92 | + ?ClientInterface $client = null, |
| 93 | + ?Configuration $config = null, |
| 94 | + ?HeaderSelector $selector = null, |
| 95 | + int $hostIndex = 0 |
96 | 96 | ) { |
97 | 97 | $this->client = $client ?: new Client(); |
98 | | - $this->config = $config ?: new Configuration(); |
| 98 | + $this->config = $config ?: Configuration::getDefaultConfiguration(); |
99 | 99 | $this->headerSelector = $selector ?: new HeaderSelector(); |
100 | 100 | $this->hostIndex = $hostIndex; |
101 | 101 | } |
@@ -184,18 +184,6 @@ public function getEmailStatusWithHttpInfo($email_address, string $contentType = |
184 | 184 |
|
185 | 185 | $statusCode = $response->getStatusCode(); |
186 | 186 |
|
187 | | - if ($statusCode < 200 || $statusCode > 299) { |
188 | | - throw new ApiException( |
189 | | - sprintf( |
190 | | - '[%d] Error connecting to the API (%s)', |
191 | | - $statusCode, |
192 | | - (string) $request->getUri() |
193 | | - ), |
194 | | - $statusCode, |
195 | | - $response->getHeaders(), |
196 | | - (string) $response->getBody() |
197 | | - ); |
198 | | - } |
199 | 187 |
|
200 | 188 | switch($statusCode) { |
201 | 189 | case 200: |
@@ -254,6 +242,19 @@ public function getEmailStatusWithHttpInfo($email_address, string $contentType = |
254 | 242 | ]; |
255 | 243 | } |
256 | 244 |
|
| 245 | + if ($statusCode < 200 || $statusCode > 299) { |
| 246 | + throw new ApiException( |
| 247 | + sprintf( |
| 248 | + '[%d] Error connecting to the API (%s)', |
| 249 | + $statusCode, |
| 250 | + (string) $request->getUri() |
| 251 | + ), |
| 252 | + $statusCode, |
| 253 | + $response->getHeaders(), |
| 254 | + (string) $response->getBody() |
| 255 | + ); |
| 256 | + } |
| 257 | + |
257 | 258 | $returnType = '\HubSpot\Client\CommunicationPreferences\Model\PublicSubscriptionStatusesResponse'; |
258 | 259 | if ($returnType === '\SplFileObject') { |
259 | 260 | $content = $response->getBody(); //stream goes to serializer |
@@ -530,18 +531,6 @@ public function subscribeWithHttpInfo($public_update_subscription_status_request |
530 | 531 |
|
531 | 532 | $statusCode = $response->getStatusCode(); |
532 | 533 |
|
533 | | - if ($statusCode < 200 || $statusCode > 299) { |
534 | | - throw new ApiException( |
535 | | - sprintf( |
536 | | - '[%d] Error connecting to the API (%s)', |
537 | | - $statusCode, |
538 | | - (string) $request->getUri() |
539 | | - ), |
540 | | - $statusCode, |
541 | | - $response->getHeaders(), |
542 | | - (string) $response->getBody() |
543 | | - ); |
544 | | - } |
545 | 534 |
|
546 | 535 | switch($statusCode) { |
547 | 536 | case 200: |
@@ -600,6 +589,19 @@ public function subscribeWithHttpInfo($public_update_subscription_status_request |
600 | 589 | ]; |
601 | 590 | } |
602 | 591 |
|
| 592 | + if ($statusCode < 200 || $statusCode > 299) { |
| 593 | + throw new ApiException( |
| 594 | + sprintf( |
| 595 | + '[%d] Error connecting to the API (%s)', |
| 596 | + $statusCode, |
| 597 | + (string) $request->getUri() |
| 598 | + ), |
| 599 | + $statusCode, |
| 600 | + $response->getHeaders(), |
| 601 | + (string) $response->getBody() |
| 602 | + ); |
| 603 | + } |
| 604 | + |
603 | 605 | $returnType = '\HubSpot\Client\CommunicationPreferences\Model\PublicSubscriptionStatus'; |
604 | 606 | if ($returnType === '\SplFileObject') { |
605 | 607 | $content = $response->getBody(); //stream goes to serializer |
@@ -875,18 +877,6 @@ public function unsubscribeWithHttpInfo($public_update_subscription_status_reque |
875 | 877 |
|
876 | 878 | $statusCode = $response->getStatusCode(); |
877 | 879 |
|
878 | | - if ($statusCode < 200 || $statusCode > 299) { |
879 | | - throw new ApiException( |
880 | | - sprintf( |
881 | | - '[%d] Error connecting to the API (%s)', |
882 | | - $statusCode, |
883 | | - (string) $request->getUri() |
884 | | - ), |
885 | | - $statusCode, |
886 | | - $response->getHeaders(), |
887 | | - (string) $response->getBody() |
888 | | - ); |
889 | | - } |
890 | 880 |
|
891 | 881 | switch($statusCode) { |
892 | 882 | case 200: |
@@ -945,6 +935,19 @@ public function unsubscribeWithHttpInfo($public_update_subscription_status_reque |
945 | 935 | ]; |
946 | 936 | } |
947 | 937 |
|
| 938 | + if ($statusCode < 200 || $statusCode > 299) { |
| 939 | + throw new ApiException( |
| 940 | + sprintf( |
| 941 | + '[%d] Error connecting to the API (%s)', |
| 942 | + $statusCode, |
| 943 | + (string) $request->getUri() |
| 944 | + ), |
| 945 | + $statusCode, |
| 946 | + $response->getHeaders(), |
| 947 | + (string) $response->getBody() |
| 948 | + ); |
| 949 | + } |
| 950 | + |
948 | 951 | $returnType = '\HubSpot\Client\CommunicationPreferences\Model\PublicSubscriptionStatus'; |
949 | 952 | if ($returnType === '\SplFileObject') { |
950 | 953 | $content = $response->getBody(); //stream goes to serializer |
|
0 commit comments