Class: Trycourier::Models::SendMessageParams::Message::Channel

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/trycourier/models/send_message_params.rb

Defined Under Namespace

Modules: RoutingMethod Classes: Metadata, Timeouts

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(utm: nil) ⇒ Object

Parameters:



141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
# File 'lib/trycourier/models/send_message_params.rb', line 141

class Channel < Trycourier::Internal::Type::BaseModel
  # @!attribute brand_id
  #   Brand id used for rendering.
  #
  #   @return [String, nil]
  optional :brand_id, String, nil?: true

  # @!attribute if_
  #   JS conditional with access to data/profile.
  #
  #   @return [String, nil]
  optional :if_, String, api_name: :if, nil?: true

  # @!attribute metadata
  #
  #   @return [Trycourier::Models::SendMessageParams::Message::Channel::Metadata, nil]
  optional :metadata, -> { Trycourier::SendMessageParams::Message::Channel:: }, nil?: true

  # @!attribute override
  #   Channel specific overrides.
  #
  #   @return [Hash{Symbol=>Object}, nil]
  optional :override,
           Trycourier::Internal::Type::HashOf[Trycourier::Internal::Type::Unknown],
           nil?: true

  # @!attribute providers
  #   Providers enabled for this channel.
  #
  #   @return [Array<String>, nil]
  optional :providers, Trycourier::Internal::Type::ArrayOf[String], nil?: true

  # @!attribute routing_method
  #   Defaults to `single`.
  #
  #   @return [Symbol, Trycourier::Models::SendMessageParams::Message::Channel::RoutingMethod, nil]
  optional :routing_method,
           enum: -> { Trycourier::SendMessageParams::Message::Channel::RoutingMethod },
           nil?: true

  # @!attribute timeouts
  #
  #   @return [Trycourier::Models::SendMessageParams::Message::Channel::Timeouts, nil]
  optional :timeouts, -> { Trycourier::SendMessageParams::Message::Channel::Timeouts }, nil?: true

  # @!method initialize(brand_id: nil, if_: nil, metadata: nil, override: nil, providers: nil, routing_method: nil, timeouts: nil)
  #   @param brand_id [String, nil] Brand id used for rendering.
  #
  #   @param if_ [String, nil] JS conditional with access to data/profile.
  #
  #   @param metadata [Trycourier::Models::SendMessageParams::Message::Channel::Metadata, nil]
  #
  #   @param override [Hash{Symbol=>Object}, nil] Channel specific overrides.
  #
  #   @param providers [Array<String>, nil] Providers enabled for this channel.
  #
  #   @param routing_method [Symbol, Trycourier::Models::SendMessageParams::Message::Channel::RoutingMethod, nil] Defaults to `single`.
  #
  #   @param timeouts [Trycourier::Models::SendMessageParams::Message::Channel::Timeouts, nil]

  # @see Trycourier::Models::SendMessageParams::Message::Channel#metadata
  class  < Trycourier::Internal::Type::BaseModel
    # @!attribute utm
    #
    #   @return [Trycourier::Models::Utm, nil]
    optional :utm, -> { Trycourier::Utm }, nil?: true

    # @!method initialize(utm: nil)
    #   @param utm [Trycourier::Models::Utm, nil]
  end

  # Defaults to `single`.
  #
  # @see Trycourier::Models::SendMessageParams::Message::Channel#routing_method
  module RoutingMethod
    extend Trycourier::Internal::Type::Enum

    ALL = :all
    SINGLE = :single

    # @!method self.values
    #   @return [Array<Symbol>]
  end

  # @see Trycourier::Models::SendMessageParams::Message::Channel#timeouts
  class Timeouts < Trycourier::Internal::Type::BaseModel
    # @!attribute channel
    #
    #   @return [Integer, nil]
    optional :channel, Integer, nil?: true

    # @!attribute provider
    #
    #   @return [Integer, nil]
    optional :provider, Integer, nil?: true

    # @!method initialize(channel: nil, provider: nil)
    #   @param channel [Integer, nil]
    #   @param provider [Integer, nil]
  end
end

Instance Attribute Details

#brand_idString?

Brand id used for rendering.

Returns:

  • (String, nil)


146
# File 'lib/trycourier/models/send_message_params.rb', line 146

optional :brand_id, String, nil?: true

#if_String?

JS conditional with access to data/profile.

Returns:

  • (String, nil)


152
# File 'lib/trycourier/models/send_message_params.rb', line 152

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

#metadataTrycourier::Models::SendMessageParams::Message::Channel::Metadata?



157
# File 'lib/trycourier/models/send_message_params.rb', line 157

optional :metadata, -> { Trycourier::SendMessageParams::Message::Channel:: }, nil?: true

#overrideHash{Symbol=>Object}?

Channel specific overrides.

Returns:

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


163
164
165
# File 'lib/trycourier/models/send_message_params.rb', line 163

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

#providersArray<String>?

Providers enabled for this channel.

Returns:

  • (Array<String>, nil)


171
# File 'lib/trycourier/models/send_message_params.rb', line 171

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

#routing_methodSymbol, ...

Defaults to ‘single`.



177
178
179
# File 'lib/trycourier/models/send_message_params.rb', line 177

optional :routing_method,
enum: -> { Trycourier::SendMessageParams::Message::Channel::RoutingMethod },
nil?: true

#timeoutsTrycourier::Models::SendMessageParams::Message::Channel::Timeouts?



184
# File 'lib/trycourier/models/send_message_params.rb', line 184

optional :timeouts, -> { Trycourier::SendMessageParams::Message::Channel::Timeouts }, nil?: true

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/trycourier/models/send_message_params.rb', line 221