Class: WorkOS::CreateUserOrganizationMembership
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- WorkOS::CreateUserOrganizationMembership
- Defined in:
- lib/workos/user_management/create_user_organization_membership.rb
Constant Summary collapse
- HASH_ATTRS =
{ user_id: :user_id, organization_id: :organization_id, role_slug: :role_slug, role_slugs: :role_slugs }.freeze
Instance Attribute Summary collapse
-
#organization_id ⇒ Object
Returns the value of attribute organization_id.
-
#role_slug ⇒ Object
Returns the value of attribute role_slug.
-
#role_slugs ⇒ Object
Returns the value of attribute role_slugs.
-
#user_id ⇒ Object
Returns the value of attribute user_id.
Attributes inherited from Types::BaseModel
Instance Method Summary collapse
-
#initialize(json) ⇒ CreateUserOrganizationMembership
constructor
A new instance of CreateUserOrganizationMembership.
Methods inherited from Types::BaseModel
Methods included from HashProvider
Constructor Details
#initialize(json) ⇒ CreateUserOrganizationMembership
Returns a new instance of CreateUserOrganizationMembership.
20 21 22 23 24 25 26 |
# File 'lib/workos/user_management/create_user_organization_membership.rb', line 20 def initialize(json) hash = self.class.normalize(json) @user_id = hash[:user_id] @organization_id = hash[:organization_id] @role_slug = hash[:role_slug] @role_slugs = hash[:role_slugs] || [] end |
Instance Attribute Details
#organization_id ⇒ Object
Returns the value of attribute organization_id.
14 15 16 |
# File 'lib/workos/user_management/create_user_organization_membership.rb', line 14 def organization_id @organization_id end |
#role_slug ⇒ Object
Returns the value of attribute role_slug.
14 15 16 |
# File 'lib/workos/user_management/create_user_organization_membership.rb', line 14 def role_slug @role_slug end |
#role_slugs ⇒ Object
Returns the value of attribute role_slugs.
14 15 16 |
# File 'lib/workos/user_management/create_user_organization_membership.rb', line 14 def role_slugs @role_slugs end |
#user_id ⇒ Object
Returns the value of attribute user_id.
14 15 16 |
# File 'lib/workos/user_management/create_user_organization_membership.rb', line 14 def user_id @user_id end |