clients/kratos/php/lib/Api/PublicApi.php
/**
     * Create request for operation 'completeSelfServiceBrowserVerificationFlow'
     *
     * @param  string $request Request is the Request ID  The value for this parameter comes from &#x60;request&#x60; URL Query parameter sent to your application (e.g. &#x60;/verify?request&#x3D;abcde&#x60;). (required)
     * @param  string $via What to verify  Currently only \&quot;email\&quot; is supported. (required)
     *
     * @throws \InvalidArgumentException
     * @return \GuzzleHttp\Psr7\Request
     */
Create request for operation 'completeSelfServiceBrowserVerificationFlow'
@param  string $request Request is the Request ID  The value for this parameter comes from `request` URL Query parameter sent to your application . (required)
@param  string $via What to verify  Currently only \"email\" is supported. (required)


Create request for operation ' completeSelfServiceBrowserVerificationFlow ' @param string $request Request is the Request ID The value for this parameter comes from ` request ` URL Query parameter sent to your application . ( required ) @param string $via What to verify Currently only \ " email \ " is supported . ( required )
protected function completeSelfServiceBrowserVerificationFlowRequest($request, $via)
    {
        if ($request === null || (is_array($request) && count($request) === 0)) {
            throw new \InvalidArgumentException(
                'Missing the required parameter $request when calling completeSelfServiceBrowserVerificationFlow'
            );
        }
        if ($via === null || (is_array($via) && count($via) === 0)) {
            throw new \InvalidArgumentException(
                'Missing the required parameter $via when calling completeSelfServiceBrowserVerificationFlow'
            );
        }
        $resourcePath = '/self-service/browser/flows/verification/{via}/complete';
        $formParams = [];
        $queryParams = [];
        $headerParams = [];
        $httpBody = '';
        $multipart = false;
        if (is_array($request)) {
            $request = ObjectSerializer::serializeCollection($request, '', true);
        }
        if ($request !== null) {
            $queryParams['request'] = $request;
        }
        if ($via !== null) {
            $resourcePath = str_replace(
                '{' . 'via' . '}',
                ObjectSerializer::toPathValue($via),
                $resourcePath
            );
        }
        $_tempBody = null;
        if ($multipart) {
            $headers = $this->headerSelector->selectHeadersForMultipart(
                ['application/json']
            );
        } else {
            $headers = $this->headerSelector->selectHeaders(
                ['application/json'],
                []
            );
        }
        if (isset($_tempBody)) {
            if ($headers['Content-Type'] === 'application/json') {
                $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody));
            } else {
                $httpBody = $_tempBody;
            }
        } elseif (count($formParams) > 0) {
            if ($multipart) {
                $multipartContents = [];
                foreach ($formParams as $formParamName => $formParamValue) {
                    $multipartContents[] = [
                        'name' => $formParamName,
                        'contents' => $formParamValue
                    ];
                }
                $httpBody = new MultipartStream($multipartContents);
            } elseif ($headers['Content-Type'] === 'application/json') {
                $httpBody = \GuzzleHttp\json_encode($formParams);
            } else {
                $httpBody = \GuzzleHttp\Psr7\build_query($formParams);
            }
        }
        $defaultHeaders = [];
        if ($this->config->getUserAgent()) {
            $defaultHeaders['User-Agent'] = $this->config->getUserAgent();
        }
        $headers = array_merge(
            $defaultHeaders,
            $headerParams,
            $headers
        );
        $query = \GuzzleHttp\Psr7\build_query($queryParams);
        return new Request(
            'POST',
            $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''),
            $headers,
            $httpBody
        );
    }
protected function completeSelfServiceBrowserVerificationFlowRequest ( $ request , $ via ) { if ( $ request === null || ( is_array ( $ request ) && count ( $ request ) === 0 ) ) { throw new \ InvalidArgumentException ( 'Missing the required parameter $request when calling completeSelfServiceBrowserVerificationFlow' ) ; } if ( $ via === null || ( is_array ( $ via ) && count ( $ via ) === 0 ) ) { throw new \ InvalidArgumentException ( 'Missing the required parameter $via when calling completeSelfServiceBrowserVerificationFlow' ) ; } $ resourcePath = '/self-service/browser/flows/verification/{via}/complete' ; $ formParams = [ ] ; $ queryParams = [ ] ; $ headerParams = [ ] ; $ httpBody = '' ; $ multipart = false ; if ( is_array ( $ request ) ) { $ request = ObjectSerializer :: serializeCollection ( $ request , '' , true ) ; } if ( $ request !== null ) { $ queryParams [ 'request' ] = $ request ; } if ( $ via !== null ) { $ resourcePath = str_replace ( '{' . 'via' . '}' , ObjectSerializer :: toPathValue ( $ via ) , $ resourcePath ) ; } $ _tempBody = null ; if ( $ multipart ) { $ headers = $ this -> headerSelector -> selectHeadersForMultipart ( [ 'application/json' ] ) ; } else { $ headers = $ this -> headerSelector -> selectHeaders ( [ 'application/json' ] , [ ] ) ; } if ( isset ( $ _tempBody ) ) { if ( $ headers [ 'Content-Type' ] === 'application/json' ) { $ httpBody = \ GuzzleHttp \ json_encode ( ObjectSerializer :: sanitizeForSerialization ( $ _tempBody ) ) ; } else { $ httpBody = $ _tempBody ; } } elseif ( count ( $ formParams ) > 0 ) { if ( $ multipart ) { $ multipartContents = [ ] ; foreach ( $ formParams as $ formParamName => $ formParamValue ) { $ multipartContents [ ] = [ 'name' => $ formParamName , 'contents' => $ formParamValue ] ; } $ httpBody = new MultipartStream ( $ multipartContents ) ; } elseif ( $ headers [ 'Content-Type' ] === 'application/json' ) { $ httpBody = \ GuzzleHttp \ json_encode ( $ formParams ) ; } else { $ httpBody = \ GuzzleHttp \ Psr7 \ build_query ( $ formParams ) ; } } $ defaultHeaders = [ ] ; if ( $ this -> config -> getUserAgent ( ) ) { $ defaultHeaders [ 'User-Agent' ] = $ this -> config -> getUserAgent ( ) ; } $ headers = array_merge ( $ defaultHeaders , $ headerParams , $ headers ) ; $ query = \ GuzzleHttp \ Psr7 \ build_query ( $ queryParams ) ; return new Request ( 'POST' , $ this -> config -> getHost ( ) . $ resourcePath . ( $ query ? " ? { $ query } " : '' ) , $ headers , $ httpBody ) ; }
Create request for operation 'completeSelfServiceBrowserVerificationFlow'
 @param  string $request Request is the Request ID  The value for this parameter comes from &#x60;request&#x60; URL Query parameter sent to your application (e.g.
Create request for operation ' completeSelfServiceBrowserVerificationFlow ' @param string $request Request is the Request ID The value for this parameter comes from &#x60 ; request&#x60 ; URL Query parameter sent to your application ( e . g .
// verify the required parameter 'request' is set // verify the required parameter 'via' is set // query params // path params // body params // for model (json/xml) // $_tempBody is the method argument, if present // for HTTP post (form) // for HTTP post (form)