twilio-ruby 5.73.3 → 5.74.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGES.md +49 -0
- data/README.md +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/address.rb +19 -3
- data/lib/twilio-ruby/rest/api/v2010/account/call/user_defined_message_subscription.rb +4 -4
- data/lib/twilio-ruby/rest/content/v1/content/approval_fetch.rb +195 -0
- data/lib/twilio-ruby/rest/content/v1/content.rb +18 -9
- data/lib/twilio-ruby/rest/flex_api/v1/assessments.rb +156 -0
- data/lib/twilio-ruby/rest/flex_api/v1/good_data.rb +6 -6
- data/lib/twilio-ruby/rest/flex_api/v1/user_roles.rb +1 -1
- data/lib/twilio-ruby/rest/flex_api/v1.rb +7 -0
- data/lib/twilio-ruby/rest/flex_api/v2/web_channels.rb +133 -0
- data/lib/twilio-ruby/rest/flex_api/v2.rb +35 -0
- data/lib/twilio-ruby/rest/flex_api.rb +19 -0
- data/lib/twilio-ruby/rest/lookups/v2/phone_number.rb +81 -6
- data/lib/twilio-ruby/rest/messaging/v1/domain_cert.rb +257 -0
- data/lib/twilio-ruby/rest/messaging/v1/domain_config.rb +267 -0
- data/lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb +43 -18
- data/lib/twilio-ruby/rest/messaging/v1.rb +34 -0
- data/lib/twilio-ruby/rest/messaging.rb +18 -0
- data/lib/twilio-ruby/rest/microvisor/v1/device.rb +7 -0
- data/lib/twilio-ruby/rest/oauth/v1/device_code.rb +153 -0
- data/lib/twilio-ruby/rest/oauth/v1/openid_discovery.rb +1 -1
- data/lib/twilio-ruby/rest/oauth/v1.rb +7 -0
- data/lib/twilio-ruby/rest/oauth.rb +6 -0
- data/lib/twilio-ruby/rest/preview.rb +0 -33
- data/lib/twilio-ruby/rest/supersim/v1/settings_update.rb +12 -5
- data/lib/twilio-ruby/twiml/voice_response.rb +21 -21
- data/lib/twilio-ruby/version.rb +1 -1
- metadata +9 -8
- data/lib/twilio-ruby/rest/preview/trusted_comms/branded_channel/channel.rb +0 -165
- data/lib/twilio-ruby/rest/preview/trusted_comms/branded_channel.rb +0 -225
- data/lib/twilio-ruby/rest/preview/trusted_comms/brands_information.rb +0 -195
- data/lib/twilio-ruby/rest/preview/trusted_comms/cps.rb +0 -186
- data/lib/twilio-ruby/rest/preview/trusted_comms/current_call.rb +0 -277
- data/lib/twilio-ruby/rest/preview/trusted_comms.rb +0 -65
@@ -25,7 +25,6 @@ module Twilio
|
|
25
25
|
@sync = nil
|
26
26
|
@understand = nil
|
27
27
|
@wireless = nil
|
28
|
-
@trusted_comms = nil
|
29
28
|
end
|
30
29
|
|
31
30
|
##
|
@@ -64,12 +63,6 @@ module Twilio
|
|
64
63
|
@wireless ||= Wireless.new self
|
65
64
|
end
|
66
65
|
|
67
|
-
##
|
68
|
-
# Version trusted_comms of preview
|
69
|
-
def trusted_comms
|
70
|
-
@trusted_comms ||= TrustedComms.new self
|
71
|
-
end
|
72
|
-
|
73
66
|
##
|
74
67
|
# @param [String] sid Contains a 34 character string that uniquely identifies this
|
75
68
|
# Fleet resource.
|
@@ -157,32 +150,6 @@ module Twilio
|
|
157
150
|
self.wireless.sims(sid)
|
158
151
|
end
|
159
152
|
|
160
|
-
##
|
161
|
-
# @param [String] sid The unique SID identifier of the Branded Channel.
|
162
|
-
# @return [Twilio::REST::Preview::TrustedComms::BrandedChannelInstance] if sid was passed.
|
163
|
-
# @return [Twilio::REST::Preview::TrustedComms::BrandedChannelList]
|
164
|
-
def branded_channels(sid=:unset)
|
165
|
-
self.trusted_comms.branded_channels(sid)
|
166
|
-
end
|
167
|
-
|
168
|
-
##
|
169
|
-
# @return [Twilio::REST::Preview::TrustedComms::BrandsInformationInstance]
|
170
|
-
def brands_information
|
171
|
-
self.trusted_comms.brands_information()
|
172
|
-
end
|
173
|
-
|
174
|
-
##
|
175
|
-
# @return [Twilio::REST::Preview::TrustedComms::CpsInstance]
|
176
|
-
def cps
|
177
|
-
self.trusted_comms.cps()
|
178
|
-
end
|
179
|
-
|
180
|
-
##
|
181
|
-
# @return [Twilio::REST::Preview::TrustedComms::CurrentCallInstance]
|
182
|
-
def current_calls
|
183
|
-
self.trusted_comms.current_calls()
|
184
|
-
end
|
185
|
-
|
186
153
|
##
|
187
154
|
# Provide a user friendly representation
|
188
155
|
def to_s
|
@@ -31,6 +31,8 @@ module Twilio
|
|
31
31
|
# memory before returning.
|
32
32
|
# @param [String] sim Filter the Settings Updates by a Super SIM's SID or
|
33
33
|
# UniqueName.
|
34
|
+
# @param [settings_update.Status] status Filter the Settings Updates by status.
|
35
|
+
# Can be `scheduled`, `in-progress`, `successful`, or `failed`.
|
34
36
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
35
37
|
# guarantees to never return more than limit. Default is no limit
|
36
38
|
# @param [Integer] page_size Number of records to fetch per request, when
|
@@ -38,8 +40,8 @@ module Twilio
|
|
38
40
|
# but a limit is defined, stream() will attempt to read the limit with the most
|
39
41
|
# efficient page size, i.e. min(limit, 1000)
|
40
42
|
# @return [Array] Array of up to limit results
|
41
|
-
def list(sim: :unset, limit: nil, page_size: nil)
|
42
|
-
self.stream(sim: sim, limit: limit, page_size: page_size).entries
|
43
|
+
def list(sim: :unset, status: :unset, limit: nil, page_size: nil)
|
44
|
+
self.stream(sim: sim, status: status, limit: limit, page_size: page_size).entries
|
43
45
|
end
|
44
46
|
|
45
47
|
##
|
@@ -48,6 +50,8 @@ module Twilio
|
|
48
50
|
# is reached.
|
49
51
|
# @param [String] sim Filter the Settings Updates by a Super SIM's SID or
|
50
52
|
# UniqueName.
|
53
|
+
# @param [settings_update.Status] status Filter the Settings Updates by status.
|
54
|
+
# Can be `scheduled`, `in-progress`, `successful`, or `failed`.
|
51
55
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
52
56
|
# guarantees to never return more than limit. Default is no limit.
|
53
57
|
# @param [Integer] page_size Number of records to fetch per request, when
|
@@ -55,10 +59,10 @@ module Twilio
|
|
55
59
|
# but a limit is defined, stream() will attempt to read the limit with the most
|
56
60
|
# efficient page size, i.e. min(limit, 1000)
|
57
61
|
# @return [Enumerable] Enumerable that will yield up to limit results
|
58
|
-
def stream(sim: :unset, limit: nil, page_size: nil)
|
62
|
+
def stream(sim: :unset, status: :unset, limit: nil, page_size: nil)
|
59
63
|
limits = @version.read_limits(limit, page_size)
|
60
64
|
|
61
|
-
page = self.page(sim: sim, page_size: limits[:page_size], )
|
65
|
+
page = self.page(sim: sim, status: status, page_size: limits[:page_size], )
|
62
66
|
|
63
67
|
@version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit])
|
64
68
|
end
|
@@ -82,13 +86,16 @@ module Twilio
|
|
82
86
|
# Request is executed immediately.
|
83
87
|
# @param [String] sim Filter the Settings Updates by a Super SIM's SID or
|
84
88
|
# UniqueName.
|
89
|
+
# @param [settings_update.Status] status Filter the Settings Updates by status.
|
90
|
+
# Can be `scheduled`, `in-progress`, `successful`, or `failed`.
|
85
91
|
# @param [String] page_token PageToken provided by the API
|
86
92
|
# @param [Integer] page_number Page Number, this value is simply for client state
|
87
93
|
# @param [Integer] page_size Number of records to return, defaults to 50
|
88
94
|
# @return [Page] Page of SettingsUpdateInstance
|
89
|
-
def page(sim: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
|
95
|
+
def page(sim: :unset, status: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
|
90
96
|
params = Twilio::Values.of({
|
91
97
|
'Sim' => sim,
|
98
|
+
'Status' => status,
|
92
99
|
'PageToken' => page_token,
|
93
100
|
'Page' => page_number,
|
94
101
|
'PageSize' => page_size,
|
@@ -614,10 +614,10 @@ module Twilio
|
|
614
614
|
# Create a new <Say-As> element
|
615
615
|
# words:: Words to be interpreted
|
616
616
|
# interpretAs:: Specify the type of words are spoken
|
617
|
-
#
|
617
|
+
# format:: Specify the format of the date when interpret-as is set to date
|
618
618
|
# keyword_args:: additional attributes
|
619
|
-
def say_as(words, interpretAs: nil,
|
620
|
-
append(SsmlSayAs.new(words, interpretAs: interpretAs,
|
619
|
+
def say_as(words, interpretAs: nil, format: nil, **keyword_args)
|
620
|
+
append(SsmlSayAs.new(words, interpretAs: interpretAs, format: format, **keyword_args))
|
621
621
|
end
|
622
622
|
|
623
623
|
##
|
@@ -701,10 +701,10 @@ module Twilio
|
|
701
701
|
# Create a new <Say-As> element
|
702
702
|
# words:: Words to be interpreted
|
703
703
|
# interpretAs:: Specify the type of words are spoken
|
704
|
-
#
|
704
|
+
# format:: Specify the format of the date when interpret-as is set to date
|
705
705
|
# keyword_args:: additional attributes
|
706
|
-
def say_as(words, interpretAs: nil,
|
707
|
-
append(SsmlSayAs.new(words, interpretAs: interpretAs,
|
706
|
+
def say_as(words, interpretAs: nil, format: nil, **keyword_args)
|
707
|
+
append(SsmlSayAs.new(words, interpretAs: interpretAs, format: format, **keyword_args))
|
708
708
|
end
|
709
709
|
|
710
710
|
##
|
@@ -832,10 +832,10 @@ module Twilio
|
|
832
832
|
# Create a new <Say-As> element
|
833
833
|
# words:: Words to be interpreted
|
834
834
|
# interpretAs:: Specify the type of words are spoken
|
835
|
-
#
|
835
|
+
# format:: Specify the format of the date when interpret-as is set to date
|
836
836
|
# keyword_args:: additional attributes
|
837
|
-
def say_as(words, interpretAs: nil,
|
838
|
-
append(SsmlSayAs.new(words, interpretAs: interpretAs,
|
837
|
+
def say_as(words, interpretAs: nil, format: nil, **keyword_args)
|
838
|
+
append(SsmlSayAs.new(words, interpretAs: interpretAs, format: format, **keyword_args))
|
839
839
|
end
|
840
840
|
|
841
841
|
##
|
@@ -931,10 +931,10 @@ module Twilio
|
|
931
931
|
# Create a new <Say-As> element
|
932
932
|
# words:: Words to be interpreted
|
933
933
|
# interpretAs:: Specify the type of words are spoken
|
934
|
-
#
|
934
|
+
# format:: Specify the format of the date when interpret-as is set to date
|
935
935
|
# keyword_args:: additional attributes
|
936
|
-
def say_as(words, interpretAs: nil,
|
937
|
-
append(SsmlSayAs.new(words, interpretAs: interpretAs,
|
936
|
+
def say_as(words, interpretAs: nil, format: nil, **keyword_args)
|
937
|
+
append(SsmlSayAs.new(words, interpretAs: interpretAs, format: format, **keyword_args))
|
938
938
|
end
|
939
939
|
|
940
940
|
##
|
@@ -1063,10 +1063,10 @@ module Twilio
|
|
1063
1063
|
# Create a new <Say-As> element
|
1064
1064
|
# words:: Words to be interpreted
|
1065
1065
|
# interpretAs:: Specify the type of words are spoken
|
1066
|
-
#
|
1066
|
+
# format:: Specify the format of the date when interpret-as is set to date
|
1067
1067
|
# keyword_args:: additional attributes
|
1068
|
-
def say_as(words, interpretAs: nil,
|
1069
|
-
append(SsmlSayAs.new(words, interpretAs: interpretAs,
|
1068
|
+
def say_as(words, interpretAs: nil, format: nil, **keyword_args)
|
1069
|
+
append(SsmlSayAs.new(words, interpretAs: interpretAs, format: format, **keyword_args))
|
1070
1070
|
end
|
1071
1071
|
|
1072
1072
|
##
|
@@ -1173,10 +1173,10 @@ module Twilio
|
|
1173
1173
|
# Create a new <Say-As> element
|
1174
1174
|
# words:: Words to be interpreted
|
1175
1175
|
# interpretAs:: Specify the type of words are spoken
|
1176
|
-
#
|
1176
|
+
# format:: Specify the format of the date when interpret-as is set to date
|
1177
1177
|
# keyword_args:: additional attributes
|
1178
|
-
def say_as(words, interpretAs: nil,
|
1179
|
-
append(SsmlSayAs.new(words, interpretAs: interpretAs,
|
1178
|
+
def say_as(words, interpretAs: nil, format: nil, **keyword_args)
|
1179
|
+
append(SsmlSayAs.new(words, interpretAs: interpretAs, format: format, **keyword_args))
|
1180
1180
|
end
|
1181
1181
|
|
1182
1182
|
##
|
@@ -1272,10 +1272,10 @@ module Twilio
|
|
1272
1272
|
# Create a new <Say-As> element
|
1273
1273
|
# words:: Words to be interpreted
|
1274
1274
|
# interpretAs:: Specify the type of words are spoken
|
1275
|
-
#
|
1275
|
+
# format:: Specify the format of the date when interpret-as is set to date
|
1276
1276
|
# keyword_args:: additional attributes
|
1277
|
-
def say_as(words, interpretAs: nil,
|
1278
|
-
append(SsmlSayAs.new(words, interpretAs: interpretAs,
|
1277
|
+
def say_as(words, interpretAs: nil, format: nil, **keyword_args)
|
1278
|
+
append(SsmlSayAs.new(words, interpretAs: interpretAs, format: format, **keyword_args))
|
1279
1279
|
end
|
1280
1280
|
|
1281
1281
|
##
|
data/lib/twilio-ruby/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: twilio-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.
|
4
|
+
version: 5.74.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Twilio API Team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-12-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jwt
|
@@ -384,6 +384,7 @@ files:
|
|
384
384
|
- lib/twilio-ruby/rest/content.rb
|
385
385
|
- lib/twilio-ruby/rest/content/v1.rb
|
386
386
|
- lib/twilio-ruby/rest/content/v1/content.rb
|
387
|
+
- lib/twilio-ruby/rest/content/v1/content/approval_fetch.rb
|
387
388
|
- lib/twilio-ruby/rest/conversations.rb
|
388
389
|
- lib/twilio-ruby/rest/conversations/v1.rb
|
389
390
|
- lib/twilio-ruby/rest/conversations/v1/address_configuration.rb
|
@@ -425,6 +426,7 @@ files:
|
|
425
426
|
- lib/twilio-ruby/rest/events/v1/subscription/subscribed_event.rb
|
426
427
|
- lib/twilio-ruby/rest/flex_api.rb
|
427
428
|
- lib/twilio-ruby/rest/flex_api/v1.rb
|
429
|
+
- lib/twilio-ruby/rest/flex_api/v1/assessments.rb
|
428
430
|
- lib/twilio-ruby/rest/flex_api/v1/channel.rb
|
429
431
|
- lib/twilio-ruby/rest/flex_api/v1/configuration.rb
|
430
432
|
- lib/twilio-ruby/rest/flex_api/v1/flex_flow.rb
|
@@ -435,6 +437,8 @@ files:
|
|
435
437
|
- lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel/interaction_channel_participant.rb
|
436
438
|
- lib/twilio-ruby/rest/flex_api/v1/user_roles.rb
|
437
439
|
- lib/twilio-ruby/rest/flex_api/v1/web_channel.rb
|
440
|
+
- lib/twilio-ruby/rest/flex_api/v2.rb
|
441
|
+
- lib/twilio-ruby/rest/flex_api/v2/web_channels.rb
|
438
442
|
- lib/twilio-ruby/rest/frontline_api.rb
|
439
443
|
- lib/twilio-ruby/rest/frontline_api/v1.rb
|
440
444
|
- lib/twilio-ruby/rest/frontline_api/v1/user.rb
|
@@ -491,6 +495,8 @@ files:
|
|
491
495
|
- lib/twilio-ruby/rest/messaging/v1/brand_registration.rb
|
492
496
|
- lib/twilio-ruby/rest/messaging/v1/brand_registration/brand_vetting.rb
|
493
497
|
- lib/twilio-ruby/rest/messaging/v1/deactivation.rb
|
498
|
+
- lib/twilio-ruby/rest/messaging/v1/domain_cert.rb
|
499
|
+
- lib/twilio-ruby/rest/messaging/v1/domain_config.rb
|
494
500
|
- lib/twilio-ruby/rest/messaging/v1/external_campaign.rb
|
495
501
|
- lib/twilio-ruby/rest/messaging/v1/service.rb
|
496
502
|
- lib/twilio-ruby/rest/messaging/v1/service/alpha_sender.rb
|
@@ -529,6 +535,7 @@ files:
|
|
529
535
|
- lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/supporting_document_type.rb
|
530
536
|
- lib/twilio-ruby/rest/oauth.rb
|
531
537
|
- lib/twilio-ruby/rest/oauth/v1.rb
|
538
|
+
- lib/twilio-ruby/rest/oauth/v1/device_code.rb
|
532
539
|
- lib/twilio-ruby/rest/oauth/v1/oauth.rb
|
533
540
|
- lib/twilio-ruby/rest/oauth/v1/openid_discovery.rb
|
534
541
|
- lib/twilio-ruby/rest/oauth/v1/token.rb
|
@@ -559,12 +566,6 @@ files:
|
|
559
566
|
- lib/twilio-ruby/rest/preview/sync/service/sync_map.rb
|
560
567
|
- lib/twilio-ruby/rest/preview/sync/service/sync_map/sync_map_item.rb
|
561
568
|
- lib/twilio-ruby/rest/preview/sync/service/sync_map/sync_map_permission.rb
|
562
|
-
- lib/twilio-ruby/rest/preview/trusted_comms.rb
|
563
|
-
- lib/twilio-ruby/rest/preview/trusted_comms/branded_channel.rb
|
564
|
-
- lib/twilio-ruby/rest/preview/trusted_comms/branded_channel/channel.rb
|
565
|
-
- lib/twilio-ruby/rest/preview/trusted_comms/brands_information.rb
|
566
|
-
- lib/twilio-ruby/rest/preview/trusted_comms/cps.rb
|
567
|
-
- lib/twilio-ruby/rest/preview/trusted_comms/current_call.rb
|
568
569
|
- lib/twilio-ruby/rest/preview/understand.rb
|
569
570
|
- lib/twilio-ruby/rest/preview/understand/assistant.rb
|
570
571
|
- lib/twilio-ruby/rest/preview/understand/assistant/assistant_fallback_actions.rb
|
@@ -1,165 +0,0 @@
|
|
1
|
-
##
|
2
|
-
# This code was generated by
|
3
|
-
# \ / _ _ _| _ _
|
4
|
-
# | (_)\/(_)(_|\/| |(/_ v1.0.0
|
5
|
-
# / /
|
6
|
-
#
|
7
|
-
# frozen_string_literal: true
|
8
|
-
|
9
|
-
module Twilio
|
10
|
-
module REST
|
11
|
-
class Preview < Domain
|
12
|
-
class TrustedComms < Version
|
13
|
-
class BrandedChannelContext < InstanceContext
|
14
|
-
##
|
15
|
-
# PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
|
16
|
-
class ChannelList < ListResource
|
17
|
-
##
|
18
|
-
# Initialize the ChannelList
|
19
|
-
# @param [Version] version Version that contains the resource
|
20
|
-
# @param [String] branded_channel_sid The unique SID identifier of the Branded
|
21
|
-
# Channel.
|
22
|
-
# @return [ChannelList] ChannelList
|
23
|
-
def initialize(version, branded_channel_sid: nil)
|
24
|
-
super(version)
|
25
|
-
|
26
|
-
# Path Solution
|
27
|
-
@solution = {branded_channel_sid: branded_channel_sid}
|
28
|
-
@uri = "/BrandedChannels/#{@solution[:branded_channel_sid]}/Channels"
|
29
|
-
end
|
30
|
-
|
31
|
-
##
|
32
|
-
# Create the ChannelInstance
|
33
|
-
# @param [String] phone_number_sid The unique SID identifier of the Phone Number
|
34
|
-
# of the Phone number to be assigned to the Branded Channel.
|
35
|
-
# @return [ChannelInstance] Created ChannelInstance
|
36
|
-
def create(phone_number_sid: nil)
|
37
|
-
data = Twilio::Values.of({'PhoneNumberSid' => phone_number_sid, })
|
38
|
-
|
39
|
-
payload = @version.create('POST', @uri, data: data)
|
40
|
-
|
41
|
-
ChannelInstance.new(@version, payload, branded_channel_sid: @solution[:branded_channel_sid], )
|
42
|
-
end
|
43
|
-
|
44
|
-
##
|
45
|
-
# Provide a user friendly representation
|
46
|
-
def to_s
|
47
|
-
'#<Twilio.Preview.TrustedComms.ChannelList>'
|
48
|
-
end
|
49
|
-
end
|
50
|
-
|
51
|
-
##
|
52
|
-
# PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
|
53
|
-
class ChannelPage < Page
|
54
|
-
##
|
55
|
-
# Initialize the ChannelPage
|
56
|
-
# @param [Version] version Version that contains the resource
|
57
|
-
# @param [Response] response Response from the API
|
58
|
-
# @param [Hash] solution Path solution for the resource
|
59
|
-
# @return [ChannelPage] ChannelPage
|
60
|
-
def initialize(version, response, solution)
|
61
|
-
super(version, response)
|
62
|
-
|
63
|
-
# Path Solution
|
64
|
-
@solution = solution
|
65
|
-
end
|
66
|
-
|
67
|
-
##
|
68
|
-
# Build an instance of ChannelInstance
|
69
|
-
# @param [Hash] payload Payload response from the API
|
70
|
-
# @return [ChannelInstance] ChannelInstance
|
71
|
-
def get_instance(payload)
|
72
|
-
ChannelInstance.new(@version, payload, branded_channel_sid: @solution[:branded_channel_sid], )
|
73
|
-
end
|
74
|
-
|
75
|
-
##
|
76
|
-
# Provide a user friendly representation
|
77
|
-
def to_s
|
78
|
-
'<Twilio.Preview.TrustedComms.ChannelPage>'
|
79
|
-
end
|
80
|
-
end
|
81
|
-
|
82
|
-
##
|
83
|
-
# PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
|
84
|
-
class ChannelInstance < InstanceResource
|
85
|
-
##
|
86
|
-
# Initialize the ChannelInstance
|
87
|
-
# @param [Version] version Version that contains the resource
|
88
|
-
# @param [Hash] payload payload that contains response from Twilio
|
89
|
-
# @param [String] branded_channel_sid The unique SID identifier of the Branded
|
90
|
-
# Channel.
|
91
|
-
# @return [ChannelInstance] ChannelInstance
|
92
|
-
def initialize(version, payload, branded_channel_sid: nil)
|
93
|
-
super(version)
|
94
|
-
|
95
|
-
# Marshaled Properties
|
96
|
-
@properties = {
|
97
|
-
'account_sid' => payload['account_sid'],
|
98
|
-
'business_sid' => payload['business_sid'],
|
99
|
-
'brand_sid' => payload['brand_sid'],
|
100
|
-
'branded_channel_sid' => payload['branded_channel_sid'],
|
101
|
-
'phone_number_sid' => payload['phone_number_sid'],
|
102
|
-
'phone_number' => payload['phone_number'],
|
103
|
-
'url' => payload['url'],
|
104
|
-
}
|
105
|
-
end
|
106
|
-
|
107
|
-
##
|
108
|
-
# @return [String] Account Sid.
|
109
|
-
def account_sid
|
110
|
-
@properties['account_sid']
|
111
|
-
end
|
112
|
-
|
113
|
-
##
|
114
|
-
# @return [String] Business Sid.
|
115
|
-
def business_sid
|
116
|
-
@properties['business_sid']
|
117
|
-
end
|
118
|
-
|
119
|
-
##
|
120
|
-
# @return [String] Brand Sid.
|
121
|
-
def brand_sid
|
122
|
-
@properties['brand_sid']
|
123
|
-
end
|
124
|
-
|
125
|
-
##
|
126
|
-
# @return [String] Branded Channel Sid.
|
127
|
-
def branded_channel_sid
|
128
|
-
@properties['branded_channel_sid']
|
129
|
-
end
|
130
|
-
|
131
|
-
##
|
132
|
-
# @return [String] Phone Number Sid to be branded.
|
133
|
-
def phone_number_sid
|
134
|
-
@properties['phone_number_sid']
|
135
|
-
end
|
136
|
-
|
137
|
-
##
|
138
|
-
# @return [String] Twilio number to assign to the Branded Channel
|
139
|
-
def phone_number
|
140
|
-
@properties['phone_number']
|
141
|
-
end
|
142
|
-
|
143
|
-
##
|
144
|
-
# @return [String] The URL of this resource.
|
145
|
-
def url
|
146
|
-
@properties['url']
|
147
|
-
end
|
148
|
-
|
149
|
-
##
|
150
|
-
# Provide a user friendly representation
|
151
|
-
def to_s
|
152
|
-
"<Twilio.Preview.TrustedComms.ChannelInstance>"
|
153
|
-
end
|
154
|
-
|
155
|
-
##
|
156
|
-
# Provide a detailed, user friendly representation
|
157
|
-
def inspect
|
158
|
-
"<Twilio.Preview.TrustedComms.ChannelInstance>"
|
159
|
-
end
|
160
|
-
end
|
161
|
-
end
|
162
|
-
end
|
163
|
-
end
|
164
|
-
end
|
165
|
-
end
|
@@ -1,225 +0,0 @@
|
|
1
|
-
##
|
2
|
-
# This code was generated by
|
3
|
-
# \ / _ _ _| _ _
|
4
|
-
# | (_)\/(_)(_|\/| |(/_ v1.0.0
|
5
|
-
# / /
|
6
|
-
#
|
7
|
-
# frozen_string_literal: true
|
8
|
-
|
9
|
-
module Twilio
|
10
|
-
module REST
|
11
|
-
class Preview < Domain
|
12
|
-
class TrustedComms < Version
|
13
|
-
##
|
14
|
-
# PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
|
15
|
-
class BrandedChannelList < ListResource
|
16
|
-
##
|
17
|
-
# Initialize the BrandedChannelList
|
18
|
-
# @param [Version] version Version that contains the resource
|
19
|
-
# @return [BrandedChannelList] BrandedChannelList
|
20
|
-
def initialize(version)
|
21
|
-
super(version)
|
22
|
-
|
23
|
-
# Path Solution
|
24
|
-
@solution = {}
|
25
|
-
end
|
26
|
-
|
27
|
-
##
|
28
|
-
# Provide a user friendly representation
|
29
|
-
def to_s
|
30
|
-
'#<Twilio.Preview.TrustedComms.BrandedChannelList>'
|
31
|
-
end
|
32
|
-
end
|
33
|
-
|
34
|
-
##
|
35
|
-
# PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
|
36
|
-
class BrandedChannelPage < Page
|
37
|
-
##
|
38
|
-
# Initialize the BrandedChannelPage
|
39
|
-
# @param [Version] version Version that contains the resource
|
40
|
-
# @param [Response] response Response from the API
|
41
|
-
# @param [Hash] solution Path solution for the resource
|
42
|
-
# @return [BrandedChannelPage] BrandedChannelPage
|
43
|
-
def initialize(version, response, solution)
|
44
|
-
super(version, response)
|
45
|
-
|
46
|
-
# Path Solution
|
47
|
-
@solution = solution
|
48
|
-
end
|
49
|
-
|
50
|
-
##
|
51
|
-
# Build an instance of BrandedChannelInstance
|
52
|
-
# @param [Hash] payload Payload response from the API
|
53
|
-
# @return [BrandedChannelInstance] BrandedChannelInstance
|
54
|
-
def get_instance(payload)
|
55
|
-
BrandedChannelInstance.new(@version, payload, )
|
56
|
-
end
|
57
|
-
|
58
|
-
##
|
59
|
-
# Provide a user friendly representation
|
60
|
-
def to_s
|
61
|
-
'<Twilio.Preview.TrustedComms.BrandedChannelPage>'
|
62
|
-
end
|
63
|
-
end
|
64
|
-
|
65
|
-
##
|
66
|
-
# PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
|
67
|
-
class BrandedChannelContext < InstanceContext
|
68
|
-
##
|
69
|
-
# Initialize the BrandedChannelContext
|
70
|
-
# @param [Version] version Version that contains the resource
|
71
|
-
# @param [String] sid The unique SID identifier of the Branded Channel.
|
72
|
-
# @return [BrandedChannelContext] BrandedChannelContext
|
73
|
-
def initialize(version, sid)
|
74
|
-
super(version)
|
75
|
-
|
76
|
-
# Path Solution
|
77
|
-
@solution = {sid: sid, }
|
78
|
-
@uri = "/BrandedChannels/#{@solution[:sid]}"
|
79
|
-
|
80
|
-
# Dependents
|
81
|
-
@channels = nil
|
82
|
-
end
|
83
|
-
|
84
|
-
##
|
85
|
-
# Fetch the BrandedChannelInstance
|
86
|
-
# @return [BrandedChannelInstance] Fetched BrandedChannelInstance
|
87
|
-
def fetch
|
88
|
-
payload = @version.fetch('GET', @uri)
|
89
|
-
|
90
|
-
BrandedChannelInstance.new(@version, payload, sid: @solution[:sid], )
|
91
|
-
end
|
92
|
-
|
93
|
-
##
|
94
|
-
# Access the channels
|
95
|
-
# @return [ChannelList]
|
96
|
-
# @return [ChannelContext]
|
97
|
-
def channels
|
98
|
-
unless @channels
|
99
|
-
@channels = ChannelList.new(@version, branded_channel_sid: @solution[:sid], )
|
100
|
-
end
|
101
|
-
|
102
|
-
@channels
|
103
|
-
end
|
104
|
-
|
105
|
-
##
|
106
|
-
# Provide a user friendly representation
|
107
|
-
def to_s
|
108
|
-
context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
|
109
|
-
"#<Twilio.Preview.TrustedComms.BrandedChannelContext #{context}>"
|
110
|
-
end
|
111
|
-
|
112
|
-
##
|
113
|
-
# Provide a detailed, user friendly representation
|
114
|
-
def inspect
|
115
|
-
context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
|
116
|
-
"#<Twilio.Preview.TrustedComms.BrandedChannelContext #{context}>"
|
117
|
-
end
|
118
|
-
end
|
119
|
-
|
120
|
-
##
|
121
|
-
# PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
|
122
|
-
class BrandedChannelInstance < InstanceResource
|
123
|
-
##
|
124
|
-
# Initialize the BrandedChannelInstance
|
125
|
-
# @param [Version] version Version that contains the resource
|
126
|
-
# @param [Hash] payload payload that contains response from Twilio
|
127
|
-
# @param [String] sid The unique SID identifier of the Branded Channel.
|
128
|
-
# @return [BrandedChannelInstance] BrandedChannelInstance
|
129
|
-
def initialize(version, payload, sid: nil)
|
130
|
-
super(version)
|
131
|
-
|
132
|
-
# Marshaled Properties
|
133
|
-
@properties = {
|
134
|
-
'account_sid' => payload['account_sid'],
|
135
|
-
'business_sid' => payload['business_sid'],
|
136
|
-
'brand_sid' => payload['brand_sid'],
|
137
|
-
'sid' => payload['sid'],
|
138
|
-
'links' => payload['links'],
|
139
|
-
'url' => payload['url'],
|
140
|
-
}
|
141
|
-
|
142
|
-
# Context
|
143
|
-
@instance_context = nil
|
144
|
-
@params = {'sid' => sid || @properties['sid'], }
|
145
|
-
end
|
146
|
-
|
147
|
-
##
|
148
|
-
# Generate an instance context for the instance, the context is capable of
|
149
|
-
# performing various actions. All instance actions are proxied to the context
|
150
|
-
# @return [BrandedChannelContext] BrandedChannelContext for this BrandedChannelInstance
|
151
|
-
def context
|
152
|
-
unless @instance_context
|
153
|
-
@instance_context = BrandedChannelContext.new(@version, @params['sid'], )
|
154
|
-
end
|
155
|
-
@instance_context
|
156
|
-
end
|
157
|
-
|
158
|
-
##
|
159
|
-
# @return [String] Account Sid.
|
160
|
-
def account_sid
|
161
|
-
@properties['account_sid']
|
162
|
-
end
|
163
|
-
|
164
|
-
##
|
165
|
-
# @return [String] Business Sid.
|
166
|
-
def business_sid
|
167
|
-
@properties['business_sid']
|
168
|
-
end
|
169
|
-
|
170
|
-
##
|
171
|
-
# @return [String] Brand Sid.
|
172
|
-
def brand_sid
|
173
|
-
@properties['brand_sid']
|
174
|
-
end
|
175
|
-
|
176
|
-
##
|
177
|
-
# @return [String] Branded Channel Sid.
|
178
|
-
def sid
|
179
|
-
@properties['sid']
|
180
|
-
end
|
181
|
-
|
182
|
-
##
|
183
|
-
# @return [String] Nested resource URLs.
|
184
|
-
def links
|
185
|
-
@properties['links']
|
186
|
-
end
|
187
|
-
|
188
|
-
##
|
189
|
-
# @return [String] The URL of this resource.
|
190
|
-
def url
|
191
|
-
@properties['url']
|
192
|
-
end
|
193
|
-
|
194
|
-
##
|
195
|
-
# Fetch the BrandedChannelInstance
|
196
|
-
# @return [BrandedChannelInstance] Fetched BrandedChannelInstance
|
197
|
-
def fetch
|
198
|
-
context.fetch
|
199
|
-
end
|
200
|
-
|
201
|
-
##
|
202
|
-
# Access the channels
|
203
|
-
# @return [channels] channels
|
204
|
-
def channels
|
205
|
-
context.channels
|
206
|
-
end
|
207
|
-
|
208
|
-
##
|
209
|
-
# Provide a user friendly representation
|
210
|
-
def to_s
|
211
|
-
values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
|
212
|
-
"<Twilio.Preview.TrustedComms.BrandedChannelInstance #{values}>"
|
213
|
-
end
|
214
|
-
|
215
|
-
##
|
216
|
-
# Provide a detailed, user friendly representation
|
217
|
-
def inspect
|
218
|
-
values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
|
219
|
-
"<Twilio.Preview.TrustedComms.BrandedChannelInstance #{values}>"
|
220
|
-
end
|
221
|
-
end
|
222
|
-
end
|
223
|
-
end
|
224
|
-
end
|
225
|
-
end
|