Class: WorkOS::ConnectedAccount

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

Constant Summary collapse

HASH_ATTRS =
{
  object: :object,
  id: :id,
  connection_role: :connection_role,
  account_identifier: :account_identifier,
  account_display_name: :account_display_name,
  user_id: :user_id,
  organization_id: :organization_id,
  scopes: :scopes,
  auth_method: :auth_method,
  api_key_last_4: :api_key_last_4,
  client_id: :client_id,
  client_secret_last_4: :client_secret_last_4,
  config: :config,
  state: :state,
  created_at: :created_at,
  updated_at: :updated_at
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ ConnectedAccount

Returns a new instance of ConnectedAccount.



44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# File 'lib/workos/pipes/connected_account.rb', line 44

def initialize(json)
  hash = self.class.normalize(json)
  @object = hash[:object]
  @id = hash[:id]
  @connection_role = hash[:connection_role]
  @account_identifier = hash[:account_identifier]
  @account_display_name = hash[:account_display_name]
  @user_id = hash[:user_id]
  @organization_id = hash[:organization_id]
  @scopes = hash[:scopes] || []
  @auth_method = hash[:auth_method]
  @api_key_last_4 = hash[:api_key_last_4]
  @client_id = hash[:client_id]
  @client_secret_last_4 = hash[:client_secret_last_4]
  @config = hash[:config] || {}
  @state = hash[:state]
  @created_at = hash[:created_at]
  @updated_at = hash[:updated_at]
end

Instance Attribute Details

#account_display_nameObject

Returns the value of attribute account_display_name.



26
27
28
# File 'lib/workos/pipes/connected_account.rb', line 26

def 
  @account_display_name
end

#account_identifierObject

Returns the value of attribute account_identifier.



26
27
28
# File 'lib/workos/pipes/connected_account.rb', line 26

def 
  @account_identifier
end

#api_key_last_4Object

Returns the value of attribute api_key_last_4.



26
27
28
# File 'lib/workos/pipes/connected_account.rb', line 26

def api_key_last_4
  @api_key_last_4
end

#auth_methodObject

Returns the value of attribute auth_method.



26
27
28
# File 'lib/workos/pipes/connected_account.rb', line 26

def auth_method
  @auth_method
end

#client_idObject

Returns the value of attribute client_id.



26
27
28
# File 'lib/workos/pipes/connected_account.rb', line 26

def client_id
  @client_id
end

#client_secret_last_4Object

Returns the value of attribute client_secret_last_4.



26
27
28
# File 'lib/workos/pipes/connected_account.rb', line 26

def client_secret_last_4
  @client_secret_last_4
end

#configObject

Returns the value of attribute config.



26
27
28
# File 'lib/workos/pipes/connected_account.rb', line 26

def config
  @config
end

#connection_roleObject

Returns the value of attribute connection_role.



26
27
28
# File 'lib/workos/pipes/connected_account.rb', line 26

def connection_role
  @connection_role
end

#created_atObject

Returns the value of attribute created_at.



26
27
28
# File 'lib/workos/pipes/connected_account.rb', line 26

def created_at
  @created_at
end

#idObject

Returns the value of attribute id.



26
27
28
# File 'lib/workos/pipes/connected_account.rb', line 26

def id
  @id
end

#objectObject

Returns the value of attribute object.



26
27
28
# File 'lib/workos/pipes/connected_account.rb', line 26

def object
  @object
end

#organization_idObject

Returns the value of attribute organization_id.



26
27
28
# File 'lib/workos/pipes/connected_account.rb', line 26

def organization_id
  @organization_id
end

#scopesObject

Returns the value of attribute scopes.



26
27
28
# File 'lib/workos/pipes/connected_account.rb', line 26

def scopes
  @scopes
end

#stateObject

Returns the value of attribute state.



26
27
28
# File 'lib/workos/pipes/connected_account.rb', line 26

def state
  @state
end

#updated_atObject

Returns the value of attribute updated_at.



26
27
28
# File 'lib/workos/pipes/connected_account.rb', line 26

def updated_at
  @updated_at
end

#user_idObject

Returns the value of attribute user_id.



26
27
28
# File 'lib/workos/pipes/connected_account.rb', line 26

def user_id
  @user_id
end