Class: Telnyx::Models::WhatsappMessageTemplateUpdateParams::Component::Buttons::Button

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/telnyx/models/whatsapp_message_template_update_params.rb

Defined Under Namespace

Modules: FlowAction, OtpType, Type

Instance Attribute Summary collapse

Class Method 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(type:, autofill_text: nil, example: nil, flow_action: nil, flow_id: nil, navigate_screen: nil, otp_type: nil, package_name: nil, phone_number: nil, signature_hash: nil, text: nil, url: nil, zero_tap_terms_accepted: nil) ⇒ Object

Some parameter documentations has been truncated, see Telnyx::Models::WhatsappMessageTemplateUpdateParams::Component::Buttons::Button for more details.

Parameters:

  • type (Symbol, Telnyx::Models::WhatsappMessageTemplateUpdateParams::Component::Buttons::Button::Type)
  • autofill_text (String) (defaults to: nil)

    Custom autofill button text for ONE_TAP OTP buttons.

  • example (Array<String>) (defaults to: nil)

    Sample values for URL variable.

  • flow_action (Symbol, Telnyx::Models::WhatsappMessageTemplateUpdateParams::Component::Buttons::Button::FlowAction) (defaults to: nil)

    Flow action type for FLOW-type buttons.

  • flow_id (String) (defaults to: nil)

    Flow ID for FLOW-type buttons.

  • navigate_screen (String) (defaults to: nil)

    Target screen name for FLOW buttons with navigate action.

  • otp_type (Symbol, Telnyx::Models::WhatsappMessageTemplateUpdateParams::Component::Buttons::Button::OtpType) (defaults to: nil)
  • package_name (String) (defaults to: nil)

    Android package name. Required for ONE_TAP OTP buttons.

  • phone_number (String) (defaults to: nil)

    Phone number in E.164 format.

  • signature_hash (String) (defaults to: nil)

    Android app signing key hash. Required for ONE_TAP OTP buttons.

  • text (String) (defaults to: nil)

    Button label text. Maximum 25 characters. Required for URL, PHONE_NUMBER, and QU

  • url (String) (defaults to: nil)

    URL for URL-type buttons. Supports one variable ({1}).

  • zero_tap_terms_accepted (Boolean) (defaults to: nil)

    Whether zero-tap terms have been accepted.



256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
# File 'lib/telnyx/models/whatsapp_message_template_update_params.rb', line 256

