Class: WorkOS::OrganizationUpdatedData

Inherits:
Types::BaseModel show all
Defined in:
lib/workos/organizations/organization_updated_data.rb

Constant Summary collapse

HASH_ATTRS =
{
  object: :object,
  id: :id,
  name: :name,
  domains: :domains,
  metadata: :metadata,
  external_id: :external_id,
  stripe_customer_id: :stripe_customer_id,
  created_at: :created_at,
  updated_at: :updated_at
}.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) ⇒ OrganizationUpdatedData

Returns a new instance of OrganizationUpdatedData.



30
31
32
33
34
35
36
37
38
39
40
41
# File 'lib/workos/organizations/organization_updated_data.rb', line 30

def initialize(json)
  hash = self.class.normalize(json)
  @object = hash[:object]
  @id = hash[:id]
  @name = hash[:name]
  @domains = (hash[:domains] || []).map { |item| item ? WorkOS::OrganizationUpdatedDataDomain.new(item) : nil }
  @metadata = hash[:metadata] || {}
  @external_id = hash[:external_id]
  @stripe_customer_id = hash[:stripe_customer_id]
  @created_at = hash[:created_at]
  @updated_at = hash[:updated_at]
end

Instance Attribute Details

#created_atObject

Returns the value of attribute created_at.



19
20
21
# File 'lib/workos/organizations/organization_updated_data.rb', line 19

def created_at
  @created_at
end

#domainsObject

Returns the value of attribute domains.



19
20
21
# File 'lib/workos/organizations/organization_updated_data.rb', line 19

def domains
  @domains
end

#external_idObject

Returns the value of attribute external_id.



19
20
21
# File 'lib/workos/organizations/organization_updated_data.rb', line 19

def external_id
  @external_id
end

#idObject

Returns the value of attribute id.



19
20
21
# File 'lib/workos/organizations/organization_updated_data.rb', line 19

def id
  @id
end

#metadataObject

Returns the value of attribute metadata.



19
20
21
# File 'lib/workos/organizations/organization_updated_data.rb', line 19

def 
  @metadata
end

#nameObject

Returns the value of attribute name.



19
20
21
# File 'lib/workos/organizations/organization_updated_data.rb', line 19

def name
  @name
end

#objectObject

Returns the value of attribute object.



19
20
21
# File 'lib/workos/organizations/organization_updated_data.rb', line 19

def object
  @object
end

#stripe_customer_idObject

Returns the value of attribute stripe_customer_id.



19
20
21
# File 'lib/workos/organizations/organization_updated_data.rb', line 19

def stripe_customer_id
  @stripe_customer_id
end

#updated_atObject

Returns the value of attribute updated_at.



19
20
21
# File 'lib/workos/organizations/organization_updated_data.rb', line 19

def updated_at
  @updated_at
end