telnyx 5.150.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -531
- data/README.md +10 -1
- 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/ai_retrieve_conversation_histories_params.rb +22 -48
- data/lib/telnyx/models/ai_retrieve_conversation_histories_response.rb +10 -50
- data/lib/telnyx/models/calls/deepgram_nova2_config.rb +23 -1
- data/lib/telnyx/models/calls/deepgram_nova3_config.rb +22 -1
- data/lib/telnyx/models/calls/transcription_start_request.rb +5 -3
- 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/{phone_number_delete_all_params.rb → reference_list_params.rb} +3 -9
- 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/public_internet_gateway.rb +24 -1
- 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 +82 -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/texml/accounts/call_calls_params.rb +9 -69
- data/lib/telnyx/models/virtual_cross_connect_create.rb +176 -2
- 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/models/wireguard_interface.rb +24 -1
- data/lib/telnyx/resources/ai.rb +20 -21
- data/lib/telnyx/resources/calls/actions.rb +1 -1
- 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 +154 -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/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/ai_retrieve_conversation_histories_params.rbi +30 -97
- data/rbi/telnyx/models/ai_retrieve_conversation_histories_response.rbi +10 -85
- data/rbi/telnyx/models/calls/deepgram_nova2_config.rbi +34 -0
- data/rbi/telnyx/models/calls/deepgram_nova3_config.rbi +32 -0
- data/rbi/telnyx/models/calls/transcription_start_request.rbi +5 -0
- 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/{phone_number_delete_all_params.rbi → verify_email_confirm_params.rbi} +13 -7
- 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/public_internet_gateway.rbi +45 -3
- 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 +179 -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/texml/accounts/call_calls_params.rbi +12 -189
- data/rbi/telnyx/models/virtual_cross_connect_create.rbi +265 -7
- 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_interface.rbi +48 -3
- data/rbi/telnyx/models/wireguard_peer_retrieve_config_response.rbi +1 -1
- data/rbi/telnyx/models.rbi +0 -7
- data/rbi/telnyx/resources/ai.rbi +21 -28
- data/rbi/telnyx/resources/calls/actions.rbi +1 -0
- 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 +115 -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/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/ai_retrieve_conversation_histories_params.rbs +15 -34
- data/sig/telnyx/models/ai_retrieve_conversation_histories_response.rbs +0 -24
- data/sig/telnyx/models/calls/deepgram_nova2_config.rbs +14 -0
- data/sig/telnyx/models/calls/deepgram_nova3_config.rbs +14 -0
- data/sig/telnyx/models/calls/transcription_start_request.rbs +1 -0
- 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/{phone_number_delete_all_params.rbs → verify_email_confirm_params.rbs} +6 -6
- 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/public_internet_gateway.rbs +32 -3
- 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 +88 -0
- data/sig/telnyx/models/{enterprises/reputation/loa_patch_all_params.rbs → storage/kvs/key_retrieve_params.rbs} +11 -11
- data/sig/telnyx/models/storage/kvs/key_update_params.rbs +47 -0
- data/sig/telnyx/models/texml/accounts/call_calls_params.rbs +15 -63
- data/sig/telnyx/models/virtual_cross_connect_create.rbs +138 -7
- 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/models/wireguard_interface.rbs +34 -3
- data/sig/telnyx/models.rbs +0 -1
- data/sig/telnyx/resources/ai.rbs +2 -3
- 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 +86 -38
- data/lib/telnyx/models/dir/phone_number_create_params.rb +0 -47
- data/lib/telnyx/models/dir/phone_number_create_response.rb +0 -32
- data/lib/telnyx/models/dir/phone_number_delete_all_response.rb +0 -103
- data/lib/telnyx/models/dir_loa_params.rb +0 -79
- data/lib/telnyx/models/dir_retrieve_document_types_params.rb +0 -14
- data/lib/telnyx/models/dir_retrieve_document_types_response.rb +0 -51
- data/lib/telnyx/models/dir_retrieve_infringement_claims_params.rb +0 -40
- data/lib/telnyx/models/dir_retrieve_infringement_claims_response.rb +0 -30
- data/lib/telnyx/models/dir_update_infringement_update_params.rb +0 -134
- data/lib/telnyx/models/enterprises/reputation/loa_create_params.rb +0 -146
- data/lib/telnyx/models/enterprises/reputation/loa_patch_all_params.rb +0 -38
- data/rbi/telnyx/models/dir/phone_number_create_params.rbi +0 -72
- data/rbi/telnyx/models/dir/phone_number_create_response.rbi +0 -48
- data/rbi/telnyx/models/dir/phone_number_delete_all_response.rbi +0 -206
- data/rbi/telnyx/models/dir_loa_params.rbi +0 -120
- data/rbi/telnyx/models/dir_retrieve_document_types_params.rbi +0 -30
- data/rbi/telnyx/models/dir_retrieve_document_types_response.rbi +0 -103
- data/rbi/telnyx/models/dir_retrieve_infringement_claims_params.rbi +0 -66
- data/rbi/telnyx/models/dir_retrieve_infringement_claims_response.rbi +0 -55
- data/rbi/telnyx/models/dir_update_infringement_update_params.rbi +0 -256
- data/rbi/telnyx/models/enterprises/reputation/loa_create_params.rbi +0 -238
- data/rbi/telnyx/models/enterprises/reputation/loa_patch_all_params.rbi +0 -60
- data/sig/telnyx/models/dir/phone_number_create_params.rbs +0 -38
- data/sig/telnyx/models/dir/phone_number_create_response.rbs +0 -16
- data/sig/telnyx/models/dir/phone_number_delete_all_response.rbs +0 -86
- data/sig/telnyx/models/dir_loa_params.rbs +0 -61
- data/sig/telnyx/models/dir_retrieve_document_types_params.rbs +0 -15
- data/sig/telnyx/models/dir_retrieve_document_types_response.rbs +0 -41
- data/sig/telnyx/models/dir_retrieve_infringement_claims_params.rbs +0 -36
- data/sig/telnyx/models/dir_retrieve_infringement_claims_response.rbs +0 -25
- data/sig/telnyx/models/dir_update_infringement_update_params.rbs +0 -111
- data/sig/telnyx/models/enterprises/reputation/loa_create_params.rbs +0 -135
|
@@ -3,18 +3,192 @@
|
|
|
3
3
|
module Telnyx
|
|
4
4
|
module Models
|
|
5
5
|
class VirtualCrossConnectCreate < Telnyx::Models::Record
|
|
6
|
-
# @!
|
|
6
|
+
# @!attribute name
|
|
7
|
+
# A user specified name for the interface.
|
|
8
|
+
#
|
|
9
|
+
# @return [String, nil]
|
|
10
|
+
optional :name, String
|
|
11
|
+
|
|
12
|
+
# @!attribute network_id
|
|
13
|
+
# The id of the network associated with the interface.
|
|
14
|
+
#
|
|
15
|
+
# @return [String, nil]
|
|
16
|
+
optional :network_id, String
|
|
17
|
+
|
|
18
|
+
# @!attribute region_code
|
|
19
|
+
# The region the interface should be deployed to.
|
|
20
|
+
#
|
|
21
|
+
# @return [String]
|
|
22
|
+
required :region_code, String
|
|
23
|
+
|
|
24
|
+
# @!attribute bandwidth_mbps
|
|
25
|
+
# The desired throughput in Megabits per Second (Mbps) for your Virtual Cross
|
|
26
|
+
# Connect.<br /><br />The available bandwidths can be found using the
|
|
27
|
+
# /virtual_cross_connect_regions endpoint.
|
|
28
|
+
#
|
|
29
|
+
# @return [Float, nil]
|
|
30
|
+
optional :bandwidth_mbps, Float
|
|
31
|
+
|
|
32
|
+
# @!attribute bgp_asn
|
|
33
|
+
# The Border Gateway Protocol (BGP) Autonomous System Number (ASN). If null, value
|
|
34
|
+
# will be assigned by Telnyx.
|
|
35
|
+
#
|
|
36
|
+
# @return [Float, nil]
|
|
37
|
+
optional :bgp_asn, Float
|
|
38
|
+
|
|
39
|
+
# @!attribute cloud_provider
|
|
40
|
+
# The Virtual Private Cloud with which you would like to establish a cross
|
|
41
|
+
# connect.
|
|
42
|
+
#
|
|
43
|
+
# @return [Symbol, Telnyx::Models::VirtualCrossConnectCreate::CloudProvider, nil]
|
|
44
|
+
optional :cloud_provider, enum: -> { Telnyx::VirtualCrossConnectCreate::CloudProvider }
|
|
45
|
+
|
|
46
|
+
# @!attribute cloud_provider_region
|
|
47
|
+
# The region where your Virtual Private Cloud hosts are located.<br /><br />The
|
|
48
|
+
# available regions can be found using the /virtual_cross_connect_regions
|
|
49
|
+
# endpoint.
|
|
50
|
+
#
|
|
51
|
+
# @return [String, nil]
|
|
52
|
+
optional :cloud_provider_region, String
|
|
53
|
+
|
|
54
|
+
# @!attribute primary_bgp_key
|
|
55
|
+
# The authentication key for BGP peer configuration.
|
|
56
|
+
#
|
|
57
|
+
# @return [String, nil]
|
|
58
|
+
optional :primary_bgp_key, String
|
|
59
|
+
|
|
60
|
+
# @!attribute primary_cloud_account_id
|
|
61
|
+
# The identifier for your Virtual Private Cloud. The number will be different
|
|
62
|
+
# based upon your Cloud provider.
|
|
63
|
+
#
|
|
64
|
+
# @return [String, nil]
|
|
65
|
+
optional :primary_cloud_account_id, String
|
|
66
|
+
|
|
67
|
+
# @!attribute primary_cloud_ip
|
|
68
|
+
# The IP address assigned for your side of the Virtual Cross
|
|
69
|
+
# Connect.<br /><br />If none is provided, one will be generated for
|
|
70
|
+
# you.<br /><br />This value should be null for GCE as Google will only inform you
|
|
71
|
+
# of your assigned IP once the connection has been accepted.
|
|
72
|
+
#
|
|
73
|
+
# @return [String, nil]
|
|
74
|
+
optional :primary_cloud_ip, String
|
|
75
|
+
|
|
76
|
+
# @!attribute primary_telnyx_ip
|
|
77
|
+
# The IP address assigned to the Telnyx side of the Virtual Cross
|
|
78
|
+
# Connect.<br /><br />If none is provided, one will be generated for
|
|
79
|
+
# you.<br /><br />This value should be null for GCE as Google will only inform you
|
|
80
|
+
# of your assigned IP once the connection has been accepted.
|
|
81
|
+
#
|
|
82
|
+
# @return [String, nil]
|
|
83
|
+
optional :primary_telnyx_ip, String
|
|
84
|
+
|
|
85
|
+
# @!attribute secondary_bgp_key
|
|
86
|
+
# The authentication key for BGP peer configuration.
|
|
87
|
+
#
|
|
88
|
+
# @return [String, nil]
|
|
89
|
+
optional :secondary_bgp_key, String
|
|
90
|
+
|
|
91
|
+
# @!attribute secondary_cloud_account_id
|
|
92
|
+
# The identifier for your Virtual Private Cloud. The number will be different
|
|
93
|
+
# based upon your Cloud provider.<br /><br />This attribute is only necessary for
|
|
94
|
+
# GCE.
|
|
95
|
+
#
|
|
96
|
+
# @return [String, nil]
|
|
97
|
+
optional :secondary_cloud_account_id, String
|
|
98
|
+
|
|
99
|
+
# @!attribute secondary_cloud_ip
|
|
100
|
+
# The IP address assigned for your side of the Virtual Cross
|
|
101
|
+
# Connect.<br /><br />If none is provided, one will be generated for
|
|
102
|
+
# you.<br /><br />This value should be null for GCE as Google will only inform you
|
|
103
|
+
# of your assigned IP once the connection has been accepted.
|
|
104
|
+
#
|
|
105
|
+
# @return [String, nil]
|
|
106
|
+
optional :secondary_cloud_ip, String
|
|
107
|
+
|
|
108
|
+
# @!attribute secondary_telnyx_ip
|
|
109
|
+
# The IP address assigned to the Telnyx side of the Virtual Cross
|
|
110
|
+
# Connect.<br /><br />If none is provided, one will be generated for
|
|
111
|
+
# you.<br /><br />This value should be null for GCE as Google will only inform you
|
|
112
|
+
# of your assigned IP once the connection has been accepted.
|
|
113
|
+
#
|
|
114
|
+
# @return [String, nil]
|
|
115
|
+
optional :secondary_telnyx_ip, String
|
|
116
|
+
|
|
117
|
+
response_only do
|
|
118
|
+
# @!attribute status
|
|
119
|
+
# The current status of the interface deployment.
|
|
120
|
+
#
|
|
121
|
+
# @return [Symbol, Telnyx::Models::InterfaceStatus, nil]
|
|
122
|
+
optional :status, enum: -> { Telnyx::InterfaceStatus }
|
|
123
|
+
|
|
124
|
+
# @!attribute primary_enabled
|
|
125
|
+
# Indicates whether the primary circuit is enabled. Setting this to `false` will
|
|
126
|
+
# disable the circuit.
|
|
127
|
+
#
|
|
128
|
+
# @return [Boolean, nil]
|
|
129
|
+
optional :primary_enabled, Telnyx::Internal::Type::Boolean
|
|
130
|
+
|
|
131
|
+
# @!attribute secondary_enabled
|
|
132
|
+
# Indicates whether the secondary circuit is enabled. Setting this to `false` will
|
|
133
|
+
# disable the circuit.
|
|
134
|
+
#
|
|
135
|
+
# @return [Boolean, nil]
|
|
136
|
+
optional :secondary_enabled, Telnyx::Internal::Type::Boolean
|
|
137
|
+
end
|
|
138
|
+
|
|
139
|
+
# @!method initialize(region_code:, name: nil, network_id: nil, status: nil, bandwidth_mbps: nil, bgp_asn: nil, cloud_provider: nil, cloud_provider_region: nil, primary_bgp_key: nil, primary_cloud_account_id: nil, primary_cloud_ip: nil, primary_enabled: nil, primary_telnyx_ip: nil, secondary_bgp_key: nil, secondary_cloud_account_id: nil, secondary_cloud_ip: nil, secondary_enabled: nil, secondary_telnyx_ip: nil)
|
|
140
|
+
# Some parameter documentations has been truncated, see
|
|
141
|
+
# {Telnyx::Models::VirtualCrossConnectCreate} for more details.
|
|
142
|
+
#
|
|
143
|
+
# @param region_code [String] The region the interface should be deployed to.
|
|
144
|
+
#
|
|
145
|
+
# @param name [String] A user specified name for the interface.
|
|
146
|
+
#
|
|
147
|
+
# @param network_id [String] The id of the network associated with the interface.
|
|
148
|
+
#
|
|
149
|
+
# @param status [Symbol, Telnyx::Models::InterfaceStatus] The current status of the interface deployment.
|
|
150
|
+
#
|
|
151
|
+
# @param bandwidth_mbps [Float] The desired throughput in Megabits per Second (Mbps) for your Virtual Cross Conn
|
|
152
|
+
#
|
|
153
|
+
# @param bgp_asn [Float] The Border Gateway Protocol (BGP) Autonomous System Number (ASN). If null, value
|
|
154
|
+
#
|
|
155
|
+
# @param cloud_provider [Symbol, Telnyx::Models::VirtualCrossConnectCreate::CloudProvider] The Virtual Private Cloud with which you would like to establish a cross connect
|
|
156
|
+
#
|
|
157
|
+
# @param cloud_provider_region [String] The region where your Virtual Private Cloud hosts are located.<br /><br />The av
|
|
158
|
+
#
|
|
159
|
+
# @param primary_bgp_key [String] The authentication key for BGP peer configuration.
|
|
160
|
+
#
|
|
161
|
+
# @param primary_cloud_account_id [String] The identifier for your Virtual Private Cloud. The number will be different base
|
|
162
|
+
#
|
|
163
|
+
# @param primary_cloud_ip [String] The IP address assigned for your side of the Virtual Cross Connect.<br /><br />I
|
|
164
|
+
#
|
|
165
|
+
# @param primary_enabled [Boolean] Indicates whether the primary circuit is enabled. Setting this to `false` will d
|
|
166
|
+
#
|
|
167
|
+
# @param primary_telnyx_ip [String] The IP address assigned to the Telnyx side of the Virtual Cross Connect.<br /><b
|
|
168
|
+
#
|
|
169
|
+
# @param secondary_bgp_key [String] The authentication key for BGP peer configuration.
|
|
170
|
+
#
|
|
171
|
+
# @param secondary_cloud_account_id [String] The identifier for your Virtual Private Cloud. The number will be different base
|
|
172
|
+
#
|
|
173
|
+
# @param secondary_cloud_ip [String] The IP address assigned for your side of the Virtual Cross Connect.<br /><br />I
|
|
174
|
+
#
|
|
175
|
+
# @param secondary_enabled [Boolean] Indicates whether the secondary circuit is enabled. Setting this to `false` will
|
|
176
|
+
#
|
|
177
|
+
# @param secondary_telnyx_ip [String] The IP address assigned to the Telnyx side of the Virtual Cross Connect.<br /><b
|
|
7
178
|
|
|
8
179
|
# The Virtual Private Cloud with which you would like to establish a cross
|
|
9
180
|
# connect.
|
|
10
181
|
#
|
|
11
|
-
# @see Telnyx::Models::VirtualCrossConnectCreate
|
|
182
|
+
# @see Telnyx::Models::VirtualCrossConnectCreate#cloud_provider
|
|
12
183
|
module CloudProvider
|
|
13
184
|
extend Telnyx::Internal::Type::Enum
|
|
14
185
|
|
|
15
186
|
AWS = :aws
|
|
16
187
|
AZURE = :azure
|
|
17
188
|
GCE = :gce
|
|
189
|
+
|
|
190
|
+
# @!method self.values
|
|
191
|
+
# @return [Array<Symbol>]
|
|
18
192
|
end
|
|
19
193
|
end
|
|
20
194
|
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
|
|
@@ -3,7 +3,30 @@
|
|
|
3
3
|
module Telnyx
|
|
4
4
|
module Models
|
|
5
5
|
class WireguardInterface < Telnyx::Models::Record
|
|
6
|
-
# @!
|
|
6
|
+
# @!attribute name
|
|
7
|
+
# A user specified name for the interface.
|
|
8
|
+
#
|
|
9
|
+
# @return [String, nil]
|
|
10
|
+
optional :name, String
|
|
11
|
+
|
|
12
|
+
# @!attribute network_id
|
|
13
|
+
# The id of the network associated with the interface.
|
|
14
|
+
#
|
|
15
|
+
# @return [String, nil]
|
|
16
|
+
optional :network_id, String
|
|
17
|
+
|
|
18
|
+
# @!attribute enable_sip_trunking
|
|
19
|
+
# Enable SIP traffic forwarding over VPN interface.
|
|
20
|
+
#
|
|
21
|
+
# @return [Boolean, nil]
|
|
22
|
+
optional :enable_sip_trunking, Telnyx::Internal::Type::Boolean
|
|
23
|
+
|
|
24
|
+
# @!method initialize(name: nil, network_id: nil, enable_sip_trunking: nil)
|
|
25
|
+
# @param name [String] A user specified name for the interface.
|
|
26
|
+
#
|
|
27
|
+
# @param network_id [String] The id of the network associated with the interface.
|
|
28
|
+
#
|
|
29
|
+
# @param enable_sip_trunking [Boolean] Enable SIP traffic forwarding over VPN interface.
|
|
7
30
|
end
|
|
8
31
|
end
|
|
9
32
|
end
|
data/lib/telnyx/resources/ai.rb
CHANGED
|
@@ -82,12 +82,12 @@ module Telnyx
|
|
|
82
82
|
#
|
|
83
83
|
# 1. The query text is embedded into a 1024-dimensional vector using the
|
|
84
84
|
# multilingual-e5-large model.
|
|
85
|
-
# 2. The vector is
|
|
86
|
-
#
|
|
85
|
+
# 2. The vector is compared against indexed record chunks using semantic
|
|
86
|
+
# similarity search.
|
|
87
87
|
# 3. When no region is specified, all regions are queried in parallel (fan-out)
|
|
88
88
|
# and results are merged by score.
|
|
89
|
-
# 4. Results are ranked by
|
|
90
|
-
# `
|
|
89
|
+
# 4. Results are ranked by similarity score (descending) and paginated via
|
|
90
|
+
# `page[number]` / `page[size]`.
|
|
91
91
|
#
|
|
92
92
|
# **Authentication:** Requires a Telnyx API key via `Authorization: Bearer <key>`.
|
|
93
93
|
# Results are automatically scoped to the caller's organization —
|
|
@@ -101,14 +101,14 @@ module Telnyx
|
|
|
101
101
|
# **Filtering:** Use `filter[field][operator]=value` query parameters to narrow
|
|
102
102
|
# results before vector search.
|
|
103
103
|
#
|
|
104
|
-
# Top-level filterable fields: `user_id`, `
|
|
105
|
-
# `
|
|
104
|
+
# Top-level filterable fields: `user_id`, `region`, `record_id`,
|
|
105
|
+
# `record_created_at`, `ingested_at`, `retention`
|
|
106
106
|
#
|
|
107
107
|
# Note: `retention` is filter-only — it can be used to narrow results but is not
|
|
108
108
|
# returned in the response body.
|
|
109
109
|
#
|
|
110
110
|
# Metadata fields: any field not in the list above is resolved to
|
|
111
|
-
# `data.metadata.<field>`
|
|
111
|
+
# `data.metadata.<field>` (e.g., `filter[language]=en` →
|
|
112
112
|
# `data.metadata.language`).
|
|
113
113
|
#
|
|
114
114
|
# Supported filter operators:
|
|
@@ -121,21 +121,17 @@ module Telnyx
|
|
|
121
121
|
# **Examples:**
|
|
122
122
|
#
|
|
123
123
|
# ```
|
|
124
|
-
# GET /v2/ai/conversation_histories?q=billing+issue&
|
|
125
|
-
# GET /v2/ai/conversation_histories?q=setup+guide&
|
|
126
|
-
# GET /v2/ai/conversation_histories?q=refund&
|
|
127
|
-
# GET /v2/ai/conversation_histories?q=outage&
|
|
128
|
-
# GET /v2/ai/conversation_histories?q=hold+time&
|
|
124
|
+
# GET /v2/ai/conversation_histories?q=billing+issue&page[size]=10
|
|
125
|
+
# GET /v2/ai/conversation_histories?q=setup+guide®ion=USA&min_score=0.5
|
|
126
|
+
# GET /v2/ai/conversation_histories?q=refund&filter[record_created_at][gte]=2026-01-01T00:00:00Z
|
|
127
|
+
# GET /v2/ai/conversation_histories?q=outage&filter[region][in]=USA,DEU
|
|
128
|
+
# GET /v2/ai/conversation_histories?q=hold+time&filter[language]=en
|
|
129
129
|
# ```
|
|
130
130
|
#
|
|
131
|
-
# @overload retrieve_conversation_histories(q:,
|
|
131
|
+
# @overload retrieve_conversation_histories(q:, filter_ingested_at_gte: nil, filter_ingested_at_lte: nil, filter_record_created_at_gte: nil, filter_record_created_at_lte: nil, filter_record_id: nil, filter_region_in: nil, filter_retention: nil, filter_user_id: nil, min_score: nil, page_number: nil, page_size: nil, region: nil, request_options: {})
|
|
132
132
|
#
|
|
133
133
|
# @param q [String] Natural language search query. The text is embedded into a 1024-dimensional vect
|
|
134
134
|
#
|
|
135
|
-
# @param record_type [Symbol, Telnyx::Models::AIRetrieveConversationHistoriesParams::RecordType] The type of records to search. Each record type is stored in a separate vector i
|
|
136
|
-
#
|
|
137
|
-
# @param filter_document_id [String] Filter by document identifier (exact match). Populated for knowledge_base record
|
|
138
|
-
#
|
|
139
135
|
# @param filter_ingested_at_gte [Time] Only include records ingested (chunked, embedded, and indexed) on or after this
|
|
140
136
|
#
|
|
141
137
|
# @param filter_ingested_at_lte [Time] Only include records ingested (chunked, embedded, and indexed) on or before this
|
|
@@ -154,9 +150,11 @@ module Telnyx
|
|
|
154
150
|
#
|
|
155
151
|
# @param min_score [Float] Minimum cosine similarity score threshold (0.0 to 1.0). Results below this thres
|
|
156
152
|
#
|
|
157
|
-
# @param
|
|
153
|
+
# @param page_number [Integer] Page number to return (1-based). Defaults to 1.
|
|
154
|
+
#
|
|
155
|
+
# @param page_size [Integer] Number of results per page. Defaults to 20, maximum 100.
|
|
158
156
|
#
|
|
159
|
-
# @param
|
|
157
|
+
# @param region [Symbol, Telnyx::Models::AIRetrieveConversationHistoriesParams::Region] Restrict search to a specific region. When omitted, all regions are queried in p
|
|
160
158
|
#
|
|
161
159
|
# @param request_options [Telnyx::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
162
160
|
#
|
|
@@ -170,7 +168,6 @@ module Telnyx
|
|
|
170
168
|
method: :get,
|
|
171
169
|
path: "ai/conversation_histories",
|
|
172
170
|
query: query.transform_keys(
|
|
173
|
-
filter_document_id: "filter[document_id]",
|
|
174
171
|
filter_ingested_at_gte: "filter[ingested_at][gte]",
|
|
175
172
|
filter_ingested_at_lte: "filter[ingested_at][lte]",
|
|
176
173
|
filter_record_created_at_gte: "filter[record_created_at][gte]",
|
|
@@ -178,7 +175,9 @@ module Telnyx
|
|
|
178
175
|
filter_record_id: "filter[record_id]",
|
|
179
176
|
filter_region_in: "filter[region][in]",
|
|
180
177
|
filter_retention: "filter[retention]",
|
|
181
|
-
filter_user_id: "filter[user_id]"
|
|
178
|
+
filter_user_id: "filter[user_id]",
|
|
179
|
+
page_number: "page[number]",
|
|
180
|
+
page_size: "page[size]"
|
|
182
181
|
),
|
|
183
182
|
model: Telnyx::Models::AIRetrieveConversationHistoriesResponse,
|
|
184
183
|
options: options
|
|
@@ -1339,7 +1339,7 @@ module Telnyx
|
|
|
1339
1339
|
#
|
|
1340
1340
|
# @param transcription_engine [Symbol, Telnyx::Models::Calls::TranscriptionStartRequest::TranscriptionEngine] Engine to use for speech recognition. Legacy values `A` - `Google`, `B` - `Telny
|
|
1341
1341
|
#
|
|
1342
|
-
# @param transcription_engine_config [Telnyx::Models::Calls::TranscriptionEngineGoogleConfig, Telnyx::Models::Calls::TranscriptionEngineTelnyxConfig, Telnyx::Models::Calls::TranscriptionEngineAzureConfig, Telnyx::Models::Calls::TranscriptionEngineXaiConfig, Telnyx::Models::Calls::TranscriptionEngineAssemblyaiConfig, Telnyx::Models::Calls::TranscriptionEngineSpeechmaticsConfig, Telnyx::Models::Calls::TranscriptionEngineSonioxConfig, Telnyx::Models::Calls::TranscriptionEngineAConfig, Telnyx::Models::Calls::TranscriptionEngineBConfig, Telnyx::Models::Calls::DeepgramNova2Config, Telnyx::Models::Calls::DeepgramNova3Config]
|
|
1342
|
+
# @param transcription_engine_config [Telnyx::Models::Calls::TranscriptionEngineGoogleConfig, Telnyx::Models::Calls::TranscriptionEngineTelnyxConfig, Telnyx::Models::Calls::TranscriptionEngineAzureConfig, Telnyx::Models::Calls::TranscriptionEngineXaiConfig, Telnyx::Models::Calls::TranscriptionEngineAssemblyaiConfig, Telnyx::Models::Calls::TranscriptionEngineSpeechmaticsConfig, Telnyx::Models::Calls::TranscriptionEngineSonioxConfig, Telnyx::Models::Calls::TranscriptionEngineParakeetConfig, Telnyx::Models::Calls::TranscriptionEngineAConfig, Telnyx::Models::Calls::TranscriptionEngineBConfig, Telnyx::Models::Calls::DeepgramNova2Config, Telnyx::Models::Calls::DeepgramNova3Config]
|
|
1343
1343
|
#
|
|
1344
1344
|
# @param transcription_tracks [String] Indicates which leg of the call will be transcribed. Use `inbound` for the leg t
|
|
1345
1345
|
#
|
|
@@ -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
|