class Button < Telnyx::Internal::Type::BaseModel
  # @!attribute type
  #
  #   @return [Symbol, Telnyx::Models::WhatsappMessageTemplateUpdateParams::Component::Buttons::Button::Type]
  required :type, enum: -> { Telnyx::WhatsappMessageTemplateUpdateParams::Component::Buttons::Button::Type }

  # @!attribute autofill_text
  #   Custom autofill button text for ONE_TAP OTP buttons.
  #
  #   @return [String, nil]
  optional :autofill_text, String

  # @!attribute example
  #   Sample values for URL variable.
  #
  #   @return [Array<String>, nil]
  optional :example, Telnyx::Internal::Type::ArrayOf[String]

  # @!attribute flow_action
  #   Flow action type for FLOW-type buttons.
  #
  #   @return [Symbol, Telnyx::Models::WhatsappMessageTemplateUpdateParams::Component::Buttons::Button::FlowAction, nil]
  optional :flow_action,
           enum: -> { Telnyx::WhatsappMessageTemplateUpdateParams::Component::Buttons::Button::FlowAction }

  # @!attribute flow_id
  #   Flow ID for FLOW-type buttons.
  #
  #   @return [String, nil]
  optional :flow_id, String

  # @!attribute navigate_screen
  #   Target screen name for FLOW buttons with navigate action.
  #
  #   @return [String, nil]
  optional :navigate_screen, String

  # @!attribute otp_type
  #
  #   @return [Symbol, Telnyx::Models::WhatsappMessageTemplateUpdateParams::Component::Buttons::Button::OtpType, nil]
  optional :otp_type,
           enum: -> { Telnyx::WhatsappMessageTemplateUpdateParams::Component::Buttons::Button::OtpType }

  # @!attribute package_name
  #   Android package name. Required for ONE_TAP OTP buttons.
  #
  #   @return [String, nil]
  optional :package_name, String

  # @!attribute phone_number
  #   Phone number in E.164 format.
  #
  #   @return [String, nil]
  optional :phone_number, String

  # @!attribute signature_hash
  #   Android app signing key hash. Required for ONE_TAP OTP buttons.
  #
  #   @return [String, nil]
  optional :signature_hash, String

  # @!attribute text
  #   Button label text. Maximum 25 characters. Required for URL, PHONE_NUMBER, and
  #   QUICK_REPLY buttons. Not required for OTP buttons (Meta supplies the label).
  #
  #   @return [String, nil]
  optional :text, String

  # @!attribute url
  #   URL for URL-type buttons. Supports one variable ({{1}}).
  #
  #   @return [String, nil]
  optional :url, String

  # @!attribute zero_tap_terms_accepted
  #   Whether zero-tap terms have been accepted.
  #
  #   @return [Boolean, nil]
  optional :zero_tap_terms_accepted, Telnyx::Internal::Type::Boolean

  # @!method initialize(type:, autofill_text: nil, example: nil, flow_action: nil, flow_id: nil, navigate_screen: nil, otp_type: nil, package_name: nil, phone_number: nil, signature_hash: nil, text: nil, url: nil, zero_tap_terms_accepted: nil)
  #   Some parameter documentations has been truncated, see
  #   {Telnyx::Models::WhatsappMessageTemplateUpdateParams::Component::Buttons::Button}
  #   for more details.
  #
  #   @param type [Symbol, Telnyx::Models::WhatsappMessageTemplateUpdateParams::Component::Buttons::Button::Type]
  #
  #   @param autofill_text [String] Custom autofill button text for ONE_TAP OTP buttons.
  #
  #   @param example [Array<String>] Sample values for URL variable.
  #
  #   @param flow_action [Symbol, Telnyx::Models::WhatsappMessageTemplateUpdateParams::Component::Buttons::Button::FlowAction] Flow action type for FLOW-type buttons.
  #
  #   @param flow_id [String] Flow ID for FLOW-type buttons.
  #
  #   @param navigate_screen [String] Target screen name for FLOW buttons with navigate action.
  #
  #   @param otp_type [Symbol, Telnyx::Models::WhatsappMessageTemplateUpdateParams::Component::Buttons::Button::OtpType]
  #
  #   @param package_name [String] Android package name. Required for ONE_TAP OTP buttons.
  #
  #   @param phone_number [String] Phone number in E.164 format.
  #
  #   @param signature_hash [String] Android app signing key hash. Required for ONE_TAP OTP buttons.
  #
  #   @param text [String] Button label text. Maximum 25 characters. Required for URL, PHONE_NUMBER, and QU
  #
  #   @param url [String] URL for URL-type buttons. Supports one variable ({{1}}).
  #
  #   @param zero_tap_terms_accepted [Boolean] Whether zero-tap terms have been accepted.

  # @see Telnyx::Models::WhatsappMessageTemplateUpdateParams::Component::Buttons::Button#type
  module Type
    extend Telnyx::Internal::Type::Enum

    URL = :URL
    PHONE_NUMBER = :PHONE_NUMBER
    QUICK_REPLY = :QUICK_REPLY
    OTP = :OTP
    COPY_CODE = :COPY_CODE
    FLOW = :FLOW

    # @!method self.values
    #   @return [Array<Symbol>]
  end

  # Flow action type for FLOW-type buttons.
  #
  # @see Telnyx::Models::WhatsappMessageTemplateUpdateParams::Component::Buttons::Button#flow_action
  module FlowAction
    extend Telnyx::Internal::Type::Enum

    NAVIGATE = :navigate
    DATA_EXCHANGE = :data_exchange

    # @!method self.values
    #   @return [Array<Symbol>]
  end

  # @see Telnyx::Models::WhatsappMessageTemplateUpdateParams::Component::Buttons::Button#otp_type
  module OtpType
    extend Telnyx::Internal::Type::Enum

    COPY_CODE = :COPY_CODE
    ONE_TAP = :ONE_TAP

    # @!method self.values
    #   @return [Array<Symbol>]
  end
