telnyx 5.151.0 → 5.152.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 (120) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +5 -538
  3. data/README.md +1 -1
  4. data/lib/telnyx/models/advanced_order_create_params.rb +1 -86
  5. data/lib/telnyx/models/advanced_order_update_requirement_group_params.rb +1 -88
  6. data/lib/telnyx/models/dir/email_verification_status_wrapped.rb +82 -0
  7. data/lib/telnyx/models/dir/reference.rb +125 -0
  8. data/lib/telnyx/models/dir/reference_create_params.rb +43 -0
  9. data/lib/telnyx/models/dir/reference_input.rb +74 -0
  10. data/lib/telnyx/models/dir/reference_list.rb +18 -0
  11. data/lib/telnyx/models/dir/reference_list_params.rb +22 -0
  12. data/lib/telnyx/models/dir/reference_update_params.rb +103 -0
  13. data/lib/telnyx/models/dir/reference_update_response.rb +23 -0
  14. data/lib/telnyx/models/dir/verify_email_confirm_params.rb +31 -0
  15. data/lib/telnyx/models/dir/verify_email_create_params.rb +22 -0
  16. data/lib/telnyx/models/dir/verify_email_list_params.rb +22 -0
  17. data/lib/telnyx/models/dir_update_infringement_params.rb +6 -2
  18. data/lib/telnyx/models/enterprises/dir_create_params.rb +10 -10
  19. data/lib/telnyx/models/storage/kv_create_params.rb +24 -0
  20. data/lib/telnyx/models/storage/kv_delete_params.rb +22 -0
  21. data/lib/telnyx/models/storage/kv_list_params.rb +32 -0
  22. data/lib/telnyx/models/storage/kv_namespace.rb +75 -0
  23. data/lib/telnyx/models/storage/kv_namespace_response_wrapper.rb +18 -0
  24. data/lib/telnyx/models/storage/kv_retrieve_params.rb +22 -0
  25. data/lib/telnyx/models/storage/kvs/key_delete_params.rb +30 -0
  26. data/lib/telnyx/models/storage/kvs/key_list_params.rb +49 -0
  27. data/lib/telnyx/models/storage/kvs/key_list_response.rb +82 -0
  28. data/lib/telnyx/models/storage/kvs/key_retrieve_params.rb +30 -0
  29. data/lib/telnyx/models/storage/kvs/key_update_params.rb +53 -0
  30. data/lib/telnyx/models/whatsapp/phone_number_retrieve_conversation_window_params.rb +31 -0
  31. data/lib/telnyx/models/whatsapp/phone_number_retrieve_conversation_window_response.rb +54 -0
  32. data/lib/telnyx/resources/dir/references.rb +139 -0
  33. data/lib/telnyx/resources/dir/verify_email.rb +91 -0
  34. data/lib/telnyx/resources/dir.rb +17 -1
  35. data/lib/telnyx/resources/documents.rb +1 -1
  36. data/lib/telnyx/resources/enterprises/dir.rb +3 -3
  37. data/lib/telnyx/resources/storage/kvs/keys.rb +154 -0
  38. data/lib/telnyx/resources/storage/kvs.rb +115 -0
  39. data/lib/telnyx/resources/storage.rb +5 -0
  40. data/lib/telnyx/resources/whatsapp/phone_numbers.rb +27 -0
  41. data/lib/telnyx/version.rb +1 -1
  42. data/lib/telnyx.rb +28 -2
  43. data/rbi/telnyx/models/advanced_order_create_params.rbi +4 -198
  44. data/rbi/telnyx/models/advanced_order_update_requirement_group_params.rbi +2 -219
  45. data/rbi/telnyx/models/ai/assistant_get_texml_response.rbi +1 -1
  46. data/rbi/telnyx/models/ai/assistants/instruction_enhance_response.rbi +1 -1
  47. data/rbi/telnyx/models/dir/email_verification_status_wrapped.rbi +184 -0
  48. data/rbi/telnyx/models/dir/reference.rbi +162 -0
  49. data/rbi/telnyx/models/dir/reference_create_params.rbi +66 -0
  50. data/rbi/telnyx/models/dir/reference_input.rbi +93 -0
  51. data/rbi/telnyx/models/dir/reference_list.rbi +29 -0
  52. data/rbi/telnyx/models/dir/reference_list_params.rbi +37 -0
  53. data/rbi/telnyx/models/dir/reference_update_params.rbi +154 -0
  54. data/rbi/telnyx/models/dir/reference_update_response.rbi +39 -0
  55. data/rbi/telnyx/models/dir/verify_email_confirm_params.rbi +54 -0
  56. data/rbi/telnyx/models/dir/verify_email_create_params.rbi +40 -0
  57. data/rbi/telnyx/models/dir/verify_email_list_params.rbi +37 -0
  58. data/rbi/telnyx/models/dir_update_infringement_params.rbi +4 -2
  59. data/rbi/telnyx/models/enterprises/dir_create_params.rbi +10 -13
  60. data/rbi/telnyx/models/messaging_profiles/autoresp_config_delete_response.rbi +1 -1
  61. data/rbi/telnyx/models/storage/kv_create_params.rbi +42 -0
  62. data/rbi/telnyx/models/storage/kv_delete_params.rbi +37 -0
  63. data/rbi/telnyx/models/storage/kv_list_params.rbi +59 -0
  64. data/rbi/telnyx/models/storage/kv_namespace.rbi +131 -0
  65. data/rbi/telnyx/models/storage/kv_namespace_response_wrapper.rbi +35 -0
  66. data/rbi/telnyx/models/storage/kv_retrieve_params.rbi +37 -0
  67. data/rbi/telnyx/models/storage/kvs/key_delete_params.rbi +50 -0
  68. data/rbi/telnyx/models/storage/kvs/key_list_params.rbi +81 -0
  69. data/rbi/telnyx/models/storage/kvs/key_list_response.rbi +179 -0
  70. data/rbi/telnyx/models/storage/kvs/key_retrieve_params.rbi +50 -0
  71. data/rbi/telnyx/models/storage/kvs/key_update_params.rbi +77 -0
  72. data/rbi/telnyx/models/sub_number_orders_report_download_response.rbi +1 -1
  73. data/rbi/telnyx/models/telephony_credential_create_token_response.rbi +1 -1
  74. data/rbi/telnyx/models/whatsapp/phone_number_retrieve_conversation_window_params.rbi +54 -0
  75. data/rbi/telnyx/models/whatsapp/phone_number_retrieve_conversation_window_response.rbi +125 -0
  76. data/rbi/telnyx/models/wireguard_peer_retrieve_config_response.rbi +1 -1
  77. data/rbi/telnyx/resources/dir/references.rbi +114 -0
  78. data/rbi/telnyx/resources/dir/verify_email.rbi +70 -0
  79. data/rbi/telnyx/resources/dir.rbi +13 -1
  80. data/rbi/telnyx/resources/enterprises/dir.rbi +4 -4
  81. data/rbi/telnyx/resources/storage/kvs/keys.rbi +115 -0
  82. data/rbi/telnyx/resources/storage/kvs.rbi +87 -0
  83. data/rbi/telnyx/resources/storage.rbi +4 -0
  84. data/rbi/telnyx/resources/whatsapp/phone_numbers.rbi +21 -0
  85. data/sig/telnyx/models/advanced_order_create_params.rbs +3 -99
  86. data/sig/telnyx/models/advanced_order_update_requirement_group_params.rbs +3 -94
  87. data/sig/telnyx/models/dir/email_verification_status_wrapped.rbs +69 -0
  88. data/sig/telnyx/models/dir/reference.rbs +88 -0
  89. data/sig/telnyx/models/dir/reference_create_params.rbs +38 -0
  90. data/sig/telnyx/models/dir/reference_input.rbs +52 -0
  91. data/sig/telnyx/models/dir/reference_list.rbs +15 -0
  92. data/sig/telnyx/models/dir/reference_list_params.rbs +25 -0
  93. data/sig/telnyx/models/dir/reference_update_params.rbs +92 -0
  94. data/sig/telnyx/models/dir/reference_update_response.rbs +15 -0
  95. data/sig/telnyx/models/dir/verify_email_confirm_params.rbs +30 -0
  96. data/sig/telnyx/models/dir/verify_email_create_params.rbs +25 -0
  97. data/sig/telnyx/models/dir/verify_email_list_params.rbs +25 -0
  98. data/sig/telnyx/models/enterprises/dir_create_params.rbs +5 -7
  99. data/sig/telnyx/models/storage/kv_create_params.rbs +25 -0
  100. data/sig/telnyx/models/storage/kv_delete_params.rbs +22 -0
  101. data/sig/telnyx/models/storage/kv_list_params.rbs +34 -0
  102. data/sig/telnyx/models/storage/kv_namespace.rbs +80 -0
  103. data/sig/telnyx/models/storage/kv_namespace_response_wrapper.rbs +20 -0
  104. data/sig/telnyx/models/storage/kv_retrieve_params.rbs +22 -0
  105. data/sig/telnyx/models/storage/kvs/key_delete_params.rbs +32 -0
  106. data/sig/telnyx/models/storage/kvs/key_list_params.rbs +46 -0
  107. data/sig/telnyx/models/storage/kvs/key_list_response.rbs +88 -0
  108. data/sig/telnyx/models/storage/kvs/key_retrieve_params.rbs +32 -0
  109. data/sig/telnyx/models/storage/kvs/key_update_params.rbs +47 -0
  110. data/sig/telnyx/models/whatsapp/phone_number_retrieve_conversation_window_params.rbs +30 -0
  111. data/sig/telnyx/models/whatsapp/phone_number_retrieve_conversation_window_response.rbs +66 -0
  112. data/sig/telnyx/resources/dir/references.rbs +35 -0
  113. data/sig/telnyx/resources/dir/verify_email.rbs +25 -0
  114. data/sig/telnyx/resources/dir.rbs +4 -0
  115. data/sig/telnyx/resources/enterprises/dir.rbs +1 -1
  116. data/sig/telnyx/resources/storage/kvs/keys.rbs +39 -0
  117. data/sig/telnyx/resources/storage/kvs.rbs +32 -0
  118. data/sig/telnyx/resources/storage.rbs +2 -0
  119. data/sig/telnyx/resources/whatsapp/phone_numbers.rbs +6 -0
  120. metadata +85 -1
