Class: Telnyx::Models::Rcs::AgentConsentConfiguration::OptInMethod

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/telnyx/models/rcs/agent_consent_configuration.rb,
sig/telnyx/models/rcs/agent_consent_configuration.rbs

Defined Under Namespace

Modules: MethodType

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(method_type:, description: nil) ⇒ Object

Parameters:



75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
# File 'lib/telnyx/models/rcs/agent_consent_configuration.rb', line 75

class OptInMethod < Telnyx::Internal::Type::BaseModel
  # @!attribute method_type
  #
  #   @return [Symbol, Telnyx::Models::Rcs::AgentConsentConfiguration::OptInMethod::MethodType]
  required :method_type, enum: -> { Telnyx::Rcs::AgentConsentConfiguration::OptInMethod::MethodType }

  # @!attribute description
  #   Required when method_type is `OTHER`.
  #
  #   @return [String, nil]
  optional :description, String, nil?: true

  # @!method initialize(method_type:, description: nil)
  #   @param method_type [Symbol, Telnyx::Models::Rcs::AgentConsentConfiguration::OptInMethod::MethodType]
  #
  #   @param description [String, nil] Required when method_type is `OTHER`.

  # @see Telnyx::Models::Rcs::AgentConsentConfiguration::OptInMethod#method_type
  module MethodType
    extend Telnyx::Internal::Type::Enum

    SMS = :SMS
    WEBSITE = :WEBSITE
    MOBILE_APP = :MOBILE_APP
    QR_CODE = :QR_CODE
    SALE_POINT = :SALE_POINT
    OTHER = :OTHER

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

Instance Attribute Details

#descriptionString?

Required when method_type is OTHER.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


85
# File 'lib/telnyx/models/rcs/agent_consent_configuration.rb', line 85

optional :description, String, nil?: true

#method_typeSymbol, Telnyx::Models::Rcs::AgentConsentConfiguration::OptInMethod::MethodType

Parameters:

  • value (Telnyx::Models::Rcs::AgentConsentConfiguration::OptInMethod::method_type)

Returns:



79
# File 'lib/telnyx/models/rcs/agent_consent_configuration.rb', line 79

required :method_type, enum: -> { Telnyx::Rcs::AgentConsentConfiguration::OptInMethod::MethodType }

Instance Method Details

#to_hash{

Returns:

  • ({)


76
# File 'sig/telnyx/models/rcs/agent_consent_configuration.rbs', line 76

def to_hash: -> {