Class: WorkOS::ConnectApplicationOAuth

Inherits:
Types::BaseModel
  • Object
show all
Defined in:
lib/workos/shared/connect_application_oauth.rb

Constant Summary collapse

HASH_ATTRS =
{
  object: :object,
  id: :id,
  client_id: :client_id,
  description: :description,
  name: :name,
  scopes: :scopes,
  created_at: :created_at,
  updated_at: :updated_at,
  application_type: :application_type,
  redirect_uris: :redirect_uris,
  cors_origins: :cors_origins,
  uses_pkce: :uses_pkce,
  is_first_party: :is_first_party,
  was_dynamically_registered: :was_dynamically_registered,
  organization_id: :organization_id
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ ConnectApplicationOAuth

Returns a new instance of ConnectApplicationOAuth.



42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# File 'lib/workos/shared/connect_application_oauth.rb', line 42

def initialize(json)
  hash = self.class.normalize(json)
  @object = hash[:object]
  @id = hash[:id]
  @client_id = hash[:client_id]
  @description = hash[:description]
  @name = hash[:name]
  @scopes = hash[:scopes] || []
  @created_at = hash[:created_at]
  @updated_at = hash[:updated_at]
  @application_type = hash[:application_type]
  @redirect_uris = (hash[:redirect_uris] || []).map { |item| item ? WorkOS::ConnectApplicationOAuthRedirectUris.new(item) : nil }
  @cors_origins = hash[:cors_origins] || []
  @uses_pkce = hash[:uses_pkce]
  @is_first_party = hash[:is_first_party]
  @was_dynamically_registered = hash[:was_dynamically_registered]
  @organization_id = hash[:organization_id]
end

Instance Attribute Details

#application_type ⇒ Object

Returns the value of attribute application_type.



25
26
27
# File 'lib/workos/shared/connect_application_oauth.rb', line 25

def application_type
  @application_type
end

#client_id ⇒ Object

Returns the value of attribute client_id.



25
26
27
# File 'lib/workos/shared/connect_application_oauth.rb', line 25

def client_id
  @client_id
end

#cors_origins ⇒ Object

Returns the value of attribute cors_origins.



25
26
27
# File 'lib/workos/shared/connect_application_oauth.rb', line 25

def cors_origins
  @cors_origins
end

#created_at ⇒ Object

Returns the value of attribute created_at.



25
26
27
# File 'lib/workos/shared/connect_application_oauth.rb', line 25

def created_at
  @created_at
end

#description ⇒ Object

Returns the value of attribute description.



25
26
27
# File 'lib/workos/shared/connect_application_oauth.rb', line 25

def description
  @description
end

#id ⇒ Object

Returns the value of attribute id.



25
26
27
# File 'lib/workos/shared/connect_application_oauth.rb', line 25

def id
  @id
end

#is_first_party ⇒ Object

Returns the value of attribute is_first_party.



25
26
27
# File 'lib/workos/shared/connect_application_oauth.rb', line 25

def is_first_party
  @is_first_party
end

#name ⇒ Object

Returns the value of attribute name.



25
26
27
# File 'lib/workos/shared/connect_application_oauth.rb', line 25

def name
  @name
end

#object ⇒ Object

Returns the value of attribute object.



25
26
27
# File 'lib/workos/shared/connect_application_oauth.rb', line 25

def object
  @object
end

#organization_id ⇒ Object

Returns the value of attribute organization_id.



25
26
27
# File 'lib/workos/shared/connect_application_oauth.rb', line 25

def organization_id
  @organization_id
end

#redirect_uris ⇒ Object

Returns the value of attribute redirect_uris.



25
26
27
# File 'lib/workos/shared/connect_application_oauth.rb', line 25

def redirect_uris
  @redirect_uris
end

#scopes ⇒ Object

Returns the value of attribute scopes.



25
26
27
# File 'lib/workos/shared/connect_application_oauth.rb', line 25

def scopes
  @scopes
end

#updated_at ⇒ Object

Returns the value of attribute updated_at.



25
26
27
# File 'lib/workos/shared/connect_application_oauth.rb', line 25

def updated_at
  @updated_at
end

#uses_pkce ⇒ Object

Returns the value of attribute uses_pkce.



25
26
27
# File 'lib/workos/shared/connect_application_oauth.rb', line 25

def uses_pkce
  @uses_pkce
end

#was_dynamically_registered ⇒ Object

Returns the value of attribute was_dynamically_registered.



25
26
27
# File 'lib/workos/shared/connect_application_oauth.rb', line 25

def was_dynamically_registered
  @was_dynamically_registered
end