Class: Courier::Models::Channel

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/courier/models/channel.rb

Defined Under Namespace

Modules: RoutingMethod

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(brand_id: nil, if_: nil, metadata: nil, override: nil, providers: nil, routing_method: nil, timeouts: nil) ⇒ Object

Parameters:

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

    Brand id used for rendering.

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

    JS conditional with access to data/profile.

  • metadata (Courier::Models::ChannelMetadata, nil) (defaults to: nil)
  • override (Hash{Symbol=>Object}, nil) (defaults to: nil)

    Channel specific overrides.

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

    Providers enabled for this channel.

  • routing_method (Symbol, Courier::Models::Channel::RoutingMethod, nil) (defaults to: nil)

    Defaults to ‘single`.

  • timeouts (Courier::Models::Timeouts, nil) (defaults to: nil)


# File 'lib/courier/models/channel.rb', line 46

Instance Attribute Details

#brand_idString?

Brand id used for rendering.

Returns:

  • (String, nil)


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

optional :brand_id, String, nil?: true

#if_String?

JS conditional with access to data/profile.

Returns:

  • (String, nil)


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

optional :if_, String, api_name: :if, nil?: true

#metadataCourier::Models::ChannelMetadata?



21
# File 'lib/courier/models/channel.rb', line 21

optional :metadata, -> { Courier::ChannelMetadata }, nil?: true

#overrideHash{Symbol=>Object}?

Channel specific overrides.

Returns:

  • (Hash{Symbol=>Object}, nil)


27
# File 'lib/courier/models/channel.rb', line 27

optional :override, Courier::Internal::Type::HashOf[Courier::Internal::Type::Unknown], nil?: true

#providersArray<String>?

Providers enabled for this channel.

Returns:

  • (Array<String>, nil)


33
# File 'lib/courier/models/channel.rb', line 33

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

#routing_methodSymbol, ...

Defaults to ‘single`.

Returns:



39
# File 'lib/courier/models/channel.rb', line 39

optional :routing_method, enum: -> { Courier::Channel::RoutingMethod }, nil?: true

#timeoutsCourier::Models::Timeouts?

Returns:



44
# File 'lib/courier/models/channel.rb', line 44

optional :timeouts, -> { Courier::Timeouts }, nil?: true