telnyx 5.151.0 → 5.153.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (129) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +7 -533
  3. data/README.md +1 -1
  4. data/lib/telnyx/internal/cursor_flat_pagination.rb +106 -0
  5. data/lib/telnyx/models/advanced_order_create_params.rb +1 -86
  6. data/lib/telnyx/models/advanced_order_update_requirement_group_params.rb +1 -88
  7. data/lib/telnyx/models/dir/email_verification_status_wrapped.rb +82 -0
  8. data/lib/telnyx/models/dir/reference.rb +125 -0
  9. data/lib/telnyx/models/dir/reference_create_params.rb +43 -0
  10. data/lib/telnyx/models/dir/reference_input.rb +74 -0
  11. data/lib/telnyx/models/dir/reference_list.rb +18 -0
  12. data/lib/telnyx/models/dir/reference_list_params.rb +22 -0
  13. data/lib/telnyx/models/dir/reference_update_params.rb +103 -0
  14. data/lib/telnyx/models/dir/reference_update_response.rb +23 -0
  15. data/lib/telnyx/models/dir/verify_email_confirm_params.rb +31 -0
  16. data/lib/telnyx/models/dir/verify_email_create_params.rb +22 -0
  17. data/lib/telnyx/models/dir/verify_email_list_params.rb +22 -0
  18. data/lib/telnyx/models/dir_update_infringement_params.rb +6 -2
  19. data/lib/telnyx/models/enterprises/dir_create_params.rb +10 -10
  20. data/lib/telnyx/models/storage/kv_create_params.rb +24 -0
  21. data/lib/telnyx/models/storage/kv_delete_params.rb +22 -0
  22. data/lib/telnyx/models/storage/kv_list_params.rb +32 -0
  23. data/lib/telnyx/models/storage/kv_namespace.rb +75 -0
  24. data/lib/telnyx/models/storage/kv_namespace_response_wrapper.rb +18 -0
  25. data/lib/telnyx/models/storage/kv_retrieve_params.rb +22 -0
  26. data/lib/telnyx/models/storage/kvs/key_delete_params.rb +30 -0
  27. data/lib/telnyx/models/storage/kvs/key_list_params.rb +49 -0
  28. data/lib/telnyx/models/storage/kvs/key_list_response.rb +35 -0
  29. data/lib/telnyx/models/storage/kvs/key_retrieve_params.rb +30 -0
  30. data/lib/telnyx/models/storage/kvs/key_update_params.rb +53 -0
  31. data/lib/telnyx/models/uac_inbound.rb +25 -1
  32. data/lib/telnyx/models/uac_inbound_request.rb +25 -1
  33. data/lib/telnyx/models/whatsapp/phone_number_retrieve_conversation_window_params.rb +31 -0
  34. data/lib/telnyx/models/whatsapp/phone_number_retrieve_conversation_window_response.rb +54 -0
  35. data/lib/telnyx/resources/dir/references.rb +139 -0
  36. data/lib/telnyx/resources/dir/verify_email.rb +91 -0
  37. data/lib/telnyx/resources/dir.rb +17 -1
  38. data/lib/telnyx/resources/documents.rb +1 -1
  39. data/lib/telnyx/resources/enterprises/dir.rb +3 -3
  40. data/lib/telnyx/resources/storage/kvs/keys.rb +155 -0
  41. data/lib/telnyx/resources/storage/kvs.rb +115 -0
  42. data/lib/telnyx/resources/storage.rb +5 -0
  43. data/lib/telnyx/resources/whatsapp/phone_numbers.rb +27 -0
  44. data/lib/telnyx/version.rb +1 -1
  45. data/lib/telnyx.rb +29 -2
  46. data/rbi/telnyx/internal/cursor_flat_pagination.rbi +48 -0
  47. data/rbi/telnyx/models/advanced_order_create_params.rbi +4 -198
  48. data/rbi/telnyx/models/advanced_order_update_requirement_group_params.rbi +2 -219
  49. data/rbi/telnyx/models/ai/assistant_get_texml_response.rbi +1 -1
  50. data/rbi/telnyx/models/ai/assistants/instruction_enhance_response.rbi +1 -1
  51. data/rbi/telnyx/models/dir/email_verification_status_wrapped.rbi +184 -0
  52. data/rbi/telnyx/models/dir/reference.rbi +162 -0
  53. data/rbi/telnyx/models/dir/reference_create_params.rbi +66 -0
  54. data/rbi/telnyx/models/dir/reference_input.rbi +93 -0
  55. data/rbi/telnyx/models/dir/reference_list.rbi +29 -0
  56. data/rbi/telnyx/models/dir/reference_list_params.rbi +37 -0
  57. data/rbi/telnyx/models/dir/reference_update_params.rbi +154 -0
  58. data/rbi/telnyx/models/dir/reference_update_response.rbi +39 -0
  59. data/rbi/telnyx/models/dir/verify_email_confirm_params.rbi +54 -0
  60. data/rbi/telnyx/models/dir/verify_email_create_params.rbi +40 -0
  61. data/rbi/telnyx/models/dir/verify_email_list_params.rbi +37 -0
  62. data/rbi/telnyx/models/dir_update_infringement_params.rbi +4 -2
  63. data/rbi/telnyx/models/enterprises/dir_create_params.rbi +10 -13
  64. data/rbi/telnyx/models/messaging_profiles/autoresp_config_delete_response.rbi +1 -1
  65. data/rbi/telnyx/models/storage/kv_create_params.rbi +42 -0
  66. data/rbi/telnyx/models/storage/kv_delete_params.rbi +37 -0
  67. data/rbi/telnyx/models/storage/kv_list_params.rbi +59 -0
  68. data/rbi/telnyx/models/storage/kv_namespace.rbi +131 -0
  69. data/rbi/telnyx/models/storage/kv_namespace_response_wrapper.rbi +35 -0
  70. data/rbi/telnyx/models/storage/kv_retrieve_params.rbi +37 -0
  71. data/rbi/telnyx/models/storage/kvs/key_delete_params.rbi +50 -0
  72. data/rbi/telnyx/models/storage/kvs/key_list_params.rbi +81 -0
  73. data/rbi/telnyx/models/storage/kvs/key_list_response.rbi +59 -0
  74. data/rbi/telnyx/models/storage/kvs/key_retrieve_params.rbi +50 -0
  75. data/rbi/telnyx/models/storage/kvs/key_update_params.rbi +77 -0
  76. data/rbi/telnyx/models/sub_number_orders_report_download_response.rbi +1 -1
  77. data/rbi/telnyx/models/telephony_credential_create_token_response.rbi +1 -1
  78. data/rbi/telnyx/models/uac_inbound.rbi +36 -0
  79. data/rbi/telnyx/models/uac_inbound_request.rbi +39 -0
  80. data/rbi/telnyx/models/whatsapp/phone_number_retrieve_conversation_window_params.rbi +54 -0
  81. data/rbi/telnyx/models/whatsapp/phone_number_retrieve_conversation_window_response.rbi +125 -0
  82. data/rbi/telnyx/models/wireguard_peer_retrieve_config_response.rbi +1 -1
  83. data/rbi/telnyx/resources/dir/references.rbi +114 -0
  84. data/rbi/telnyx/resources/dir/verify_email.rbi +70 -0
  85. data/rbi/telnyx/resources/dir.rbi +13 -1
  86. data/rbi/telnyx/resources/enterprises/dir.rbi +4 -4
  87. data/rbi/telnyx/resources/storage/kvs/keys.rbi +122 -0
  88. data/rbi/telnyx/resources/storage/kvs.rbi +87 -0
  89. data/rbi/telnyx/resources/storage.rbi +4 -0
  90. data/rbi/telnyx/resources/whatsapp/phone_numbers.rbi +21 -0
  91. data/sig/telnyx/internal/cursor_flat_pagination.rbs +28 -0
  92. data/sig/telnyx/models/advanced_order_create_params.rbs +3 -99
  93. data/sig/telnyx/models/advanced_order_update_requirement_group_params.rbs +3 -94
  94. data/sig/telnyx/models/dir/email_verification_status_wrapped.rbs +69 -0
  95. data/sig/telnyx/models/dir/reference.rbs +88 -0
  96. data/sig/telnyx/models/dir/reference_create_params.rbs +38 -0
  97. data/sig/telnyx/models/dir/reference_input.rbs +52 -0
  98. data/sig/telnyx/models/dir/reference_list.rbs +15 -0
  99. data/sig/telnyx/models/dir/reference_list_params.rbs +25 -0
  100. data/sig/telnyx/models/dir/reference_update_params.rbs +92 -0
  101. data/sig/telnyx/models/dir/reference_update_response.rbs +15 -0
  102. data/sig/telnyx/models/dir/verify_email_confirm_params.rbs +30 -0
  103. data/sig/telnyx/models/dir/verify_email_create_params.rbs +25 -0
  104. data/sig/telnyx/models/dir/verify_email_list_params.rbs +25 -0
  105. data/sig/telnyx/models/enterprises/dir_create_params.rbs +5 -7
  106. data/sig/telnyx/models/storage/kv_create_params.rbs +25 -0
  107. data/sig/telnyx/models/storage/kv_delete_params.rbs +22 -0
  108. data/sig/telnyx/models/storage/kv_list_params.rbs +34 -0
  109. data/sig/telnyx/models/storage/kv_namespace.rbs +80 -0
  110. data/sig/telnyx/models/storage/kv_namespace_response_wrapper.rbs +20 -0
  111. data/sig/telnyx/models/storage/kv_retrieve_params.rbs +22 -0
  112. data/sig/telnyx/models/storage/kvs/key_delete_params.rbs +32 -0
  113. data/sig/telnyx/models/storage/kvs/key_list_params.rbs +46 -0
  114. data/sig/telnyx/models/storage/kvs/key_list_response.rbs +32 -0
  115. data/sig/telnyx/models/storage/kvs/key_retrieve_params.rbs +32 -0
  116. data/sig/telnyx/models/storage/kvs/key_update_params.rbs +47 -0
  117. data/sig/telnyx/models/uac_inbound.rbs +21 -0
  118. data/sig/telnyx/models/uac_inbound_request.rbs +21 -0
  119. data/sig/telnyx/models/whatsapp/phone_number_retrieve_conversation_window_params.rbs +30 -0
  120. data/sig/telnyx/models/whatsapp/phone_number_retrieve_conversation_window_response.rbs +66 -0
  121. data/sig/telnyx/resources/dir/references.rbs +35 -0
  122. data/sig/telnyx/resources/dir/verify_email.rbs +25 -0
  123. data/sig/telnyx/resources/dir.rbs +4 -0
  124. data/sig/telnyx/resources/enterprises/dir.rbs +1 -1
  125. data/sig/telnyx/resources/storage/kvs/keys.rbs +39 -0
  126. data/sig/telnyx/resources/storage/kvs.rbs +32 -0
  127. data/sig/telnyx/resources/storage.rbs +2 -0
  128. data/sig/telnyx/resources/whatsapp/phone_numbers.rbs +6 -0
  129. metadata +89 -2
