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

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

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



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

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)

Returns:

  • (String, nil)


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

optional :id, String, nil?: true

#nameString?

Template name (mutually exclusive with id)

Returns:

  • (String, nil)


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

optional :name, String, nil?: true

#parametersHash{Symbol=>String}?

Template variable parameters for personalization

Returns:

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


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

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