telnyx 5.65.0 → 5.66.1
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 +22 -0
- data/README.md +1 -1
- data/lib/telnyx/client.rb +13 -0
- data/lib/telnyx/models/enterprise_create_params.rb +411 -0
- data/lib/telnyx/models/enterprise_create_response.rb +450 -0
- data/lib/telnyx/models/enterprise_delete_params.rb +20 -0
- data/lib/telnyx/models/enterprise_list_params.rb +38 -0
- data/lib/telnyx/models/enterprise_list_response.rb +439 -0
- data/lib/telnyx/models/enterprise_retrieve_params.rb +20 -0
- data/lib/telnyx/models/enterprise_retrieve_response.rb +452 -0
- data/lib/telnyx/models/enterprise_update_params.rb +364 -0
- data/lib/telnyx/models/enterprise_update_response.rb +450 -0
- data/lib/telnyx/models/enterprises/reputation/number_create_params.rb +33 -0
- data/lib/telnyx/models/enterprises/reputation/number_create_response.rb +106 -0
- data/lib/telnyx/models/enterprises/reputation/number_delete_params.rb +30 -0
- data/lib/telnyx/models/enterprises/reputation/number_list_params.rb +49 -0
- data/lib/telnyx/models/enterprises/reputation/number_list_response.rb +154 -0
- data/lib/telnyx/models/enterprises/reputation/number_retrieve_params.rb +45 -0
- data/lib/telnyx/models/enterprises/reputation/number_retrieve_response.rb +165 -0
- data/lib/telnyx/models/enterprises/reputation_create_params.rb +58 -0
- data/lib/telnyx/models/enterprises/reputation_create_response.rb +111 -0
- data/lib/telnyx/models/enterprises/reputation_delete_all_params.rb +22 -0
- data/lib/telnyx/models/enterprises/reputation_list_params.rb +22 -0
- data/lib/telnyx/models/enterprises/reputation_list_response.rb +111 -0
- data/lib/telnyx/models/enterprises/reputation_update_frequency_params.rb +47 -0
- data/lib/telnyx/models/enterprises/reputation_update_frequency_response.rb +112 -0
- data/lib/telnyx/models/reputation/number_delete_params.rb +22 -0
- data/lib/telnyx/models/reputation/number_list_params.rb +40 -0
- data/lib/telnyx/models/reputation/number_list_response.rb +151 -0
- data/lib/telnyx/models/reputation/number_retrieve_params.rb +35 -0
- data/lib/telnyx/models/reputation/number_retrieve_response.rb +163 -0
- data/lib/telnyx/models/terms_of_service/number_reputation_agree_params.rb +16 -0
- data/lib/telnyx/models.rb +16 -0
- data/lib/telnyx/resources/enterprises/reputation/numbers.rb +174 -0
- data/lib/telnyx/resources/enterprises/reputation.rb +166 -0
- data/lib/telnyx/resources/enterprises.rb +217 -0
- data/lib/telnyx/resources/reputation/numbers.rb +102 -0
- data/lib/telnyx/resources/reputation.rb +20 -0
- data/lib/telnyx/resources/terms_of_service/number_reputation.rb +39 -0
- data/lib/telnyx/resources/terms_of_service.rb +19 -0
- data/lib/telnyx/version.rb +1 -1
- data/lib/telnyx.rb +36 -0
- data/rbi/telnyx/client.rbi +10 -0
- data/rbi/telnyx/models/enterprise_create_params.rbi +719 -0
- data/rbi/telnyx/models/enterprise_create_response.rbi +841 -0
- data/rbi/telnyx/models/enterprise_delete_params.rbi +35 -0
- data/rbi/telnyx/models/enterprise_list_params.rbi +68 -0
- data/rbi/telnyx/models/enterprise_list_response.rbi +794 -0
- data/rbi/telnyx/models/enterprise_retrieve_params.rbi +35 -0
- data/rbi/telnyx/models/enterprise_retrieve_response.rbi +843 -0
- data/rbi/telnyx/models/enterprise_update_params.rbi +651 -0
- data/rbi/telnyx/models/enterprise_update_response.rbi +841 -0
- data/rbi/telnyx/models/enterprises/reputation/number_create_params.rbi +56 -0
- data/rbi/telnyx/models/enterprises/reputation/number_create_response.rbi +238 -0
- data/rbi/telnyx/models/enterprises/reputation/number_delete_params.rbi +50 -0
- data/rbi/telnyx/models/enterprises/reputation/number_list_params.rbi +81 -0
- data/rbi/telnyx/models/enterprises/reputation/number_list_response.rbi +288 -0
- data/rbi/telnyx/models/enterprises/reputation/number_retrieve_params.rbi +67 -0
- data/rbi/telnyx/models/enterprises/reputation/number_retrieve_response.rbi +335 -0
- data/rbi/telnyx/models/enterprises/reputation_create_params.rbi +135 -0
- data/rbi/telnyx/models/enterprises/reputation_create_response.rbi +277 -0
- data/rbi/telnyx/models/enterprises/reputation_delete_all_params.rbi +40 -0
- data/rbi/telnyx/models/enterprises/reputation_list_params.rbi +40 -0
- data/rbi/telnyx/models/enterprises/reputation_list_response.rbi +273 -0
- data/rbi/telnyx/models/enterprises/reputation_update_frequency_params.rbi +115 -0
- data/rbi/telnyx/models/enterprises/reputation_update_frequency_response.rbi +278 -0
- data/rbi/telnyx/models/reputation/number_delete_params.rbi +40 -0
- data/rbi/telnyx/models/reputation/number_list_params.rbi +73 -0
- data/rbi/telnyx/models/reputation/number_list_response.rbi +286 -0
- data/rbi/telnyx/models/reputation/number_retrieve_params.rbi +59 -0
- data/rbi/telnyx/models/reputation/number_retrieve_response.rbi +328 -0
- data/rbi/telnyx/models/terms_of_service/number_reputation_agree_params.rbi +32 -0
- data/rbi/telnyx/models.rbi +16 -0
- data/rbi/telnyx/resources/enterprises/reputation/numbers.rbi +142 -0
- data/rbi/telnyx/resources/enterprises/reputation.rbi +140 -0
- data/rbi/telnyx/resources/enterprises.rbi +226 -0
- data/rbi/telnyx/resources/reputation/numbers.rbi +80 -0
- data/rbi/telnyx/resources/reputation.rbi +17 -0
- data/rbi/telnyx/resources/terms_of_service/number_reputation.rbi +24 -0
- data/rbi/telnyx/resources/terms_of_service.rbi +16 -0
- data/sig/telnyx/client.rbs +6 -0
- data/sig/telnyx/models/enterprise_create_params.rbs +344 -0
- data/sig/telnyx/models/enterprise_create_response.rbs +392 -0
- data/sig/telnyx/models/enterprise_delete_params.rbs +23 -0
- data/sig/telnyx/models/enterprise_list_params.rbs +38 -0
- data/sig/telnyx/models/enterprise_list_response.rbs +375 -0
- data/sig/telnyx/models/enterprise_retrieve_params.rbs +23 -0
- data/sig/telnyx/models/enterprise_retrieve_response.rbs +392 -0
- data/sig/telnyx/models/enterprise_update_params.rbs +341 -0
- data/sig/telnyx/models/enterprise_update_response.rbs +392 -0
- data/sig/telnyx/models/enterprises/reputation/number_create_params.rbs +32 -0
- data/sig/telnyx/models/enterprises/reputation/number_create_response.rbs +124 -0
- data/sig/telnyx/models/enterprises/reputation/number_delete_params.rbs +32 -0
- data/sig/telnyx/models/enterprises/reputation/number_list_params.rbs +51 -0
- data/sig/telnyx/models/enterprises/reputation/number_list_response.rbs +132 -0
- data/sig/telnyx/models/enterprises/reputation/number_retrieve_params.rbs +38 -0
- data/sig/telnyx/models/enterprises/reputation/number_retrieve_response.rbs +153 -0
- data/sig/telnyx/models/enterprises/reputation_create_params.rbs +58 -0
- data/sig/telnyx/models/enterprises/reputation_create_response.rbs +114 -0
- data/sig/telnyx/models/enterprises/reputation_delete_all_params.rbs +25 -0
- data/sig/telnyx/models/enterprises/reputation_list_params.rbs +25 -0
- data/sig/telnyx/models/enterprises/reputation_list_response.rbs +114 -0
- data/sig/telnyx/models/enterprises/reputation_update_frequency_params.rbs +49 -0
- data/sig/telnyx/models/enterprises/reputation_update_frequency_response.rbs +116 -0
- data/sig/telnyx/models/reputation/number_delete_params.rbs +25 -0
- data/sig/telnyx/models/reputation/number_list_params.rbs +40 -0
- data/sig/telnyx/models/reputation/number_list_response.rbs +130 -0
- data/sig/telnyx/models/reputation/number_retrieve_params.rbs +32 -0
- data/sig/telnyx/models/reputation/number_retrieve_response.rbs +149 -0
- data/sig/telnyx/models/terms_of_service/number_reputation_agree_params.rbs +17 -0
- data/sig/telnyx/models.rbs +16 -0
- data/sig/telnyx/resources/enterprises/reputation/numbers.rbs +38 -0
- data/sig/telnyx/resources/enterprises/reputation.rbs +34 -0
- data/sig/telnyx/resources/enterprises.rbs +70 -0
- data/sig/telnyx/resources/reputation/numbers.rbs +27 -0
- data/sig/telnyx/resources/reputation.rbs +9 -0
- data/sig/telnyx/resources/terms_of_service/number_reputation.rbs +11 -0
- data/sig/telnyx/resources/terms_of_service.rbs +9 -0
- metadata +110 -2
data/rbi/telnyx/models.rbi
CHANGED
|
@@ -590,6 +590,18 @@ module Telnyx
|
|
|
590
590
|
|
|
591
591
|
EncryptedMedia = Telnyx::Models::EncryptedMedia
|
|
592
592
|
|
|
593
|
+
EnterpriseCreateParams = Telnyx::Models::EnterpriseCreateParams
|
|
594
|
+
|
|
595
|
+
EnterpriseDeleteParams = Telnyx::Models::EnterpriseDeleteParams
|
|
596
|
+
|
|
597
|
+
EnterpriseListParams = Telnyx::Models::EnterpriseListParams
|
|
598
|
+
|
|
599
|
+
EnterpriseRetrieveParams = Telnyx::Models::EnterpriseRetrieveParams
|
|
600
|
+
|
|
601
|
+
Enterprises = Telnyx::Models::Enterprises
|
|
602
|
+
|
|
603
|
+
EnterpriseUpdateParams = Telnyx::Models::EnterpriseUpdateParams
|
|
604
|
+
|
|
593
605
|
EventNode = Telnyx::Models::EventNode
|
|
594
606
|
|
|
595
607
|
ExternalConnection = Telnyx::Models::ExternalConnection
|
|
@@ -1430,6 +1442,8 @@ module Telnyx
|
|
|
1430
1442
|
|
|
1431
1443
|
Reports = Telnyx::Models::Reports
|
|
1432
1444
|
|
|
1445
|
+
Reputation = Telnyx::Models::Reputation
|
|
1446
|
+
|
|
1433
1447
|
RequirementGroup = Telnyx::Models::RequirementGroup
|
|
1434
1448
|
|
|
1435
1449
|
RequirementGroupCreateParams = Telnyx::Models::RequirementGroupCreateParams
|
|
@@ -1668,6 +1682,8 @@ module Telnyx
|
|
|
1668
1682
|
TelephonyCredentialUpdateParams =
|
|
1669
1683
|
Telnyx::Models::TelephonyCredentialUpdateParams
|
|
1670
1684
|
|
|
1685
|
+
TermsOfService = Telnyx::Models::TermsOfService
|
|
1686
|
+
|
|
1671
1687
|
Texml = Telnyx::Models::Texml
|
|
1672
1688
|
|
|
1673
1689
|
TexmlApplication = Telnyx::Models::TexmlApplication
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Telnyx
|
|
4
|
+
module Resources
|
|
5
|
+
class Enterprises
|
|
6
|
+
class Reputation
|
|
7
|
+
# Associate phone numbers with an enterprise for reputation monitoring and
|
|
8
|
+
# retrieve reputation scores
|
|
9
|
+
class Numbers
|
|
10
|
+
# Associate one or more phone numbers with an enterprise for Number Reputation
|
|
11
|
+
# monitoring.
|
|
12
|
+
#
|
|
13
|
+
# **Validations:**
|
|
14
|
+
#
|
|
15
|
+
# - Phone numbers must be in E.164 format (e.g., `+16035551234`)
|
|
16
|
+
# - Phone numbers must be in-service and belong to your account (verified via
|
|
17
|
+
# Warehouse)
|
|
18
|
+
# - Phone numbers must be US local numbers
|
|
19
|
+
# - Phone numbers cannot already be associated with any enterprise
|
|
20
|
+
#
|
|
21
|
+
# **Note:** This operation is atomic — if any number fails validation, the entire
|
|
22
|
+
# request fails.
|
|
23
|
+
#
|
|
24
|
+
# **Maximum:** 100 phone numbers per request.
|
|
25
|
+
sig do
|
|
26
|
+
params(
|
|
27
|
+
enterprise_id: String,
|
|
28
|
+
phone_numbers: T::Array[String],
|
|
29
|
+
request_options: Telnyx::RequestOptions::OrHash
|
|
30
|
+
).returns(
|
|
31
|
+
Telnyx::Models::Enterprises::Reputation::NumberCreateResponse
|
|
32
|
+
)
|
|
33
|
+
end
|
|
34
|
+
def create(
|
|
35
|
+
# Unique identifier of the enterprise (UUID)
|
|
36
|
+
enterprise_id,
|
|
37
|
+
# List of phone numbers to associate for reputation monitoring (max 100)
|
|
38
|
+
phone_numbers:,
|
|
39
|
+
request_options: {}
|
|
40
|
+
)
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
# Get detailed reputation data for a specific phone number associated with an
|
|
44
|
+
# enterprise.
|
|
45
|
+
#
|
|
46
|
+
# **Query Parameters:**
|
|
47
|
+
#
|
|
48
|
+
# - `fresh` (default: `false`): When `true`, fetches fresh reputation data (incurs
|
|
49
|
+
# API cost). When `false`, returns cached data. If no cached data exists, fresh
|
|
50
|
+
# data is automatically fetched.
|
|
51
|
+
#
|
|
52
|
+
# **Returns:**
|
|
53
|
+
#
|
|
54
|
+
# - `spam_risk`: Overall spam risk level (`low`, `medium`, `high`)
|
|
55
|
+
# - `spam_category`: Spam category classification
|
|
56
|
+
# - `maturity_score`: Maturity metric (0–100)
|
|
57
|
+
# - `connection_score`: Connection quality metric (0–100)
|
|
58
|
+
# - `engagement_score`: Engagement metric (0–100)
|
|
59
|
+
# - `sentiment_score`: Sentiment metric (0–100)
|
|
60
|
+
# - `last_refreshed_at`: Timestamp of last data refresh
|
|
61
|
+
sig do
|
|
62
|
+
params(
|
|
63
|
+
phone_number: String,
|
|
64
|
+
enterprise_id: String,
|
|
65
|
+
fresh: T::Boolean,
|
|
66
|
+
request_options: Telnyx::RequestOptions::OrHash
|
|
67
|
+
).returns(
|
|
68
|
+
Telnyx::Models::Enterprises::Reputation::NumberRetrieveResponse
|
|
69
|
+
)
|
|
70
|
+
end
|
|
71
|
+
def retrieve(
|
|
72
|
+
# Path param: Phone number in E.164 format
|
|
73
|
+
phone_number,
|
|
74
|
+
# Path param: Unique identifier of the enterprise (UUID)
|
|
75
|
+
enterprise_id:,
|
|
76
|
+
# Query param: When true, fetches fresh reputation data (incurs API cost). When
|
|
77
|
+
# false, returns cached data.
|
|
78
|
+
fresh: nil,
|
|
79
|
+
request_options: {}
|
|
80
|
+
)
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
# List all phone numbers associated with an enterprise for Number Reputation
|
|
84
|
+
# monitoring.
|
|
85
|
+
#
|
|
86
|
+
# Returns phone numbers with their cached reputation data (if available). Supports
|
|
87
|
+
# pagination and filtering by phone number.
|
|
88
|
+
sig do
|
|
89
|
+
params(
|
|
90
|
+
enterprise_id: String,
|
|
91
|
+
page_number: Integer,
|
|
92
|
+
page_size: Integer,
|
|
93
|
+
phone_number: String,
|
|
94
|
+
request_options: Telnyx::RequestOptions::OrHash
|
|
95
|
+
).returns(
|
|
96
|
+
Telnyx::Internal::DefaultFlatPagination[
|
|
97
|
+
Telnyx::Models::Enterprises::Reputation::NumberListResponse
|
|
98
|
+
]
|
|
99
|
+
)
|
|
100
|
+
end
|
|
101
|
+
def list(
|
|
102
|
+
# Unique identifier of the enterprise (UUID)
|
|
103
|
+
enterprise_id,
|
|
104
|
+
# Page number (1-indexed)
|
|
105
|
+
page_number: nil,
|
|
106
|
+
# Number of items per page
|
|
107
|
+
page_size: nil,
|
|
108
|
+
# Filter by specific phone number (E.164 format)
|
|
109
|
+
phone_number: nil,
|
|
110
|
+
request_options: {}
|
|
111
|
+
)
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
# Remove a phone number from Number Reputation monitoring for an enterprise.
|
|
115
|
+
#
|
|
116
|
+
# The number will no longer be tracked and reputation data will no longer be
|
|
117
|
+
# refreshed.
|
|
118
|
+
sig do
|
|
119
|
+
params(
|
|
120
|
+
phone_number: String,
|
|
121
|
+
enterprise_id: String,
|
|
122
|
+
request_options: Telnyx::RequestOptions::OrHash
|
|
123
|
+
).void
|
|
124
|
+
end
|
|
125
|
+
def delete(
|
|
126
|
+
# Phone number in E.164 format
|
|
127
|
+
phone_number,
|
|
128
|
+
# Unique identifier of the enterprise (UUID)
|
|
129
|
+
enterprise_id:,
|
|
130
|
+
request_options: {}
|
|
131
|
+
)
|
|
132
|
+
end
|
|
133
|
+
|
|
134
|
+
# @api private
|
|
135
|
+
sig { params(client: Telnyx::Client).returns(T.attached_class) }
|
|
136
|
+
def self.new(client:)
|
|
137
|
+
end
|
|
138
|
+
end
|
|
139
|
+
end
|
|
140
|
+
end
|
|
141
|
+
end
|
|
142
|
+
end
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Telnyx
|
|
4
|
+
module Resources
|
|
5
|
+
class Enterprises
|
|
6
|
+
# Manage Number Reputation enrollment and check frequency settings for an
|
|
7
|
+
# enterprise
|
|
8
|
+
class Reputation
|
|
9
|
+
# Associate phone numbers with an enterprise for reputation monitoring and
|
|
10
|
+
# retrieve reputation scores
|
|
11
|
+
sig { returns(Telnyx::Resources::Enterprises::Reputation::Numbers) }
|
|
12
|
+
attr_reader :numbers
|
|
13
|
+
|
|
14
|
+
# Enable Number Reputation service for an enterprise.
|
|
15
|
+
#
|
|
16
|
+
# **Requirements:**
|
|
17
|
+
#
|
|
18
|
+
# - Signed LOA (Letter of Authorization) document ID
|
|
19
|
+
# - Reputation check frequency (defaults to `business_daily`)
|
|
20
|
+
# - Number Reputation Terms of Service must be accepted
|
|
21
|
+
#
|
|
22
|
+
# **Flow:**
|
|
23
|
+
#
|
|
24
|
+
# 1. Registers the enterprise for reputation monitoring
|
|
25
|
+
# 2. Creates reputation settings with `pending` status
|
|
26
|
+
# 3. Awaits admin approval before monitoring begins
|
|
27
|
+
#
|
|
28
|
+
# **Resubmission After Rejection:** If a previously rejected record exists, this
|
|
29
|
+
# endpoint will delete it and create a new `pending` record.
|
|
30
|
+
#
|
|
31
|
+
# **Available Frequencies:**
|
|
32
|
+
#
|
|
33
|
+
# - `business_daily` — Monday–Friday
|
|
34
|
+
# - `daily` — Every day
|
|
35
|
+
# - `weekly` — Once per week
|
|
36
|
+
# - `biweekly` — Once every two weeks
|
|
37
|
+
# - `monthly` — Once per month
|
|
38
|
+
# - `never` — Manual refresh only
|
|
39
|
+
sig do
|
|
40
|
+
params(
|
|
41
|
+
enterprise_id: String,
|
|
42
|
+
loa_document_id: String,
|
|
43
|
+
check_frequency:
|
|
44
|
+
Telnyx::Enterprises::ReputationCreateParams::CheckFrequency::OrSymbol,
|
|
45
|
+
request_options: Telnyx::RequestOptions::OrHash
|
|
46
|
+
).returns(Telnyx::Models::Enterprises::ReputationCreateResponse)
|
|
47
|
+
end
|
|
48
|
+
def create(
|
|
49
|
+
# Unique identifier of the enterprise (UUID)
|
|
50
|
+
enterprise_id,
|
|
51
|
+
# ID of the signed Letter of Authorization (LOA) document uploaded to the document
|
|
52
|
+
# service
|
|
53
|
+
loa_document_id:,
|
|
54
|
+
# Frequency for automatically refreshing reputation data
|
|
55
|
+
check_frequency: nil,
|
|
56
|
+
request_options: {}
|
|
57
|
+
)
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
# Retrieve the current Number Reputation settings for an enterprise.
|
|
61
|
+
#
|
|
62
|
+
# Returns the enrollment status (`pending`, `approved`, `rejected`, `deleted`),
|
|
63
|
+
# check frequency, and any rejection reasons.
|
|
64
|
+
#
|
|
65
|
+
# Returns `404` if reputation has not been enabled for this enterprise.
|
|
66
|
+
sig do
|
|
67
|
+
params(
|
|
68
|
+
enterprise_id: String,
|
|
69
|
+
request_options: Telnyx::RequestOptions::OrHash
|
|
70
|
+
).returns(Telnyx::Models::Enterprises::ReputationListResponse)
|
|
71
|
+
end
|
|
72
|
+
def list(
|
|
73
|
+
# Unique identifier of the enterprise (UUID)
|
|
74
|
+
enterprise_id,
|
|
75
|
+
request_options: {}
|
|
76
|
+
)
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
# Disable Number Reputation for an enterprise.
|
|
80
|
+
#
|
|
81
|
+
# This will:
|
|
82
|
+
#
|
|
83
|
+
# - Delete the reputation settings record
|
|
84
|
+
# - Log the deletion for audit purposes
|
|
85
|
+
# - Stop all future automated reputation checks
|
|
86
|
+
#
|
|
87
|
+
# **Note:** Can only be performed on `approved` reputation settings.
|
|
88
|
+
sig do
|
|
89
|
+
params(
|
|
90
|
+
enterprise_id: String,
|
|
91
|
+
request_options: Telnyx::RequestOptions::OrHash
|
|
92
|
+
).void
|
|
93
|
+
end
|
|
94
|
+
def delete_all(
|
|
95
|
+
# Unique identifier of the enterprise (UUID)
|
|
96
|
+
enterprise_id,
|
|
97
|
+
request_options: {}
|
|
98
|
+
)
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
# Update how often reputation data is automatically refreshed.
|
|
102
|
+
#
|
|
103
|
+
# **Note:** The enterprise must have `approved` reputation settings. Updating
|
|
104
|
+
# frequency on `pending` or `rejected` settings will return an error.
|
|
105
|
+
#
|
|
106
|
+
# **Available Frequencies:**
|
|
107
|
+
#
|
|
108
|
+
# - `business_daily` — Monday–Friday
|
|
109
|
+
# - `daily` — Every day including weekends
|
|
110
|
+
# - `weekly` — Once per week
|
|
111
|
+
# - `biweekly` — Once every two weeks
|
|
112
|
+
# - `monthly` — Once per month
|
|
113
|
+
# - `never` — Manual refresh only (no automatic checks)
|
|
114
|
+
sig do
|
|
115
|
+
params(
|
|
116
|
+
enterprise_id: String,
|
|
117
|
+
check_frequency:
|
|
118
|
+
Telnyx::Enterprises::ReputationUpdateFrequencyParams::CheckFrequency::OrSymbol,
|
|
119
|
+
request_options: Telnyx::RequestOptions::OrHash
|
|
120
|
+
).returns(
|
|
121
|
+
Telnyx::Models::Enterprises::ReputationUpdateFrequencyResponse
|
|
122
|
+
)
|
|
123
|
+
end
|
|
124
|
+
def update_frequency(
|
|
125
|
+
# Unique identifier of the enterprise (UUID)
|
|
126
|
+
enterprise_id,
|
|
127
|
+
# New frequency for refreshing reputation data
|
|
128
|
+
check_frequency:,
|
|
129
|
+
request_options: {}
|
|
130
|
+
)
|
|
131
|
+
end
|
|
132
|
+
|
|
133
|
+
# @api private
|
|
134
|
+
sig { params(client: Telnyx::Client).returns(T.attached_class) }
|
|
135
|
+
def self.new(client:)
|
|
136
|
+
end
|
|
137
|
+
end
|
|
138
|
+
end
|
|
139
|
+
end
|
|
140
|
+
end
|
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Telnyx
|
|
4
|
+
module Resources
|
|
5
|
+
# Enterprise management for Branded Calling and Number Reputation services
|
|
6
|
+
class Enterprises
|
|
7
|
+
# Manage Number Reputation enrollment and check frequency settings for an
|
|
8
|
+
# enterprise
|
|
9
|
+
sig { returns(Telnyx::Resources::Enterprises::Reputation) }
|
|
10
|
+
attr_reader :reputation
|
|
11
|
+
|
|
12
|
+
# Create a new enterprise for Branded Calling / Number Reputation services.
|
|
13
|
+
#
|
|
14
|
+
# Registers the enterprise in the Branded Calling / Number Reputation services,
|
|
15
|
+
# enabling it to create Display Identity Records (DIRs) or enroll in Number
|
|
16
|
+
# Reputation monitoring.
|
|
17
|
+
#
|
|
18
|
+
# **Required Fields:** `legal_name`, `doing_business_as`, `organization_type`,
|
|
19
|
+
# `country_code`, `website`, `fein`, `industry`, `number_of_employees`,
|
|
20
|
+
# `organization_legal_type`, `organization_contact`, `billing_contact`,
|
|
21
|
+
# `organization_physical_address`, `billing_address`
|
|
22
|
+
sig do
|
|
23
|
+
params(
|
|
24
|
+
billing_address:
|
|
25
|
+
Telnyx::EnterpriseCreateParams::BillingAddress::OrHash,
|
|
26
|
+
billing_contact:
|
|
27
|
+
Telnyx::EnterpriseCreateParams::BillingContact::OrHash,
|
|
28
|
+
country_code: String,
|
|
29
|
+
doing_business_as: String,
|
|
30
|
+
fein: String,
|
|
31
|
+
industry: String,
|
|
32
|
+
legal_name: String,
|
|
33
|
+
number_of_employees:
|
|
34
|
+
Telnyx::EnterpriseCreateParams::NumberOfEmployees::OrSymbol,
|
|
35
|
+
organization_contact:
|
|
36
|
+
Telnyx::EnterpriseCreateParams::OrganizationContact::OrHash,
|
|
37
|
+
organization_legal_type:
|
|
38
|
+
Telnyx::EnterpriseCreateParams::OrganizationLegalType::OrSymbol,
|
|
39
|
+
organization_physical_address:
|
|
40
|
+
Telnyx::EnterpriseCreateParams::OrganizationPhysicalAddress::OrHash,
|
|
41
|
+
organization_type:
|
|
42
|
+
Telnyx::EnterpriseCreateParams::OrganizationType::OrSymbol,
|
|
43
|
+
website: String,
|
|
44
|
+
corporate_registration_number: String,
|
|
45
|
+
customer_reference: String,
|
|
46
|
+
dun_bradstreet_number: String,
|
|
47
|
+
primary_business_domain_sic_code: String,
|
|
48
|
+
professional_license_number: String,
|
|
49
|
+
role_type: Telnyx::EnterpriseCreateParams::RoleType::OrSymbol,
|
|
50
|
+
request_options: Telnyx::RequestOptions::OrHash
|
|
51
|
+
).returns(Telnyx::Models::EnterpriseCreateResponse)
|
|
52
|
+
end
|
|
53
|
+
def create(
|
|
54
|
+
billing_address:,
|
|
55
|
+
billing_contact:,
|
|
56
|
+
# Country code. Currently only 'US' is accepted.
|
|
57
|
+
country_code:,
|
|
58
|
+
# Primary business name / DBA name
|
|
59
|
+
doing_business_as:,
|
|
60
|
+
# Federal Employer Identification Number. Format: XX-XXXXXXX or 9-digit number
|
|
61
|
+
# (minimum 9 digits).
|
|
62
|
+
fein:,
|
|
63
|
+
# Industry classification. Case-insensitive. Accepted values: accounting, finance,
|
|
64
|
+
# billing, collections, business, charity, nonprofit, communications, telecom,
|
|
65
|
+
# customer service, support, delivery, shipping, logistics, education, financial,
|
|
66
|
+
# banking, government, public, healthcare, health, pharmacy, medical, insurance,
|
|
67
|
+
# legal, law, notifications, scheduling, real estate, property, retail, ecommerce,
|
|
68
|
+
# sales, marketing, software, technology, tech, media, surveys, market research,
|
|
69
|
+
# travel, hospitality, hotel
|
|
70
|
+
industry:,
|
|
71
|
+
# Legal name of the enterprise
|
|
72
|
+
legal_name:,
|
|
73
|
+
# Employee count range
|
|
74
|
+
number_of_employees:,
|
|
75
|
+
# Organization contact information. Note: the response returns this object with
|
|
76
|
+
# the phone field as 'phone' (not 'phone_number').
|
|
77
|
+
organization_contact:,
|
|
78
|
+
# Legal structure type
|
|
79
|
+
organization_legal_type:,
|
|
80
|
+
organization_physical_address:,
|
|
81
|
+
# Type of organization
|
|
82
|
+
organization_type:,
|
|
83
|
+
# Enterprise website URL. Accepts any string — no URL format validation enforced.
|
|
84
|
+
website:,
|
|
85
|
+
# Corporate registration number (optional)
|
|
86
|
+
corporate_registration_number: nil,
|
|
87
|
+
# Optional customer reference identifier for your own tracking
|
|
88
|
+
customer_reference: nil,
|
|
89
|
+
# D-U-N-S Number (optional)
|
|
90
|
+
dun_bradstreet_number: nil,
|
|
91
|
+
# SIC Code (optional)
|
|
92
|
+
primary_business_domain_sic_code: nil,
|
|
93
|
+
# Professional license number (optional)
|
|
94
|
+
professional_license_number: nil,
|
|
95
|
+
# Role type in Branded Calling / Number Reputation services
|
|
96
|
+
role_type: nil,
|
|
97
|
+
request_options: {}
|
|
98
|
+
)
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
# Retrieve details of a specific enterprise by ID.
|
|
102
|
+
sig do
|
|
103
|
+
params(
|
|
104
|
+
enterprise_id: String,
|
|
105
|
+
request_options: Telnyx::RequestOptions::OrHash
|
|
106
|
+
).returns(Telnyx::Models::EnterpriseRetrieveResponse)
|
|
107
|
+
end
|
|
108
|
+
def retrieve(
|
|
109
|
+
# Unique identifier of the enterprise (UUID)
|
|
110
|
+
enterprise_id,
|
|
111
|
+
request_options: {}
|
|
112
|
+
)
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
# Update enterprise information. All fields are optional — only the provided
|
|
116
|
+
# fields will be updated.
|
|
117
|
+
sig do
|
|
118
|
+
params(
|
|
119
|
+
enterprise_id: String,
|
|
120
|
+
billing_address:
|
|
121
|
+
Telnyx::EnterpriseUpdateParams::BillingAddress::OrHash,
|
|
122
|
+
billing_contact:
|
|
123
|
+
Telnyx::EnterpriseUpdateParams::BillingContact::OrHash,
|
|
124
|
+
corporate_registration_number: String,
|
|
125
|
+
customer_reference: String,
|
|
126
|
+
doing_business_as: String,
|
|
127
|
+
dun_bradstreet_number: String,
|
|
128
|
+
fein: String,
|
|
129
|
+
industry: String,
|
|
130
|
+
legal_name: String,
|
|
131
|
+
number_of_employees:
|
|
132
|
+
Telnyx::EnterpriseUpdateParams::NumberOfEmployees::OrSymbol,
|
|
133
|
+
organization_contact:
|
|
134
|
+
Telnyx::EnterpriseUpdateParams::OrganizationContact::OrHash,
|
|
135
|
+
organization_legal_type:
|
|
136
|
+
Telnyx::EnterpriseUpdateParams::OrganizationLegalType::OrSymbol,
|
|
137
|
+
organization_physical_address:
|
|
138
|
+
Telnyx::EnterpriseUpdateParams::OrganizationPhysicalAddress::OrHash,
|
|
139
|
+
primary_business_domain_sic_code: String,
|
|
140
|
+
professional_license_number: String,
|
|
141
|
+
website: String,
|
|
142
|
+
request_options: Telnyx::RequestOptions::OrHash
|
|
143
|
+
).returns(Telnyx::Models::EnterpriseUpdateResponse)
|
|
144
|
+
end
|
|
145
|
+
def update(
|
|
146
|
+
# Unique identifier of the enterprise (UUID)
|
|
147
|
+
enterprise_id,
|
|
148
|
+
billing_address: nil,
|
|
149
|
+
billing_contact: nil,
|
|
150
|
+
# Corporate registration number
|
|
151
|
+
corporate_registration_number: nil,
|
|
152
|
+
# Customer reference identifier
|
|
153
|
+
customer_reference: nil,
|
|
154
|
+
# DBA name
|
|
155
|
+
doing_business_as: nil,
|
|
156
|
+
# D-U-N-S Number
|
|
157
|
+
dun_bradstreet_number: nil,
|
|
158
|
+
# Federal Employer Identification Number. Format: XX-XXXXXXX or XXXXXXXXX
|
|
159
|
+
fein: nil,
|
|
160
|
+
# Industry classification
|
|
161
|
+
industry: nil,
|
|
162
|
+
# Legal name of the enterprise
|
|
163
|
+
legal_name: nil,
|
|
164
|
+
# Employee count range
|
|
165
|
+
number_of_employees: nil,
|
|
166
|
+
# Organization contact information. Note: the response returns this object with
|
|
167
|
+
# the phone field as 'phone' (not 'phone_number').
|
|
168
|
+
organization_contact: nil,
|
|
169
|
+
# Legal structure type
|
|
170
|
+
organization_legal_type: nil,
|
|
171
|
+
organization_physical_address: nil,
|
|
172
|
+
# SIC Code
|
|
173
|
+
primary_business_domain_sic_code: nil,
|
|
174
|
+
# Professional license number
|
|
175
|
+
professional_license_number: nil,
|
|
176
|
+
# Company website URL
|
|
177
|
+
website: nil,
|
|
178
|
+
request_options: {}
|
|
179
|
+
)
|
|
180
|
+
end
|
|
181
|
+
|
|
182
|
+
# Retrieve a paginated list of enterprises associated with your account.
|
|
183
|
+
sig do
|
|
184
|
+
params(
|
|
185
|
+
legal_name: String,
|
|
186
|
+
page_number: Integer,
|
|
187
|
+
page_size: Integer,
|
|
188
|
+
request_options: Telnyx::RequestOptions::OrHash
|
|
189
|
+
).returns(
|
|
190
|
+
Telnyx::Internal::DefaultFlatPagination[
|
|
191
|
+
Telnyx::Models::EnterpriseListResponse
|
|
192
|
+
]
|
|
193
|
+
)
|
|
194
|
+
end
|
|
195
|
+
def list(
|
|
196
|
+
# Filter by legal name (partial match)
|
|
197
|
+
legal_name: nil,
|
|
198
|
+
# Page number (1-indexed)
|
|
199
|
+
page_number: nil,
|
|
200
|
+
# Number of items per page
|
|
201
|
+
page_size: nil,
|
|
202
|
+
request_options: {}
|
|
203
|
+
)
|
|
204
|
+
end
|
|
205
|
+
|
|
206
|
+
# Delete an enterprise and all associated resources. This action is irreversible.
|
|
207
|
+
sig do
|
|
208
|
+
params(
|
|
209
|
+
enterprise_id: String,
|
|
210
|
+
request_options: Telnyx::RequestOptions::OrHash
|
|
211
|
+
).void
|
|
212
|
+
end
|
|
213
|
+
def delete(
|
|
214
|
+
# Unique identifier of the enterprise (UUID)
|
|
215
|
+
enterprise_id,
|
|
216
|
+
request_options: {}
|
|
217
|
+
)
|
|
218
|
+
end
|
|
219
|
+
|
|
220
|
+
# @api private
|
|
221
|
+
sig { params(client: Telnyx::Client).returns(T.attached_class) }
|
|
222
|
+
def self.new(client:)
|
|
223
|
+
end
|
|
224
|
+
end
|
|
225
|
+
end
|
|
226
|
+
end
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Telnyx
|
|
4
|
+
module Resources
|
|
5
|
+
class Reputation
|
|
6
|
+
# Associate phone numbers with an enterprise for reputation monitoring and
|
|
7
|
+
# retrieve reputation scores
|
|
8
|
+
class Numbers
|
|
9
|
+
# Get reputation data for a specific phone number without requiring an
|
|
10
|
+
# `enterprise_id`.
|
|
11
|
+
#
|
|
12
|
+
# Same response as the enterprise-scoped endpoint. Uses cached data by default.
|
|
13
|
+
sig do
|
|
14
|
+
params(
|
|
15
|
+
phone_number: String,
|
|
16
|
+
fresh: T::Boolean,
|
|
17
|
+
request_options: Telnyx::RequestOptions::OrHash
|
|
18
|
+
).returns(Telnyx::Models::Reputation::NumberRetrieveResponse)
|
|
19
|
+
end
|
|
20
|
+
def retrieve(
|
|
21
|
+
# Phone number in E.164 format
|
|
22
|
+
phone_number,
|
|
23
|
+
# When true, fetches fresh reputation data (incurs API cost). When false, returns
|
|
24
|
+
# cached data.
|
|
25
|
+
fresh: nil,
|
|
26
|
+
request_options: {}
|
|
27
|
+
)
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
# List all phone numbers enrolled in Number Reputation monitoring for your
|
|
31
|
+
# account. This is a simplified endpoint that does not require an `enterprise_id`
|
|
32
|
+
# — it returns numbers across all your enterprises.
|
|
33
|
+
#
|
|
34
|
+
# Supports pagination and filtering by phone number.
|
|
35
|
+
sig do
|
|
36
|
+
params(
|
|
37
|
+
page_number: Integer,
|
|
38
|
+
page_size: Integer,
|
|
39
|
+
phone_number: String,
|
|
40
|
+
request_options: Telnyx::RequestOptions::OrHash
|
|
41
|
+
).returns(
|
|
42
|
+
Telnyx::Internal::DefaultFlatPagination[
|
|
43
|
+
Telnyx::Models::Reputation::NumberListResponse
|
|
44
|
+
]
|
|
45
|
+
)
|
|
46
|
+
end
|
|
47
|
+
def list(
|
|
48
|
+
# Page number (1-indexed)
|
|
49
|
+
page_number: nil,
|
|
50
|
+
# Number of items per page
|
|
51
|
+
page_size: nil,
|
|
52
|
+
# Filter by specific phone number (E.164 format)
|
|
53
|
+
phone_number: nil,
|
|
54
|
+
request_options: {}
|
|
55
|
+
)
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
# Remove a phone number from Number Reputation monitoring without requiring an
|
|
59
|
+
# `enterprise_id`.
|
|
60
|
+
sig do
|
|
61
|
+
params(
|
|
62
|
+
phone_number: String,
|
|
63
|
+
request_options: Telnyx::RequestOptions::OrHash
|
|
64
|
+
).void
|
|
65
|
+
end
|
|
66
|
+
def delete(
|
|
67
|
+
# Phone number in E.164 format
|
|
68
|
+
phone_number,
|
|
69
|
+
request_options: {}
|
|
70
|
+
)
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
# @api private
|
|
74
|
+
sig { params(client: Telnyx::Client).returns(T.attached_class) }
|
|
75
|
+
def self.new(client:)
|
|
76
|
+
end
|
|
77
|
+
end
|
|
78
|
+
end
|
|
79
|
+
end
|
|
80
|
+
end
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Telnyx
|
|
4
|
+
module Resources
|
|
5
|
+
class Reputation
|
|
6
|
+
# Associate phone numbers with an enterprise for reputation monitoring and
|
|
7
|
+
# retrieve reputation scores
|
|
8
|
+
sig { returns(Telnyx::Resources::Reputation::Numbers) }
|
|
9
|
+
attr_reader :numbers
|
|
10
|
+
|
|
11
|
+
# @api private
|
|
12
|
+
sig { params(client: Telnyx::Client).returns(T.attached_class) }
|
|
13
|
+
def self.new(client:)
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Telnyx
|
|
4
|
+
module Resources
|
|
5
|
+
class TermsOfService
|
|
6
|
+
# Terms of Service agreement endpoints
|
|
7
|
+
class NumberReputation
|
|
8
|
+
# Accept the Terms of Service for the Number Reputation product. Must be called
|
|
9
|
+
# before using Number Reputation endpoints.
|
|
10
|
+
#
|
|
11
|
+
# Returns `400` with error code `10015` if the user has already agreed to the
|
|
12
|
+
# current ToS version.
|
|
13
|
+
sig { params(request_options: Telnyx::RequestOptions::OrHash).void }
|
|
14
|
+
def agree(request_options: {})
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
# @api private
|
|
18
|
+
sig { params(client: Telnyx::Client).returns(T.attached_class) }
|
|
19
|
+
def self.new(client:)
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
end
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Telnyx
|
|
4
|
+
module Resources
|
|
5
|
+
class TermsOfService
|
|
6
|
+
# Terms of Service agreement endpoints
|
|
7
|
+
sig { returns(Telnyx::Resources::TermsOfService::NumberReputation) }
|
|
8
|
+
attr_reader :number_reputation
|
|
9
|
+
|
|
10
|
+
# @api private
|
|
11
|
+
sig { params(client: Telnyx::Client).returns(T.attached_class) }
|
|
12
|
+
def self.new(client:)
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
data/sig/telnyx/client.rbs
CHANGED
|
@@ -334,6 +334,12 @@ module Telnyx
|
|
|
334
334
|
|
|
335
335
|
attr_reader traffic_policy_profiles: Telnyx::Resources::TrafficPolicyProfiles
|
|
336
336
|
|
|
337
|
+
attr_reader enterprises: Telnyx::Resources::Enterprises
|
|
338
|
+
|
|
339
|
+
attr_reader reputation: Telnyx::Resources::Reputation
|
|
340
|
+
|
|
341
|
+
attr_reader terms_of_service: Telnyx::Resources::TermsOfService
|
|
342
|
+
|
|
337
343
|
private def auth_headers: -> ::Hash[String, String]
|
|
338
344
|
|
|
339
345
|
private def bearer_auth: -> ::Hash[String, String]
|