Class: WorkOS::ConnectApplicationOAuth

Inherits:
Types::BaseModel 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,
  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

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) ⇒ ConnectApplicationOAuth

Returns a new instance of ConnectApplicationOAuth.



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

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 }
  @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_typeObject

Returns the value of attribute application_type.



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

def application_type
  @application_type
end

#client_idObject

Returns the value of attribute client_id.



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

def client_id
  @client_id
end

#created_atObject

Returns the value of attribute created_at.



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

def created_at
  @created_at
end

#descriptionObject

Returns the value of attribute description.



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

def description
  @description
end

#idObject

Returns the value of attribute id.



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

def id
  @id
end

#is_first_partyObject

Returns the value of attribute is_first_party.



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

def is_first_party
  @is_first_party
end

#nameObject

Returns the value of attribute name.



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

def name
  @name
end

#objectObject

Returns the value of attribute object.



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

def object
  @object
end

#organization_idObject

Returns the value of attribute organization_id.



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

def organization_id
  @organization_id
end

#redirect_urisObject

Returns the value of attribute redirect_uris.



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

def redirect_uris
  @redirect_uris
end

#scopesObject

Returns the value of attribute scopes.



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

def scopes
  @scopes
end

#updated_atObject

Returns the value of attribute updated_at.



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

def updated_at
  @updated_at
end

#uses_pkceObject

Returns the value of attribute uses_pkce.



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

def uses_pkce
  @uses_pkce
end

#was_dynamically_registeredObject

Returns the value of attribute was_dynamically_registered.



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

def was_dynamically_registered
  @was_dynamically_registered
end