Class: WorkOS::CreateM2MApplication

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

Constant Summary collapse

HASH_ATTRS =
{
  name: :name,
  application_type: :application_type,
  description: :description,
  scopes: :scopes,
  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) ⇒ CreateM2MApplication

Returns a new instance of CreateM2MApplication.



22
23
24
25
26
27
28
29
# File 'lib/workos/connect/create_m2m_application.rb', line 22

def initialize(json)
  hash = self.class.normalize(json)
  @name = hash[:name]
  @application_type = hash[:application_type]
  @description = hash[:description]
  @scopes = hash[:scopes] || []
  @organization_id = hash[:organization_id]
end

Instance Attribute Details

#application_typeObject

Returns the value of attribute application_type.



15
16
17
# File 'lib/workos/connect/create_m2m_application.rb', line 15

def application_type
  @application_type
end

#descriptionObject

Returns the value of attribute description.



15
16
17
# File 'lib/workos/connect/create_m2m_application.rb', line 15

def description
  @description
end

#nameObject

Returns the value of attribute name.



15
16
17
# File 'lib/workos/connect/create_m2m_application.rb', line 15

def name
  @name
end

#organization_idObject

Returns the value of attribute organization_id.



15
16
17
# File 'lib/workos/connect/create_m2m_application.rb', line 15

def organization_id
  @organization_id
end

#scopesObject

Returns the value of attribute scopes.



15
16
17
# File 'lib/workos/connect/create_m2m_application.rb', line 15

def scopes
  @scopes
end