@@ -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
@@ -0,0 +1,93 @@
1
+ # typed: strong
2
+
3
+ module Telnyx
4
+ module Models
5
+ module Dir
6
+ class ReferenceInput < Telnyx::Internal::Type::BaseModel
7
+ OrHash =
8
+ T.type_alias do
9
+ T.any(Telnyx::Dir::ReferenceInput, Telnyx::Internal::AnyHash)
10
+ end
11
+
12
+ # Reference contact email address. Required: the reference is emailed scheduling
13
+ # and dial-in notices.
14
+ sig { returns(String) }
15
+ attr_accessor :email
16
+
17
+ # Full name of the reference contact.
18
+ sig { returns(String) }
19
+ attr_accessor :full_name
20
+
21
+ # Reference phone number in E.164 format, e.g. +14155550123.
22
+ sig { returns(String) }
23
+ attr_accessor :phone_e164
24
+
25
+ # IANA timezone id for the reference (e.g. America/New_York). Required: calls are
26
+ # only placed within the reference's local 8am-9pm window.
27
+ sig { returns(String) }
28
+ attr_accessor :timezone
29
+
30
+ # Job title of the reference contact.
31
+ sig { returns(T.nilable(String)) }
32
+ attr_accessor :job_title
33
+
34
+ # Organization the reference contact belongs to.
35
+ sig { returns(T.nilable(String)) }
36
+ attr_accessor :organization
37
+
38
+ # How the reference contact is related to the registering business.
39
+ sig { returns(T.nilable(String)) }
40
+ attr_accessor :relationship_to_registrant
41
+
42
+ # One reference supplied at submit. The reference type is implied by the field
43
+ # that carries it (business_references vs financial_reference).
44
+ sig do
45
+ params(
46
+ email: String,
47
+ full_name: String,
48
+ phone_e164: String,
49
+ timezone: String,
50
+ job_title: T.nilable(String),
51
+ organization: T.nilable(String),
52
+ relationship_to_registrant: T.nilable(String)
53
+ ).returns(T.attached_class)
54
+ end
55
+ def self.new(
56
+ # Reference contact email address. Required: the reference is emailed scheduling
57
+ # and dial-in notices.
58
+ email:,
59
+ # Full name of the reference contact.
60
+ full_name:,
61
+ # Reference phone number in E.164 format, e.g. +14155550123.
62
+ phone_e164:,
63
+ # IANA timezone id for the reference (e.g. America/New_York). Required: calls are
64
+ # only placed within the reference's local 8am-9pm window.
65
+ timezone:,
66
+ # Job title of the reference contact.
67
+ job_title: nil,
68
+ # Organization the reference contact belongs to.
69
+ organization: nil,
70
+ # How the reference contact is related to the registering business.
71
+ relationship_to_registrant: nil
72
+ )
73
+ end
74
+
75
+ sig do
76
+ override.returns(
77
+ {
78
+ email: String,
79
+ full_name: String,
80
+ phone_e164: String,
81
+ timezone: String,
82
+ job_title: T.nilable(String),
83
+ organization: T.nilable(String),
84
+ relationship_to_registrant: T.nilable(String)
85
+ }
86
+ )
87
+ end
88
+ def to_hash
89
+ end
90
+ end
91
+ end
92
+ end
93
+ end
@@ -0,0 +1,29 @@
1
+ # typed: strong
2
+
3
+ module Telnyx
4
+ module Models
5
+ module Dir
6
+ class ReferenceList < Telnyx::Internal::Type::BaseModel
7
+ OrHash =
8
+ T.type_alias do
9
+ T.any(Telnyx::Dir::ReferenceList, Telnyx::Internal::AnyHash)
10
+ end
11
+
12
+ sig { returns(T::Array[Telnyx::Dir::Reference]) }
13
+ attr_accessor :data
14
+
15
+ sig do
16
+ params(data: T::Array[Telnyx::Dir::Reference::OrHash]).returns(
17
+ T.attached_class
18
+ )
19
+ end
20
+ def self.new(data:)
21
+ end
22
+
23
+ sig { override.returns({ data: T::Array[Telnyx::Dir::Reference] }) }
24
+ def to_hash
25
+ end
26
+ end
27
+ end
28
+ end
29
+ end
@@ -0,0 +1,37 @@
1
+ # typed: strong
2
+
3
+ module Telnyx
4
+ module Models
5
+ module Dir
6
+ class ReferenceListParams < 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::ReferenceListParams, Telnyx::Internal::AnyHash)
13
+ end
14
+
15
+ sig { returns(String) }
16
+ attr_accessor :dir_id
17
+
18
+ sig do
19
+ params(
20
+ dir_id: String,
21
+ request_options: Telnyx::RequestOptions::OrHash
22
+ ).returns(T.attached_class)
23
+ end
24
+ def self.new(dir_id:, request_options: {})
25
+ end
26
+
27
+ sig do
28
+ override.returns(
29
+ { dir_id: String, request_options: Telnyx::RequestOptions }
30
+ )
31
+ end
32
+ def to_hash
33
+ end
34
+ end
35
+ end
36
+ end
37
+ end