Class: Telnyx::Models::Dir::PhoneNumberAddResponse::Data

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

Defined Under Namespace

Modules: Status Classes: RejectionReason

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(code: nil, detail: nil, message: nil, title: nil) ⇒ Object

Some parameter documentations has been truncated, see RejectionReason for more details.

Populated when ‘status` is `unsuccessful` or `permanently_rejected`.

Parameters:

  • code (String) (defaults to: nil)
  • detail (String) (defaults to: nil)
  • message (String, nil) (defaults to: nil)

    Customer-visible free-text comment from the Telnyx vetting team. Only the first

  • title (String) (defaults to: nil)


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
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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
# File 'lib/telnyx/models/dir/phone_number_add_response.rb', line 30

class Data < Telnyx::Internal::Type::BaseModel
  # @!attribute batch_id
  #   Id of the batch this number was vetted as part of.
  #
  #   @return [String, nil]
  optional :batch_id, String, nil?: true

  # @!attribute dir_id
  #
  #   @return [String, nil]
  optional :dir_id, String

  # @!attribute enterprise_id
  #
  #   @return [String, nil]
  optional :enterprise_id, String

  # @!attribute loa_document_id
  #   Id of the Letter of Authorization document attached to this number's batch.
  #
  #   @return [String, nil]
  optional :loa_document_id, String, nil?: true

  # @!attribute phone_number
  #   E.164 with leading `+`.
  #
  #   @return [String, nil]
  optional :phone_number, String

  # @!attribute rejection_reason
  #   Populated when `status` is `unsuccessful` or `permanently_rejected`.
  #
  #   @return [Telnyx::Models::Dir::PhoneNumberAddResponse::Data::RejectionReason, nil]
  optional :rejection_reason,
           -> { Telnyx::Models::Dir::PhoneNumberAddResponse::Data::RejectionReason },
           nil?: true

  # @!attribute status
  #   Phone-number lifecycle status.
  #
  #   - `submitted` / `in_review` - Telnyx is reviewing the batch this number belongs
  #     to.
  #   - `verified` - approved; the DIR's display identity will be shown on outbound
  #     calls from this number.
  #   - `unsuccessful` - Telnyx rejected this submission; the customer may re-add to
  #     retry.
  #   - `suspended` - temporarily disabled (e.g. by an active infringement claim on
  #     the DIR).
  #   - `expired` - verification expired; re-add to renew.
  #   - `permanently_rejected` - terminal; cannot be re-added on this or any other DIR
  #     you own.
  #
  #   @return [Symbol, Telnyx::Models::Dir::PhoneNumberAddResponse::Data::Status, nil]
  optional :status, enum: -> { Telnyx::Models::Dir::PhoneNumberAddResponse::Data::Status }

  response_only do
    # @!attribute id
    #
    #   @return [String, nil]
    optional :id, String

    # @!attribute created_at
    #
    #   @return [Time, nil]
    optional :created_at, Time

    # @!attribute updated_at
    #
    #   @return [Time, nil]
    optional :updated_at, Time

    # @!attribute verified_at
    #
    #   @return [Time, nil]
    optional :verified_at, Time, nil?: true
  end

  # @!method initialize(id: nil, batch_id: nil, created_at: nil, dir_id: nil, enterprise_id: nil, loa_document_id: nil, phone_number: nil, rejection_reason: nil, status: nil, updated_at: nil, verified_at: nil)
  #   Some parameter documentations has been truncated, see
  #   {Telnyx::Models::Dir::PhoneNumberAddResponse::Data} for more details.
  #
  #   @param id [String]
  #
  #   @param batch_id [String, nil] Id of the batch this number was vetted as part of.
  #
  #   @param created_at [Time]
  #
  #   @param dir_id [String]
  #
  #   @param enterprise_id [String]
  #
  #   @param loa_document_id [String, nil] Id of the Letter of Authorization document attached to this number's batch.
  #
  #   @param phone_number [String] E.164 with leading `+`.
  #
  #   @param rejection_reason [Telnyx::Models::Dir::PhoneNumberAddResponse::Data::RejectionReason, nil] Populated when `status` is `unsuccessful` or `permanently_rejected`.
  #
  #   @param status [Symbol, Telnyx::Models::Dir::PhoneNumberAddResponse::Data::Status] Phone-number lifecycle status.
  #
  #   @param updated_at [Time]
  #
  #   @param verified_at [Time, nil]

  # @see Telnyx::Models::Dir::PhoneNumberAddResponse::Data#rejection_reason
  class RejectionReason < Telnyx::Internal::Type::BaseModel
    # @!attribute code
    #
    #   @return [String, nil]
    optional :code, String

    # @!attribute detail
    #
    #   @return [String, nil]
    optional :detail, String

    # @!attribute message
    #   Customer-visible free-text comment from the Telnyx vetting team. Only the first
    #   entry of `rejection_reasons` carries this; the rest are `null`.
    #
    #   @return [String, nil]
    optional :message, String, nil?: true

    # @!attribute title
    #
    #   @return [String, nil]
    optional :title, String

    # @!method initialize(code: nil, detail: nil, message: nil, title: nil)
    #   Some parameter documentations has been truncated, see
    #   {Telnyx::Models::Dir::PhoneNumberAddResponse::Data::RejectionReason} for more
    #   details.
    #
    #   Populated when `status` is `unsuccessful` or `permanently_rejected`.
    #
    #   @param code [String]
    #
    #   @param detail [String]
    #
    #   @param message [String, nil] Customer-visible free-text comment from the Telnyx vetting team. Only the first
    #
    #   @param title [String]
  end

  # Phone-number lifecycle status.
  #
  # - `submitted` / `in_review` - Telnyx is reviewing the batch this number belongs
  #   to.
  # - `verified` - approved; the DIR's display identity will be shown on outbound
  #   calls from this number.
  # - `unsuccessful` - Telnyx rejected this submission; the customer may re-add to
  #   retry.
  # - `suspended` - temporarily disabled (e.g. by an active infringement claim on
  #   the DIR).
  # - `expired` - verification expired; re-add to renew.
  # - `permanently_rejected` - terminal; cannot be re-added on this or any other DIR
  #   you own.
  #
  # @see Telnyx::Models::Dir::PhoneNumberAddResponse::Data#status
  module Status
    extend Telnyx::Internal::Type::Enum

    SUBMITTED = :submitted
    IN_REVIEW = :in_review
    VERIFIED = :verified
    UNSUCCESSFUL = :unsuccessful
    SUSPENDED = :suspended
    EXPIRED = :expired
    PERMANENTLY_REJECTED = :permanently_rejected

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

Instance Attribute Details

#batch_idString?

Id of the batch this number was vetted as part of.

Returns:

  • (String, nil)


35
# File 'lib/telnyx/models/dir/phone_number_add_response.rb', line 35

optional :batch_id, String, nil?: true

#dir_idString?

Returns:

  • (String, nil)


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

optional :dir_id, String

#enterprise_idString?

Returns:

  • (String, nil)


45
# File 'lib/telnyx/models/dir/phone_number_add_response.rb', line 45

optional :enterprise_id, String

#loa_document_idString?

Id of the Letter of Authorization document attached to this number’s batch.

Returns:

  • (String, nil)


51
# File 'lib/telnyx/models/dir/phone_number_add_response.rb', line 51

optional :loa_document_id, String, nil?: true

#phone_numberString?

E.164 with leading ‘+`.

