Class: Sentdm::Models::Template

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/sentdm/models/template.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, category: nil, channels: nil, created_at: nil, is_published: nil, language: nil, name: nil, status: nil, updated_at: nil, variables: nil) ⇒ Object

Template response for v3 API

Parameters:

  • id (String) (defaults to: nil)

    Unique template identifier

  • category (String) (defaults to: nil)

    Template category: MARKETING, UTILITY, AUTHENTICATION

  • channels (Array<String>, nil) (defaults to: nil)

    Supported channels: sms, whatsapp

  • created_at (Time) (defaults to: nil)

    When the template was created

  • is_published (Boolean) (defaults to: nil)

    Whether the template is published and active

  • language (String) (defaults to: nil)

    Template language code (e.g., en_US)

  • name (String) (defaults to: nil)

    Template display name

  • status (String) (defaults to: nil)

    Template status: APPROVED, PENDING, REJECTED

  • updated_at (Time, nil) (defaults to: nil)

    When the template was last updated

  • variables (Array<String>, nil) (defaults to: nil)

    Template variables for personalization



# File 'lib/sentdm/models/template.rb', line 66

Instance Attribute Details

#categoryString?

Template category: MARKETING, UTILITY, AUTHENTICATION

Returns:

  • (String, nil)


16
# File 'lib/sentdm/models/template.rb', line 16

optional :category, String

#channelsArray<String>?

Supported channels: sms, whatsapp

Returns:

  • (Array<String>, nil)


22
# File 'lib/sentdm/models/template.rb', line 22

optional :channels, Sentdm::Internal::Type::ArrayOf[String], nil?: true

#created_atTime?

When the template was created

Returns:

  • (Time, nil)


28
# File 'lib/sentdm/models/template.rb', line 28

optional :created_at, Time

#idString?

Unique template identifier

Returns:

  • (String, nil)


10
# File 'lib/sentdm/models/template.rb', line 10

optional :id, String

#is_publishedBoolean?

Whether the template is published and active

Returns:

  • (Boolean, nil)


34
# File 'lib/sentdm/models/template.rb', line 34

optional :is_published, Sentdm::Internal::Type::Boolean

#languageString?

Template language code (e.g., en_US)

Returns:

  • (String, nil)


40
# File 'lib/sentdm/models/template.rb', line 40

optional :language, String

#nameString?

Template display name

Returns:

  • (String, nil)


46
# File 'lib/sentdm/models/template.rb', line 46

optional :name, String

#statusString?

Template status: APPROVED, PENDING, REJECTED

Returns:

  • (String, nil)


52
# File 'lib/sentdm/models/template.rb', line 52

optional :status, String

#updated_atTime?

When the template was last updated

Returns:

  • (Time, nil)


58
# File 'lib/sentdm/models/template.rb', line 58

optional :updated_at, Time, nil?: true

#variablesArray<String>?

Template variables for personalization

Returns:

  • (Array<String>, nil)


64
# File 'lib/sentdm/models/template.rb', line 64

optional :variables, Sentdm::Internal::Type::ArrayOf[String], nil?: true