twilio-ruby 7.11.3 → 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/CHANGES.md +76 -0
- data/Gemfile.lock +2 -2
- data/README.md +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/conference.rb +4 -4
- 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 +35 -3
- 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 +512 -17
- data/lib/twilio-ruby/rest/insights/v3/{capacity.rb → custom_field_mappings_capacity.rb} +26 -26
- data/lib/twilio-ruby/rest/insights/v3.rb +17 -7
- data/lib/twilio-ruby/rest/memory/v1/conversation_summary.rb +5 -5
- 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/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/version.rb +1 -1
- metadata +4 -4
- data/lib/twilio-ruby/rest/numbers/v1/voice_verification_check.rb +0 -165
|
@@ -17,24 +17,24 @@ module Twilio
|
|
|
17
17
|
module REST
|
|
18
18
|
class Insights < InsightsBase
|
|
19
19
|
class V3 < Version
|
|
20
|
-
class
|
|
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
27
|
|
|
28
28
|
apiV1Version = ApiV1Version.new version.domain, version
|
|
29
29
|
super(apiV1Version)
|
|
30
30
|
# Path Solution
|
|
31
31
|
@solution = { }
|
|
32
|
-
@uri = "/ControlPlane/ConversationInsights/
|
|
32
|
+
@uri = "/ControlPlane/ConversationInsights/CustomFieldMappingsCapacity"
|
|
33
33
|
|
|
34
34
|
end
|
|
35
35
|
##
|
|
36
|
-
# Fetch the
|
|
37
|
-
# @return [
|
|
36
|
+
# Fetch the CustomFieldMappingsCapacityInstance
|
|
37
|
+
# @return [CustomFieldMappingsCapacityInstance] Fetched CustomFieldMappingsCapacityInstance
|
|
38
38
|
def fetch
|
|
39
39
|
|
|
40
40
|
headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
|
|
@@ -44,15 +44,15 @@ module Twilio
|
|
|
44
44
|
|
|
45
45
|
|
|
46
46
|
payload = @version.fetch('GET', @uri, headers: headers)
|
|
47
|
-
|
|
47
|
+
CustomFieldMappingsCapacityInstance.new(
|
|
48
48
|
@version,
|
|
49
49
|
payload,
|
|
50
50
|
)
|
|
51
51
|
end
|
|
52
52
|
|
|
53
53
|
##
|
|
54
|
-
# Fetch the
|
|
55
|
-
# @return [
|
|
54
|
+
# Fetch the CustomFieldMappingsCapacityInstanceMetadata
|
|
55
|
+
# @return [CustomFieldMappingsCapacityInstance] Fetched CustomFieldMappingsCapacityInstance
|
|
56
56
|
def fetch_with_metadata
|
|
57
57
|
|
|
58
58
|
headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
|
|
@@ -62,13 +62,13 @@ module Twilio
|
|
|
62
62
|
|
|
63
63
|
|
|
64
64
|
response = @version.fetch_with_metadata('GET', @uri, headers: headers)
|
|
65
|
-
|
|
65
|
+
custom_field_mappings_capacity_instance = CustomFieldMappingsCapacityInstance.new(
|
|
66
66
|
@version,
|
|
67
67
|
response.body,
|
|
68
68
|
)
|
|
69
|
-
|
|
69
|
+
CustomFieldMappingsCapacityInstanceMetadata.new(
|
|
70
70
|
@version,
|
|
71
|
-
|
|
71
|
+
custom_field_mappings_capacity_instance,
|
|
72
72
|
response.headers,
|
|
73
73
|
response.status_code
|
|
74
74
|
)
|
|
@@ -79,17 +79,17 @@ module Twilio
|
|
|
79
79
|
|
|
80
80
|
# Provide a user friendly representation
|
|
81
81
|
def to_s
|
|
82
|
-
'#<Twilio.Insights.V3.
|
|
82
|
+
'#<Twilio.Insights.V3.CustomFieldMappingsCapacityList>'
|
|
83
83
|
end
|
|
84
84
|
end
|
|
85
85
|
|
|
86
|
-
class
|
|
86
|
+
class CustomFieldMappingsCapacityPage < TokenPage
|
|
87
87
|
##
|
|
88
|
-
# Initialize the
|
|
88
|
+
# Initialize the CustomFieldMappingsCapacityPage
|
|
89
89
|
# @param [Version] version Version that contains the resource
|
|
90
90
|
# @param [Response] response Response from the API
|
|
91
91
|
# @param [Hash] solution Path solution for the resource
|
|
92
|
-
# @return [
|
|
92
|
+
# @return [CustomFieldMappingsCapacityPage] CustomFieldMappingsCapacityPage
|
|
93
93
|
def initialize(version, response, solution)
|
|
94
94
|
|
|
95
95
|
apiV1Version = ApiV1Version.new version.domain, version
|
|
@@ -100,30 +100,30 @@ module Twilio
|
|
|
100
100
|
end
|
|
101
101
|
|
|
102
102
|
##
|
|
103
|
-
# Build an instance of
|
|
103
|
+
# Build an instance of CustomFieldMappingsCapacityInstance
|
|
104
104
|
# @param [Hash] payload Payload response from the API
|
|
105
|
-
# @return [
|
|
105
|
+
# @return [CustomFieldMappingsCapacityInstance] CustomFieldMappingsCapacityInstance
|
|
106
106
|
def get_instance(payload)
|
|
107
|
-
|
|
107
|
+
CustomFieldMappingsCapacityInstance.new(@version, payload)
|
|
108
108
|
end
|
|
109
109
|
|
|
110
110
|
##
|
|
111
111
|
# Provide a user friendly representation
|
|
112
112
|
def to_s
|
|
113
|
-
'<Twilio.Insights.V3.
|
|
113
|
+
'<Twilio.Insights.V3.CustomFieldMappingsCapacityPage>'
|
|
114
114
|
end
|
|
115
115
|
end
|
|
116
116
|
|
|
117
|
-
class
|
|
117
|
+
class CustomFieldMappingsCapacityInstance < InstanceResource
|
|
118
118
|
##
|
|
119
|
-
# Initialize the
|
|
119
|
+
# Initialize the CustomFieldMappingsCapacityInstance
|
|
120
120
|
# @param [Version] version Version that contains the resource
|
|
121
121
|
# @param [Hash] payload payload that contains response from Twilio
|
|
122
122
|
# @param [String] account_sid The SID of the
|
|
123
|
-
# {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
|
|
124
124
|
# resource.
|
|
125
125
|
# @param [String] sid The SID of the Call resource to fetch.
|
|
126
|
-
# @return [
|
|
126
|
+
# @return [CustomFieldMappingsCapacityInstance] CustomFieldMappingsCapacityInstance
|
|
127
127
|
def initialize(version, payload )
|
|
128
128
|
|
|
129
129
|
apiV1Version = ApiV1Version.new version.domain, version
|
|
@@ -145,13 +145,13 @@ module Twilio
|
|
|
145
145
|
##
|
|
146
146
|
# Provide a user friendly representation
|
|
147
147
|
def to_s
|
|
148
|
-
"<Twilio.Insights.V3.
|
|
148
|
+
"<Twilio.Insights.V3.CustomFieldMappingsCapacityInstance>"
|
|
149
149
|
end
|
|
150
150
|
|
|
151
151
|
##
|
|
152
152
|
# Provide a detailed, user friendly representation
|
|
153
153
|
def inspect
|
|
154
|
-
"<Twilio.Insights.V3.
|
|
154
|
+
"<Twilio.Insights.V3.CustomFieldMappingsCapacityInstance>"
|
|
155
155
|
end
|
|
156
156
|
end
|
|
157
157
|
|
|
@@ -21,22 +21,32 @@ module Twilio
|
|
|
21
21
|
def initialize(domain)
|
|
22
22
|
super
|
|
23
23
|
@version = 'v3'
|
|
24
|
-
@capacity = nil
|
|
25
24
|
@custom_field_mappings = nil
|
|
25
|
+
@custom_field_mappings_capacity = nil
|
|
26
26
|
@metadata = nil
|
|
27
27
|
@query = nil
|
|
28
28
|
@query_jobs = nil
|
|
29
29
|
end
|
|
30
30
|
|
|
31
31
|
##
|
|
32
|
-
# @
|
|
33
|
-
|
|
34
|
-
|
|
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
|
|
35
45
|
end
|
|
36
46
|
##
|
|
37
|
-
# @return [Twilio::REST::Insights::V3::
|
|
38
|
-
def
|
|
39
|
-
@
|
|
47
|
+
# @return [Twilio::REST::Insights::V3::CustomFieldMappingsCapacityList]
|
|
48
|
+
def custom_field_mappings_capacity
|
|
49
|
+
@custom_field_mappings_capacity ||= CustomFieldMappingsCapacityList.new self
|
|
40
50
|
end
|
|
41
51
|
##
|
|
42
52
|
# @return [Twilio::REST::Insights::V3::MetadataList]
|
|
@@ -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
|
|
@@ -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
|
|
@@ -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
|
|
@@ -19,6 +19,26 @@ module Twilio
|
|
|
19
19
|
class V1 < Version
|
|
20
20
|
class SmsVerificationList < ListResource
|
|
21
21
|
|
|
22
|
+
class NumbersV1SmsVerificationRequest
|
|
23
|
+
# @param [to]: [String] The phone number to verify in E.164 format.
|
|
24
|
+
# @param [locale]: [String] The locale for the verification SMS message.
|
|
25
|
+
# @param [friendly_name]: [String] A human-readable name for the caller ID.
|
|
26
|
+
attr_accessor :to, :locale, :friendly_name
|
|
27
|
+
def initialize(payload)
|
|
28
|
+
@to = payload["to"]
|
|
29
|
+
@locale = payload["locale"]
|
|
30
|
+
@friendly_name = payload["friendly_name"]
|
|
31
|
+
end
|
|
32
|
+
def to_json(options = {})
|
|
33
|
+
{
|
|
34
|
+
"to": @to,
|
|
35
|
+
"locale": @locale,
|
|
36
|
+
"friendly_name": @friendly_name,
|
|
37
|
+
}.to_json(options)
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
|
|
22
42
|
##
|
|
23
43
|
# Initialize the SmsVerificationList
|
|
24
44
|
# @param [Version] version Version that contains the resource
|
|
@@ -33,16 +53,18 @@ module Twilio
|
|
|
33
53
|
end
|
|
34
54
|
##
|
|
35
55
|
# Create the SmsVerificationInstance
|
|
56
|
+
# @param [NumbersV1SmsVerificationRequest] numbers_v1_sms_verification_request
|
|
36
57
|
# @return [SmsVerificationInstance] Created SmsVerificationInstance
|
|
37
|
-
def create
|
|
58
|
+
def create(numbers_v1_sms_verification_request: nil
|
|
59
|
+
)
|
|
38
60
|
|
|
39
61
|
headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
|
|
62
|
+
headers['Content-Type'] = 'application/json'
|
|
40
63
|
|
|
41
64
|
|
|
42
65
|
|
|
43
66
|
|
|
44
|
-
|
|
45
|
-
payload = @version.create('POST', @uri, headers: headers)
|
|
67
|
+
payload = @version.create('POST', @uri, headers: headers, data: numbers_v1_sms_verification_request.to_json)
|
|
46
68
|
SmsVerificationInstance.new(
|
|
47
69
|
@version,
|
|
48
70
|
payload,
|
|
@@ -51,16 +73,18 @@ module Twilio
|
|
|
51
73
|
|
|
52
74
|
##
|
|
53
75
|
# Create the SmsVerificationInstanceMetadata
|
|
76
|
+
# @param [NumbersV1SmsVerificationRequest] numbers_v1_sms_verification_request
|
|
54
77
|
# @return [SmsVerificationInstance] Created SmsVerificationInstance
|
|
55
|
-
def create_with_metadata
|
|
78
|
+
def create_with_metadata(numbers_v1_sms_verification_request: nil
|
|
79
|
+
)
|
|
56
80
|
|
|
57
81
|
headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
|
|
82
|
+
headers['Content-Type'] = 'application/json'
|
|
58
83
|
|
|
59
84
|
|
|
60
85
|
|
|
61
86
|
|
|
62
|
-
|
|
63
|
-
response = @version.create_with_metadata('POST', @uri, headers: headers)
|
|
87
|
+
response = @version.create_with_metadata('POST', @uri, headers: headers, data: numbers_v1_sms_verification_request.to_json)
|
|
64
88
|
sms_verification_instance = SmsVerificationInstance.new(
|
|
65
89
|
@version,
|
|
66
90
|
response.body,
|
|
@@ -19,6 +19,26 @@ module Twilio
|
|
|
19
19
|
class V1 < Version
|
|
20
20
|
class SmsVerificationCheckList < ListResource
|
|
21
21
|
|
|
22
|
+
class NumbersV1SmsVerificationCheckRequest
|
|
23
|
+
# @param [to]: [String] The phone number being verified in E.164 format.
|
|
24
|
+
# @param [verification_code]: [String] The 6 character verification code to check.
|
|
25
|
+
# @param [friendly_name]: [String] A human-readable name for the caller ID.
|
|
26
|
+
attr_accessor :to, :verification_code, :friendly_name
|
|
27
|
+
def initialize(payload)
|
|
28
|
+
@to = payload["to"]
|
|
29
|
+
@verification_code = payload["verification_code"]
|
|
30
|
+
@friendly_name = payload["friendly_name"]
|
|
31
|
+
end
|
|
32
|
+
def to_json(options = {})
|
|
33
|
+
{
|
|
34
|
+
"to": @to,
|
|
35
|
+
"verification_code": @verification_code,
|
|
36
|
+
"friendly_name": @friendly_name,
|
|
37
|
+
}.to_json(options)
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
|
|
22
42
|
##
|
|
23
43
|
# Initialize the SmsVerificationCheckList
|
|
24
44
|
# @param [Version] version Version that contains the resource
|
|
@@ -33,16 +53,18 @@ module Twilio
|
|
|
33
53
|
end
|
|
34
54
|
##
|
|
35
55
|
# Create the SmsVerificationCheckInstance
|
|
56
|
+
# @param [NumbersV1SmsVerificationCheckRequest] numbers_v1_sms_verification_check_request
|
|
36
57
|
# @return [SmsVerificationCheckInstance] Created SmsVerificationCheckInstance
|
|
37
|
-
def create
|
|
58
|
+
def create(numbers_v1_sms_verification_check_request: nil
|
|
59
|
+
)
|
|
38
60
|
|
|
39
61
|
headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
|
|
62
|
+
headers['Content-Type'] = 'application/json'
|
|
40
63
|
|
|
41
64
|
|
|
42
65
|
|
|
43
66
|
|
|
44
|
-
|
|
45
|
-
payload = @version.create('POST', @uri, headers: headers)
|
|
67
|
+
payload = @version.create('POST', @uri, headers: headers, data: numbers_v1_sms_verification_check_request.to_json)
|
|
46
68
|
SmsVerificationCheckInstance.new(
|
|
47
69
|
@version,
|
|
48
70
|
payload,
|
|
@@ -51,16 +73,18 @@ module Twilio
|
|
|
51
73
|
|
|
52
74
|
##
|
|
53
75
|
# Create the SmsVerificationCheckInstanceMetadata
|
|
76
|
+
# @param [NumbersV1SmsVerificationCheckRequest] numbers_v1_sms_verification_check_request
|
|
54
77
|
# @return [SmsVerificationCheckInstance] Created SmsVerificationCheckInstance
|
|
55
|
-
def create_with_metadata
|
|
78
|
+
def create_with_metadata(numbers_v1_sms_verification_check_request: nil
|
|
79
|
+
)
|
|
56
80
|
|
|
57
81
|
headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
|
|
82
|
+
headers['Content-Type'] = 'application/json'
|
|
58
83
|
|
|
59
84
|
|
|
60
85
|
|
|
61
86
|
|
|
62
|
-
|
|
63
|
-
response = @version.create_with_metadata('POST', @uri, headers: headers)
|
|
87
|
+
response = @version.create_with_metadata('POST', @uri, headers: headers, data: numbers_v1_sms_verification_check_request.to_json)
|
|
64
88
|
sms_verification_check_instance = SmsVerificationCheckInstance.new(
|
|
65
89
|
@version,
|
|
66
90
|
response.body,
|
|
@@ -19,6 +19,41 @@ module Twilio
|
|
|
19
19
|
class V1 < Version
|
|
20
20
|
class VoiceVerificationList < ListResource
|
|
21
21
|
|
|
22
|
+
class NumbersV1VoiceVerificationRequest
|
|
23
|
+
# @param [phone_number]: [String] The phone number to verify in E.164 format.
|
|
24
|
+
# @param [friendly_name]: [String] A human-readable name for the caller ID.
|
|
25
|
+
# @param [custom_code]: [String] A custom verification code to use instead of a generated one.
|
|
26
|
+
# @param [call_delay]: [String] Number of seconds to delay the verification call (0-60).
|
|
27
|
+
# @param [status_callback]: [String] URL to receive status callback events.
|
|
28
|
+
# @param [status_callback_method]: [String] HTTP method for status callback requests.
|
|
29
|
+
# @param [extension]: [String] Phone extension to dial after connecting.
|
|
30
|
+
# @param [custom_success_message]: [String] Custom message to play after successful verification.
|
|
31
|
+
attr_accessor :phone_number, :friendly_name, :custom_code, :call_delay, :status_callback, :status_callback_method, :extension, :custom_success_message
|
|
32
|
+
def initialize(payload)
|
|
33
|
+
@phone_number = payload["phone_number"]
|
|
34
|
+
@friendly_name = payload["friendly_name"]
|
|
35
|
+
@custom_code = payload["custom_code"]
|
|
36
|
+
@call_delay = payload["call_delay"]
|
|
37
|
+
@status_callback = payload["status_callback"]
|
|
38
|
+
@status_callback_method = payload["status_callback_method"]
|
|
39
|
+
@extension = payload["extension"]
|
|
40
|
+
@custom_success_message = payload["custom_success_message"]
|
|
41
|
+
end
|
|
42
|
+
def to_json(options = {})
|
|
43
|
+
{
|
|
44
|
+
"phone_number": @phone_number,
|
|
45
|
+
"friendly_name": @friendly_name,
|
|
46
|
+
"custom_code": @custom_code,
|
|
47
|
+
"call_delay": @call_delay,
|
|
48
|
+
"status_callback": @status_callback,
|
|
49
|
+
"status_callback_method": @status_callback_method,
|
|
50
|
+
"extension": @extension,
|
|
51
|
+
"custom_success_message": @custom_success_message,
|
|
52
|
+
}.to_json(options)
|
|
53
|
+
end
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
|
|
22
57
|
##
|
|
23
58
|
# Initialize the VoiceVerificationList
|
|
24
59
|
# @param [Version] version Version that contains the resource
|
|
@@ -33,16 +68,18 @@ module Twilio
|
|
|
33
68
|
end
|
|
34
69
|
##
|
|
35
70
|
# Create the VoiceVerificationInstance
|
|
71
|
+
# @param [NumbersV1VoiceVerificationRequest] numbers_v1_voice_verification_request
|
|
36
72
|
# @return [VoiceVerificationInstance] Created VoiceVerificationInstance
|
|
37
|
-
def create
|
|
73
|
+
def create(numbers_v1_voice_verification_request: nil
|
|
74
|
+
)
|
|
38
75
|
|
|
39
76
|
headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
|
|
77
|
+
headers['Content-Type'] = 'application/json'
|
|
40
78
|
|
|
41
79
|
|
|
42
80
|
|
|
43
81
|
|
|
44
|
-
|
|
45
|
-
payload = @version.create('POST', @uri, headers: headers)
|
|
82
|
+
payload = @version.create('POST', @uri, headers: headers, data: numbers_v1_voice_verification_request.to_json)
|
|
46
83
|
VoiceVerificationInstance.new(
|
|
47
84
|
@version,
|
|
48
85
|
payload,
|
|
@@ -51,16 +88,18 @@ module Twilio
|
|
|
51
88
|
|
|
52
89
|
##
|
|
53
90
|
# Create the VoiceVerificationInstanceMetadata
|
|
91
|
+
# @param [NumbersV1VoiceVerificationRequest] numbers_v1_voice_verification_request
|
|
54
92
|
# @return [VoiceVerificationInstance] Created VoiceVerificationInstance
|
|
55
|
-
def create_with_metadata
|
|
93
|
+
def create_with_metadata(numbers_v1_voice_verification_request: nil
|
|
94
|
+
)
|
|
56
95
|
|
|
57
96
|
headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
|
|
97
|
+
headers['Content-Type'] = 'application/json'
|
|
58
98
|
|
|
59
99
|
|
|
60
100
|
|
|
61
101
|
|
|
62
|
-
|
|
63
|
-
response = @version.create_with_metadata('POST', @uri, headers: headers)
|
|
102
|
+
response = @version.create_with_metadata('POST', @uri, headers: headers, data: numbers_v1_voice_verification_request.to_json)
|
|
64
103
|
voice_verification_instance = VoiceVerificationInstance.new(
|
|
65
104
|
@version,
|
|
66
105
|
response.body,
|