twilio-ruby 7.11.2 → 7.12.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/.github/workflows/test-and-deploy.yml +13 -1
- data/CHANGES.md +272 -0
- data/Gemfile.lock +2 -2
- data/README.md +2 -2
- data/githooks/pre-commit +11 -0
- data/lib/twilio-ruby/rest/api/v2010/account/conference.rb +4 -4
- data/lib/twilio-ruby/rest/api/v2010/account/message.rb +2 -2
- data/lib/twilio-ruby/rest/content/v1/content.rb +2 -2
- data/lib/twilio-ruby/rest/conversations/v2/action.rb +9 -2
- data/lib/twilio-ruby/rest/conversations/v2/communication.rb +4 -1
- data/lib/twilio-ruby/rest/conversations/v2/configuration.rb +14 -0
- data/lib/twilio-ruby/rest/conversations/v2/conversation.rb +133 -12
- data/lib/twilio-ruby/rest/insights/v1/call/call_summary.rb +1 -1
- data/lib/twilio-ruby/rest/insights/v1/call_summaries.rb +1 -1
- data/lib/twilio-ruby/rest/insights/v3/custom_field_mapping.rb +774 -0
- data/lib/twilio-ruby/rest/{numbers/v1/voice_verification_check.rb → insights/v3/custom_field_mappings_capacity.rb} +44 -48
- data/lib/twilio-ruby/rest/insights/v3.rb +22 -0
- data/lib/twilio-ruby/rest/intelligence/v3/rule_execution.rb +33 -1
- data/lib/twilio-ruby/rest/memory/v1/conversation_summary.rb +5 -5
- data/lib/twilio-ruby/rest/memory/v1/data_mapping.rb +3 -3
- data/lib/twilio-ruby/rest/memory/v1/observation.rb +9 -9
- data/lib/twilio-ruby/rest/memory/v1/revision.rb +1 -1
- data/lib/twilio-ruby/rest/memory/v1/store.rb +3 -3
- data/lib/twilio-ruby/rest/memory/v1/trait_group.rb +3 -3
- data/lib/twilio-ruby/rest/messaging/v2/channels_sender.rb +30 -2
- data/lib/twilio-ruby/rest/numbers/v1/sms_verification.rb +30 -6
- data/lib/twilio-ruby/rest/numbers/v1/sms_verification_check.rb +30 -6
- data/lib/twilio-ruby/rest/numbers/v1/voice_verification.rb +45 -6
- data/lib/twilio-ruby/rest/numbers/v1.rb +0 -6
- data/lib/twilio-ruby/rest/preview/hosted_numbers/authorization_document.rb +40 -0
- data/lib/twilio-ruby/rest/routes/v3/iso_country_code.rb +402 -0
- data/lib/twilio-ruby/rest/routes/v3.rb +43 -0
- data/lib/twilio-ruby/rest/verify/v2/service/entity/factor.rb +1 -1
- data/lib/twilio-ruby/rest/verify/v2/service/new_verify_factor.rb +1 -1
- data/lib/twilio-ruby/rest/voice/v2/recording_account_default_configuration.rb +547 -0
- data/lib/twilio-ruby/rest/voice/v2.rb +6 -0
- data/lib/twilio-ruby/twiml/voice_response.rb +12 -6
- data/lib/twilio-ruby/version.rb +1 -1
- metadata +6 -3
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
# | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
|
|
5
5
|
# | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
|
|
6
6
|
#
|
|
7
|
-
# Twilio -
|
|
8
|
-
#
|
|
7
|
+
# Twilio - Insights
|
|
8
|
+
# The Twilio Insights v3 API provides semantic query access to Conversations analytics data. Resources include synchronous Query, Metadata, and asynchronous QueryJobs for long-running queries.
|
|
9
9
|
#
|
|
10
10
|
# NOTE: This class is auto generated by OpenAPI Generator.
|
|
11
11
|
# https://openapi-generator.tech
|
|
@@ -15,26 +15,27 @@
|
|
|
15
15
|
|
|
16
16
|
module Twilio
|
|
17
17
|
module REST
|
|
18
|
-
class
|
|
19
|
-
class
|
|
20
|
-
class
|
|
18
|
+
class Insights < InsightsBase
|
|
19
|
+
class V3 < Version
|
|
20
|
+
class CustomFieldMappingsCapacityList < ListResource
|
|
21
21
|
|
|
22
22
|
##
|
|
23
|
-
# Initialize the
|
|
23
|
+
# Initialize the CustomFieldMappingsCapacityList
|
|
24
24
|
# @param [Version] version Version that contains the resource
|
|
25
|
-
# @return [
|
|
25
|
+
# @return [CustomFieldMappingsCapacityList] CustomFieldMappingsCapacityList
|
|
26
26
|
def initialize(version)
|
|
27
|
-
super(version)
|
|
28
27
|
|
|
28
|
+
apiV1Version = ApiV1Version.new version.domain, version
|
|
29
|
+
super(apiV1Version)
|
|
29
30
|
# Path Solution
|
|
30
31
|
@solution = { }
|
|
31
|
-
@uri = "/
|
|
32
|
+
@uri = "/ControlPlane/ConversationInsights/CustomFieldMappingsCapacity"
|
|
32
33
|
|
|
33
34
|
end
|
|
34
35
|
##
|
|
35
|
-
#
|
|
36
|
-
# @return [
|
|
37
|
-
def
|
|
36
|
+
# Fetch the CustomFieldMappingsCapacityInstance
|
|
37
|
+
# @return [CustomFieldMappingsCapacityInstance] Fetched CustomFieldMappingsCapacityInstance
|
|
38
|
+
def fetch
|
|
38
39
|
|
|
39
40
|
headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
|
|
40
41
|
|
|
@@ -42,17 +43,17 @@ module Twilio
|
|
|
42
43
|
|
|
43
44
|
|
|
44
45
|
|
|
45
|
-
payload = @version.
|
|
46
|
-
|
|
46
|
+
payload = @version.fetch('GET', @uri, headers: headers)
|
|
47
|
+
CustomFieldMappingsCapacityInstance.new(
|
|
47
48
|
@version,
|
|
48
49
|
payload,
|
|
49
50
|
)
|
|
50
51
|
end
|
|
51
52
|
|
|
52
53
|
##
|
|
53
|
-
#
|
|
54
|
-
# @return [
|
|
55
|
-
def
|
|
54
|
+
# Fetch the CustomFieldMappingsCapacityInstanceMetadata
|
|
55
|
+
# @return [CustomFieldMappingsCapacityInstance] Fetched CustomFieldMappingsCapacityInstance
|
|
56
|
+
def fetch_with_metadata
|
|
56
57
|
|
|
57
58
|
headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
|
|
58
59
|
|
|
@@ -60,14 +61,14 @@ module Twilio
|
|
|
60
61
|
|
|
61
62
|
|
|
62
63
|
|
|
63
|
-
response = @version.
|
|
64
|
-
|
|
64
|
+
response = @version.fetch_with_metadata('GET', @uri, headers: headers)
|
|
65
|
+
custom_field_mappings_capacity_instance = CustomFieldMappingsCapacityInstance.new(
|
|
65
66
|
@version,
|
|
66
67
|
response.body,
|
|
67
68
|
)
|
|
68
|
-
|
|
69
|
+
CustomFieldMappingsCapacityInstanceMetadata.new(
|
|
69
70
|
@version,
|
|
70
|
-
|
|
71
|
+
custom_field_mappings_capacity_instance,
|
|
71
72
|
response.headers,
|
|
72
73
|
response.status_code
|
|
73
74
|
)
|
|
@@ -78,84 +79,79 @@ module Twilio
|
|
|
78
79
|
|
|
79
80
|
# Provide a user friendly representation
|
|
80
81
|
def to_s
|
|
81
|
-
'#<Twilio.
|
|
82
|
+
'#<Twilio.Insights.V3.CustomFieldMappingsCapacityList>'
|
|
82
83
|
end
|
|
83
84
|
end
|
|
84
85
|
|
|
85
|
-
class
|
|
86
|
+
class CustomFieldMappingsCapacityPage < TokenPage
|
|
86
87
|
##
|
|
87
|
-
# Initialize the
|
|
88
|
+
# Initialize the CustomFieldMappingsCapacityPage
|
|
88
89
|
# @param [Version] version Version that contains the resource
|
|
89
90
|
# @param [Response] response Response from the API
|
|
90
91
|
# @param [Hash] solution Path solution for the resource
|
|
91
|
-
# @return [
|
|
92
|
+
# @return [CustomFieldMappingsCapacityPage] CustomFieldMappingsCapacityPage
|
|
92
93
|
def initialize(version, response, solution)
|
|
93
|
-
super(version, response)
|
|
94
94
|
|
|
95
|
+
apiV1Version = ApiV1Version.new version.domain, version
|
|
96
|
+
super(apiV1Version, response)
|
|
95
97
|
|
|
96
98
|
# Path Solution
|
|
97
99
|
@solution = solution
|
|
98
100
|
end
|
|
99
101
|
|
|
100
102
|
##
|
|
101
|
-
# Build an instance of
|
|
103
|
+
# Build an instance of CustomFieldMappingsCapacityInstance
|
|
102
104
|
# @param [Hash] payload Payload response from the API
|
|
103
|
-
# @return [
|
|
105
|
+
# @return [CustomFieldMappingsCapacityInstance] CustomFieldMappingsCapacityInstance
|
|
104
106
|
def get_instance(payload)
|
|
105
|
-
|
|
107
|
+
CustomFieldMappingsCapacityInstance.new(@version, payload)
|
|
106
108
|
end
|
|
107
109
|
|
|
108
110
|
##
|
|
109
111
|
# Provide a user friendly representation
|
|
110
112
|
def to_s
|
|
111
|
-
'<Twilio.
|
|
113
|
+
'<Twilio.Insights.V3.CustomFieldMappingsCapacityPage>'
|
|
112
114
|
end
|
|
113
115
|
end
|
|
114
116
|
|
|
115
|
-
class
|
|
117
|
+
class CustomFieldMappingsCapacityInstance < InstanceResource
|
|
116
118
|
##
|
|
117
|
-
# Initialize the
|
|
119
|
+
# Initialize the CustomFieldMappingsCapacityInstance
|
|
118
120
|
# @param [Version] version Version that contains the resource
|
|
119
121
|
# @param [Hash] payload payload that contains response from Twilio
|
|
120
122
|
# @param [String] account_sid The SID of the
|
|
121
|
-
# {Account}[https://www.twilio.com/docs/iam/api/account] that created this
|
|
123
|
+
# {Account}[https://www.twilio.com/docs/iam/api/account] that created this CustomFieldMappingsCapacity
|
|
122
124
|
# resource.
|
|
123
125
|
# @param [String] sid The SID of the Call resource to fetch.
|
|
124
|
-
# @return [
|
|
126
|
+
# @return [CustomFieldMappingsCapacityInstance] CustomFieldMappingsCapacityInstance
|
|
125
127
|
def initialize(version, payload )
|
|
126
|
-
super(version)
|
|
127
128
|
|
|
129
|
+
apiV1Version = ApiV1Version.new version.domain, version
|
|
130
|
+
super(apiV1Version)
|
|
128
131
|
|
|
129
132
|
# Marshaled Properties
|
|
130
133
|
@properties = {
|
|
131
|
-
'
|
|
132
|
-
'caller_id_sid' => payload['caller_id_sid'],
|
|
134
|
+
'measure' => payload['measure'],
|
|
133
135
|
}
|
|
134
136
|
end
|
|
135
137
|
|
|
136
138
|
|
|
137
139
|
##
|
|
138
|
-
# @return [
|
|
139
|
-
def
|
|
140
|
-
@properties['
|
|
141
|
-
end
|
|
142
|
-
|
|
143
|
-
##
|
|
144
|
-
# @return [String] The Caller ID SID created upon successful verification.
|
|
145
|
-
def caller_id_sid
|
|
146
|
-
@properties['caller_id_sid']
|
|
140
|
+
# @return [CategoryCapacity]
|
|
141
|
+
def measure
|
|
142
|
+
@properties['measure']
|
|
147
143
|
end
|
|
148
144
|
|
|
149
145
|
##
|
|
150
146
|
# Provide a user friendly representation
|
|
151
147
|
def to_s
|
|
152
|
-
"<Twilio.
|
|
148
|
+
"<Twilio.Insights.V3.CustomFieldMappingsCapacityInstance>"
|
|
153
149
|
end
|
|
154
150
|
|
|
155
151
|
##
|
|
156
152
|
# Provide a detailed, user friendly representation
|
|
157
153
|
def inspect
|
|
158
|
-
"<Twilio.
|
|
154
|
+
"<Twilio.Insights.V3.CustomFieldMappingsCapacityInstance>"
|
|
159
155
|
end
|
|
160
156
|
end
|
|
161
157
|
|
|
@@ -21,11 +21,33 @@ module Twilio
|
|
|
21
21
|
def initialize(domain)
|
|
22
22
|
super
|
|
23
23
|
@version = 'v3'
|
|
24
|
+
@custom_field_mappings = nil
|
|
25
|
+
@custom_field_mappings_capacity = nil
|
|
24
26
|
@metadata = nil
|
|
25
27
|
@query = nil
|
|
26
28
|
@query_jobs = nil
|
|
27
29
|
end
|
|
28
30
|
|
|
31
|
+
##
|
|
32
|
+
# @param [String] mapping_id The unique identifier of the custom field mapping, as returned in `id` when the mapping was created.
|
|
33
|
+
# @return [Twilio::REST::Insights::V3::CustomFieldMappingContext] if mappingId was passed.
|
|
34
|
+
# @return [Twilio::REST::Insights::V3::CustomFieldMappingList]
|
|
35
|
+
def custom_field_mappings(mapping_id=:unset)
|
|
36
|
+
if mapping_id.nil?
|
|
37
|
+
raise ArgumentError, 'mapping_id cannot be nil'
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
if mapping_id == :unset
|
|
41
|
+
@custom_field_mappings ||= CustomFieldMappingList.new self
|
|
42
|
+
else
|
|
43
|
+
CustomFieldMappingContext.new(self, mapping_id)
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
##
|
|
47
|
+
# @return [Twilio::REST::Insights::V3::CustomFieldMappingsCapacityList]
|
|
48
|
+
def custom_field_mappings_capacity
|
|
49
|
+
@custom_field_mappings_capacity ||= CustomFieldMappingsCapacityList.new self
|
|
50
|
+
end
|
|
29
51
|
##
|
|
30
52
|
# @return [Twilio::REST::Insights::V3::MetadataList]
|
|
31
53
|
def metadata
|
|
@@ -23,17 +23,20 @@ module Twilio
|
|
|
23
23
|
# @param [intelligence_configuration_id]: [String] The Intelligence Configuration identifier to execute the Rule within.
|
|
24
24
|
# @param [rule_id]: [String] The rule identifier to execute within the selected Intelligence Configuration.
|
|
25
25
|
# @param [conversation_id]: [String] The Conversation identifier to execute the Rule against.
|
|
26
|
-
|
|
26
|
+
# @param [rule]: [RuleExecutionList.RuleOverride]
|
|
27
|
+
attr_accessor :intelligence_configuration_id, :rule_id, :conversation_id, :rule
|
|
27
28
|
def initialize(payload)
|
|
28
29
|
@intelligence_configuration_id = payload["intelligence_configuration_id"]
|
|
29
30
|
@rule_id = payload["rule_id"]
|
|
30
31
|
@conversation_id = payload["conversation_id"]
|
|
32
|
+
@rule = payload["rule"]
|
|
31
33
|
end
|
|
32
34
|
def to_json(options = {})
|
|
33
35
|
{
|
|
34
36
|
"intelligenceConfigurationId": @intelligence_configuration_id,
|
|
35
37
|
"ruleId": @rule_id,
|
|
36
38
|
"conversationId": @conversation_id,
|
|
39
|
+
"rule": @rule,
|
|
37
40
|
}.to_json(options)
|
|
38
41
|
end
|
|
39
42
|
end
|
|
@@ -105,6 +108,22 @@ module Twilio
|
|
|
105
108
|
end
|
|
106
109
|
end
|
|
107
110
|
|
|
111
|
+
class OperatorOverride
|
|
112
|
+
# @param [id]: [String] The operator id (as configured in the stored rule) to override.
|
|
113
|
+
# @param [parameters]: [Hash<String, Object>] Parameter overrides merged into the stored operator's parameters.
|
|
114
|
+
attr_accessor :id, :parameters
|
|
115
|
+
def initialize(payload)
|
|
116
|
+
@id = payload["id"]
|
|
117
|
+
@parameters = payload["parameters"]
|
|
118
|
+
end
|
|
119
|
+
def to_json(options = {})
|
|
120
|
+
{
|
|
121
|
+
"id": @id,
|
|
122
|
+
"parameters": @parameters,
|
|
123
|
+
}.to_json(options)
|
|
124
|
+
end
|
|
125
|
+
end
|
|
126
|
+
|
|
108
127
|
class ResolvedContext
|
|
109
128
|
# @param [memory]: [ResolvedContextMemory]
|
|
110
129
|
# @param [knowledge]: [ResolvedContextKnowledge]
|
|
@@ -166,6 +185,19 @@ module Twilio
|
|
|
166
185
|
end
|
|
167
186
|
end
|
|
168
187
|
|
|
188
|
+
class RuleOverride
|
|
189
|
+
# @param [operators]: [Array<RuleExecutionList.OperatorOverride>] Operator parameter overrides, merged key-by-key into the stored operator's parameters (override wins on matching keys; unspecified keys retain their stored values). Operators in the stored rule not referenced here execute with their stored parameters unchanged.
|
|
190
|
+
attr_accessor :operators
|
|
191
|
+
def initialize(payload)
|
|
192
|
+
@operators = payload["operators"]
|
|
193
|
+
end
|
|
194
|
+
def to_json(options = {})
|
|
195
|
+
{
|
|
196
|
+
"operators": @operators,
|
|
197
|
+
}.to_json(options)
|
|
198
|
+
end
|
|
199
|
+
end
|
|
200
|
+
|
|
169
201
|
class SystemMetaData
|
|
170
202
|
# @param [resolved_model]: [String] The underlying LLM model used for this execution.
|
|
171
203
|
# @param [latency_ms]: [Integer] Operator execution time in milliseconds.
|
|
@@ -33,7 +33,7 @@ module Twilio
|
|
|
33
33
|
end
|
|
34
34
|
|
|
35
35
|
class SummaryCore
|
|
36
|
-
# @param [source]: [String] The source system that generated the summary. Allows letters, numbers, spaces,
|
|
36
|
+
# @param [source]: [String] The source system that generated the summary. Allows letters, numbers, spaces, periods, underscores, hyphens, and forward slashes.
|
|
37
37
|
# @param [content]: [String] The main content of the summary.
|
|
38
38
|
# @param [occurred_at]: [Time] The timestamp when the summary was originally created.
|
|
39
39
|
# @param [conversation_id]: [String] A unique identifier for the conversation using Twilio Type ID (TTID) format.
|
|
@@ -55,7 +55,7 @@ module Twilio
|
|
|
55
55
|
end
|
|
56
56
|
|
|
57
57
|
class SummaryCorePatch
|
|
58
|
-
# @param [source]: [String] The source system that generated the summary. Allows letters, numbers, spaces,
|
|
58
|
+
# @param [source]: [String] The source system that generated the summary. Allows letters, numbers, spaces, periods, underscores, hyphens, and forward slashes.
|
|
59
59
|
# @param [content]: [String] The main content of the summary.
|
|
60
60
|
# @param [occurred_at]: [Time] The timestamp when the summary was originally created. If not provided, defaults to the time the summary was received.
|
|
61
61
|
# @param [conversation_id]: [String] A unique identifier for the conversation using Twilio Type ID (TTID) format.
|
|
@@ -91,7 +91,7 @@ module Twilio
|
|
|
91
91
|
end
|
|
92
92
|
|
|
93
93
|
class SummaryCore
|
|
94
|
-
# @param [source]: [String] The source system that generated the summary. Allows letters, numbers, spaces,
|
|
94
|
+
# @param [source]: [String] The source system that generated the summary. Allows letters, numbers, spaces, periods, underscores, hyphens, and forward slashes.
|
|
95
95
|
# @param [content]: [String] The main content of the summary.
|
|
96
96
|
# @param [occurred_at]: [Time] The timestamp when the summary was originally created.
|
|
97
97
|
# @param [conversation_id]: [String] A unique identifier for the conversation using Twilio Type ID (TTID) format.
|
|
@@ -113,7 +113,7 @@ module Twilio
|
|
|
113
113
|
end
|
|
114
114
|
|
|
115
115
|
class SummaryCorePatch
|
|
116
|
-
# @param [source]: [String] The source system that generated the summary. Allows letters, numbers, spaces,
|
|
116
|
+
# @param [source]: [String] The source system that generated the summary. Allows letters, numbers, spaces, periods, underscores, hyphens, and forward slashes.
|
|
117
117
|
# @param [content]: [String] The main content of the summary.
|
|
118
118
|
# @param [occurred_at]: [Time] The timestamp when the summary was originally created. If not provided, defaults to the time the summary was received.
|
|
119
119
|
# @param [conversation_id]: [String] A unique identifier for the conversation using Twilio Type ID (TTID) format.
|
|
@@ -714,7 +714,7 @@ module Twilio
|
|
|
714
714
|
end
|
|
715
715
|
|
|
716
716
|
##
|
|
717
|
-
# @return [String] The source system that generated the summary. Allows letters, numbers, spaces,
|
|
717
|
+
# @return [String] The source system that generated the summary. Allows letters, numbers, spaces, periods, underscores, hyphens, and forward slashes.
|
|
718
718
|
def source
|
|
719
719
|
@properties['source']
|
|
720
720
|
end
|
|
@@ -470,7 +470,7 @@ module Twilio
|
|
|
470
470
|
# @return [DataMappingInstance] Patched DataMappingInstance
|
|
471
471
|
def patch(
|
|
472
472
|
if_match: :unset,
|
|
473
|
-
data_mapping_core:
|
|
473
|
+
data_mapping_core: nil
|
|
474
474
|
)
|
|
475
475
|
|
|
476
476
|
headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', 'If-Match' => if_match, })
|
|
@@ -495,7 +495,7 @@ module Twilio
|
|
|
495
495
|
# @return [DataMappingInstance] Patchd DataMappingInstance
|
|
496
496
|
def patch_with_metadata(
|
|
497
497
|
if_match: :unset,
|
|
498
|
-
data_mapping_core:
|
|
498
|
+
data_mapping_core: nil
|
|
499
499
|
)
|
|
500
500
|
|
|
501
501
|
headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', 'If-Match' => if_match, })
|
|
@@ -807,7 +807,7 @@ module Twilio
|
|
|
807
807
|
# @return [DataMappingInstance] Patched DataMappingInstance
|
|
808
808
|
def patch(
|
|
809
809
|
if_match: :unset,
|
|
810
|
-
data_mapping_core:
|
|
810
|
+
data_mapping_core: nil
|
|
811
811
|
)
|
|
812
812
|
|
|
813
813
|
context.patch(
|
|
@@ -35,7 +35,7 @@ module Twilio
|
|
|
35
35
|
class ObservationBase
|
|
36
36
|
# @param [content]: [String] The main content of the observation.
|
|
37
37
|
# @param [occurred_at]: [Time] The timestamp when the observation originally occurred.
|
|
38
|
-
# @param [source]: [String] The source system that generated this observation. Allows letters, numbers, spaces,
|
|
38
|
+
# @param [source]: [String] The source system that generated this observation. Allows letters, numbers, spaces, periods, underscores, hyphens, and forward slashes.
|
|
39
39
|
# @param [conversation_ids]: [Array<String>] Array of conversation IDs associated with this observation.
|
|
40
40
|
attr_accessor :content, :occurred_at, :source, :conversation_ids
|
|
41
41
|
def initialize(payload)
|
|
@@ -57,7 +57,7 @@ module Twilio
|
|
|
57
57
|
class ObservationCreateRequest
|
|
58
58
|
# @param [content]: [String] The main content of the observation.
|
|
59
59
|
# @param [occurred_at]: [Time] The timestamp when the observation originally occurred.
|
|
60
|
-
# @param [source]: [String] The source system that generated this observation. Allows letters, numbers, spaces,
|
|
60
|
+
# @param [source]: [String] The source system that generated this observation. Allows letters, numbers, spaces, periods, underscores, hyphens, and forward slashes.
|
|
61
61
|
# @param [conversation_ids]: [Array<String>] Array of conversation IDs associated with this observation.
|
|
62
62
|
attr_accessor :content, :occurred_at, :source, :conversation_ids
|
|
63
63
|
def initialize(payload)
|
|
@@ -93,7 +93,7 @@ module Twilio
|
|
|
93
93
|
class ObservationBase
|
|
94
94
|
# @param [content]: [String] The main content of the observation.
|
|
95
95
|
# @param [occurred_at]: [Time] The timestamp when the observation originally occurred.
|
|
96
|
-
# @param [source]: [String] The source system that generated this observation. Allows letters, numbers, spaces,
|
|
96
|
+
# @param [source]: [String] The source system that generated this observation. Allows letters, numbers, spaces, periods, underscores, hyphens, and forward slashes.
|
|
97
97
|
# @param [conversation_ids]: [Array<String>] Array of conversation IDs associated with this observation.
|
|
98
98
|
attr_accessor :content, :occurred_at, :source, :conversation_ids
|
|
99
99
|
def initialize(payload)
|
|
@@ -115,7 +115,7 @@ module Twilio
|
|
|
115
115
|
class ObservationCreateRequest
|
|
116
116
|
# @param [content]: [String] The main content of the observation.
|
|
117
117
|
# @param [occurred_at]: [Time] The timestamp when the observation originally occurred.
|
|
118
|
-
# @param [source]: [String] The source system that generated this observation. Allows letters, numbers, spaces,
|
|
118
|
+
# @param [source]: [String] The source system that generated this observation. Allows letters, numbers, spaces, periods, underscores, hyphens, and forward slashes.
|
|
119
119
|
# @param [conversation_ids]: [Array<String>] Array of conversation IDs associated with this observation.
|
|
120
120
|
attr_accessor :content, :occurred_at, :source, :conversation_ids
|
|
121
121
|
def initialize(payload)
|
|
@@ -215,7 +215,7 @@ module Twilio
|
|
|
215
215
|
# memory before returning.
|
|
216
216
|
# @param [String] page_token The token for the page of results to retrieve.
|
|
217
217
|
# @param [String] order_by Either 'ASC' or 'DESC' to sort results ascending or descending respectively.
|
|
218
|
-
# @param [String] source Filter by source. Allows letters, numbers, spaces,
|
|
218
|
+
# @param [String] source Filter by source. Allows letters, numbers, spaces, periods, underscores, hyphens, and forward slashes.
|
|
219
219
|
# @param [Time] created_after Filter observations created after this timestamp (inclusive).
|
|
220
220
|
# @param [Time] created_before Filter observations created before this timestamp (exclusive).
|
|
221
221
|
# @param [String] conversation_id Filter by conversation ID. Returns only items associated with the specified conversation.
|
|
@@ -247,7 +247,7 @@ module Twilio
|
|
|
247
247
|
# is reached.
|
|
248
248
|
# @param [String] page_token The token for the page of results to retrieve.
|
|
249
249
|
# @param [String] order_by Either 'ASC' or 'DESC' to sort results ascending or descending respectively.
|
|
250
|
-
# @param [String] source Filter by source. Allows letters, numbers, spaces,
|
|
250
|
+
# @param [String] source Filter by source. Allows letters, numbers, spaces, periods, underscores, hyphens, and forward slashes.
|
|
251
251
|
# @param [Time] created_after Filter observations created after this timestamp (inclusive).
|
|
252
252
|
# @param [Time] created_before Filter observations created before this timestamp (exclusive).
|
|
253
253
|
# @param [String] conversation_id Filter by conversation ID. Returns only items associated with the specified conversation.
|
|
@@ -283,7 +283,7 @@ module Twilio
|
|
|
283
283
|
# Lists ObservationPageMetadata records from the API as a list.
|
|
284
284
|
# @param [String] page_token The token for the page of results to retrieve.
|
|
285
285
|
# @param [String] order_by Either 'ASC' or 'DESC' to sort results ascending or descending respectively.
|
|
286
|
-
# @param [String] source Filter by source. Allows letters, numbers, spaces,
|
|
286
|
+
# @param [String] source Filter by source. Allows letters, numbers, spaces, periods, underscores, hyphens, and forward slashes.
|
|
287
287
|
# @param [Time] created_after Filter observations created after this timestamp (inclusive).
|
|
288
288
|
# @param [Time] created_before Filter observations created before this timestamp (exclusive).
|
|
289
289
|
# @param [String] conversation_id Filter by conversation ID. Returns only items associated with the specified conversation.
|
|
@@ -337,7 +337,7 @@ module Twilio
|
|
|
337
337
|
# Request is executed immediately.
|
|
338
338
|
# @param [String] page_token The token for the page of results to retrieve.
|
|
339
339
|
# @param [String] order_by Either 'ASC' or 'DESC' to sort results ascending or descending respectively.
|
|
340
|
-
# @param [String] source Filter by source. Allows letters, numbers, spaces,
|
|
340
|
+
# @param [String] source Filter by source. Allows letters, numbers, spaces, periods, underscores, hyphens, and forward slashes.
|
|
341
341
|
# @param [Time] created_after Filter observations created after this timestamp (inclusive).
|
|
342
342
|
# @param [Time] created_before Filter observations created before this timestamp (exclusive).
|
|
343
343
|
# @param [String] conversation_id Filter by conversation ID. Returns only items associated with the specified conversation.
|
|
@@ -758,7 +758,7 @@ module Twilio
|
|
|
758
758
|
end
|
|
759
759
|
|
|
760
760
|
##
|
|
761
|
-
# @return [String] The source system that generated this observation. Allows letters, numbers, spaces,
|
|
761
|
+
# @return [String] The source system that generated this observation. Allows letters, numbers, spaces, periods, underscores, hyphens, and forward slashes.
|
|
762
762
|
def source
|
|
763
763
|
@properties['source']
|
|
764
764
|
end
|
|
@@ -299,7 +299,7 @@ module Twilio
|
|
|
299
299
|
end
|
|
300
300
|
|
|
301
301
|
##
|
|
302
|
-
# @return [String] The source system that generated this observation. Allows letters, numbers, spaces,
|
|
302
|
+
# @return [String] The source system that generated this observation. Allows letters, numbers, spaces, periods, underscores, hyphens, and forward slashes.
|
|
303
303
|
def source
|
|
304
304
|
@properties['source']
|
|
305
305
|
end
|
|
@@ -388,7 +388,7 @@ module Twilio
|
|
|
388
388
|
# @return [StoreInstance] Patched StoreInstance
|
|
389
389
|
def patch(
|
|
390
390
|
if_match: :unset,
|
|
391
|
-
patch_store_request:
|
|
391
|
+
patch_store_request: nil
|
|
392
392
|
)
|
|
393
393
|
|
|
394
394
|
headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', 'If-Match' => if_match, })
|
|
@@ -412,7 +412,7 @@ module Twilio
|
|
|
412
412
|
# @return [StoreInstance] Patchd StoreInstance
|
|
413
413
|
def patch_with_metadata(
|
|
414
414
|
if_match: :unset,
|
|
415
|
-
patch_store_request:
|
|
415
|
+
patch_store_request: nil
|
|
416
416
|
)
|
|
417
417
|
|
|
418
418
|
headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', 'If-Match' => if_match, })
|
|
@@ -716,7 +716,7 @@ module Twilio
|
|
|
716
716
|
# @return [StoreInstance] Patched StoreInstance
|
|
717
717
|
def patch(
|
|
718
718
|
if_match: :unset,
|
|
719
|
-
patch_store_request:
|
|
719
|
+
patch_store_request: nil
|
|
720
720
|
)
|
|
721
721
|
|
|
722
722
|
context.patch(
|
|
@@ -594,7 +594,7 @@ module Twilio
|
|
|
594
594
|
# @return [TraitGroupInstance] Patched TraitGroupInstance
|
|
595
595
|
def patch(
|
|
596
596
|
if_match: :unset,
|
|
597
|
-
patch_trait_group_request:
|
|
597
|
+
patch_trait_group_request: nil
|
|
598
598
|
)
|
|
599
599
|
|
|
600
600
|
headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', 'If-Match' => if_match, })
|
|
@@ -619,7 +619,7 @@ module Twilio
|
|
|
619
619
|
# @return [TraitGroupInstance] Patchd TraitGroupInstance
|
|
620
620
|
def patch_with_metadata(
|
|
621
621
|
if_match: :unset,
|
|
622
|
-
patch_trait_group_request:
|
|
622
|
+
patch_trait_group_request: nil
|
|
623
623
|
)
|
|
624
624
|
|
|
625
625
|
headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', 'If-Match' => if_match, })
|
|
@@ -924,7 +924,7 @@ module Twilio
|
|
|
924
924
|
# @return [TraitGroupInstance] Patched TraitGroupInstance
|
|
925
925
|
def patch(
|
|
926
926
|
if_match: :unset,
|
|
927
|
-
patch_trait_group_request:
|
|
927
|
+
patch_trait_group_request: nil
|
|
928
928
|
)
|
|
929
929
|
|
|
930
930
|
context.patch(
|
|
@@ -20,7 +20,7 @@ module Twilio
|
|
|
20
20
|
class ChannelsSenderList < ListResource
|
|
21
21
|
|
|
22
22
|
class MessagingV2ChannelsSenderProfile
|
|
23
|
-
# @param [name]: [String] The name of the sender. Required for WhatsApp senders and must follow [Meta's display name guidelines](https://www.facebook.com/business/help/757569725593362).
|
|
23
|
+
# @param [name]: [String] The name of the sender. Required for WhatsApp senders and must follow [Meta's display name guidelines](https://www.facebook.com/business/help/757569725593362). On update, a WhatsApp sender's name is not changed synchronously: it is submitted to Meta for review, and `profile.name` continues to report the current active name until Meta approves the new one and the sender is automatically re-registered. Track progress with `pending_display_name_status` on Fetch Sender, and see `display_name_status` on the update response for the immediate outcome. Re-submitting the same name is how you retry applying a name Meta has already approved, for example after correcting the sender's two-step verification PIN. Meta permits a limited number of display name changes per 30-day period.
|
|
24
24
|
# @param [about]: [String] The profile about text for the sender.
|
|
25
25
|
# @param [address]: [String] The address of the sender.
|
|
26
26
|
# @param [description]: [String] The description of the sender.
|
|
@@ -206,7 +206,7 @@ module Twilio
|
|
|
206
206
|
|
|
207
207
|
|
|
208
208
|
class MessagingV2ChannelsSenderProfile
|
|
209
|
-
# @param [name]: [String] The name of the sender. Required for WhatsApp senders and must follow [Meta's display name guidelines](https://www.facebook.com/business/help/757569725593362).
|
|
209
|
+
# @param [name]: [String] The name of the sender. Required for WhatsApp senders and must follow [Meta's display name guidelines](https://www.facebook.com/business/help/757569725593362). On update, a WhatsApp sender's name is not changed synchronously: it is submitted to Meta for review, and `profile.name` continues to report the current active name until Meta approves the new one and the sender is automatically re-registered. Track progress with `pending_display_name_status` on Fetch Sender, and see `display_name_status` on the update response for the immediate outcome. Re-submitting the same name is how you retry applying a name Meta has already approved, for example after correcting the sender's two-step verification PIN. Meta permits a limited number of display name changes per 30-day period.
|
|
210
210
|
# @param [about]: [String] The profile about text for the sender.
|
|
211
211
|
# @param [address]: [String] The address of the sender.
|
|
212
212
|
# @param [description]: [String] The description of the sender.
|
|
@@ -899,10 +899,14 @@ module Twilio
|
|
|
899
899
|
'configuration' => payload['configuration'],
|
|
900
900
|
'webhook' => payload['webhook'],
|
|
901
901
|
'profile' => payload['profile'],
|
|
902
|
+
'pending_display_name' => payload['pending_display_name'],
|
|
903
|
+
'pending_display_name_status' => payload['pending_display_name_status'],
|
|
904
|
+
'pending_display_name_status_date' => Twilio.deserialize_iso8601_datetime(payload['pending_display_name_status_date']),
|
|
902
905
|
'properties' => payload['properties'],
|
|
903
906
|
'offline_reasons' => payload['offline_reasons'],
|
|
904
907
|
'compliance' => payload['compliance'],
|
|
905
908
|
'url' => payload['url'],
|
|
909
|
+
'display_name_status' => payload['display_name_status'],
|
|
906
910
|
}
|
|
907
911
|
|
|
908
912
|
# Context
|
|
@@ -963,6 +967,24 @@ module Twilio
|
|
|
963
967
|
@properties['profile']
|
|
964
968
|
end
|
|
965
969
|
|
|
970
|
+
##
|
|
971
|
+
# @return [String] WhatsApp only. The display name the most recent change applies to — awaiting Meta review, approved by Meta and awaiting re-registration, or, once `pending_display_name_status` is `COMPLETED`, the name now in effect (identical to `name`). Absent when no display name change has been made, and once a completed change stops being reported.
|
|
972
|
+
def pending_display_name
|
|
973
|
+
@properties['pending_display_name']
|
|
974
|
+
end
|
|
975
|
+
|
|
976
|
+
##
|
|
977
|
+
# @return [String] WhatsApp only. The status of the most recent display name change. `PENDING_REVIEW`, `APPROVED` and `DECLINED` are reported by Meta. `PIN_MISMATCH` and `REGISTRATION_FAILED` mean Meta approved the name but it could not be applied; `EXPIRED` means Meta's 14-day window to apply an approved name elapsed. In all three cases, re-submit the same `profile.name` to retry. `COMPLETED` means the name was approved and applied — `name` now returns it. A `COMPLETED` change is reported for 14 days after it completes and is absent afterwards, so treat its presence as \"recently completed\" rather than a permanent flag; use `pending_display_name_status_date` to tell how recent. Absent when no display name change has been made.
|
|
978
|
+
def pending_display_name_status
|
|
979
|
+
@properties['pending_display_name_status']
|
|
980
|
+
end
|
|
981
|
+
|
|
982
|
+
##
|
|
983
|
+
# @return [Time] WhatsApp only. The date and time in UTC when `pending_display_name_status` last changed, specified in ISO 8601 format. Absent whenever `pending_display_name_status` is absent, so the three `pending_display_name*` fields are always present or absent together.
|
|
984
|
+
def pending_display_name_status_date
|
|
985
|
+
@properties['pending_display_name_status_date']
|
|
986
|
+
end
|
|
987
|
+
|
|
966
988
|
##
|
|
967
989
|
# @return [MessagingV2ChannelsSenderProperties]
|
|
968
990
|
def properties
|
|
@@ -987,6 +1009,12 @@ module Twilio
|
|
|
987
1009
|
@properties['url']
|
|
988
1010
|
end
|
|
989
1011
|
|
|
1012
|
+
##
|
|
1013
|
+
# @return [String] WhatsApp only. The outcome of the display name operation in this request. Present only when the request included `profile.name`. `updating` — accepted; either submitted to Meta for review, or, when Meta had already approved this exact name, routed straight to re-registration. `no_change` — the name already matches the sender's active display name; nothing was submitted to Meta. `pending_review` — the same name is already under review at Meta; the existing request continues unchanged. `error` — the display name could not be processed, while other profile fields in the same request were still applied. Returned with a 202 and carries no error code or message. This covers every failure mode, including the case where Meta accepted the name but tracking could not be started — poll `pending_display_name_status` to establish the real state rather than assuming the name was rejected. When `profile.name` is the only field in the request, the failure is returned as an error response with a specific code instead of this status.
|
|
1014
|
+
def display_name_status
|
|
1015
|
+
@properties['display_name_status']
|
|
1016
|
+
end
|
|
1017
|
+
|
|
990
1018
|
##
|
|
991
1019
|
# Delete the ChannelsSenderInstance
|
|
992
1020
|
# @return [Boolean] True if delete succeeds, false otherwise
|