@@ -17,239 +17,22 @@ module Telnyx
17
17
  sig { returns(String) }
18
18
  attr_accessor :advanced_order_id
19
19
 
20
- sig { returns(T.nilable(String)) }
21
- attr_reader :area_code
22
-
23
- sig { params(area_code: String).void }
24
- attr_writer :area_code
25
-
26
- sig { returns(T.nilable(String)) }
27
- attr_reader :comments
28
-
29
- sig { params(comments: String).void }
30
- attr_writer :comments
31
-
32
- sig { returns(T.nilable(String)) }
33
- attr_reader :country_code
34
-
35
- sig { params(country_code: String).void }
36
- attr_writer :country_code
37
-
38
- sig { returns(T.nilable(String)) }
39
- attr_reader :customer_reference
40
-
41
- sig { params(customer_reference: String).void }
42
- attr_writer :customer_reference
43
-
44
- sig do
45
- returns(
46
- T.nilable(
47
- T::Array[
48
- Telnyx::AdvancedOrderUpdateRequirementGroupParams::Feature::OrSymbol
49
- ]
50
- )
51
- )
52
- end
53
- attr_reader :features
54
-
55
- sig do
56
- params(
57
- features:
58
- T::Array[
59
- Telnyx::AdvancedOrderUpdateRequirementGroupParams::Feature::OrSymbol
60
- ]
61
- ).void
62
- end
63
- attr_writer :features
64
-
65
- sig do
66
- returns(
67
- T.nilable(
68
- Telnyx::AdvancedOrderUpdateRequirementGroupParams::PhoneNumberType::OrSymbol
69
- )
70
- )
71
- end
72
- attr_reader :phone_number_type
73
-
74
- sig do
75
- params(
76
- phone_number_type:
77
- Telnyx::AdvancedOrderUpdateRequirementGroupParams::PhoneNumberType::OrSymbol
78
- ).void
79
- end
80
- attr_writer :phone_number_type
81
-
82
- sig { returns(T.nilable(Integer)) }
83
- attr_reader :quantity
84
-
85
- sig { params(quantity: Integer).void }
86
- attr_writer :quantity
87
-
88
- # The ID of the requirement group to associate with this advanced order
89
- sig { returns(T.nilable(String)) }
90
- attr_reader :requirement_group_id
91
-
92
- sig { params(requirement_group_id: String).void }
93
- attr_writer :requirement_group_id
94
-
95
20
  sig do
