Class: Increase::Models::OAuthToken

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/increase/models/oauth_token.rb,
sig/increase/models/oauth_token.rbs

Overview

See Also:

  • Increase::Resources::OAuthTokens#create

Defined Under Namespace

Modules: TokenType, Type

Instance Attribute Summary collapse

Class Method 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:, group_id:, token_type:, type:) ⇒ Object

A token that is returned to your application when a user completes the OAuth flow and may be used to authenticate requests. Learn more about OAuth here.



# File 'lib/increase/models/oauth_token.rb', line 33


Instance Attribute Details

#access_tokenString

You may use this token in place of an API key to make OAuth requests on a user's behalf.



12
# File 'lib/increase/models/oauth_token.rb', line 12

required :access_token, String

#group_idString

The Group's identifier. A Group is the top-level organization in Increase.



18
# File 'lib/increase/models/oauth_token.rb', line 18

required :group_id, String

#token_typeSymbol, Increase::Models::OAuthToken::TokenType

The type of OAuth token.



24
# File 'lib/increase/models/oauth_token.rb', line 24

required :token_type, enum: -> { Increase::OAuthToken::TokenType }

#typeSymbol, Increase::Models::OAuthToken::Type

A constant representing the object's type. For this resource it will always be oauth_token.



31
# File 'lib/increase/models/oauth_token.rb', line 31

required :type, enum: -> { Increase::OAuthToken::Type }

Class Method Details

.valuesArray<Symbol>



# File 'lib/increase/models/oauth_token.rb', line 58


Instance Method Details

#to_hash{



27
# File 'sig/increase/models/oauth_token.rbs', line 27

def to_hash: -> {