Class: Sentdm::Models::MessageSendParams::Template

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/sentdm/models/message_send_params.rb,
sig/sentdm/models/message_send_params.rbs

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(id: nil, name: nil, parameters: nil) ⇒ Object

SDK-style template reference: resolve by ID or by name, with optional parameters.

Parameters:

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

    Template ID (mutually exclusive with name)

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

    Template name (mutually exclusive with id)

  • parameters (Hash{Symbol=>String}, nil) (defaults to: nil)

    Template variable parameters for personalization



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
# File 'lib/sentdm/models/message_send_params.rb', line 74

class Template < Sentdm::Internal::Type::BaseModel
  # @!attribute id
  #   Template ID (mutually exclusive with name)
  #
  #   @return [String, nil]
  optional :id, String, nil?: true

  # @!attribute name
  #   Template name (mutually exclusive with id)
  #
  #   @return [String, nil]
  optional :name, String, nil?: true

  # @!attribute parameters
  #   Template variable parameters for personalization
  #
  #   @return [Hash{Symbol=>String}, nil]
  optional :parameters, Sentdm::Internal::Type::HashOf[String], nil?: true

  # @!method initialize(id: nil, name: nil, parameters: nil)
  #   SDK-style template reference: resolve by ID or by name, with optional
  #   parameters.
  #
  #   @param id [String, nil] Template ID (mutually exclusive with name)
  #
  #   @param name [String, nil] Template name (mutually exclusive with id)
  #
  #   @param parameters [Hash{Symbol=>String}, nil] Template variable parameters for personalization
end

Instance Attribute Details

#idString?

Template ID (mutually exclusive with name)

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


79
# File 'lib/sentdm/models/message_send_params.rb', line 79

optional :id, String, nil?: true

#nameString?

Template name (mutually exclusive with id)

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


85
# File 'lib/sentdm/models/message_send_params.rb', line 85

optional :name, String, nil?: true

#parametersHash{Symbol=>String}?

Template variable parameters for personalization

Parameters:

  • value (::Hash[Symbol, String], nil)

Returns:

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


91
# File 'lib/sentdm/models/message_send_params.rb', line 91

optional :parameters, Sentdm::Internal::Type::HashOf[String], nil?: true

Instance Method Details

#to_hash{

Returns:

  • ({)


79
# File 'sig/sentdm/models/message_send_params.rbs', line 79

def to_hash: -> {