Class: Courier::Models::WorkspacePreferenceCreateRequest

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

Direct Known Subclasses

WorkspacePreferenceCreateParams

Instance Attribute 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(name:, description: nil, has_custom_routing: nil, routing_options: nil) ⇒ Object

Request body for creating a workspace preference.

Parameters:

  • name (String)

    Human-readable name for the workspace preference.

  • description (String, nil) (defaults to: nil)

    Optional description shown under the section on the hosted preferences page.

  • has_custom_routing (Boolean, nil) (defaults to: nil)

    Whether the workspace preference defines custom routing for its topics.

  • routing_options (Array<Symbol, Courier::Models::ChannelClassification>, nil) (defaults to: nil)

    Default channels for the workspace preference. Defaults to empty if omitted.



# File 'lib/courier/models/workspace_preference_create_request.rb', line 32

Instance Attribute Details

#descriptionString?

Optional description shown under the section on the hosted preferences page.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


16
# File 'lib/courier/models/workspace_preference_create_request.rb', line 16

optional :description, String, nil?: true

#has_custom_routingBoolean?

Whether the workspace preference defines custom routing for its topics.

Parameters:

  • value (Boolean, nil)

Returns:

  • (Boolean, nil)


22
# File 'lib/courier/models/workspace_preference_create_request.rb', line 22

optional :has_custom_routing, Courier::Internal::Type::Boolean, nil?: true

#nameString

Human-readable name for the workspace preference.

Parameters:

  • value (String)

Returns:

  • (String)


10
# File 'lib/courier/models/workspace_preference_create_request.rb', line 10

required :name, String

#routing_optionsArray<Symbol, Courier::Models::ChannelClassification>?

Default channels for the workspace preference. Defaults to empty if omitted.

Parameters:

  • value (::Array[Courier::Models::channel_classification], nil)

Returns:



28
29
30
# File 'lib/courier/models/workspace_preference_create_request.rb', line 28

optional :routing_options,
-> { Courier::Internal::Type::ArrayOf[enum: Courier::ChannelClassification] },
nil?: true

Instance Method Details

#to_hash{

Returns:

  • ({)


27
# File 'sig/courier/models/workspace_preference_create_request.rbs', line 27

def to_hash: -> {