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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -533
- data/README.md +1 -1
- data/lib/telnyx/internal/cursor_flat_pagination.rb +106 -0
- data/lib/telnyx/models/advanced_order_create_params.rb +1 -86
- data/lib/telnyx/models/advanced_order_update_requirement_group_params.rb +1 -88
- data/lib/telnyx/models/dir/email_verification_status_wrapped.rb +82 -0
- data/lib/telnyx/models/dir/reference.rb +125 -0
- data/lib/telnyx/models/dir/reference_create_params.rb +43 -0
- data/lib/telnyx/models/dir/reference_input.rb +74 -0
- data/lib/telnyx/models/dir/reference_list.rb +18 -0
- data/lib/telnyx/models/dir/reference_list_params.rb +22 -0
- data/lib/telnyx/models/dir/reference_update_params.rb +103 -0
- data/lib/telnyx/models/dir/reference_update_response.rb +23 -0
- data/lib/telnyx/models/dir/verify_email_confirm_params.rb +31 -0
- data/lib/telnyx/models/dir/verify_email_create_params.rb +22 -0
- data/lib/telnyx/models/dir/verify_email_list_params.rb +22 -0
- data/lib/telnyx/models/dir_update_infringement_params.rb +6 -2
- data/lib/telnyx/models/enterprises/dir_create_params.rb +10 -10
- data/lib/telnyx/models/storage/kv_create_params.rb +24 -0
- data/lib/telnyx/models/storage/kv_delete_params.rb +22 -0
- data/lib/telnyx/models/storage/kv_list_params.rb +32 -0
- data/lib/telnyx/models/storage/kv_namespace.rb +75 -0
- data/lib/telnyx/models/storage/kv_namespace_response_wrapper.rb +18 -0
- data/lib/telnyx/models/storage/kv_retrieve_params.rb +22 -0
- data/lib/telnyx/models/storage/kvs/key_delete_params.rb +30 -0
- data/lib/telnyx/models/storage/kvs/key_list_params.rb +49 -0
- data/lib/telnyx/models/storage/kvs/key_list_response.rb +35 -0
- data/lib/telnyx/models/storage/kvs/key_retrieve_params.rb +30 -0
- data/lib/telnyx/models/storage/kvs/key_update_params.rb +53 -0
- data/lib/telnyx/models/uac_inbound.rb +25 -1
- data/lib/telnyx/models/uac_inbound_request.rb +25 -1
- data/lib/telnyx/models/whatsapp/phone_number_retrieve_conversation_window_params.rb +31 -0
- data/lib/telnyx/models/whatsapp/phone_number_retrieve_conversation_window_response.rb +54 -0
- data/lib/telnyx/resources/dir/references.rb +139 -0
- data/lib/telnyx/resources/dir/verify_email.rb +91 -0
- data/lib/telnyx/resources/dir.rb +17 -1
- data/lib/telnyx/resources/documents.rb +1 -1
- data/lib/telnyx/resources/enterprises/dir.rb +3 -3
- data/lib/telnyx/resources/storage/kvs/keys.rb +155 -0
- data/lib/telnyx/resources/storage/kvs.rb +115 -0
- data/lib/telnyx/resources/storage.rb +5 -0
- data/lib/telnyx/resources/whatsapp/phone_numbers.rb +27 -0
- data/lib/telnyx/version.rb +1 -1
- data/lib/telnyx.rb +29 -2
- data/rbi/telnyx/internal/cursor_flat_pagination.rbi +48 -0
- data/rbi/telnyx/models/advanced_order_create_params.rbi +4 -198
- data/rbi/telnyx/models/advanced_order_update_requirement_group_params.rbi +2 -219
- data/rbi/telnyx/models/ai/assistant_get_texml_response.rbi +1 -1
- data/rbi/telnyx/models/ai/assistants/instruction_enhance_response.rbi +1 -1
- data/rbi/telnyx/models/dir/email_verification_status_wrapped.rbi +184 -0
- data/rbi/telnyx/models/dir/reference.rbi +162 -0
- data/rbi/telnyx/models/dir/reference_create_params.rbi +66 -0
- data/rbi/telnyx/models/dir/reference_input.rbi +93 -0
- data/rbi/telnyx/models/dir/reference_list.rbi +29 -0
- data/rbi/telnyx/models/dir/reference_list_params.rbi +37 -0
- data/rbi/telnyx/models/dir/reference_update_params.rbi +154 -0
- data/rbi/telnyx/models/dir/reference_update_response.rbi +39 -0
- data/rbi/telnyx/models/dir/verify_email_confirm_params.rbi +54 -0
- data/rbi/telnyx/models/dir/verify_email_create_params.rbi +40 -0
- data/rbi/telnyx/models/dir/verify_email_list_params.rbi +37 -0
- data/rbi/telnyx/models/dir_update_infringement_params.rbi +4 -2
- data/rbi/telnyx/models/enterprises/dir_create_params.rbi +10 -13
- data/rbi/telnyx/models/messaging_profiles/autoresp_config_delete_response.rbi +1 -1
- data/rbi/telnyx/models/storage/kv_create_params.rbi +42 -0
- data/rbi/telnyx/models/storage/kv_delete_params.rbi +37 -0
- data/rbi/telnyx/models/storage/kv_list_params.rbi +59 -0
- data/rbi/telnyx/models/storage/kv_namespace.rbi +131 -0
- data/rbi/telnyx/models/storage/kv_namespace_response_wrapper.rbi +35 -0
- data/rbi/telnyx/models/storage/kv_retrieve_params.rbi +37 -0
- data/rbi/telnyx/models/storage/kvs/key_delete_params.rbi +50 -0
- data/rbi/telnyx/models/storage/kvs/key_list_params.rbi +81 -0
- data/rbi/telnyx/models/storage/kvs/key_list_response.rbi +59 -0
- data/rbi/telnyx/models/storage/kvs/key_retrieve_params.rbi +50 -0
- data/rbi/telnyx/models/storage/kvs/key_update_params.rbi +77 -0
- data/rbi/telnyx/models/sub_number_orders_report_download_response.rbi +1 -1
- data/rbi/telnyx/models/telephony_credential_create_token_response.rbi +1 -1
- data/rbi/telnyx/models/uac_inbound.rbi +36 -0
- data/rbi/telnyx/models/uac_inbound_request.rbi +39 -0
- data/rbi/telnyx/models/whatsapp/phone_number_retrieve_conversation_window_params.rbi +54 -0
- data/rbi/telnyx/models/whatsapp/phone_number_retrieve_conversation_window_response.rbi +125 -0
- data/rbi/telnyx/models/wireguard_peer_retrieve_config_response.rbi +1 -1
- data/rbi/telnyx/resources/dir/references.rbi +114 -0
- data/rbi/telnyx/resources/dir/verify_email.rbi +70 -0
- data/rbi/telnyx/resources/dir.rbi +13 -1
- data/rbi/telnyx/resources/enterprises/dir.rbi +4 -4
- data/rbi/telnyx/resources/storage/kvs/keys.rbi +122 -0
- data/rbi/telnyx/resources/storage/kvs.rbi +87 -0
- data/rbi/telnyx/resources/storage.rbi +4 -0
- data/rbi/telnyx/resources/whatsapp/phone_numbers.rbi +21 -0
- data/sig/telnyx/internal/cursor_flat_pagination.rbs +28 -0
- data/sig/telnyx/models/advanced_order_create_params.rbs +3 -99
- data/sig/telnyx/models/advanced_order_update_requirement_group_params.rbs +3 -94
- data/sig/telnyx/models/dir/email_verification_status_wrapped.rbs +69 -0
- data/sig/telnyx/models/dir/reference.rbs +88 -0
- data/sig/telnyx/models/dir/reference_create_params.rbs +38 -0
- data/sig/telnyx/models/dir/reference_input.rbs +52 -0
- data/sig/telnyx/models/dir/reference_list.rbs +15 -0
- data/sig/telnyx/models/dir/reference_list_params.rbs +25 -0
- data/sig/telnyx/models/dir/reference_update_params.rbs +92 -0
- data/sig/telnyx/models/dir/reference_update_response.rbs +15 -0
- data/sig/telnyx/models/dir/verify_email_confirm_params.rbs +30 -0
- data/sig/telnyx/models/dir/verify_email_create_params.rbs +25 -0
- data/sig/telnyx/models/dir/verify_email_list_params.rbs +25 -0
- data/sig/telnyx/models/enterprises/dir_create_params.rbs +5 -7
- data/sig/telnyx/models/storage/kv_create_params.rbs +25 -0
- data/sig/telnyx/models/storage/kv_delete_params.rbs +22 -0
- data/sig/telnyx/models/storage/kv_list_params.rbs +34 -0
- data/sig/telnyx/models/storage/kv_namespace.rbs +80 -0
- data/sig/telnyx/models/storage/kv_namespace_response_wrapper.rbs +20 -0
- data/sig/telnyx/models/storage/kv_retrieve_params.rbs +22 -0
- data/sig/telnyx/models/storage/kvs/key_delete_params.rbs +32 -0
- data/sig/telnyx/models/storage/kvs/key_list_params.rbs +46 -0
- data/sig/telnyx/models/storage/kvs/key_list_response.rbs +32 -0
- data/sig/telnyx/models/storage/kvs/key_retrieve_params.rbs +32 -0
- data/sig/telnyx/models/storage/kvs/key_update_params.rbs +47 -0
- data/sig/telnyx/models/uac_inbound.rbs +21 -0
- data/sig/telnyx/models/uac_inbound_request.rbs +21 -0
- data/sig/telnyx/models/whatsapp/phone_number_retrieve_conversation_window_params.rbs +30 -0
- data/sig/telnyx/models/whatsapp/phone_number_retrieve_conversation_window_response.rbs +66 -0
- data/sig/telnyx/resources/dir/references.rbs +35 -0
- data/sig/telnyx/resources/dir/verify_email.rbs +25 -0
- data/sig/telnyx/resources/dir.rbs +4 -0
- data/sig/telnyx/resources/enterprises/dir.rbs +1 -1
- data/sig/telnyx/resources/storage/kvs/keys.rbs +39 -0
- data/sig/telnyx/resources/storage/kvs.rbs +32 -0
- data/sig/telnyx/resources/storage.rbs +2 -0
- data/sig/telnyx/resources/whatsapp/phone_numbers.rbs +6 -0
- metadata +89 -2
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Telnyx
|
|
4
|
+
module Models
|
|
5
|
+
module Storage
|
|
6
|
+
module Kvs
|
|
7
|
+
# @see Telnyx::Resources::Storage::Kvs::Keys#update
|
|
8
|
+
class KeyUpdateParams < Telnyx::Internal::Type::BaseModel
|
|
9
|
+
extend Telnyx::Internal::Type::RequestParameters::Converter
|
|
10
|
+
include Telnyx::Internal::Type::RequestParameters
|
|
11
|
+
|
|
12
|
+
# @!attribute id
|
|
13
|
+
#
|
|
14
|
+
# @return [String]
|
|
15
|
+
required :id, String
|
|
16
|
+
|
|
17
|
+
# @!attribute key
|
|
18
|
+
#
|
|
19
|
+
# @return [String]
|
|
20
|
+
required :key, String
|
|
21
|
+
|
|
22
|
+
# @!attribute body
|
|
23
|
+
# Raw value bytes, stored verbatim.
|
|
24
|
+
#
|
|
25
|
+
# @return [Pathname, StringIO, IO, String, Telnyx::FilePart]
|
|
26
|
+
required :body, Telnyx::Internal::Type::FileInput
|
|
27
|
+
|
|
28
|
+
# @!attribute ttl_secs
|
|
29
|
+
# Time-to-live in seconds. When set, the key expires and is deleted after this
|
|
30
|
+
# duration. Requires a namespace provisioned with TTL support; namespaces without
|
|
31
|
+
# it return a `409`.
|
|
32
|
+
#
|
|
33
|
+
# @return [Integer, nil]
|
|
34
|
+
optional :ttl_secs, Integer
|
|
35
|
+
|
|
36
|
+
# @!method initialize(id:, key:, body:, ttl_secs: nil, request_options: {})
|
|
37
|
+
# Some parameter documentations has been truncated, see
|
|
38
|
+
# {Telnyx::Models::Storage::Kvs::KeyUpdateParams} for more details.
|
|
39
|
+
#
|
|
40
|
+
# @param id [String]
|
|
41
|
+
#
|
|
42
|
+
# @param key [String]
|
|
43
|
+
#
|
|
44
|
+
# @param body [Pathname, StringIO, IO, String, Telnyx::FilePart] Raw value bytes, stored verbatim.
|
|
45
|
+
#
|
|
46
|
+
# @param ttl_secs [Integer] Time-to-live in seconds. When set, the key expires and is deleted after this dur
|
|
47
|
+
#
|
|
48
|
+
# @param request_options [Telnyx::RequestOptions, Hash{Symbol=>Object}]
|
|
49
|
+
end
|
|
50
|
+
end
|
|
51
|
+
end
|
|
52
|
+
end
|
|
53
|
+
end
|
|
@@ -78,6 +78,13 @@ module Telnyx
|
|
|
78
78
|
# @return [Boolean, nil]
|
|
79
79
|
optional :sip_compact_headers_enabled, Telnyx::Internal::Type::Boolean
|
|
80
80
|
|
|
81
|
+
# @!attribute sip_region
|
|
82
|
+
# Selects which `sip_region` to receive inbound calls from. If null, the default
|
|
83
|
+
# region (US) will be used.
|
|
84
|
+
#
|
|
85
|
+
# @return [Symbol, Telnyx::Models::UacInbound::SipRegion, nil]
|
|
86
|
+
optional :sip_region, enum: -> { Telnyx::UacInbound::SipRegion }
|
|
87
|
+
|
|
81
88
|
# @!attribute sip_subdomain
|
|
82
89
|
# The Telnyx-generated SIP subdomain for this UAC connection.
|
|
83
90
|
#
|
|
@@ -102,7 +109,7 @@ module Telnyx
|
|
|
102
109
|
# @return [Integer, nil]
|
|
103
110
|
optional :timeout_2xx_secs, Integer
|
|
104
111
|
|
|
105
|
-
# @!method initialize(ani_number_format: nil, channel_limit: nil, codecs: nil, default_routing_method: nil, dnis_number_format: nil, generate_ringback_tone: nil, isup_headers_enabled: nil, prack_enabled: nil, shaken_stir_enabled: nil, simultaneous_ringing: nil, sip_compact_headers_enabled: nil, sip_subdomain: nil, sip_subdomain_receive_settings: nil, timeout_1xx_secs: nil, timeout_2xx_secs: nil)
|
|
112
|
+
# @!method initialize(ani_number_format: nil, channel_limit: nil, codecs: nil, default_routing_method: nil, dnis_number_format: nil, generate_ringback_tone: nil, isup_headers_enabled: nil, prack_enabled: nil, shaken_stir_enabled: nil, simultaneous_ringing: nil, sip_compact_headers_enabled: nil, sip_region: nil, sip_subdomain: nil, sip_subdomain_receive_settings: nil, timeout_1xx_secs: nil, timeout_2xx_secs: nil)
|
|
106
113
|
# Some parameter documentations has been truncated, see
|
|
107
114
|
# {Telnyx::Models::UacInbound} for more details.
|
|
108
115
|
#
|
|
@@ -128,6 +135,8 @@ module Telnyx
|
|
|
128
135
|
#
|
|
129
136
|
# @param sip_compact_headers_enabled [Boolean] Defaults to true.
|
|
130
137
|
#
|
|
138
|
+
# @param sip_region [Symbol, Telnyx::Models::UacInbound::SipRegion] Selects which `sip_region` to receive inbound calls from. If null, the default r
|
|
139
|
+
#
|
|
131
140
|
# @param sip_subdomain [String] The Telnyx-generated SIP subdomain for this UAC connection.
|
|
132
141
|
#
|
|
133
142
|
# @param sip_subdomain_receive_settings [Symbol, Telnyx::Models::UacInbound::SipSubdomainReceiveSettings] Controls which SIP URI callers may reach this connection.
|
|
@@ -193,6 +202,21 @@ module Telnyx
|
|
|
193
202
|
# @return [Array<Symbol>]
|
|
194
203
|
end
|
|
195
204
|
|
|
205
|
+
# Selects which `sip_region` to receive inbound calls from. If null, the default
|
|
206
|
+
# region (US) will be used.
|
|
207
|
+
#
|
|
208
|
+
# @see Telnyx::Models::UacInbound#sip_region
|
|
209
|
+
module SipRegion
|
|
210
|
+
extend Telnyx::Internal::Type::Enum
|
|
211
|
+
|
|
212
|
+
US = :US
|
|
213
|
+
EUROPE = :Europe
|
|
214
|
+
AUSTRALIA = :Australia
|
|
215
|
+
|
|
216
|
+
# @!method self.values
|
|
217
|
+
# @return [Array<Symbol>]
|
|
218
|
+
end
|
|
219
|
+
|
|
196
220
|
# Controls which SIP URI callers may reach this connection.
|
|
197
221
|
#
|
|
198
222
|
# @see Telnyx::Models::UacInbound#sip_subdomain_receive_settings
|
|
@@ -78,6 +78,13 @@ module Telnyx
|
|
|
78
78
|
# @return [Boolean, nil]
|
|
79
79
|
optional :sip_compact_headers_enabled, Telnyx::Internal::Type::Boolean
|
|
80
80
|
|
|
81
|
+
# @!attribute sip_region
|
|
82
|
+
# Selects which `sip_region` to receive inbound calls from. If null, the default
|
|
83
|
+
# region (US) will be used.
|
|
84
|
+
#
|
|
85
|
+
# @return [Symbol, Telnyx::Models::UacInboundRequest::SipRegion, nil]
|
|
86
|
+
optional :sip_region, enum: -> { Telnyx::UacInboundRequest::SipRegion }
|
|
87
|
+
|
|
81
88
|
# @!attribute timeout_1xx_secs
|
|
82
89
|
# Time(sec) before aborting if connection is not made.
|
|
83
90
|
#
|
|
@@ -90,7 +97,7 @@ module Telnyx
|
|
|
90
97
|
# @return [Integer, nil]
|
|
91
98
|
optional :timeout_2xx_secs, Integer
|
|
92
99
|
|
|
93
|
-
# @!method initialize(ani_number_format: nil, channel_limit: nil, codecs: nil, default_routing_method: nil, dnis_number_format: nil, generate_ringback_tone: nil, isup_headers_enabled: nil, prack_enabled: nil, shaken_stir_enabled: nil, simultaneous_ringing: nil, sip_compact_headers_enabled: nil, timeout_1xx_secs: nil, timeout_2xx_secs: nil)
|
|
100
|
+
# @!method initialize(ani_number_format: nil, channel_limit: nil, codecs: nil, default_routing_method: nil, dnis_number_format: nil, generate_ringback_tone: nil, isup_headers_enabled: nil, prack_enabled: nil, shaken_stir_enabled: nil, simultaneous_ringing: nil, sip_compact_headers_enabled: nil, sip_region: nil, timeout_1xx_secs: nil, timeout_2xx_secs: nil)
|
|
94
101
|
# Some parameter documentations has been truncated, see
|
|
95
102
|
# {Telnyx::Models::UacInboundRequest} for more details.
|
|
96
103
|
#
|
|
@@ -120,6 +127,8 @@ module Telnyx
|
|
|
120
127
|
#
|
|
121
128
|
# @param sip_compact_headers_enabled [Boolean] Defaults to true.
|
|
122
129
|
#
|
|
130
|
+
# @param sip_region [Symbol, Telnyx::Models::UacInboundRequest::SipRegion] Selects which `sip_region` to receive inbound calls from. If null, the default r
|
|
131
|
+
#
|
|
123
132
|
# @param timeout_1xx_secs [Integer] Time(sec) before aborting if connection is not made.
|
|
124
133
|
#
|
|
125
134
|
# @param timeout_2xx_secs [Integer] Time(sec) before aborting if call is unanswered (min: 1, max: 600).
|
|
@@ -180,6 +189,21 @@ module Telnyx
|
|
|
180
189
|
# @!method self.values
|
|
181
190
|
# @return [Array<Symbol>]
|
|
182
191
|
end
|
|
192
|
+
|
|
193
|
+
# Selects which `sip_region` to receive inbound calls from. If null, the default
|
|
194
|
+
# region (US) will be used.
|
|
195
|
+
#
|
|
196
|
+
# @see Telnyx::Models::UacInboundRequest#sip_region
|
|
197
|
+
module SipRegion
|
|
198
|
+
extend Telnyx::Internal::Type::Enum
|
|
199
|
+
|
|
200
|
+
US = :US
|
|
201
|
+
EUROPE = :Europe
|
|
202
|
+
AUSTRALIA = :Australia
|
|
203
|
+
|
|
204
|
+
# @!method self.values
|
|
205
|
+
# @return [Array<Symbol>]
|
|
206
|
+
end
|
|
183
207
|
end
|
|
184
208
|
end
|
|
185
209
|
end
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Telnyx
|
|
4
|
+
module Models
|
|
5
|
+
module Whatsapp
|
|
6
|
+
# @see Telnyx::Resources::Whatsapp::PhoneNumbers#retrieve_conversation_window
|
|
7
|
+
class PhoneNumberRetrieveConversationWindowParams < Telnyx::Internal::Type::BaseModel
|
|
8
|
+
extend Telnyx::Internal::Type::RequestParameters::Converter
|
|
9
|
+
include Telnyx::Internal::Type::RequestParameters
|
|
10
|
+
|
|
11
|
+
# @!attribute phone_number
|
|
12
|
+
#
|
|
13
|
+
# @return [String]
|
|
14
|
+
required :phone_number, String
|
|
15
|
+
|
|
16
|
+
# @!attribute destination_number
|
|
17
|
+
# Destination phone number in E.164 format
|
|
18
|
+
#
|
|
19
|
+
# @return [String]
|
|
20
|
+
required :destination_number, String
|
|
21
|
+
|
|
22
|
+
# @!method initialize(phone_number:, destination_number:, request_options: {})
|
|
23
|
+
# @param phone_number [String]
|
|
24
|
+
#
|
|
25
|
+
# @param destination_number [String] Destination phone number in E.164 format
|
|
26
|
+
#
|
|
27
|
+
# @param request_options [Telnyx::RequestOptions, Hash{Symbol=>Object}]
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
end
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Telnyx
|
|
4
|
+
module Models
|
|
5
|
+
module Whatsapp
|
|
6
|
+
# @see Telnyx::Resources::Whatsapp::PhoneNumbers#retrieve_conversation_window
|
|
7
|
+
class PhoneNumberRetrieveConversationWindowResponse < Telnyx::Internal::Type::BaseModel
|
|
8
|
+
# @!attribute data
|
|
9
|
+
#
|
|
10
|
+
# @return [Telnyx::Models::Whatsapp::PhoneNumberRetrieveConversationWindowResponse::Data, nil]
|
|
11
|
+
optional :data, -> { Telnyx::Models::Whatsapp::PhoneNumberRetrieveConversationWindowResponse::Data }
|
|
12
|
+
|
|
13
|
+
# @!method initialize(data: nil)
|
|
14
|
+
# @param data [Telnyx::Models::Whatsapp::PhoneNumberRetrieveConversationWindowResponse::Data]
|
|
15
|
+
|
|
16
|
+
# @see Telnyx::Models::Whatsapp::PhoneNumberRetrieveConversationWindowResponse#data
|
|
17
|
+
class Data < Telnyx::Internal::Type::BaseModel
|
|
18
|
+
# @!attribute last_user_message_at
|
|
19
|
+
# Timestamp of the last inbound message that opened the window
|
|
20
|
+
#
|
|
21
|
+
# @return [Time, nil]
|
|
22
|
+
optional :last_user_message_at, Time
|
|
23
|
+
|
|
24
|
+
# @!attribute window_active
|
|
25
|
+
# Whether the 24-hour conversation window is currently open
|
|
26
|
+
#
|
|
27
|
+
# @return [Boolean, nil]
|
|
28
|
+
optional :window_active, Telnyx::Internal::Type::Boolean
|
|
29
|
+
|
|
30
|
+
# @!attribute window_expires_at
|
|
31
|
+
# When the window closes. Null if no active window.
|
|
32
|
+
#
|
|
33
|
+
# @return [Time, nil]
|
|
34
|
+
optional :window_expires_at, Time
|
|
35
|
+
|
|
36
|
+
# @!attribute window_type
|
|
37
|
+
# Window type. Currently always 24h when present.
|
|
38
|
+
#
|
|
39
|
+
# @return [String, nil]
|
|
40
|
+
optional :window_type, String
|
|
41
|
+
|
|
42
|
+
# @!method initialize(last_user_message_at: nil, window_active: nil, window_expires_at: nil, window_type: nil)
|
|
43
|
+
# @param last_user_message_at [Time] Timestamp of the last inbound message that opened the window
|
|
44
|
+
#
|
|
45
|
+
# @param window_active [Boolean] Whether the 24-hour conversation window is currently open
|
|
46
|
+
#
|
|
47
|
+
# @param window_expires_at [Time] When the window closes. Null if no active window.
|
|
48
|
+
#
|
|
49
|
+
# @param window_type [String] Window type. Currently always 24h when present.
|
|
50
|
+
end
|
|
51
|
+
end
|
|
52
|
+
end
|
|
53
|
+
end
|
|
54
|
+
end
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Telnyx
|
|
4
|
+
module Resources
|
|
5
|
+
class Dir
|
|
6
|
+
# Submit and manage the two business references and one financial reference that
|
|
7
|
+
# vouch for a DIR. References are contacted to confirm the business identity
|
|
8
|
+
# during vetting.
|
|
9
|
+
class References
|
|
10
|
+
# Some parameter documentations has been truncated, see
|
|
11
|
+
# {Telnyx::Models::Dir::ReferenceCreateParams} for more details.
|
|
12
|
+
#
|
|
13
|
+
# Submit the two business references and one financial reference for a DIR.
|
|
14
|
+
#
|
|
15
|
+
# The DIR's authorizer email must be verified first (see the email-verification
|
|
16
|
+
# endpoint). Until it is, this returns `409` and no references are stored.
|
|
17
|
+
#
|
|
18
|
+
# The request body carries exactly two business references plus one financial
|
|
19
|
+
# reference. On success the references are stored and the response echoes them in
|
|
20
|
+
# the same shape as the GET. Submitting again converges on the already-stored
|
|
21
|
+
# references rather than erroring.
|
|
22
|
+
#
|
|
23
|
+
# @overload create(dir_id, business_references:, financial_reference:, request_options: {})
|
|
24
|
+
#
|
|
25
|
+
# @param dir_id [String] The DIR id. Lowercase UUID.
|
|
26
|
+
#
|
|
27
|
+
# @param business_references [Array<Telnyx::Models::Dir::ReferenceInput>] Exactly two business references.
|
|
28
|
+
#
|
|
29
|
+
# @param financial_reference [Telnyx::Models::Dir::ReferenceInput] One reference supplied at submit. The reference type is implied by the field tha
|
|
30
|
+
#
|
|
31
|
+
# @param request_options [Telnyx::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
32
|
+
#
|
|
33
|
+
# @return [Telnyx::Models::Dir::ReferenceList]
|
|
34
|
+
#
|
|
35
|
+
# @see Telnyx::Models::Dir::ReferenceCreateParams
|
|
36
|
+
def create(dir_id, params)
|
|
37
|
+
parsed, options = Telnyx::Dir::ReferenceCreateParams.dump_request(params)
|
|
38
|
+
@client.request(
|
|
39
|
+
method: :post,
|
|
40
|
+
path: ["dir/%1$s/references", dir_id],
|
|
41
|
+
body: parsed,
|
|
42
|
+
model: Telnyx::Dir::ReferenceList,
|
|
43
|
+
options: options
|
|
44
|
+
)
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
# Some parameter documentations has been truncated, see
|
|
48
|
+
# {Telnyx::Models::Dir::ReferenceUpdateParams} for more details.
|
|
49
|
+
#
|
|
50
|
+
# Partially update one reference, addressed by the DIR id plus the reference's
|
|
51
|
+
# type (business or financial) and slot.
|
|
52
|
+
#
|
|
53
|
+
# Cosmetic fields (full name, job title, organization, relationship, email) are
|
|
54
|
+
# always editable. The phone number and timezone may only be changed while a
|
|
55
|
+
# scheduled call has not yet been dialed; if a call is in progress or all attempts
|
|
56
|
+
# are complete, those fields are locked. Changing the timezone reschedules any
|
|
57
|
+
# pending call into the new local calling window.
|
|
58
|
+
#
|
|
59
|
+
# @overload update(slot, dir_id:, ref_type:, email: nil, full_name: nil, job_title: nil, organization: nil, phone_e164: nil, relationship_to_registrant: nil, timezone: nil, request_options: {})
|
|
60
|
+
#
|
|
61
|
+
# @param slot [Integer] Path param: Reference slot. Business references use slots 0 and 1; the financial
|
|
62
|
+
#
|
|
63
|
+
# @param dir_id [String] Path param: The DIR id. Lowercase UUID.
|
|
64
|
+
#
|
|
65
|
+
# @param ref_type [Symbol, Telnyx::Models::Dir::ReferenceUpdateParams::RefType] Path param: Reference type to address.
|
|
66
|
+
#
|
|
67
|
+
# @param email [String] Body param: Reference contact email address.
|
|
68
|
+
#
|
|
69
|
+
# @param full_name [String] Body param: Full name of the reference contact.
|
|
70
|
+
#
|
|
71
|
+
# @param job_title [String, nil] Body param: Job title of the reference contact.
|
|
72
|
+
#
|
|
73
|
+
# @param organization [String, nil] Body param: Organization the reference contact belongs to.
|
|
74
|
+
#
|
|
75
|
+
# @param phone_e164 [String] Body param: Reference phone number in E.164 format.
|
|
76
|
+
#
|
|
77
|
+
# @param relationship_to_registrant [String, nil] Body param: How the reference contact is related to the registering business.
|
|
78
|
+
#
|
|
79
|
+
# @param timezone [String] Body param: IANA timezone id for the reference.
|
|
80
|
+
#
|
|
81
|
+
# @param request_options [Telnyx::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
82
|
+
#
|
|
83
|
+
# @return [Telnyx::Models::Dir::ReferenceUpdateResponse]
|
|
84
|
+
#
|
|
85
|
+
# @see Telnyx::Models::Dir::ReferenceUpdateParams
|
|
86
|
+
def update(slot, params)
|
|
87
|
+
parsed, options = Telnyx::Dir::ReferenceUpdateParams.dump_request(params)
|
|
88
|
+
dir_id =
|
|
89
|
+
parsed.delete(:dir_id) do
|
|
90
|
+
raise ArgumentError.new("missing required path argument #{_1}")
|
|
91
|
+
end
|
|
92
|
+
ref_type =
|
|
93
|
+
parsed.delete(:ref_type) do
|
|
94
|
+
raise ArgumentError.new("missing required path argument #{_1}")
|
|
95
|
+
end
|
|
96
|
+
@client.request(
|
|
97
|
+
method: :patch,
|
|
98
|
+
path: ["dir/%1$s/references/%2$s/%3$s", dir_id, ref_type, slot],
|
|
99
|
+
body: parsed,
|
|
100
|
+
model: Telnyx::Models::Dir::ReferenceUpdateResponse,
|
|
101
|
+
options: options
|
|
102
|
+
)
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
# List the business and financial references submitted for a DIR.
|
|
106
|
+
#
|
|
107
|
+
# Returns the two business references (slots 0 and 1) followed by the single
|
|
108
|
+
# financial reference. Each entry carries only the customer-supplied details
|
|
109
|
+
# (name, title, organization, relationship, phone, email, timezone). Returns an
|
|
110
|
+
# empty list when no references were submitted.
|
|
111
|
+
#
|
|
112
|
+
# @overload list(dir_id, request_options: {})
|
|
113
|
+
#
|
|
114
|
+
# @param dir_id [String] The DIR id. Lowercase UUID.
|
|
115
|
+
#
|
|
116
|
+
# @param request_options [Telnyx::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
117
|
+
#
|
|
118
|
+
# @return [Telnyx::Models::Dir::ReferenceList]
|
|
119
|
+
#
|
|
120
|
+
# @see Telnyx::Models::Dir::ReferenceListParams
|
|
121
|
+
def list(dir_id, params = {})
|
|
122
|
+
@client.request(
|
|
123
|
+
method: :get,
|
|
124
|
+
path: ["dir/%1$s/references", dir_id],
|
|
125
|
+
model: Telnyx::Dir::ReferenceList,
|
|
126
|
+
options: params[:request_options]
|
|
127
|
+
)
|
|
128
|
+
end
|
|
129
|
+
|
|
130
|
+
# @api private
|
|
131
|
+
#
|
|
132
|
+
# @param client [Telnyx::Client]
|
|
133
|
+
def initialize(client:)
|
|
134
|
+
@client = client
|
|
135
|
+
end
|
|
136
|
+
end
|
|
137
|
+
end
|
|
138
|
+
end
|
|
139
|
+
end
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Telnyx
|
|
4
|
+
module Resources
|
|
5
|
+
class Dir
|
|
6
|
+
# Verify ownership of a DIR's authorizer email. A short code is emailed and
|
|
7
|
+
# confirmed; the email must be verified before references can be submitted.
|
|
8
|
+
class VerifyEmail
|
|
9
|
+
# Email a 6-digit code to the DIR's authorizer email to confirm ownership of that
|
|
10
|
+
# address.
|
|
11
|
+
#
|
|
12
|
+
# The code expires in 15 minutes. Requesting a new code invalidates any previous
|
|
13
|
+
# one. Resends are rate limited (a short cooldown plus a daily cap). Submit the
|
|
14
|
+
# code to `POST /dir/{dir_id}/verify_email/confirm`.
|
|
15
|
+
#
|
|
16
|
+
# @overload create(dir_id, request_options: {})
|
|
17
|
+
#
|
|
18
|
+
# @param dir_id [String] The DIR id. Lowercase UUID.
|
|
19
|
+
#
|
|
20
|
+
# @param request_options [Telnyx::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
21
|
+
#
|
|
22
|
+
# @return [Telnyx::Models::Dir::EmailVerificationStatusWrapped]
|
|
23
|
+
#
|
|
24
|
+
# @see Telnyx::Models::Dir::VerifyEmailCreateParams
|
|
25
|
+
def create(dir_id, params = {})
|
|
26
|
+
@client.request(
|
|
27
|
+
method: :post,
|
|
28
|
+
path: ["dir/%1$s/verify_email", dir_id],
|
|
29
|
+
model: Telnyx::Dir::EmailVerificationStatusWrapped,
|
|
30
|
+
options: params[:request_options]
|
|
31
|
+
)
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
# Whether the DIR's current authorizer email has been verified.
|
|
35
|
+
#
|
|
36
|
+
# @overload list(dir_id, request_options: {})
|
|
37
|
+
#
|
|
38
|
+
# @param dir_id [String] The DIR id. Lowercase UUID.
|
|
39
|
+
#
|
|
40
|
+
# @param request_options [Telnyx::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
41
|
+
#
|
|
42
|
+
# @return [Telnyx::Models::Dir::EmailVerificationStatusWrapped]
|
|
43
|
+
#
|
|
44
|
+
# @see Telnyx::Models::Dir::VerifyEmailListParams
|
|
45
|
+
def list(dir_id, params = {})
|
|
46
|
+
@client.request(
|
|
47
|
+
method: :get,
|
|
48
|
+
path: ["dir/%1$s/verify_email", dir_id],
|
|
49
|
+
model: Telnyx::Dir::EmailVerificationStatusWrapped,
|
|
50
|
+
options: params[:request_options]
|
|
51
|
+
)
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
# Submit the 6-digit code that was emailed to the DIR's authorizer email. On
|
|
55
|
+
# success the authorizer email is marked verified.
|
|
56
|
+
#
|
|
57
|
+
# For security, any failure (wrong, expired, already-used, or too many attempts)
|
|
58
|
+
# returns the same generic message.
|
|
59
|
+
#
|
|
60
|
+
# @overload confirm(dir_id, code:, request_options: {})
|
|
61
|
+
#
|
|
62
|
+
# @param dir_id [String] The DIR id. Lowercase UUID.
|
|
63
|
+
#
|
|
64
|
+
# @param code [String] The 6-digit code sent to the authorizer email.
|
|
65
|
+
#
|
|
66
|
+
# @param request_options [Telnyx::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
67
|
+
#
|
|
68
|
+
# @return [Telnyx::Models::Dir::EmailVerificationStatusWrapped]
|
|
69
|
+
#
|
|
70
|
+
# @see Telnyx::Models::Dir::VerifyEmailConfirmParams
|
|
71
|
+
def confirm(dir_id, params)
|
|
72
|
+
parsed, options = Telnyx::Dir::VerifyEmailConfirmParams.dump_request(params)
|
|
73
|
+
@client.request(
|
|
74
|
+
method: :post,
|
|
75
|
+
path: ["dir/%1$s/verify_email/confirm", dir_id],
|
|
76
|
+
body: parsed,
|
|
77
|
+
model: Telnyx::Dir::EmailVerificationStatusWrapped,
|
|
78
|
+
options: options
|
|
79
|
+
)
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
# @api private
|
|
83
|
+
#
|
|
84
|
+
# @param client [Telnyx::Client]
|
|
85
|
+
def initialize(client:)
|
|
86
|
+
@client = client
|
|
87
|
+
end
|
|
88
|
+
end
|
|
89
|
+
end
|
|
90
|
+
end
|
|
91
|
+
end
|
data/lib/telnyx/resources/dir.rb
CHANGED
|
@@ -18,6 +18,17 @@ module Telnyx
|
|
|
18
18
|
# @return [Telnyx::Resources::Dir::PhoneNumbers]
|
|
19
19
|
attr_reader :phone_numbers
|
|
20
20
|
|
|
21
|
+
# Submit and manage the two business references and one financial reference that
|
|
22
|
+
# vouch for a DIR. References are contacted to confirm the business identity
|
|
23
|
+
# during vetting.
|
|
24
|
+
# @return [Telnyx::Resources::Dir::References]
|
|
25
|
+
attr_reader :references
|
|
26
|
+
|
|
27
|
+
# Verify ownership of a DIR's authorizer email. A short code is emailed and
|
|
28
|
+
# confirmed; the email must be verified before references can be submitted.
|
|
29
|
+
# @return [Telnyx::Resources::Dir::VerifyEmail]
|
|
30
|
+
attr_reader :verify_email
|
|
31
|
+
|
|
21
32
|
# Returns a single DIR by id. The enterprise is resolved server-side from the DIR
|
|
22
33
|
# id. Returns `404` if the DIR does not exist or is not yours.
|
|
23
34
|
#
|
|
@@ -298,6 +309,9 @@ module Telnyx
|
|
|
298
309
|
)
|
|
299
310
|
end
|
|
300
311
|
|
|
312
|
+
# Some parameter documentations has been truncated, see
|
|
313
|
+
# {Telnyx::Models::DirUpdateInfringementParams} for more details.
|
|
314
|
+
#
|
|
301
315
|
# Push a fix for a DIR that is `suspended` with an open infringement claim back
|
|
302
316
|
# into vetting. `POST /dir/{dir_id}/submit` is blocked while a claim is open, so
|
|
303
317
|
# this is the customer-callable path to update the DIR's content and re-certify
|
|
@@ -323,7 +337,7 @@ module Telnyx
|
|
|
323
337
|
#
|
|
324
338
|
# @param display_name [String, nil]
|
|
325
339
|
#
|
|
326
|
-
# @param documents [Array<Telnyx::Models::Document>, nil] Append-only supporting documents.
|
|
340
|
+
# @param documents [Array<Telnyx::Models::Document>, nil] Append-only supporting documents to attach while resolving the claim (e.g. autho
|
|
327
341
|
#
|
|
328
342
|
# @param logo_url [String, nil] Publicly accessible HTTPS URL (max 128 chars) to a 256x256 BMP logo (max 1 MB).
|
|
329
343
|
#
|
|
@@ -351,6 +365,8 @@ module Telnyx
|
|
|
351
365
|
@comments = Telnyx::Resources::Dir::Comments.new(client: client)
|
|
352
366
|
@phone_number_batches = Telnyx::Resources::Dir::PhoneNumberBatches.new(client: client)
|
|
353
367
|
@phone_numbers = Telnyx::Resources::Dir::PhoneNumbers.new(client: client)
|
|
368
|
+
@references = Telnyx::Resources::Dir::References.new(client: client)
|
|
369
|
+
@verify_email = Telnyx::Resources::Dir::VerifyEmail.new(client: client)
|
|
354
370
|
end
|
|
355
371
|
end
|
|
356
372
|
end
|
|
@@ -35,7 +35,7 @@ module Telnyx
|
|
|
35
35
|
# `POST /enterprises/{id}/branded_calling`).
|
|
36
36
|
# - `404` - enterprise does not exist or does not belong to your account.
|
|
37
37
|
#
|
|
38
|
-
# @overload create(enterprise_id, authorizer_email:, authorizer_name:, certify_brand_is_accurate:, certify_ip_ownership:, certify_no_shaft_content:, display_name:,
|
|
38
|
+
# @overload create(enterprise_id, authorizer_email:, authorizer_name:, call_reasons:, certify_brand_is_accurate:, certify_ip_ownership:, certify_no_shaft_content:, display_name:, documents: nil, logo_url: nil, reselling: nil, request_options: {})
|
|
39
39
|
#
|
|
40
40
|
# @param enterprise_id [String] The enterprise id. Lowercase UUID.
|
|
41
41
|
#
|
|
@@ -43,6 +43,8 @@ module Telnyx
|
|
|
43
43
|
#
|
|
44
44
|
# @param authorizer_name [String] Name of the person at your enterprise who is authorizing this DIR registration.
|
|
45
45
|
#
|
|
46
|
+
# @param call_reasons [Array<String>] 1–10 reasons your business calls customers. Validate phrasing against `POST /cal
|
|
47
|
+
#
|
|
46
48
|
# @param certify_brand_is_accurate [Boolean, Telnyx::Models::Enterprises::DirCreateParams::CertifyBrandIsAccurate] Must be `true`.
|
|
47
49
|
#
|
|
48
50
|
# @param certify_ip_ownership [Boolean, Telnyx::Models::Enterprises::DirCreateParams::CertifyIPOwnership] Must be `true`. Confirms ownership of any logos/trademarks shown.
|
|
@@ -51,8 +53,6 @@ module Telnyx
|
|
|
51
53
|
#
|
|
52
54
|
# @param display_name [String] Name shown to call recipients. No emoji; not whitespace-only.
|
|
53
55
|
#
|
|
54
|
-
# @param call_reasons [Array<String>] 1–10 reasons your business calls customers. Validate phrasing against `POST /cal
|
|
55
|
-
#
|
|
56
56
|
# @param documents [Array<Telnyx::Models::Document>] Supporting documents. Each `document_id` may appear at most once on a DIR.
|
|
57
57
|
#
|
|
58
58
|
# @param logo_url [String] Publicly accessible HTTPS URL (max 128 chars) to a 256x256 BMP logo (max 1 MB).
|