96
21
  params(
97
22
  advanced_order_id: String,
98
- area_code: String,
99
- comments: String,
100
- country_code: String,
101
- customer_reference: String,
102
- features:
103
- T::Array[
104
- Telnyx::AdvancedOrderUpdateRequirementGroupParams::Feature::OrSymbol
105
- ],
106
- phone_number_type:
107
- Telnyx::AdvancedOrderUpdateRequirementGroupParams::PhoneNumberType::OrSymbol,
108
- quantity: Integer,
109
- requirement_group_id: String,
110
23
  request_options: Telnyx::RequestOptions::OrHash
111
24
  ).returns(T.attached_class)
112
25
  end
113
- def self.new(
114
- advanced_order_id:,
115
- area_code: nil,
116
- comments: nil,
117
- country_code: nil,
118
- customer_reference: nil,
119
- features: nil,
120
- phone_number_type: nil,
121
- quantity: nil,
122
- # The ID of the requirement group to associate with this advanced order
123
- requirement_group_id: nil,
124
- request_options: {}
125
- )
26
+ def self.new(advanced_order_id:, request_options: {})
126
27
  end
127
28
 
128
29
  sig do
129
30
  override.returns(
130
- {
131
- advanced_order_id: String,
132
- area_code: String,
133
- comments: String,
134
- country_code: String,
135
- customer_reference: String,
136
- features:
137
- T::Array[
138
- Telnyx::AdvancedOrderUpdateRequirementGroupParams::Feature::OrSymbol
139
- ],
140
- phone_number_type:
141
- Telnyx::AdvancedOrderUpdateRequirementGroupParams::PhoneNumberType::OrSymbol,
142
- quantity: Integer,
143
- requirement_group_id: String,
144
- request_options: Telnyx::RequestOptions
145
- }
31
+ { advanced_order_id: String, request_options: Telnyx::RequestOptions }
146
32
  )
