Class: WorkOS::UpdateUserOrganizationMembership

Inherits:
Types::BaseModel show all
Defined in:
lib/workos/user_management/update_user_organization_membership.rb

Constant Summary collapse

HASH_ATTRS =
{
  role_slug: :role_slug,
  role_slugs: :role_slugs
}.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) ⇒ UpdateUserOrganizationMembership

Returns a new instance of UpdateUserOrganizationMembership.



16
17
18
19
20
# File 'lib/workos/user_management/update_user_organization_membership.rb', line 16

def initialize(json)
  hash = self.class.normalize(json)
  @role_slug = hash[:role_slug]
  @role_slugs = hash[:role_slugs] || []
end

Instance Attribute Details

#role_slugObject

Returns the value of attribute role_slug.



12
13
14
# File 'lib/workos/user_management/update_user_organization_membership.rb', line 12

def role_slug
  @role_slug
end

#role_slugsObject

Returns the value of attribute role_slugs.



12
13
14
# File 'lib/workos/user_management/update_user_organization_membership.rb', line 12

def role_slugs
  @role_slugs
end