Class: WorkOS::DataIntegrationAccessTokenResponse

Inherits:
Types::BaseModel show all
Defined in:
lib/workos/pipes/data_integration_access_token_response.rb

Constant Summary collapse

HASH_ATTRS =
{
  active: :active,
  access_token: :access_token,
  error: :error
}.freeze

Instance Attribute Summary collapse

Attributes inherited from Types::BaseModel

#last_response

Instance Method Summary collapse

Methods inherited from Types::BaseModel

normalize

Methods included from HashProvider

#inspect, #to_h, #to_json

Constructor Details

#initialize(json) ⇒ DataIntegrationAccessTokenResponse

Returns a new instance of DataIntegrationAccessTokenResponse.



18
19
20
21
22
23
# File 'lib/workos/pipes/data_integration_access_token_response.rb', line 18

def initialize(json)
  hash = self.class.normalize(json)
  @active = hash[:active]
  @access_token = hash[:access_token] ? WorkOS::DataIntegrationAccessTokenResponseAccessToken.new(hash[:access_token]) : nil
  @error = hash[:error]
end

Instance Attribute Details

#access_tokenObject

Returns the value of attribute access_token.



13
14
15
# File 'lib/workos/pipes/data_integration_access_token_response.rb', line 13

def access_token
  @access_token
end

#activeObject

Returns the value of attribute active.



13
14
15
# File 'lib/workos/pipes/data_integration_access_token_response.rb', line 13

def active
  @active
end

#errorObject

Returns the value of attribute error.



13
14
15
# File 'lib/workos/pipes/data_integration_access_token_response.rb', line 13

def error
  @error
end