Class: Telnyx::Models::OAuthTokenResponse

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/telnyx/models/oauth_token_response.rb

Overview

Defined Under Namespace

Modules: TokenType

Instance Attribute Summary collapse

Instance Method Summary collapse

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(access_token:, expires_in:, token_type:, refresh_token: nil, scope: nil) ⇒ Object

Parameters:

  • access_token (String)

    The access token

  • expires_in (Integer)

    Token lifetime in seconds

  • token_type (Symbol, Telnyx::Models::OAuthTokenResponse::TokenType)

    Token type

  • refresh_token (String) (defaults to: nil)

    Refresh token (if applicable)

  • scope (String) (defaults to: nil)

    Space-separated list of granted scopes



# File 'lib/telnyx/models/oauth_token_response.rb', line 37

Instance Attribute Details

#access_tokenString

The access token

Returns:

  • (String)


11
# File 'lib/telnyx/models/oauth_token_response.rb', line 11

required :access_token, String

#expires_inInteger

Token lifetime in seconds

Returns:

  • (Integer)


17
# File 'lib/telnyx/models/oauth_token_response.rb', line 17

required :expires_in, Integer

#refresh_tokenString?

Refresh token (if applicable)

Returns:

  • (String, nil)


29
# File 'lib/telnyx/models/oauth_token_response.rb', line 29

optional :refresh_token, String

#scopeString?

Space-separated list of granted scopes

Returns:

  • (String, nil)


35
# File 'lib/telnyx/models/oauth_token_response.rb', line 35

optional :scope, String

#token_typeSymbol, Telnyx::Models::OAuthTokenResponse::TokenType

Token type



23
# File 'lib/telnyx/models/oauth_token_response.rb', line 23

required :token_type, enum: -> { Telnyx::Models::OAuthTokenResponse::TokenType }