Returns:

  • (String, nil)


57
# File 'lib/telnyx/models/dir/phone_number_add_response.rb', line 57

optional :phone_number, String

#rejection_reasonTelnyx::Models::Dir::PhoneNumberAddResponse::Data::RejectionReason?

Populated when ‘status` is `unsuccessful` or `permanently_rejected`.



63
64
65
# File 'lib/telnyx/models/dir/phone_number_add_response.rb', line 63

optional :rejection_reason,
-> { Telnyx::Models::Dir::PhoneNumberAddResponse::Data::RejectionReason },
nil?: true

#statusSymbol, ...

Phone-number lifecycle status.

  • ‘submitted` / `in_review` - Telnyx is reviewing the batch this number belongs to.

  • ‘verified` - approved; the DIR’s display identity will be shown on outbound calls from this number.

  • ‘unsuccessful` - Telnyx rejected this submission; the customer may re-add to retry.

  • ‘suspended` - temporarily disabled (e.g. by an active infringement claim on the DIR).

  • ‘expired` - verification expired; re-add to renew.

  • ‘permanently_rejected` - terminal; cannot be re-added on this or any other DIR you own.



83
# File 'lib/telnyx/models/dir/phone_number_add_response.rb', line 83

optional :status, enum: -> { Telnyx::Models::Dir::PhoneNumberAddResponse::Data::Status }