Class: Telnyx::Models::OAuthGrant

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

Overview

Defined Under Namespace

Modules: RecordType

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(id:, client_id:, created_at:, record_type:, scopes:, last_used_at: nil) ⇒ Object

Parameters:

  • id (String)

    Unique identifier for the OAuth grant

  • client_id (String)

    OAuth client identifier

  • created_at (Time)

    Timestamp when the grant was created

  • record_type (Symbol, Telnyx::Models::OAuthGrant::RecordType)

    Record type identifier

  • scopes (Array<String>)

    List of granted OAuth scopes

  • last_used_at (Time, nil) (defaults to: nil)

    Timestamp when the grant was last used



# File 'lib/telnyx/models/oauth_grant.rb', line 43

Instance Attribute Details

#client_idString

OAuth client identifier

Returns:

  • (String)


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

required :client_id, String

#created_atTime

Timestamp when the grant was created

Returns:

  • (Time)


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

required :created_at, Time

#idString

Unique identifier for the OAuth grant

Returns:

  • (String)


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

required :id, String

#last_used_atTime?

Timestamp when the grant was last used

Returns:

  • (Time, nil)


41
# File 'lib/telnyx/models/oauth_grant.rb', line 41

optional :last_used_at, Time, nil?: true

#record_typeSymbol, Telnyx::Models::OAuthGrant::RecordType

Record type identifier



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

required :record_type, enum: -> { Telnyx::OAuthGrant::RecordType }

#scopesArray<String>

List of granted OAuth scopes

Returns:

  • (Array<String>)


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

required :scopes, Telnyx::Internal::Type::ArrayOf[String]