Class: Straddle::Models::UserEventV1WebhookEvent::Data::Membership

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/straddle/models/user_event_v1_webhook_event.rb,
sig/straddle/models/user_event_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_event_v1_webhook_event.rb', line 199

Instance Attribute Details

#authenticator_organization_id ⇒ String

Organization identifier used by the authentication provider.

Parameters:

  • value (String)

Returns:

  • (String)


168
# File 'lib/straddle/models/user_event_v1_webhook_event.rb', line 168

required :authenticator_organization_id, String

#entity_id ⇒ String?

Unique identifier of the entity associated with the membership.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


197
# File 'lib/straddle/models/user_event_v1_webhook_event.rb', line 197

optional :entity_id, String, nil?: true

#entity_name ⇒ String

Display name of the entity associated with the membership.

Parameters:

  • value (String)

Returns:

  • (String)


174
# File 'lib/straddle/models/user_event_v1_webhook_event.rb', line 174

required :entity_name, String

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

Entity level at which the membership applies.

Parameters:

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

Returns:



180
# File 'lib/straddle/models/user_event_v1_webhook_event.rb', line 180

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

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

Roles granted by the membership.

Parameters:

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

Returns:



186
187
188
189
190
191
# File 'lib/straddle/models/user_event_v1_webhook_event.rb', line 186

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

Class Method Details

.values ⇒ Array<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/straddle/models/user_event_v1_webhook_event.rb', line 223

Instance Method Details

#to_hash ⇒ {

Returns:

  • ({)


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

def to_hash: -> {