options['clientSecret'] = $clientSecret; $this->options['code'] = $code; $this->options['codeVerifier'] = $codeVerifier; $this->options['deviceCode'] = $deviceCode; $this->options['refreshToken'] = $refreshToken; $this->options['deviceId'] = $deviceId; } /** * The credential for confidential OAuth App. * * @param string $clientSecret The credential for confidential OAuth App. * @return $this Fluent Builder */ public function setClientSecret(string $clientSecret): self { $this->options['clientSecret'] = $clientSecret; return $this; } /** * JWT token related to the authorization code grant type. * * @param string $code JWT token related to the authorization code grant type. * @return $this Fluent Builder */ public function setCode(string $code): self { $this->options['code'] = $code; return $this; } /** * A code which is generation cryptographically. * * @param string $codeVerifier A code which is generation cryptographically. * @return $this Fluent Builder */ public function setCodeVerifier(string $codeVerifier): self { $this->options['codeVerifier'] = $codeVerifier; return $this; } /** * JWT token related to the device code grant type. * * @param string $deviceCode JWT token related to the device code grant type. * @return $this Fluent Builder */ public function setDeviceCode(string $deviceCode): self { $this->options['deviceCode'] = $deviceCode; return $this; } /** * JWT token related to the refresh token grant type. * * @param string $refreshToken JWT token related to the refresh token grant type. * @return $this Fluent Builder */ public function setRefreshToken(string $refreshToken): self { $this->options['refreshToken'] = $refreshToken; return $this; } /** * The Id of the device associated with the token (refresh token). * * @param string $deviceId The Id of the device associated with the token (refresh token). * @return $this Fluent Builder */ public function setDeviceId(string $deviceId): self { $this->options['deviceId'] = $deviceId; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Oauth.V1.CreateTokenOptions ' . $options . ']'; } }