Class: WorkOS::TokenQuery

Inherits:
WorkOS::Types::BaseModel show all
Defined in:
lib/workos/sso/token_query.rb

Constant Summary collapse

HASH_ATTRS =
{
  client_id: :client_id,
  client_secret: :client_secret,
  code: :code,
  grant_type: :grant_type
}.freeze

Instance Attribute Summary collapse

Attributes inherited from WorkOS::Types::BaseModel

#last_response

Instance Method Summary collapse

Methods inherited from WorkOS::Types::BaseModel

normalize

Methods included from HashProvider

#inspect, #to_h, #to_json

Constructor Details

#initialize(json) ⇒ TokenQuery

Returns a new instance of TokenQuery.



20
21
22
23
24
25
26
# File 'lib/workos/sso/token_query.rb', line 20

def initialize(json)
  hash = self.class.normalize(json)
  @client_id = hash[:client_id]
  @client_secret = hash[:client_secret]
  @code = hash[:code]
  @grant_type = hash[:grant_type]
end

Instance Attribute Details

#client_idObject

Returns the value of attribute client_id.



14
15
16
# File 'lib/workos/sso/token_query.rb', line 14

def client_id
  @client_id
end

#client_secretObject

Returns the value of attribute client_secret.



14
15
16
# File 'lib/workos/sso/token_query.rb', line 14

def client_secret
  @client_secret
end

#codeObject

Returns the value of attribute code.



14
15
16
# File 'lib/workos/sso/token_query.rb', line 14

def code
  @code
end

#grant_typeObject

Returns the value of attribute grant_type.



14
15
16
# File 'lib/workos/sso/token_query.rb', line 14

def grant_type
  @grant_type
end