end

Instance Attribute Details

#autofill_textString?

Custom autofill button text for ONE_TAP OTP buttons.

Returns:

  • (String, nil)


266
# File 'lib/telnyx/models/whatsapp_message_template_update_params.rb', line 266

optional :autofill_text, String

#exampleArray<String>?

Sample values for URL variable.

Returns:

  • (Array<String>, nil)


272
# File 'lib/telnyx/models/whatsapp_message_template_update_params.rb', line 272

optional :example, Telnyx::Internal::Type::ArrayOf[String]

#flow_actionSymbol, ...

Flow action type for FLOW-type buttons.



278
279
# File 'lib/telnyx/models/whatsapp_message_template_update_params.rb', line 278

optional :flow_action,
enum: -> { Telnyx::WhatsappMessageTemplateUpdateParams::Component::Buttons::Button::FlowAction }

#flow_idString?

Flow ID for FLOW-type buttons.

Returns:

  • (String, nil)


285
# File 'lib/telnyx/models/whatsapp_message_template_update_params.rb', line 285

optional :flow_id, String

Target screen name for FLOW buttons with navigate action.

Returns:

  • (String, nil)


291
# File 'lib/telnyx/models/whatsapp_message_template_update_params.rb', line 291

optional :navigate_screen, String

#otp_typeSymbol, ...



296
297
# File 'lib/telnyx/models/whatsapp_message_template_update_params.rb', line 296

optional :otp_type,
enum: -> { Telnyx::WhatsappMessageTemplateUpdateParams::Component::Buttons::Button::OtpType }

#package_nameString?

Android package name. Required for ONE_TAP OTP buttons.

Returns:

  • (String, nil)


303
# File 'lib/telnyx/models/whatsapp_message_template_update_params.rb', line 303

optional :package_name, String

#phone_numberString?

Phone number in E.164 format.

Returns:

  • (String, nil)


309
# File 'lib/telnyx/models/whatsapp_message_template_update_params.rb', line 309

optional :phone_number, String

#signature_hashString?

Android app signing key hash. Required for ONE_TAP OTP buttons.

Returns:

  • (String, nil)


315
# File 'lib/telnyx/models/whatsapp_message_template_update_params.rb', line 315

optional :signature_hash, String

#textString?

Button label text. Maximum 25 characters. Required for URL, PHONE_NUMBER, and QUICK_REPLY buttons. Not required for OTP buttons (Meta supplies the label).

Returns:

  • (String, nil)


322
# File 'lib/telnyx/models/whatsapp_message_template_update_params.rb', line 322

optional :text, String

#typeSymbol, Telnyx::Models::WhatsappMessageTemplateUpdateParams::Component::Buttons::Button::Type



260
# File 'lib/telnyx/models/whatsapp_message_template_update_params.rb', line 260

required :type, enum: -> { Telnyx::WhatsappMessageTemplateUpdateParams::Component::Buttons::Button::Type }

#urlString?

URL for URL-type buttons. Supports one variable ({1}).

Returns:

  • (String, nil)


328
# File 'lib/telnyx/models/whatsapp_message_template_update_params.rb', line 328

optional :url, String

#zero_tap_terms_acceptedBoolean?

Whether zero-tap terms have been accepted.

Returns:

  • (Boolean, nil)


334
# File 'lib/telnyx/models/whatsapp_message_template_update_params.rb', line 334

optional :zero_tap_terms_accepted, Telnyx::Internal::Type::Boolean

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/telnyx/models/whatsapp_message_template_update_params.rb', line 378