Class: Straddle::Models::UserCreatedV1WebhookEvent::Data::Membership

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/straddle/models/user_created_v1_webhook_event.rb,
sig/straddle/models/user_created_v1_webhook_event.rbs

Defined Under Namespace

Modules: Level, Role

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, inspect, #inspect, meta_info, new_coerce_state, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

#initialize(authenticator_organization_id:, entity_name:, level:, roles:, entity_id: nil) ⇒ Object

Parameters:



# File 'lib/straddle/models/user_created_v1_webhook_event.rb', line 203

Instance Attribute Details

#authenticator_organization_id ⇒ String

Organization identifier used by the authentication provider.

Parameters:

  • value (String)

Returns:

  • (String)


172
# File 'lib/straddle/models/user_created_v1_webhook_event.rb', line 172

required :authenticator_organization_id, String

#entity_id ⇒ String?

Unique identifier of the entity associated with the membership.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


201
# File 'lib/straddle/models/user_created_v1_webhook_event.rb', line 201

optional :entity_id, String, nil?: true

#entity_name ⇒ String

Display name of the entity associated with the membership.

Parameters:

  • value (String)

Returns:

  • (String)


178
# File 'lib/straddle/models/user_created_v1_webhook_event.rb', line 178

required :entity_name, String

#level ⇒ Symbol, Straddle::Models::UserCreatedV1WebhookEvent::Data::Membership::Level

Entity level at which the membership applies.

Parameters:

  • value (Straddle::Models::UserCreatedV1WebhookEvent::Data::Membership::level)

Returns:



184
# File 'lib/straddle/models/user_created_v1_webhook_event.rb', line 184

required :level, enum: -> { Straddle::UserCreatedV1WebhookEvent::Data::Membership::Level }

#roles ⇒ Array<Symbol, Straddle::Models::UserCreatedV1WebhookEvent::Data::Membership::Role>

Roles granted by the membership.

Parameters:

  • value (::Array[Straddle::Models::UserCreatedV1WebhookEvent::Data::Membership::role])

Returns:



190
191
192
193
194
195
# File 'lib/straddle/models/user_created_v1_webhook_event.rb', line 190

required :roles,
-> do
  Straddle::Internal::Type::ArrayOf[
    enum: Straddle::UserCreatedV1WebhookEvent::Data::Membership::Role
  ]
end

Class Method Details

.values ⇒ Array<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/straddle/models/user_created_v1_webhook_event.rb', line 227

Instance Method Details

#to_hash ⇒ {

Returns:

  • ({)


152
# File 'sig/straddle/models/user_created_v1_webhook_event.rbs', line 152

def to_hash: -> {