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/**
@@ -95,13 +95,13 @@ class BatchApi
9595 * @param int $hostIndex (Optional) host index to select the list of hosts if defined in the OpenAPI spec
9696 */
9797 public function __construct (
98- ClientInterface $ client = null ,
99- Configuration $ config = null ,
100- HeaderSelector $ selector = null ,
101- $ hostIndex = 0
98+ ? ClientInterface $ client = null ,
99+ ? Configuration $ config = null ,
100+ ? HeaderSelector $ selector = null ,
101+ int $ hostIndex = 0
102102 ) {
103103 $ this ->client = $ client ?: new Client ();
104- $ this ->config = $ config ?: new Configuration ();
104+ $ this ->config = $ config ?: Configuration:: getDefaultConfiguration ();
105105 $ this ->headerSelector = $ selector ?: new HeaderSelector ();
106106 $ this ->hostIndex = $ hostIndex ;
107107 }
@@ -189,18 +189,6 @@ public function archiveWithHttpInfo($batch_input_simple_public_object_id, string
189189
190190 $ statusCode = $ response ->getStatusCode ();
191191
192- if ($ statusCode < 200 || $ statusCode > 299 ) {
193- throw new ApiException (
194- sprintf (
195- '[%d] Error connecting to the API (%s) ' ,
196- $ statusCode ,
197- (string ) $ request ->getUri ()
198- ),
199- $ statusCode ,
200- $ response ->getHeaders (),
201- (string ) $ response ->getBody ()
202- );
203- }
204192
205193 return [null , $ statusCode , $ response ->getHeaders ()];
206194
@@ -430,18 +418,6 @@ public function createWithHttpInfo($batch_input_simple_public_object_batch_input
430418
431419 $ statusCode = $ response ->getStatusCode ();
432420
433- if ($ statusCode < 200 || $ statusCode > 299 ) {
434- throw new ApiException (
435- sprintf (
436- '[%d] Error connecting to the API (%s) ' ,
437- $ statusCode ,
438- (string ) $ request ->getUri ()
439- ),
440- $ statusCode ,
441- $ response ->getHeaders (),
442- (string ) $ response ->getBody ()
443- );
444- }
445421
446422 switch ($ statusCode ) {
447423 case 201 :
@@ -527,6 +503,19 @@ public function createWithHttpInfo($batch_input_simple_public_object_batch_input
527503 ];
528504 }
529505
506+ if ($ statusCode < 200 || $ statusCode > 299 ) {
507+ throw new ApiException (
508+ sprintf (
509+ '[%d] Error connecting to the API (%s) ' ,
510+ $ statusCode ,
511+ (string ) $ request ->getUri ()
512+ ),
513+ $ statusCode ,
514+ $ response ->getHeaders (),
515+ (string ) $ response ->getBody ()
516+ );
517+ }
518+
530519 $ returnType = '\HubSpot\Client\Crm\Commerce\Invoices\Model\BatchResponseSimplePublicObject ' ;
531520 if ($ returnType === '\SplFileObject ' ) {
532521 $ content = $ response ->getBody (); //stream goes to serializer
@@ -760,7 +749,7 @@ public function createRequest($batch_input_simple_public_object_batch_input_for_
760749 * Read a batch of invoices by internal ID, or unique property values
761750 *
762751 * @param \HubSpot\Client\Crm\Commerce\Invoices\Model\BatchReadInputSimplePublicObjectId $batch_read_input_simple_public_object_id batch_read_input_simple_public_object_id (required)
763- * @param bool $archived Whether to return only results that have been archived. (optional, default to false)
752+ * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false)
764753 * @param string $contentType The value for the Content-Type header. Check self::contentTypes['read'] to see the possible values for this operation
765754 *
766755 * @throws \HubSpot\Client\Crm\Commerce\Invoices\ApiException on non-2xx response or if the response body is not in the expected format
@@ -779,7 +768,7 @@ public function read($batch_read_input_simple_public_object_id, $archived = fals
779768 * Read a batch of invoices by internal ID, or unique property values
780769 *
781770 * @param \HubSpot\Client\Crm\Commerce\Invoices\Model\BatchReadInputSimplePublicObjectId $batch_read_input_simple_public_object_id (required)
782- * @param bool $archived Whether to return only results that have been archived. (optional, default to false)
771+ * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false)
783772 * @param string $contentType The value for the Content-Type header. Check self::contentTypes['read'] to see the possible values for this operation
784773 *
785774 * @throws \HubSpot\Client\Crm\Commerce\Invoices\ApiException on non-2xx response or if the response body is not in the expected format
@@ -812,18 +801,6 @@ public function readWithHttpInfo($batch_read_input_simple_public_object_id, $arc
812801
813802 $ statusCode = $ response ->getStatusCode ();
814803
815- if ($ statusCode < 200 || $ statusCode > 299 ) {
816- throw new ApiException (
817- sprintf (
818- '[%d] Error connecting to the API (%s) ' ,
819- $ statusCode ,
820- (string ) $ request ->getUri ()
821- ),
822- $ statusCode ,
823- $ response ->getHeaders (),
824- (string ) $ response ->getBody ()
825- );
826- }
827804
828805 switch ($ statusCode ) {
829806 case 200 :
@@ -909,6 +886,19 @@ public function readWithHttpInfo($batch_read_input_simple_public_object_id, $arc
909886 ];
910887 }
911888
889+ if ($ statusCode < 200 || $ statusCode > 299 ) {
890+ throw new ApiException (
891+ sprintf (
892+ '[%d] Error connecting to the API (%s) ' ,
893+ $ statusCode ,
894+ (string ) $ request ->getUri ()
895+ ),
896+ $ statusCode ,
897+ $ response ->getHeaders (),
898+ (string ) $ response ->getBody ()
899+ );
900+ }
901+
912902 $ returnType = '\HubSpot\Client\Crm\Commerce\Invoices\Model\BatchResponseSimplePublicObject ' ;
913903 if ($ returnType === '\SplFileObject ' ) {
914904 $ content = $ response ->getBody (); //stream goes to serializer
@@ -974,7 +964,7 @@ public function readWithHttpInfo($batch_read_input_simple_public_object_id, $arc
974964 * Read a batch of invoices by internal ID, or unique property values
975965 *
976966 * @param \HubSpot\Client\Crm\Commerce\Invoices\Model\BatchReadInputSimplePublicObjectId $batch_read_input_simple_public_object_id (required)
977- * @param bool $archived Whether to return only results that have been archived. (optional, default to false)
967+ * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false)
978968 * @param string $contentType The value for the Content-Type header. Check self::contentTypes['read'] to see the possible values for this operation
979969 *
980970 * @throws \InvalidArgumentException
@@ -996,7 +986,7 @@ function ($response) {
996986 * Read a batch of invoices by internal ID, or unique property values
997987 *
998988 * @param \HubSpot\Client\Crm\Commerce\Invoices\Model\BatchReadInputSimplePublicObjectId $batch_read_input_simple_public_object_id (required)
999- * @param bool $archived Whether to return only results that have been archived. (optional, default to false)
989+ * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false)
1000990 * @param string $contentType The value for the Content-Type header. Check self::contentTypes['read'] to see the possible values for this operation
1001991 *
1002992 * @throws \InvalidArgumentException
@@ -1047,7 +1037,7 @@ function ($exception) {
10471037 * Create request for operation 'read'
10481038 *
10491039 * @param \HubSpot\Client\Crm\Commerce\Invoices\Model\BatchReadInputSimplePublicObjectId $batch_read_input_simple_public_object_id (required)
1050- * @param bool $archived Whether to return only results that have been archived. (optional, default to false)
1040+ * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false)
10511041 * @param string $contentType The value for the Content-Type header. Check self::contentTypes['read'] to see the possible values for this operation
10521042 *
10531043 * @throws \InvalidArgumentException
@@ -1205,18 +1195,6 @@ public function updateWithHttpInfo($batch_input_simple_public_object_batch_input
12051195
12061196 $ statusCode = $ response ->getStatusCode ();
12071197
1208- if ($ statusCode < 200 || $ statusCode > 299 ) {
1209- throw new ApiException (
1210- sprintf (
1211- '[%d] Error connecting to the API (%s) ' ,
1212- $ statusCode ,
1213- (string ) $ request ->getUri ()
1214- ),
1215- $ statusCode ,
1216- $ response ->getHeaders (),
1217- (string ) $ response ->getBody ()
1218- );
1219- }
12201198
12211199 switch ($ statusCode ) {
12221200 case 200 :
@@ -1302,6 +1280,19 @@ public function updateWithHttpInfo($batch_input_simple_public_object_batch_input
13021280 ];
13031281 }
13041282
1283+ if ($ statusCode < 200 || $ statusCode > 299 ) {
1284+ throw new ApiException (
1285+ sprintf (
1286+ '[%d] Error connecting to the API (%s) ' ,
1287+ $ statusCode ,
1288+ (string ) $ request ->getUri ()
1289+ ),
1290+ $ statusCode ,
1291+ $ response ->getHeaders (),
1292+ (string ) $ response ->getBody ()
1293+ );
1294+ }
1295+
13051296 $ returnType = '\HubSpot\Client\Crm\Commerce\Invoices\Model\BatchResponseSimplePublicObject ' ;
13061297 if ($ returnType === '\SplFileObject ' ) {
13071298 $ content = $ response ->getBody (); //stream goes to serializer
@@ -1585,18 +1576,6 @@ public function upsertWithHttpInfo($batch_input_simple_public_object_batch_input
15851576
15861577 $ statusCode = $ response ->getStatusCode ();
15871578
1588- if ($ statusCode < 200 || $ statusCode > 299 ) {
1589- throw new ApiException (
1590- sprintf (
1591- '[%d] Error connecting to the API (%s) ' ,
1592- $ statusCode ,
1593- (string ) $ request ->getUri ()
1594- ),
1595- $ statusCode ,
1596- $ response ->getHeaders (),
1597- (string ) $ response ->getBody ()
1598- );
1599- }
16001579
16011580 switch ($ statusCode ) {
16021581 case 200 :
@@ -1682,6 +1661,19 @@ public function upsertWithHttpInfo($batch_input_simple_public_object_batch_input
16821661 ];
16831662 }
16841663
1664+ if ($ statusCode < 200 || $ statusCode > 299 ) {
1665+ throw new ApiException (
1666+ sprintf (
1667+ '[%d] Error connecting to the API (%s) ' ,
1668+ $ statusCode ,
1669+ (string ) $ request ->getUri ()
1670+ ),
1671+ $ statusCode ,
1672+ $ response ->getHeaders (),
1673+ (string ) $ response ->getBody ()
1674+ );
1675+ }
1676+
16851677 $ returnType = '\HubSpot\Client\Crm\Commerce\Invoices\Model\BatchResponseSimplePublicUpsertObject ' ;
16861678 if ($ returnType === '\SplFileObject ' ) {
16871679 $ content = $ response ->getBody (); //stream goes to serializer
0 commit comments