147
33
  end
148
34
  def to_hash
149
35
  end
150
-
151
- module Feature
152
- extend Telnyx::Internal::Type::Enum
153
-
154
- TaggedSymbol =
155
- T.type_alias do
156
- T.all(
157
- Symbol,
158
- Telnyx::AdvancedOrderUpdateRequirementGroupParams::Feature
159
- )
160
- end
161
- OrSymbol = T.type_alias { T.any(Symbol, String) }
162
-
163
- SMS =
164
- T.let(
165
- :sms,
166
- Telnyx::AdvancedOrderUpdateRequirementGroupParams::Feature::TaggedSymbol
167
- )
168
- MMS =
169
- T.let(
170
- :mms,
171
- Telnyx::AdvancedOrderUpdateRequirementGroupParams::Feature::TaggedSymbol
172
- )
173
- VOICE =
174
- T.let(
175
- :voice,
176
- Telnyx::AdvancedOrderUpdateRequirementGroupParams::Feature::TaggedSymbol
177
- )
178
- FAX =
179
- T.let(
180
- :fax,
181
- Telnyx::AdvancedOrderUpdateRequirementGroupParams::Feature::TaggedSymbol
182
- )
183
- EMERGENCY =
184
- T.let(
185
- :emergency,
186
- Telnyx::AdvancedOrderUpdateRequirementGroupParams::Feature::TaggedSymbol
187
- )
188
-
189
- sig do
190
- override.returns(
191
- T::Array[
192
- Telnyx::AdvancedOrderUpdateRequirementGroupParams::Feature::TaggedSymbol
193
- ]
194
- )
195
- end
196
- def self.values
197
- end
198
- end
199
-
200
- module PhoneNumberType
201
- extend Telnyx::Internal::Type::Enum
202
-
203
- TaggedSymbol =
204
- T.type_alias do
205
- T.all(
206
- Symbol,
207
- Telnyx::AdvancedOrderUpdateRequirementGroupParams::PhoneNumberType
208
- )
209
- end
210
- OrSymbol = T.type_alias { T.any(Symbol, String) }
211
-
212
- LOCAL =
213
- T.let(
214
- :local,
215
- Telnyx::AdvancedOrderUpdateRequirementGroupParams::PhoneNumberType::TaggedSymbol
216
- )
217
- MOBILE =
218
- T.let(
219
- :mobile,
220
- Telnyx::AdvancedOrderUpdateRequirementGroupParams::PhoneNumberType::TaggedSymbol
221
- )
222
- TOLL_FREE =
223
- T.let(
224
- :toll_free,
225
- Telnyx::AdvancedOrderUpdateRequirementGroupParams::PhoneNumberType::TaggedSymbol
226
- )
227
- SHARED_COST =
228
- T.let(
229
- :shared_cost,
230
- Telnyx::AdvancedOrderUpdateRequirementGroupParams::PhoneNumberType::TaggedSymbol
231
- )
232
- NATIONAL =
233
- T.let(
234
- :national,
235
- Telnyx::AdvancedOrderUpdateRequirementGroupParams::PhoneNumberType::TaggedSymbol
236
- )
237
- LANDLINE =
238
- T.let(
239
- :landline,
240
- Telnyx::AdvancedOrderUpdateRequirementGroupParams::PhoneNumberType::TaggedSymbol
241
- )
242
-
243
- sig do
244
- override.returns(
245
- T::Array[
246
- Telnyx::AdvancedOrderUpdateRequirementGroupParams::PhoneNumberType::TaggedSymbol
247
- ]
248
- )
249
- end
250
- def self.values
251
- end
252
- end
253
36
  end
