Class: Courier::Models::TenantTemplateInput::Channel

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/courier/models/tenant_template_input.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:



45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
# File 'lib/courier/models/tenant_template_input.rb', line 45

class Channel < Courier::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 [Courier::Models::TenantTemplateInput::Channel::Metadata, nil]
  optional :metadata, -> { Courier::TenantTemplateInput::Channel:: }, nil?: true

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

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

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

  # @!attribute timeouts
  #
  #   @return [Courier::Models::TenantTemplateInput::Channel::Timeouts, nil]
  optional :timeouts, -> { Courier::TenantTemplateInput::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 [Courier::Models::TenantTemplateInput::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, Courier::Models::TenantTemplateInput::Channel::RoutingMethod, nil] Defaults to `single`.
  #
  #   @param timeouts [Courier::Models::TenantTemplateInput::Channel::Timeouts, nil]

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

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

  # Defaults to `single`.
  #
  # @see Courier::Models::TenantTemplateInput::Channel#routing_method
  module RoutingMethod
    extend Courier::Internal::Type::Enum

    ALL = :all
    SINGLE = :single

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

  # @see Courier::Models::TenantTemplateInput::Channel#timeouts
  class Timeouts < Courier::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)


50
# File 'lib/courier/models/tenant_template_input.rb', line 50

optional :brand_id, String, nil?: true

#if_String?

JS conditional with access to data/profile.

Returns:

  • (String, nil)


56
# File 'lib/courier/models/tenant_template_input.rb', line 56

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

#metadataCourier::Models::TenantTemplateInput::Channel::Metadata?



61
# File 'lib/courier/models/tenant_template_input.rb', line 61

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

#overrideHash{Symbol=>Object}?

Channel specific overrides.

Returns:

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


67
# File 'lib/courier/models/tenant_template_input.rb', line 67

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

#providersArray<String>?

Providers enabled for this channel.

Returns:

  • (Array<String>, nil)


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

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

#routing_methodSymbol, ...

Defaults to single.



79
80
81
82
83
# File 'lib/courier/models/tenant_template_input.rb', line 79

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

#timeoutsCourier::Models::TenantTemplateInput::Channel::Timeouts?



88
# File 'lib/courier/models/tenant_template_input.rb', line 88

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

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/courier/models/tenant_template_input.rb', line 125