@@ -136,15 +136,17 @@ public function getConfig()
136136 * @param string|null $client_id client_id (optional)
137137 * @param string|null $client_secret client_secret (optional)
138138 * @param string|null $refresh_token refresh_token (optional)
139+ * @param string|null $code_verifier code_verifier (optional)
140+ * @param string|null $scope scope (optional)
139141 * @param string $contentType The value for the Content-Type header. Check self::contentTypes['create'] to see the possible values for this operation
140142 *
141143 * @throws \HubSpot\Client\Oauth\ApiException on non-2xx response or if the response body is not in the expected format
142144 * @throws \InvalidArgumentException
143145 * @return \HubSpot\Client\Oauth\Model\TokenResponseIF|\HubSpot\Client\Oauth\Model\Error
144146 */
145- public function create ($ grant_type = null , $ code = null , $ redirect_uri = null , $ client_id = null , $ client_secret = null , $ refresh_token = null , string $ contentType = self ::contentTypes['create ' ][0 ])
147+ public function create ($ grant_type = null , $ code = null , $ redirect_uri = null , $ client_id = null , $ client_secret = null , $ refresh_token = null , $ code_verifier = null , $ scope = null , string $ contentType = self ::contentTypes['create ' ][0 ])
146148 {
147- list ($ response ) = $ this ->createWithHttpInfo ($ grant_type , $ code , $ redirect_uri , $ client_id , $ client_secret , $ refresh_token , $ contentType );
149+ list ($ response ) = $ this ->createWithHttpInfo ($ grant_type , $ code , $ redirect_uri , $ client_id , $ client_secret , $ refresh_token , $ code_verifier , $ scope , $ contentType );
148150 return $ response ;
149151 }
150152
@@ -159,15 +161,17 @@ public function create($grant_type = null, $code = null, $redirect_uri = null, $
159161 * @param string|null $client_id (optional)
160162 * @param string|null $client_secret (optional)
161163 * @param string|null $refresh_token (optional)
164+ * @param string|null $code_verifier (optional)
165+ * @param string|null $scope (optional)
162166 * @param string $contentType The value for the Content-Type header. Check self::contentTypes['create'] to see the possible values for this operation
163167 *
164168 * @throws \HubSpot\Client\Oauth\ApiException on non-2xx response or if the response body is not in the expected format
165169 * @throws \InvalidArgumentException
166170 * @return array of \HubSpot\Client\Oauth\Model\TokenResponseIF|\HubSpot\Client\Oauth\Model\Error, HTTP status code, HTTP response headers (array of strings)
167171 */
168- public function createWithHttpInfo ($ grant_type = null , $ code = null , $ redirect_uri = null , $ client_id = null , $ client_secret = null , $ refresh_token = null , string $ contentType = self ::contentTypes['create ' ][0 ])
172+ public function createWithHttpInfo ($ grant_type = null , $ code = null , $ redirect_uri = null , $ client_id = null , $ client_secret = null , $ refresh_token = null , $ code_verifier = null , $ scope = null , string $ contentType = self ::contentTypes['create ' ][0 ])
169173 {
170- $ request = $ this ->createRequest ($ grant_type , $ code , $ redirect_uri , $ client_id , $ client_secret , $ refresh_token , $ contentType );
174+ $ request = $ this ->createRequest ($ grant_type , $ code , $ redirect_uri , $ client_id , $ client_secret , $ refresh_token , $ code_verifier , $ scope , $ contentType );
171175
172176 try {
173177 $ options = $ this ->createHttpClientOption ();
@@ -207,7 +211,7 @@ public function createWithHttpInfo($grant_type = null, $code = null, $redirect_u
207211 );
208212 }
209213
210-
214+
211215
212216 if ($ statusCode < 200 || $ statusCode > 299 ) {
213217 throw new ApiException (
@@ -246,7 +250,7 @@ public function createWithHttpInfo($grant_type = null, $code = null, $redirect_u
246250 $ e ->setResponseObject ($ data );
247251 throw $ e ;
248252 }
249-
253+
250254
251255 throw $ e ;
252256 }
@@ -263,14 +267,16 @@ public function createWithHttpInfo($grant_type = null, $code = null, $redirect_u
263267 * @param string|null $client_id (optional)
264268 * @param string|null $client_secret (optional)
265269 * @param string|null $refresh_token (optional)
270+ * @param string|null $code_verifier (optional)
271+ * @param string|null $scope (optional)
266272 * @param string $contentType The value for the Content-Type header. Check self::contentTypes['create'] to see the possible values for this operation
267273 *
268274 * @throws \InvalidArgumentException
269275 * @return \GuzzleHttp\Promise\PromiseInterface
270276 */
271- public function createAsync ($ grant_type = null , $ code = null , $ redirect_uri = null , $ client_id = null , $ client_secret = null , $ refresh_token = null , string $ contentType = self ::contentTypes['create ' ][0 ])
277+ public function createAsync ($ grant_type = null , $ code = null , $ redirect_uri = null , $ client_id = null , $ client_secret = null , $ refresh_token = null , $ code_verifier = null , $ scope = null , string $ contentType = self ::contentTypes['create ' ][0 ])
272278 {
273- return $ this ->createAsyncWithHttpInfo ($ grant_type , $ code , $ redirect_uri , $ client_id , $ client_secret , $ refresh_token , $ contentType )
279+ return $ this ->createAsyncWithHttpInfo ($ grant_type , $ code , $ redirect_uri , $ client_id , $ client_secret , $ refresh_token , $ code_verifier , $ scope , $ contentType )
274280 ->then (
275281 function ($ response ) {
276282 return $ response [0 ];
@@ -289,15 +295,17 @@ function ($response) {
289295 * @param string|null $client_id (optional)
290296 * @param string|null $client_secret (optional)
291297 * @param string|null $refresh_token (optional)
298+ * @param string|null $code_verifier (optional)
299+ * @param string|null $scope (optional)
292300 * @param string $contentType The value for the Content-Type header. Check self::contentTypes['create'] to see the possible values for this operation
293301 *
294302 * @throws \InvalidArgumentException
295303 * @return \GuzzleHttp\Promise\PromiseInterface
296304 */
297- public function createAsyncWithHttpInfo ($ grant_type = null , $ code = null , $ redirect_uri = null , $ client_id = null , $ client_secret = null , $ refresh_token = null , string $ contentType = self ::contentTypes['create ' ][0 ])
305+ public function createAsyncWithHttpInfo ($ grant_type = null , $ code = null , $ redirect_uri = null , $ client_id = null , $ client_secret = null , $ refresh_token = null , $ code_verifier = null , $ scope = null , string $ contentType = self ::contentTypes['create ' ][0 ])
298306 {
299307 $ returnType = '\HubSpot\Client\Oauth\Model\TokenResponseIF ' ;
300- $ request = $ this ->createRequest ($ grant_type , $ code , $ redirect_uri , $ client_id , $ client_secret , $ refresh_token , $ contentType );
308+ $ request = $ this ->createRequest ($ grant_type , $ code , $ redirect_uri , $ client_id , $ client_secret , $ refresh_token , $ code_verifier , $ scope , $ contentType );
301309
302310 return $ this ->client
303311 ->sendAsync ($ request , $ this ->createHttpClientOption ())
@@ -344,12 +352,14 @@ function ($exception) {
344352 * @param string|null $client_id (optional)
345353 * @param string|null $client_secret (optional)
346354 * @param string|null $refresh_token (optional)
355+ * @param string|null $code_verifier (optional)
356+ * @param string|null $scope (optional)
347357 * @param string $contentType The value for the Content-Type header. Check self::contentTypes['create'] to see the possible values for this operation
348358 *
349359 * @throws \InvalidArgumentException
350360 * @return \GuzzleHttp\Psr7\Request
351361 */
352- public function createRequest ($ grant_type = null , $ code = null , $ redirect_uri = null , $ client_id = null , $ client_secret = null , $ refresh_token = null , string $ contentType = self ::contentTypes['create ' ][0 ])
362+ public function createRequest ($ grant_type = null , $ code = null , $ redirect_uri = null , $ client_id = null , $ client_secret = null , $ refresh_token = null , $ code_verifier = null , $ scope = null , string $ contentType = self ::contentTypes['create ' ][0 ])
353363 {
354364
355365
@@ -359,6 +369,8 @@ public function createRequest($grant_type = null, $code = null, $redirect_uri =
359369
360370
361371
372+
373+
362374 $ resourcePath = '/oauth/v1/token ' ;
363375 $ formParams = [];
364376 $ queryParams = [];
@@ -379,6 +391,8 @@ public function createRequest($grant_type = null, $code = null, $redirect_uri =
379391 'client_id ' => $ client_id ,
380392 'client_secret ' => $ client_secret ,
381393 'refresh_token ' => $ refresh_token ,
394+ 'code_verifier ' => $ code_verifier ,
395+ 'scope ' => $ scope ,
382396 ]);
383397
384398 $ formParams = $ formDataProcessor ->flatten ($ formData );
0 commit comments