Class: Telnyx::Models::MessagingHostedNumberOrderCheckEligibilityResponse::PhoneNumber

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

Defined Under Namespace

Modules: EligibleStatus

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(detail: nil, eligible: nil, eligible_status: nil, phone_number: nil) ⇒ Object

Parameters:



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
66
67
68
69
70
71
72
73
74
# File 'lib/telnyx/models/messaging_hosted_number_order_check_eligibility_response.rb', line 17

class PhoneNumber < Telnyx::Internal::Type::BaseModel
  # @!attribute detail
  #   Detailed information about the eligibility status.
  #
  #   @return [String, nil]
  optional :detail, String

  # @!attribute eligible
  #   Whether the phone number is eligible for hosted messaging.
  #
  #   @return [Boolean, nil]
  optional :eligible, Telnyx::Internal::Type::Boolean

  # @!attribute eligible_status
  #   The eligibility status of the phone number.
  #
  #   @return [Symbol, Telnyx::Models::MessagingHostedNumberOrderCheckEligibilityResponse::PhoneNumber::EligibleStatus, nil]
  optional :eligible_status,
           enum: -> { Telnyx::Models::MessagingHostedNumberOrderCheckEligibilityResponse::PhoneNumber::EligibleStatus }

  # @!attribute phone_number
  #   The phone number in e164 format.
  #
  #   @return [String, nil]
  optional :phone_number, String

  # @!method initialize(detail: nil, eligible: nil, eligible_status: nil, phone_number: nil)
  #   @param detail [String] Detailed information about the eligibility status.
  #
  #   @param eligible [Boolean] Whether the phone number is eligible for hosted messaging.
  #
  #   @param eligible_status [Symbol, Telnyx::Models::MessagingHostedNumberOrderCheckEligibilityResponse::PhoneNumber::EligibleStatus] The eligibility status of the phone number.
  #
  #   @param phone_number [String] The phone number in e164 format.

  # The eligibility status of the phone number.
  #
  # @see Telnyx::Models::MessagingHostedNumberOrderCheckEligibilityResponse::PhoneNumber#eligible_status
  module EligibleStatus
    extend Telnyx::Internal::Type::Enum

    NUMBER_CAN_NOT_BE_REPEATED = :NUMBER_CAN_NOT_BE_REPEATED
    NUMBER_CAN_NOT_BE_VALIDATED = :NUMBER_CAN_NOT_BE_VALIDATED
    NUMBER_CAN_NOT_BE_WIRELESS = :NUMBER_CAN_NOT_BE_WIRELESS
    NUMBER_CAN_NOT_BE_ACTIVE_IN_YOUR_ACCOUNT = :NUMBER_CAN_NOT_BE_ACTIVE_IN_YOUR_ACCOUNT
    NUMBER_CAN_NOT_HOSTED_WITH_A_TELNYX_SUBSCRIBER = :NUMBER_CAN_NOT_HOSTED_WITH_A_TELNYX_SUBSCRIBER
    NUMBER_CAN_NOT_BE_IN_TELNYX = :NUMBER_CAN_NOT_BE_IN_TELNYX
    NUMBER_IS_NOT_A_US_NUMBER = :NUMBER_IS_NOT_A_US_NUMBER
    NUMBER_IS_NOT_A_VALID_ROUTING_NUMBER = :NUMBER_IS_NOT_A_VALID_ROUTING_NUMBER
    NUMBER_IS_NOT_IN_E164_FORMAT = :NUMBER_IS_NOT_IN_E164_FORMAT
    BILLING_ACCOUNT_CHECK_FAILED = :BILLING_ACCOUNT_CHECK_FAILED
    BILLING_ACCOUNT_IS_ABOLISHED = :BILLING_ACCOUNT_IS_ABOLISHED
    ELIGIBLE = :ELIGIBLE

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

Instance Attribute Details

#detailString?

Detailed information about the eligibility status.

Returns:

  • (String, nil)


22
# File 'lib/telnyx/models/messaging_hosted_number_order_check_eligibility_response.rb', line 22

optional :detail, String

#eligibleBoolean?

Whether the phone number is eligible for hosted messaging.

Returns:

  • (Boolean, nil)


28
# File 'lib/telnyx/models/messaging_hosted_number_order_check_eligibility_response.rb', line 28

optional :eligible, Telnyx::Internal::Type::Boolean

#eligible_statusSymbol, ...

The eligibility status of the phone number.



34
35
# File 'lib/telnyx/models/messaging_hosted_number_order_check_eligibility_response.rb', line 34

optional :eligible_status,
enum: -> { Telnyx::Models::MessagingHostedNumberOrderCheckEligibilityResponse::PhoneNumber::EligibleStatus }

#phone_numberString?

The phone number in e164 format.

Returns:

  • (String, nil)


41
# File 'lib/telnyx/models/messaging_hosted_number_order_check_eligibility_response.rb', line 41

optional :phone_number, String