Class: Courier::Models::Channel
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- Courier::Models::Channel
- Defined in:
- lib/courier/models/channel.rb,
sig/courier/models/channel.rbs
Defined Under Namespace
Modules: RoutingMethod
Instance Attribute Summary collapse
-
#brand_id ⇒ String?
Brand id used for rendering.
-
#if_ ⇒ String?
JS conditional with access to data/profile.
- #metadata ⇒ Courier::Models::ChannelMetadata?
-
#override ⇒ Hash{Symbol=>Object}?
Channel specific overrides.
-
#providers ⇒ Array<String>?
Providers enabled for this channel.
-
#routing_method ⇒ Symbol, ...
Defaults to
single. - #timeouts ⇒ Courier::Models::Timeouts?
Instance Method Summary collapse
-
#initialize(brand_id: nil, if_: nil, metadata: nil, override: nil, providers: nil, routing_method: nil, timeouts: nil) ⇒ Channel
constructor
A new instance of Channel.
- #to_hash ⇒ { brand_id: String?, if_: String?, metadata: Courier::ChannelMetadata?, override: ::Hash[Symbol, top]?, providers: ::Array[String]?, routing_method: Courier::Models::Channel::routing_method?, timeouts: Courier::Timeouts? }
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) ⇒ Channel
Returns a new instance of Channel.
|
|
# File 'lib/courier/models/channel.rb', line 46
|
Instance Attribute Details
#brand_id ⇒ String?
Brand id used for rendering.
10 |
# File 'lib/courier/models/channel.rb', line 10 optional :brand_id, String, nil?: true |
#if_ ⇒ String?
JS conditional with access to data/profile.
16 |
# File 'lib/courier/models/channel.rb', line 16 optional :if_, String, api_name: :if, nil?: true |
#metadata ⇒ Courier::Models::ChannelMetadata?
21 |
# File 'lib/courier/models/channel.rb', line 21 optional :metadata, -> { Courier::ChannelMetadata }, nil?: true |
#override ⇒ Hash{Symbol=>Object}?
Channel specific overrides.
27 |
# File 'lib/courier/models/channel.rb', line 27 optional :override, Courier::Internal::Type::HashOf[Courier::Internal::Type::Unknown], nil?: true |
#providers ⇒ Array<String>?
Providers enabled for this channel.
33 |
# File 'lib/courier/models/channel.rb', line 33 optional :providers, Courier::Internal::Type::ArrayOf[String], nil?: true |
#routing_method ⇒ Symbol, ...
Defaults to single.
39 |
# File 'lib/courier/models/channel.rb', line 39 optional :routing_method, enum: -> { Courier::Channel::RoutingMethod }, nil?: true |
#timeouts ⇒ Courier::Models::Timeouts?
44 |
# File 'lib/courier/models/channel.rb', line 44 optional :timeouts, -> { Courier::Timeouts }, nil?: true |
Instance Method Details
#to_hash ⇒ { brand_id: String?, if_: String?, metadata: Courier::ChannelMetadata?, override: ::Hash[Symbol, top]?, providers: ::Array[String]?, routing_method: Courier::Models::Channel::routing_method?, timeouts: Courier::Timeouts? }
39 40 41 42 43 44 45 46 47 |
# File 'sig/courier/models/channel.rbs', line 39
def to_hash: -> {
brand_id: String?,
if_: String?,
metadata: Courier::ChannelMetadata?,
override: ::Hash[Symbol, top]?,
providers: ::Array[String]?,
routing_method: Courier::Models::Channel::routing_method?,
timeouts: Courier::Timeouts?
}
|