Class: Courier::Models::RoutingStrategyGetResponse

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

Overview

See Also:

  • Courier::Resources::RoutingStrategies#create

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(id:, channels:, created:, creator:, name:, providers:, routing:, description: nil, tags: nil, updated: nil, updater: nil) ⇒ Object

Full routing strategy entity returned by GET.

Parameters:

  • id (String) —

    The routing strategy ID (rs_ prefix).

  • channels (Hash{Symbol=>Courier::Models::Channel}) —

    Per-channel delivery configuration. May be empty.

  • created (Integer) —

    Epoch milliseconds when the strategy was created.

  • creator (String) —

    User ID of the creator.

  • name (String) —

    Human-readable name.

  • providers (Hash{Symbol=>Courier::Models::MessageProvidersType}) —

    Per-provider delivery configuration. May be empty.

  • routing (Courier::Models::MessageRouting) —

    Routing tree defining channel selection method and order.

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

    Description of the routing strategy.

  • tags (Array<String>, nil) (defaults to: nil) —

    Tags for categorization.

  • updated (Integer, nil) (defaults to: nil) —

    Epoch milliseconds of last update.

  • updater (String, nil) (defaults to: nil) —

    User ID of the last updater.



# File 'lib/courier/models/routing_strategy_get_response.rb', line 73

Instance Attribute Details

#channels ⇒ Hash{Symbol=>Courier::Models::Channel}

Per-channel delivery configuration. May be empty.

Parameters:

  • value (Courier::Models::message_channels)

Returns:



17
# File 'lib/courier/models/routing_strategy_get_response.rb', line 17

required :channels, -> { Courier::Internal::Type::HashOf[Courier::Channel] }

#created ⇒ Integer

Epoch milliseconds when the strategy was created.

Parameters:

  • value (Integer)

Returns:

  • (Integer)


23
# File 'lib/courier/models/routing_strategy_get_response.rb', line 23

required :created, Integer

#creator ⇒ String

User ID of the creator.

Parameters:

  • value (String)

Returns:

  • (String)


29
# File 'lib/courier/models/routing_strategy_get_response.rb', line 29

required :creator, String

#description ⇒ String?

Description of the routing strategy.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


53
# File 'lib/courier/models/routing_strategy_get_response.rb', line 53

optional :description, String, nil?: true

#id ⇒ String

The routing strategy ID (rs_ prefix).

Parameters:

  • value (String)

Returns:

  • (String)


11
# File 'lib/courier/models/routing_strategy_get_response.rb', line 11

required :id, String

#name ⇒ String

Human-readable name.

Parameters:

  • value (String)

Returns:

  • (String)


35
# File 'lib/courier/models/routing_strategy_get_response.rb', line 35

required :name, String

#providers ⇒ Hash{Symbol=>Courier::Models::MessageProvidersType}

Per-provider delivery configuration. May be empty.

Parameters:

  • value (Courier::Models::message_providers)

Returns:



41
# File 'lib/courier/models/routing_strategy_get_response.rb', line 41

required :providers, -> { Courier::Internal::Type::HashOf[Courier::MessageProvidersType] }

#routing ⇒ Courier::Models::MessageRouting

Routing tree defining channel selection method and order.



47
# File 'lib/courier/models/routing_strategy_get_response.rb', line 47

required :routing, -> { Courier::MessageRouting }

#tags ⇒ Array<String>?

Tags for categorization.

Parameters:

  • value (::Array[String], nil)

Returns:

  • (Array<String>, nil)


59
# File 'lib/courier/models/routing_strategy_get_response.rb', line 59

optional :tags, Courier::Internal::Type::ArrayOf[String], nil?: true

#updated ⇒ Integer?

Epoch milliseconds of last update.

Parameters:

  • value (Integer, nil)

Returns:

  • (Integer, nil)


65
# File 'lib/courier/models/routing_strategy_get_response.rb', line 65

optional :updated, Integer, nil?: true

#updater ⇒ String?

User ID of the last updater.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


71
# File 'lib/courier/models/routing_strategy_get_response.rb', line 71

optional :updater, String, nil?: true

Instance Method Details

#to_hash ⇒ {

Returns:

  • ({)


55
# File 'sig/courier/models/routing_strategy_get_response.rbs', line 55

def to_hash: -> {