Class: Telnyx::Models::MessagingHostedNumberOrderCreateVerificationCodesResponse::Data

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

Defined Under Namespace

Modules: Type

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(phone_number:, error: nil, type: nil, verification_code_id: nil) ⇒ Object

Verification code result response

Parameters:

  • phone_number (String)

    Phone number for which the verification code was created

  • error (String) (defaults to: nil)

    Error message describing why the verification code creation failed

  • type (Symbol, Telnyx::Models::MessagingHostedNumberOrderCreateVerificationCodesResponse::Data::Type) (defaults to: nil)

    Type of verification method used

  • verification_code_id (String) (defaults to: nil)

    Unique identifier for the verification code



16
17
18
19
20
21
22
23
24
25
26
27
28
29
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
# File 'lib/telnyx/models/messaging_hosted_number_order_create_verification_codes_response.rb', line 16

class Data < Telnyx::Internal::Type::BaseModel
  # @!attribute phone_number
  #   Phone number for which the verification code was created
  #
  #   @return [String]
  required :phone_number, String

  # @!attribute error
  #   Error message describing why the verification code creation failed
  #
  #   @return [String, nil]
  optional :error, String

  # @!attribute type
  #   Type of verification method used
  #
  #   @return [Symbol, Telnyx::Models::MessagingHostedNumberOrderCreateVerificationCodesResponse::Data::Type, nil]
  optional :type,
           enum: -> { Telnyx::Models::MessagingHostedNumberOrderCreateVerificationCodesResponse::Data::Type }

  # @!attribute verification_code_id
  #   Unique identifier for the verification code
  #
  #   @return [String, nil]
  optional :verification_code_id, String

  # @!method initialize(phone_number:, error: nil, type: nil, verification_code_id: nil)
  #   Verification code result response
  #
  #   @param phone_number [String] Phone number for which the verification code was created
  #
  #   @param error [String] Error message describing why the verification code creation failed
  #
  #   @param type [Symbol, Telnyx::Models::MessagingHostedNumberOrderCreateVerificationCodesResponse::Data::Type] Type of verification method used
  #
  #   @param verification_code_id [String] Unique identifier for the verification code

  # Type of verification method used
  #
  # @see Telnyx::Models::MessagingHostedNumberOrderCreateVerificationCodesResponse::Data#type
  module Type
    extend Telnyx::Internal::Type::Enum

    SMS = :sms
    CALL = :call

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

Instance Attribute Details

#errorString?

Error message describing why the verification code creation failed

Returns:

  • (String, nil)


27
# File 'lib/telnyx/models/messaging_hosted_number_order_create_verification_codes_response.rb', line 27

optional :error, String

#phone_numberString

Phone number for which the verification code was created

Returns:

  • (String)


21
# File 'lib/telnyx/models/messaging_hosted_number_order_create_verification_codes_response.rb', line 21

required :phone_number, String

#typeSymbol, ...

Type of verification method used



33
34
# File 'lib/telnyx/models/messaging_hosted_number_order_create_verification_codes_response.rb', line 33

optional :type,
enum: -> { Telnyx::Models::MessagingHostedNumberOrderCreateVerificationCodesResponse::Data::Type }

#verification_code_idString?

Unique identifier for the verification code

Returns:

  • (String, nil)


40
# File 'lib/telnyx/models/messaging_hosted_number_order_create_verification_codes_response.rb', line 40

optional :verification_code_id, String