Class: Courier::Models::NotificationElementPutRequest

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

Direct Known Subclasses

NotificationPutElementParams

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(type:, channels: nil, data: nil, if_: nil, loop_: nil, ref: nil, state: nil) ⇒ Object

Request body for updating a single element. Additional type-specific fields are allowed.

Parameters:

  • type (String)

    Element type (text, meta, action, image, etc.).

  • channels (Array<String>) (defaults to: nil)
  • data (Hash{Symbol=>Object}) (defaults to: nil)
  • if_ (String) (defaults to: nil)
  • loop_ (String) (defaults to: nil)
  • ref (String) (defaults to: nil)
  • state (Symbol, Courier::Models::NotificationTemplateState) (defaults to: nil)

    Template state. Defaults to DRAFT.



# File 'lib/courier/models/notification_element_put_request.rb', line 43

Instance Attribute Details

#channelsArray<String>?

Returns:

  • (Array<String>, nil)


15
# File 'lib/courier/models/notification_element_put_request.rb', line 15

optional :channels, Courier::Internal::Type::ArrayOf[String]

#dataHash{Symbol=>Object}?

Returns:

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


20
# File 'lib/courier/models/notification_element_put_request.rb', line 20

optional :data, Courier::Internal::Type::HashOf[Courier::Internal::Type::Unknown]

#if_String?

Returns:

  • (String, nil)


25
# File 'lib/courier/models/notification_element_put_request.rb', line 25

optional :if_, String, api_name: :if

#loop_String?

Returns:

  • (String, nil)


30
# File 'lib/courier/models/notification_element_put_request.rb', line 30

optional :loop_, String, api_name: :loop

#refString?

Returns:

  • (String, nil)


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

optional :ref, String

#stateSymbol, ...

Template state. Defaults to DRAFT.



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

optional :state, enum: -> { Courier::NotificationTemplateState }

#typeString

Element type (text, meta, action, image, etc.).

Returns:

  • (String)


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

required :type, String