254
37
  end
255
38
  end
@@ -3,7 +3,7 @@
3
3
  module Telnyx
4
4
  module Models
5
5
  module AI
6
- AssistantGetTexmlResponse = String
6
+ AssistantGetTexmlResponse = T.type_alias { String }
7
7
  end
8
8
  end
9
9
  end
@@ -4,7 +4,7 @@ module Telnyx
4
4
  module Models
5
5
  module AI
6
6
  module Assistants
7
- InstructionEnhanceResponse = String
7
+ InstructionEnhanceResponse = T.type_alias { String }
8
8
  end
9
9
  end
10
10
  end
@@ -0,0 +1,184 @@
1
+ # typed: strong
2
+
3
+ module Telnyx
4
+ module Models
5
+ module Dir
6
+ class EmailVerificationStatusWrapped < Telnyx::Internal::Type::BaseModel
7
+ OrHash =
8
+ T.type_alias do
9
+ T.any(
10
+ Telnyx::Dir::EmailVerificationStatusWrapped,
11
+ Telnyx::Internal::AnyHash
12
+ )
13
+ end
14
+
15
+ # Verification state for a DIR's authorizer email.
16
+ sig { returns(Telnyx::Dir::EmailVerificationStatusWrapped::Data) }
17
+ attr_reader :data
18
+
19
+ sig do
20
+ params(
21
+ data: Telnyx::Dir::EmailVerificationStatusWrapped::Data::OrHash
22
+ ).void
23
+ end
24
+ attr_writer :data
25
+
26
+ sig do
27
+ params(
28
+ data: Telnyx::Dir::EmailVerificationStatusWrapped::Data::OrHash
29
+ ).returns(T.attached_class)
30
+ end
31
+ def self.new(
32
+ # Verification state for a DIR's authorizer email.
33
+ data:
34
+ )
35
+ end
36
+
37
+ sig do
38
+ override.returns(
39
+ { data: Telnyx::Dir::EmailVerificationStatusWrapped::Data }
40
+ )
41
+ end
42
+ def to_hash
43
+ end
44
+
45
+ class Data < Telnyx::Internal::Type::BaseModel
46
+ OrHash =
47
+ T.type_alias do
48
+ T.any(
49
+ Telnyx::Dir::EmailVerificationStatusWrapped::Data,
50
+ Telnyx::Internal::AnyHash
51
+ )
52
+ end
53
+
54
+ # Whether the DIR's authorizer email has been confirmed.
55
+ sig { returns(T::Boolean) }
56
+ attr_accessor :email_verified
57
+
58
+ # `sent` after a code is emailed; `verified` after a successful confirm;
59
+ # `unverified` when no verification is in progress.
60
+ sig do
61
+ returns(
62
+ Telnyx::Dir::EmailVerificationStatusWrapped::Data::Status::TaggedSymbol
63
+ )
64
+ end
65
+ attr_accessor :status
66
+
67
+ # Always `email_verification`.
68
+ sig do
69
+ returns(
70
+ Telnyx::Dir::EmailVerificationStatusWrapped::Data::RecordType::TaggedSymbol
71
+ )
72
+ end
73
+ attr_accessor :record_type
74
+
75
+ # Verification state for a DIR's authorizer email.
76
+ sig do
77
+ params(
78
+ email_verified: T::Boolean,
79
+ record_type:
80
+ Telnyx::Dir::EmailVerificationStatusWrapped::Data::RecordType::OrSymbol,
81
+ status:
82
+ Telnyx::Dir::EmailVerificationStatusWrapped::Data::Status::OrSymbol
83
+ ).returns(T.attached_class)
84
+ end
85
+ def self.new(
86
+ # Whether the DIR's authorizer email has been confirmed.
87
+ email_verified:,
88
+ # Always `email_verification`.
89
+ record_type:,
90
+ # `sent` after a code is emailed; `verified` after a successful confirm;
91
+ # `unverified` when no verification is in progress.
92
+ status:
93
+ )
94
+ end
95
+
96
+ sig do
97
+ override.returns(
98
+ {
99
+ email_verified: T::Boolean,
100
+ record_type:
101
+ Telnyx::Dir::EmailVerificationStatusWrapped::Data::RecordType::TaggedSymbol,
102
+ status:
103
+ Telnyx::Dir::EmailVerificationStatusWrapped::Data::Status::TaggedSymbol
104
+ }
105
+ )
106
+ end
107
+ def to_hash
108
+ end
109
+
110
+ # Always `email_verification`.
111
+ module RecordType
112
+ extend Telnyx::Internal::Type::Enum
113
+
114
+ TaggedSymbol =
115
+ T.type_alias do
116
+ T.all(
117
+ Symbol,
118
+ Telnyx::Dir::EmailVerificationStatusWrapped::Data::RecordType
119
+ )
120
+ end
121
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
122
+
123
+ EMAIL_VERIFICATION =
124
+ T.let(
125
+ :email_verification,
126
+ Telnyx::Dir::EmailVerificationStatusWrapped::Data::RecordType::TaggedSymbol
127
+ )
128
+
129
+ sig do
130
+ override.returns(
131
+ T::Array[
132
+ Telnyx::Dir::EmailVerificationStatusWrapped::Data::RecordType::TaggedSymbol
133
+ ]
134
+ )
135
+ end
136
+ def self.values
137
+ end
138
+ end
139
+
140
+ # `sent` after a code is emailed; `verified` after a successful confirm;
141
+ # `unverified` when no verification is in progress.
142
+ module Status
143
+ extend Telnyx::Internal::Type::Enum
144
+
145
+ TaggedSymbol =
146
+ T.type_alias do
147
+ T.all(
148
+ Symbol,
149
+ Telnyx::Dir::EmailVerificationStatusWrapped::Data::Status
150
+ )
151
+ end
152
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
153
+
154
+ SENT =
155
+ T.let(
156
+ :sent,
157
+ Telnyx::Dir::EmailVerificationStatusWrapped::Data::Status::TaggedSymbol
158
+ )
159
+ VERIFIED =
160
+ T.let(
161
+ :verified,
162
+ Telnyx::Dir::EmailVerificationStatusWrapped::Data::Status::TaggedSymbol
163
+ )
164
+ UNVERIFIED =
165
+ T.let(
166
+ :unverified,
167
+ Telnyx::Dir::EmailVerificationStatusWrapped::Data::Status::TaggedSymbol
168
+ )
169
+
170
+ sig do
171
+ override.returns(
172
+ T::Array[
173
+ Telnyx::Dir::EmailVerificationStatusWrapped::Data::Status::TaggedSymbol
174
+ ]
175
+ )
176
+ end
177
+ def self.values
178
+ end
179
+ end
180
+ end
181
+ end
182
+ end
183
+ end
184
+ end
@@ -0,0 +1,162 @@
1
+ # typed: strong
2
+
3
+ module Telnyx
4
+ module Models
5
+ module Dir
6
+ class Reference < Telnyx::Internal::Type::BaseModel
7
+ OrHash =
8
+ T.type_alias do
9
+ T.any(Telnyx::Dir::Reference, Telnyx::Internal::AnyHash)
10
+ end
11
+
12
+ # Full name of the reference contact.
13
+ sig { returns(String) }
14
+ attr_accessor :full_name
15
+
16
+ # Reference phone number in E.164 format.
17
+ sig { returns(String) }
18
+ attr_accessor :phone_e164
19
+
20
+ # Whether this is a business reference or the financial reference.
21
+ sig { returns(Telnyx::Dir::Reference::RefType::TaggedSymbol) }
22
+ attr_accessor :ref_type
23
+
24
+ # Position within the reference type. Business references occupy slots 0 and 1;
25
+ # the financial reference occupies slot 0.
26
+ sig { returns(Integer) }
27
+ attr_accessor :slot
28
+
29
+ # IANA timezone id for the reference. Calls are only placed within the reference's
30
+ # local 8am-9pm window.
31
+ sig { returns(String) }
32
+ attr_accessor :timezone
33
+
34
+ # Reference contact email address.
35
+ sig { returns(T.nilable(String)) }
36
+ attr_accessor :email
37
+
38
+ # Job title of the reference contact.
39
+ sig { returns(T.nilable(String)) }
40
+ attr_accessor :job_title
41
+
42
+ # Organization the reference contact belongs to.
43
+ sig { returns(T.nilable(String)) }
44
+ attr_accessor :organization
45
+
46
+ # How the reference contact is related to the registering business.
47
+ sig { returns(T.nilable(String)) }
48
+ attr_accessor :relationship_to_registrant
49
+
50
+ # Always `dir_reference`.
51
+ sig { returns(Telnyx::Dir::Reference::RecordType::TaggedSymbol) }
52
+ attr_accessor :record_type
53
+
54
+ # A reference (business or financial) on a DIR, in the customer-facing shape. No
55
+ # internal identifiers are exposed.
56
+ sig do
57
+ params(
58
+ full_name: String,
59
+ phone_e164: String,
60
+ record_type: Telnyx::Dir::Reference::RecordType::OrSymbol,
61
+ ref_type: Telnyx::Dir::Reference::RefType::OrSymbol,
62
+ slot: Integer,
63
+ timezone: String,
64
+ email: T.nilable(String),
65
+ job_title: T.nilable(String),
66
+ organization: T.nilable(String),
67
+ relationship_to_registrant: T.nilable(String)
68
+ ).returns(T.attached_class)
69
+ end
70
+ def self.new(
71
+ # Full name of the reference contact.
72
+ full_name:,
73
+ # Reference phone number in E.164 format.
74
+ phone_e164:,
75
+ # Always `dir_reference`.
76
+ record_type:,
77
+ # Whether this is a business reference or the financial reference.
78
+ ref_type:,
79
+ # Position within the reference type. Business references occupy slots 0 and 1;
80
+ # the financial reference occupies slot 0.
81
+ slot:,
82
+ # IANA timezone id for the reference. Calls are only placed within the reference's
83
+ # local 8am-9pm window.
84
+ timezone:,
85
+ # Reference contact email address.
86
+ email: nil,
87
+ # Job title of the reference contact.
88
+ job_title: nil,
89
+ # Organization the reference contact belongs to.
90
+ organization: nil,
91
+ # How the reference contact is related to the registering business.
92
+ relationship_to_registrant: nil
93
+ )
94
+ end
95
+
96
+ sig do
97
+ override.returns(
98
+ {
99
+ full_name: String,
100
+ phone_e164: String,
101
+ record_type: Telnyx::Dir::Reference::RecordType::TaggedSymbol,
102
+ ref_type: Telnyx::Dir::Reference::RefType::TaggedSymbol,
103
+ slot: Integer,
104
+ timezone: String,
105
+ email: T.nilable(String),
106
+ job_title: T.nilable(String),
107
+ organization: T.nilable(String),
108
+ relationship_to_registrant: T.nilable(String)
109
+ }
110
+ )
111
+ end
112
+ def to_hash
113
+ end
114
+
115
+ # Always `dir_reference`.
116
+ module RecordType
117
+ extend Telnyx::Internal::Type::Enum
118
+
119
+ TaggedSymbol =
120
+ T.type_alias { T.all(Symbol, Telnyx::Dir::Reference::RecordType) }
121
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
122
+
123
+ DIR_REFERENCE =
124
+ T.let(
125
+ :dir_reference,
126
+ Telnyx::Dir::Reference::RecordType::TaggedSymbol
127
+ )
128
+
129
+ sig do
130
+ override.returns(
131
+ T::Array[Telnyx::Dir::Reference::RecordType::TaggedSymbol]
132
+ )
133
+ end
134
+ def self.values
135
+ end
136
+ end
137
+
138
+ # Whether this is a business reference or the financial reference.
139
+ module RefType
140
+ extend Telnyx::Internal::Type::Enum
141
+
142
+ TaggedSymbol =
143
+ T.type_alias { T.all(Symbol, Telnyx::Dir::Reference::RefType) }
144
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
145
+
146
+ BUSINESS =
147
+ T.let(:business, Telnyx::Dir::Reference::RefType::TaggedSymbol)
148
+ FINANCIAL =
149
+ T.let(:financial, Telnyx::Dir::Reference::RefType::TaggedSymbol)
150
+
151
+ sig do
152
+ override.returns(
153
+ T::Array[Telnyx::Dir::Reference::RefType::TaggedSymbol]
154
+ )
155
+ end
156
+ def self.values
157
+ end
158
+ end
159
+ end
160
+ end
161
+ end
162
+ end
@@ -0,0 +1,66 @@
1
+ # typed: strong
2
+
3
+ module Telnyx
4
+ module Models
5
+ module Dir
6
+ class ReferenceCreateParams < Telnyx::Internal::Type::BaseModel
7
+ extend Telnyx::Internal::Type::RequestParameters::Converter
8
+ include Telnyx::Internal::Type::RequestParameters
9
+
10
+ OrHash =
11
+ T.type_alias do
12
+ T.any(Telnyx::Dir::ReferenceCreateParams, Telnyx::Internal::AnyHash)
13
+ end
14
+
15
+ sig { returns(String) }
16
+ attr_accessor :dir_id
17
+
18
+ # Exactly two business references.
19
+ sig { returns(T::Array[Telnyx::Dir::ReferenceInput]) }
20
+ attr_accessor :business_references
21
+
22
+ # One reference supplied at submit. The reference type is implied by the field
23
+ # that carries it (business_references vs financial_reference).
24
+ sig { returns(Telnyx::Dir::ReferenceInput) }
25
+ attr_reader :financial_reference
26
+
27
+ sig do
28
+ params(financial_reference: Telnyx::Dir::ReferenceInput::OrHash).void
29
+ end
30
+ attr_writer :financial_reference
31
+
32
+ sig do
33
+ params(
34
+ dir_id: String,
35
+ business_references: T::Array[Telnyx::Dir::ReferenceInput::OrHash],
36
+ financial_reference: Telnyx::Dir::ReferenceInput::OrHash,
37
+ request_options: Telnyx::RequestOptions::OrHash
38
+ ).returns(T.attached_class)
39
+ end
40
+ def self.new(
41
+ dir_id:,
42
+ # Exactly two business references.
43
+ business_references:,
44
+ # One reference supplied at submit. The reference type is implied by the field
45
+ # that carries it (business_references vs financial_reference).
46
+ financial_reference:,
47
+ request_options: {}
48
+ )
49
+ end
50
+
51
+ sig do
52
+ override.returns(
53
+ {
54
+ dir_id: String,
55
+ business_references: T::Array[Telnyx::Dir::ReferenceInput],
56
+ financial_reference: Telnyx::Dir::ReferenceInput,
57
+ request_options: Telnyx::RequestOptions
58
+ }
59
+ )
60
+ end
61
+ def to_hash
62
+ end
63
+ end
64
+ end
65
+ end
66
+ end