Class: Inttegro::MessageTemplate::CreateFields

Inherits:
T::Struct
  • Object
show all
Defined in:
lib/inttegro/message_template/create_fields.rb

Overview

Typed representation of the create fields object in the Inttegro API.

This generated model is immutable. Construct it with .new, or decode a string-keyed API payload with .from_hash. #serialize produces a string-keyed hash using the original wire field names and serialized enum values.

Instance Attribute Summary collapse

Instance Attribute Details

#about ⇒ String? (readonly)

Optional description of when this template should be used.

Optional in the API payload; omitted values default to nil. Wire name: about.

Returns:

  • (String, nil)


55
56
57
58
59
60
61
62
# File 'lib/inttegro/message_template/create_fields.rb', line 55

class CreateFields < T::Struct
  const :name, String
  const :about, T.nilable(String), default: nil
  const :channel, Inttegro::MessageTemplate::Channel
  const :purpose, String
  const :locale, T.nilable(String), default: nil
  const :variables, T.nilable(T::Array[Inttegro::MessageTemplate::VariableInput]), default: nil
end

#channel ⇒ Inttegro::MessageTemplate::Channel (readonly)

Delivery channel this template renders for.

Required in the API payload. Wire name: channel.



55
56
57
58
59
60
61
62
# File 'lib/inttegro/message_template/create_fields.rb', line 55

class CreateFields < T::Struct
  const :name, String
  const :about, T.nilable(String), default: nil
  const :channel, Inttegro::MessageTemplate::Channel
  const :purpose, String
  const :locale, T.nilable(String), default: nil
  const :variables, T.nilable(T::Array[Inttegro::MessageTemplate::VariableInput]), default: nil
end

#locale ⇒ String? (readonly)

Template locale. Defaults to en when omitted.

Optional in the API payload; omitted values default to nil. Wire name: locale.

Returns:

  • (String, nil)


55
56
57
58
59
60
61
62
# File 'lib/inttegro/message_template/create_fields.rb', line 55

class CreateFields < T::Struct
  const :name, String
  const :about, T.nilable(String), default: nil
  const :channel, Inttegro::MessageTemplate::Channel
  const :purpose, String
  const :locale, T.nilable(String), default: nil
  const :variables, T.nilable(T::Array[Inttegro::MessageTemplate::VariableInput]), default: nil
end

#name ⇒ String (readonly)

Human-readable template name.

Required in the API payload. Wire name: name.

Returns:

  • (String)


55
56
57
58
59
60
61
62
# File 'lib/inttegro/message_template/create_fields.rb', line 55

class CreateFields < T::Struct
  const :name, String
  const :about, T.nilable(String), default: nil
  const :channel, Inttegro::MessageTemplate::Channel
  const :purpose, String
  const :locale, T.nilable(String), default: nil
  const :variables, T.nilable(T::Array[Inttegro::MessageTemplate::VariableInput]), default: nil
end

#purpose ⇒ String (readonly)

Caller-defined purpose for filtering and analytics.

Required in the API payload. Wire name: purpose.

Returns:

  • (String)


55
56
57
58
59
60
61
62
# File 'lib/inttegro/message_template/create_fields.rb', line 55

class CreateFields < T::Struct
  const :name, String
  const :about, T.nilable(String), default: nil
  const :channel, Inttegro::MessageTemplate::Channel
  const :purpose, String
  const :locale, T.nilable(String), default: nil
  const :variables, T.nilable(T::Array[Inttegro::MessageTemplate::VariableInput]), default: nil
end

#variables ⇒ Array<Inttegro::MessageTemplate::VariableInput>? (readonly)

Variables accepted by this template.

Optional in the API payload; omitted values default to nil. Wire name: variables.



55
56
57
58
59
60
61
62
# File 'lib/inttegro/message_template/create_fields.rb', line 55

class CreateFields < T::Struct
  const :name, String
  const :about, T.nilable(String), default: nil
  const :channel, Inttegro::MessageTemplate::Channel
  const :purpose, String
  const :locale, T.nilable(String), default: nil
  const :variables, T.nilable(T::Array[Inttegro::MessageTemplate::VariableInput]), default: nil
end