Class: Zavudev::Models::Broadcasts::ContactAddParams::Contact

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/zavudev/models/broadcasts/contact_add_params.rb,
sig/zavudev/models/broadcasts/contact_add_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(recipient:, template_button_variables: nil, template_header_variables: nil, template_variables: nil) ⇒ Object

Some parameter documentations has been truncated, see Zavudev::Models::Broadcasts::ContactAddParams::Contact for more details.

Parameters:

  • recipient (String)

    Phone number (E.164) or email address.

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

    Per-contact button variables for dynamic URL/OTP buttons. Keys are the button in

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

    Per-contact value for a text-header variable, keyed by 1. If omitted, Zavu res

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

    Per-contact body variables. Key them to match the template body: by position (`1



30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
# File 'lib/zavudev/models/broadcasts/contact_add_params.rb', line 30

class Contact < Zavudev::Internal::Type::BaseModel
  # @!attribute recipient
  #   Phone number (E.164) or email address.
  #
  #   @return [String]
  required :recipient, String

  # @!attribute template_button_variables
  #   Per-contact button variables for dynamic URL/OTP buttons. Keys are the button
  #   index (0, 1, 2).
  #
  #   @return [Hash{Symbol=>String}, nil]
  optional :template_button_variables,
           Zavudev::Internal::Type::HashOf[String],
           api_name: :templateButtonVariables

  # @!attribute template_header_variables
  #   Per-contact value for a text-header variable, keyed by `1`. If omitted, Zavu
  #   resolves the header from `templateVariables` by the header placeholder's name.
  #
  #   @return [Hash{Symbol=>String}, nil]
  optional :template_header_variables,
           Zavudev::Internal::Type::HashOf[String],
           api_name: :templateHeaderVariables

  # @!attribute template_variables
  #   Per-contact body variables. Key them to match the template body: by position
  #   (`1`, `2`, ...) for positional templates, or by name (e.g. `customer_name`) for
  #   named templates. Zavu detects the template's format and sends the correct
  #   payload to Meta. Do not mix positional and named keys.
  #
  #   @return [Hash{Symbol=>String}, nil]
  optional :template_variables, Zavudev::Internal::Type::HashOf[String], api_name: :templateVariables

  # @!method initialize(recipient:, template_button_variables: nil, template_header_variables: nil, template_variables: nil)
  #   Some parameter documentations has been truncated, see
  #   {Zavudev::Models::Broadcasts::ContactAddParams::Contact} for more details.
  #
  #   @param recipient [String] Phone number (E.164) or email address.
  #
  #   @param template_button_variables [Hash{Symbol=>String}] Per-contact button variables for dynamic URL/OTP buttons. Keys are the button in
  #
  #   @param template_header_variables [Hash{Symbol=>String}] Per-contact value for a text-header variable, keyed by `1`. If omitted, Zavu res
  #
  #   @param template_variables [Hash{Symbol=>String}] Per-contact body variables. Key them to match the template body: by position (`1
end

Instance Attribute Details

#recipientString

Phone number (E.164) or email address.

Parameters:

  • value (String)

Returns:

  • (String)


35
# File 'lib/zavudev/models/broadcasts/contact_add_params.rb', line 35

required :recipient, String

#template_button_variablesHash{Symbol=>String}?

Per-contact button variables for dynamic URL/OTP buttons. Keys are the button index (0, 1, 2).

Returns:

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


42
43
44
# File 'lib/zavudev/models/broadcasts/contact_add_params.rb', line 42

optional :template_button_variables,
Zavudev::Internal::Type::HashOf[String],
api_name: :templateButtonVariables

#template_header_variablesHash{Symbol=>String}?

Per-contact value for a text-header variable, keyed by 1. If omitted, Zavu resolves the header from templateVariables by the header placeholder's name.

Returns:

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


51
52
53
# File 'lib/zavudev/models/broadcasts/contact_add_params.rb', line 51

optional :template_header_variables,
Zavudev::Internal::Type::HashOf[String],
api_name: :templateHeaderVariables

#template_variablesHash{Symbol=>String}?

Per-contact body variables. Key them to match the template body: by position (1, 2, ...) for positional templates, or by name (e.g. customer_name) for named templates. Zavu detects the template's format and sends the correct payload to Meta. Do not mix positional and named keys.

Returns:

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


62
# File 'lib/zavudev/models/broadcasts/contact_add_params.rb', line 62

optional :template_variables, Zavudev::Internal::Type::HashOf[String], api_name: :templateVariables

Instance Method Details

#to_hash{

Returns:

  • ({)


67
# File 'sig/zavudev/models/broadcasts/contact_add_params.rbs', line 67

def to_hash: -> {