Class: Telnyx::Models::OAuthTokenParams

Inherits:
Internal::Type::BaseModel show all
Extended by:
Internal::Type::RequestParameters::Converter
Includes:
Internal::Type::RequestParameters
Defined in:
lib/telnyx/models/oauth_token_params.rb

Overview

Defined Under Namespace

Modules: GrantType

Instance Attribute Summary collapse

Attributes included from Internal::Type::RequestParameters

#request_options

Instance Method Summary collapse

Methods included from Internal::Type::RequestParameters::Converter

dump_request

Methods included from Internal::Type::RequestParameters

included

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

#initialize(grant_type:, client_id: nil, client_secret: nil, code: nil, code_verifier: nil, redirect_uri: nil, refresh_token: nil, scope: nil, request_options: {}) ⇒ Object

Parameters:

  • grant_type (Symbol, Telnyx::Models::OAuthTokenParams::GrantType)

    OAuth 2.0 grant type

  • client_id (String) (defaults to: nil)

    OAuth client ID (if not using HTTP Basic auth)

  • client_secret (String) (defaults to: nil)

    OAuth client secret (if not using HTTP Basic auth)

  • code (String) (defaults to: nil)

    Authorization code (for authorization_code flow)

  • code_verifier (String) (defaults to: nil)

    PKCE code verifier (for authorization_code flow)

  • redirect_uri (String) (defaults to: nil)

    Redirect URI (for authorization_code flow)

  • refresh_token (String) (defaults to: nil)

    Refresh token (for refresh_token flow)

  • scope (String) (defaults to: nil)

    Space-separated list of requested scopes (for client_credentials)

  • request_options (Telnyx::RequestOptions, Hash{Symbol=>Object}) (defaults to: {})


# File 'lib/telnyx/models/oauth_token_params.rb', line 58

Instance Attribute Details

#client_idString?

OAuth client ID (if not using HTTP Basic auth)

Returns:

  • (String, nil)


20
# File 'lib/telnyx/models/oauth_token_params.rb', line 20

optional :client_id, String

#client_secretString?

OAuth client secret (if not using HTTP Basic auth)

Returns:

  • (String, nil)


26
# File 'lib/telnyx/models/oauth_token_params.rb', line 26

optional :client_secret, String

#codeString?

Authorization code (for authorization_code flow)

Returns:

  • (String, nil)


32
# File 'lib/telnyx/models/oauth_token_params.rb', line 32

optional :code, String

#code_verifierString?

PKCE code verifier (for authorization_code flow)

Returns:

  • (String, nil)


38
# File 'lib/telnyx/models/oauth_token_params.rb', line 38

optional :code_verifier, String

#grant_typeSymbol, Telnyx::Models::OAuthTokenParams::GrantType

OAuth 2.0 grant type



14
# File 'lib/telnyx/models/oauth_token_params.rb', line 14

required :grant_type, enum: -> { Telnyx::OAuthTokenParams::GrantType }

#redirect_uriString?

Redirect URI (for authorization_code flow)

Returns:

  • (String, nil)


44
# File 'lib/telnyx/models/oauth_token_params.rb', line 44

optional :redirect_uri, String

#refresh_tokenString?

Refresh token (for refresh_token flow)

Returns:

  • (String, nil)


50
# File 'lib/telnyx/models/oauth_token_params.rb', line 50

optional :refresh_token, String

#scopeString?

Space-separated list of requested scopes (for client_credentials)

Returns:

  • (String, nil)


56
# File 'lib/telnyx/models/oauth_token_params.rb', line 56

optional :scope, String