Class: WorkOS::OrganizationConnectedAccount

Inherits:
Types::BaseModel
  • Object
show all
Defined in:
lib/workos/pipes/organization_connected_account.rb

Constant Summary collapse

HASH_ATTRS =
{
  account_display_name: :account_display_name,
  account_identifier: :account_identifier,
  access_token: :access_token,
  refresh_token: :refresh_token,
  expires_at: :expires_at,
  scopes: :scopes,
  state: :state,
  user_id: :user_id
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ OrganizationConnectedAccount

Returns a new instance of OrganizationConnectedAccount.



28
29
30
31
32
33
34
35
36
37
38
# File 'lib/workos/pipes/organization_connected_account.rb', line 28

def initialize(json)
  hash = self.class.normalize(json)
  @account_display_name = hash[:account_display_name]
  @account_identifier = hash[:account_identifier]
  @access_token = hash[:access_token]
  @refresh_token = hash[:refresh_token]
  @expires_at = hash[:expires_at]
  @scopes = hash[:scopes] || []
  @state = hash[:state]
  @user_id = hash[:user_id]
end

Instance Attribute Details

#access_token ⇒ Object

Returns the value of attribute access_token.



18
19
20
# File 'lib/workos/pipes/organization_connected_account.rb', line 18

def access_token
  @access_token
end

#account_display_name ⇒ Object

Returns the value of attribute account_display_name.



18
19
20
# File 'lib/workos/pipes/organization_connected_account.rb', line 18

def 
  @account_display_name
end

#account_identifier ⇒ Object

Returns the value of attribute account_identifier.



18
19
20
# File 'lib/workos/pipes/organization_connected_account.rb', line 18

def 
  @account_identifier
end

#expires_at ⇒ Object

Returns the value of attribute expires_at.



18
19
20
# File 'lib/workos/pipes/organization_connected_account.rb', line 18

def expires_at
  @expires_at
end

#refresh_token ⇒ Object

Returns the value of attribute refresh_token.



18
19
20
# File 'lib/workos/pipes/organization_connected_account.rb', line 18

def refresh_token
  @refresh_token
end

#scopes ⇒ Object

Returns the value of attribute scopes.



18
19
20
# File 'lib/workos/pipes/organization_connected_account.rb', line 18

def scopes
  @scopes
end

#state ⇒ Object

Returns the value of attribute state.



18
19
20
# File 'lib/workos/pipes/organization_connected_account.rb', line 18

def state
  @state
end

#user_id ⇒ Object

Returns the value of attribute user_id.



18
19
20
# File 'lib/workos/pipes/organization_connected_account.rb', line 18

def user_id
  @user_id
end