Class: WorkOS::CreateOAuthApplication

Inherits:
Types::BaseModel show all
Defined in:
lib/workos/connect/create_oauth_application.rb

Constant Summary collapse

HASH_ATTRS =
{
  name: :name,
  application_type: :application_type,
  description: :description,
  scopes: :scopes,
  redirect_uris: :redirect_uris,
  uses_pkce: :uses_pkce,
  is_first_party: :is_first_party,
  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) ⇒ CreateOAuthApplication

Returns a new instance of CreateOAuthApplication.



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

def initialize(json)
  hash = self.class.normalize(json)
  @name = hash[:name]
  @application_type = hash[:application_type]
  @description = hash[:description]
  @scopes = hash[:scopes] || []
  @redirect_uris = (hash[:redirect_uris] || []).map { |item| item ? WorkOS::RedirectUriInput.new(item) : nil }
  @uses_pkce = hash[:uses_pkce]
  @is_first_party = hash[:is_first_party]
  @organization_id = hash[:organization_id]
end

Instance Attribute Details

#application_typeObject

Returns the value of attribute application_type.



18
19
20
# File 'lib/workos/connect/create_oauth_application.rb', line 18

def application_type
  @application_type
end

#descriptionObject

Returns the value of attribute description.



18
19
20
# File 'lib/workos/connect/create_oauth_application.rb', line 18

def description
  @description
end

#is_first_partyObject

Returns the value of attribute is_first_party.



18
19
20
# File 'lib/workos/connect/create_oauth_application.rb', line 18

def is_first_party
  @is_first_party
end

#nameObject

Returns the value of attribute name.



18
19
20
# File 'lib/workos/connect/create_oauth_application.rb', line 18

def name
  @name
end

#organization_idObject

Returns the value of attribute organization_id.



18
19
20
# File 'lib/workos/connect/create_oauth_application.rb', line 18

def organization_id
  @organization_id
end

#redirect_urisObject

Returns the value of attribute redirect_uris.



18
19
20
# File 'lib/workos/connect/create_oauth_application.rb', line 18

def redirect_uris
  @redirect_uris
end

#scopesObject

Returns the value of attribute scopes.



18
19
20
# File 'lib/workos/connect/create_oauth_application.rb', line 18

def scopes
  @scopes
end

#uses_pkceObject

Returns the value of attribute uses_pkce.



18
19
20
# File 'lib/workos/connect/create_oauth_application.rb', line 18

def uses_pkce
  @uses_pkce
end