twilio-ruby 5.52.0 → 5.67.3
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 +5 -5
- data/.github/workflows/pr-lint.yml +15 -0
- data/.github/workflows/test-and-deploy.yml +129 -0
- data/.gitignore +5 -1
- data/.rubocop.yml +1 -1
- data/.rubocop_todo.yml +91 -28
- data/CHANGES.md +563 -0
- data/Gemfile +1 -0
- data/Makefile +8 -11
- data/README.md +13 -6
- data/examples/examples.rb +1 -1
- data/lib/rack/twilio_webhook_authentication.rb +25 -1
- data/lib/twilio-ruby/http/http_client.rb +20 -4
- data/lib/twilio-ruby/http.rb +5 -0
- data/lib/twilio-ruby/jwt/access_token.rb +13 -0
- data/lib/twilio-ruby/rest/api/v2010/account/call/feedback.rb +23 -23
- data/lib/twilio-ruby/rest/api/v2010/account/call/feedback_summary.rb +5 -5
- data/lib/twilio-ruby/rest/api/v2010/account/call/payment.rb +8 -8
- data/lib/twilio-ruby/rest/api/v2010/account/call/siprec.rb +674 -0
- data/lib/twilio-ruby/rest/api/v2010/account/call/stream.rb +674 -0
- data/lib/twilio-ruby/rest/api/v2010/account/call.rb +68 -14
- data/lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb +12 -8
- data/lib/twilio-ruby/rest/api/v2010/account/conference/recording.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/local.rb +11 -4
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/mobile.rb +11 -4
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/toll_free.rb +11 -4
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number.rb +17 -10
- data/lib/twilio-ruby/rest/api/v2010/account/message.rb +18 -5
- data/lib/twilio-ruby/rest/api/v2010/account/recording.rb +34 -7
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/credential_list_mapping.rb +11 -11
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/ip_access_control_list_mapping.rb +11 -11
- data/lib/twilio-ruby/rest/bulkexports/v1/export/day.rb +0 -8
- data/lib/twilio-ruby/rest/bulkexports/v1/export/export_custom_job.rb +0 -6
- data/lib/twilio-ruby/rest/bulkexports/v1/export/job.rb +0 -8
- data/lib/twilio-ruby/rest/bulkexports/v1/export.rb +0 -8
- data/lib/twilio-ruby/rest/bulkexports/v1/export_configuration.rb +0 -8
- data/lib/twilio-ruby/rest/chat/v2/service/user/user_channel.rb +10 -4
- data/lib/twilio-ruby/rest/chat/v3/channel.rb +275 -0
- data/lib/twilio-ruby/rest/chat/v3.rb +48 -0
- data/lib/twilio-ruby/rest/chat.rb +16 -0
- data/lib/twilio-ruby/rest/client.rb +21 -12
- data/lib/twilio-ruby/rest/conversations/v1/address_configuration.rb +454 -0
- data/lib/twilio-ruby/rest/conversations/v1/conversation/message.rb +12 -5
- data/lib/twilio-ruby/rest/conversations/v1/conversation.rb +7 -0
- data/lib/twilio-ruby/rest/conversations/v1/participant_conversation.rb +312 -0
- data/lib/twilio-ruby/rest/conversations/v1/service/configuration/notification.rb +18 -2
- data/lib/twilio-ruby/rest/conversations/v1/service/configuration/webhook.rb +269 -0
- data/lib/twilio-ruby/rest/conversations/v1/service/configuration.rb +8 -0
- data/lib/twilio-ruby/rest/conversations/v1/service/conversation/message.rb +12 -5
- data/lib/twilio-ruby/rest/conversations/v1/service/conversation.rb +7 -0
- data/lib/twilio-ruby/rest/conversations/v1/service/participant_conversation.rb +324 -0
- data/lib/twilio-ruby/rest/conversations/v1/service/user/user_conversation.rb +466 -0
- data/lib/twilio-ruby/rest/conversations/v1/service/user.rb +44 -0
- data/lib/twilio-ruby/rest/conversations/v1/service.rb +23 -0
- data/lib/twilio-ruby/rest/conversations/v1/user/user_conversation.rb +442 -0
- data/lib/twilio-ruby/rest/conversations/v1/user.rb +35 -0
- data/lib/twilio-ruby/rest/conversations/v1.rb +24 -0
- data/lib/twilio-ruby/rest/conversations.rb +15 -0
- data/lib/twilio-ruby/rest/events/v1/event_type.rb +12 -5
- data/lib/twilio-ruby/rest/events/v1/sink.rb +41 -5
- data/lib/twilio-ruby/rest/flex_api/v1/configuration.rb +28 -0
- data/lib/twilio-ruby/rest/flex_api/v1/flex_flow.rb +55 -34
- data/lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel/interaction_channel_invite.rb +236 -0
- data/lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel/interaction_channel_participant.rb +330 -0
- data/lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel.rb +384 -0
- data/lib/twilio-ruby/rest/flex_api/v1/interaction.rb +233 -0
- data/lib/twilio-ruby/rest/flex_api/v1.rb +16 -0
- data/lib/twilio-ruby/rest/flex_api.rb +9 -0
- data/lib/twilio-ruby/rest/frontline_api/v1/user.rb +258 -0
- data/lib/twilio-ruby/rest/{fax → frontline_api}/v1.rb +11 -11
- data/lib/twilio-ruby/rest/{fax.rb → frontline_api.rb} +11 -11
- data/lib/twilio-ruby/rest/insights/v1/annotation.rb +271 -0
- data/lib/twilio-ruby/rest/insights/v1/call_summaries.rb +434 -0
- data/lib/twilio-ruby/rest/insights/v1/conference/conference_participant.rb +474 -0
- data/lib/twilio-ruby/rest/insights/v1/conference.rb +512 -0
- data/lib/twilio-ruby/rest/insights/v1/setting.rb +215 -0
- data/lib/twilio-ruby/rest/insights/v1.rb +46 -0
- data/lib/twilio-ruby/rest/insights.rb +28 -0
- data/lib/twilio-ruby/rest/lookups/v2/phone_number.rb +268 -0
- data/lib/twilio-ruby/rest/lookups/v2.rb +45 -0
- data/lib/twilio-ruby/rest/lookups.rb +7 -0
- data/lib/twilio-ruby/rest/media/v1/media_processor.rb +397 -0
- data/lib/twilio-ruby/rest/media/v1/media_recording.rb +406 -0
- data/lib/twilio-ruby/rest/media/v1/player_streamer/playback_grant.rb +221 -0
- data/lib/twilio-ruby/rest/media/v1/player_streamer.rb +403 -0
- data/lib/twilio-ruby/rest/media/v1.rb +76 -0
- data/lib/twilio-ruby/rest/media.rb +65 -0
- data/lib/twilio-ruby/rest/{fax/v1/fax/fax_media.rb → messaging/v1/brand_registration/brand_vetting.rb} +134 -95
- data/lib/twilio-ruby/rest/messaging/v1/brand_registration.rb +127 -2
- data/lib/twilio-ruby/rest/messaging/v1/external_campaign.rb +7 -0
- data/lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb +187 -20
- data/lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person_usecase.rb +6 -2
- data/lib/twilio-ruby/rest/messaging/v1/service.rb +37 -5
- data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle/bundle_copy.rb +268 -0
- data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle/replace_items.rb +188 -0
- data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle.rb +128 -26
- data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/supporting_document.rb +7 -0
- data/lib/twilio-ruby/rest/pricing/v2/country.rb +280 -0
- data/lib/twilio-ruby/rest/pricing/v2/number.rb +225 -0
- data/lib/twilio-ruby/rest/pricing/v2.rb +37 -0
- data/lib/twilio-ruby/rest/pricing.rb +19 -0
- data/lib/twilio-ruby/rest/serverless/v1/service/environment.rb +1 -1
- data/lib/twilio-ruby/rest/serverless/v1/service.rb +7 -0
- data/lib/twilio-ruby/rest/studio/v1/flow/execution.rb +1 -1
- data/lib/twilio-ruby/rest/studio/v2/flow/execution.rb +1 -1
- data/lib/twilio-ruby/rest/supersim/v1/esim_profile.rb +372 -0
- data/lib/twilio-ruby/rest/supersim/v1/fleet.rb +44 -55
- data/lib/twilio-ruby/rest/supersim/v1/{command.rb → ip_command.rb} +132 -84
- data/lib/twilio-ruby/rest/supersim/v1/sim/billing_period.rb +231 -0
- data/lib/twilio-ruby/rest/supersim/v1/sim.rb +30 -1
- data/lib/twilio-ruby/rest/supersim/v1/sms_command.rb +1 -1
- data/lib/twilio-ruby/rest/supersim/v1/usage_record.rb +23 -9
- data/lib/twilio-ruby/rest/supersim/v1.rb +23 -7
- data/lib/twilio-ruby/rest/supersim.rb +15 -6
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/activity.rb +7 -0
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task/reservation.rb +7 -3
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_cumulative_statistics.rb +6 -2
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/reservation.rb +7 -3
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker.rb +23 -11
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow/workflow_cumulative_statistics.rb +4 -2
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workspace_cumulative_statistics.rb +4 -2
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace.rb +38 -22
- data/lib/twilio-ruby/rest/trunking/v1/trunk.rb +19 -3
- data/lib/twilio-ruby/rest/verify/v2/service/access_token.rb +155 -10
- data/lib/twilio-ruby/rest/verify/v2/service/entity/challenge/notification.rb +12 -9
- data/lib/twilio-ruby/rest/verify/v2/service/entity/challenge.rb +74 -22
- data/lib/twilio-ruby/rest/verify/v2/service/entity/factor.rb +34 -15
- data/lib/twilio-ruby/rest/verify/v2/service/entity/new_factor.rb +66 -31
- data/lib/twilio-ruby/rest/verify/v2/service/entity.rb +7 -3
- data/lib/twilio-ruby/rest/verify/v2/service/verification.rb +25 -7
- data/lib/twilio-ruby/rest/verify/v2/service/webhook.rb +24 -5
- data/lib/twilio-ruby/rest/verify/v2/service.rb +40 -11
- data/lib/twilio-ruby/rest/verify/v2/template.rb +206 -0
- data/lib/twilio-ruby/rest/verify/v2/verification_attempt.rb +89 -21
- data/lib/twilio-ruby/rest/verify/v2/verification_attempts_summary.rb +234 -0
- data/lib/twilio-ruby/rest/verify/v2.rb +14 -0
- data/lib/twilio-ruby/rest/verify.rb +14 -2
- data/lib/twilio-ruby/rest/video/v1/composition.rb +21 -8
- data/lib/twilio-ruby/rest/video/v1/composition_hook.rb +0 -8
- data/lib/twilio-ruby/rest/video/v1/recording.rb +21 -0
- data/lib/twilio-ruby/rest/video/v1/room/recording.rb +7 -0
- data/lib/twilio-ruby/rest/video/v1/room.rb +62 -5
- data/lib/twilio-ruby/rest/voice/v1/archived_call.rb +184 -0
- data/lib/twilio-ruby/rest/voice/v1.rb +21 -0
- data/lib/twilio-ruby/rest/voice.rb +8 -0
- data/lib/twilio-ruby/rest/wireless/v1/rate_plan.rb +3 -3
- data/lib/twilio-ruby/rest/wireless/v1/sim.rb +16 -26
- data/lib/twilio-ruby/rest.rb +13 -0
- data/lib/twilio-ruby/twiml/voice_response.rb +727 -87
- data/lib/twilio-ruby/version.rb +1 -1
- data/lib/twilio-ruby.rb +6 -16
- data/sonar-project.properties +13 -0
- data/twilio-ruby.gemspec +1 -2
- metadata +59 -32
- data/.travis.yml +0 -45
- data/lib/twilio-ruby/rest/fax/v1/fax.rb +0 -536
- /data/lib/twilio-ruby/framework/{domain.rb → rest/domain.rb} +0 -0
- /data/lib/twilio-ruby/framework/{error.rb → rest/error.rb} +0 -0
- /data/lib/twilio-ruby/framework/{helper.rb → rest/helper.rb} +0 -0
- /data/lib/twilio-ruby/framework/{obsolete_client.rb → rest/obsolete_client.rb} +0 -0
- /data/lib/twilio-ruby/framework/{page.rb → rest/page.rb} +0 -0
- /data/lib/twilio-ruby/framework/{resource.rb → rest/resource.rb} +0 -0
- /data/lib/twilio-ruby/framework/{version.rb → rest/version.rb} +0 -0
@@ -0,0 +1,225 @@
|
|
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 Pricing < Domain
|
12
|
+
class V2 < Version
|
13
|
+
class NumberList < ListResource
|
14
|
+
##
|
15
|
+
# Initialize the NumberList
|
16
|
+
# @param [Version] version Version that contains the resource
|
17
|
+
# @return [NumberList] NumberList
|
18
|
+
def initialize(version)
|
19
|
+
super(version)
|
20
|
+
|
21
|
+
# Path Solution
|
22
|
+
@solution = {}
|
23
|
+
end
|
24
|
+
|
25
|
+
##
|
26
|
+
# Provide a user friendly representation
|
27
|
+
def to_s
|
28
|
+
'#<Twilio.Pricing.V2.NumberList>'
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
class NumberPage < Page
|
33
|
+
##
|
34
|
+
# Initialize the NumberPage
|
35
|
+
# @param [Version] version Version that contains the resource
|
36
|
+
# @param [Response] response Response from the API
|
37
|
+
# @param [Hash] solution Path solution for the resource
|
38
|
+
# @return [NumberPage] NumberPage
|
39
|
+
def initialize(version, response, solution)
|
40
|
+
super(version, response)
|
41
|
+
|
42
|
+
# Path Solution
|
43
|
+
@solution = solution
|
44
|
+
end
|
45
|
+
|
46
|
+
##
|
47
|
+
# Build an instance of NumberInstance
|
48
|
+
# @param [Hash] payload Payload response from the API
|
49
|
+
# @return [NumberInstance] NumberInstance
|
50
|
+
def get_instance(payload)
|
51
|
+
NumberInstance.new(@version, payload, )
|
52
|
+
end
|
53
|
+
|
54
|
+
##
|
55
|
+
# Provide a user friendly representation
|
56
|
+
def to_s
|
57
|
+
'<Twilio.Pricing.V2.NumberPage>'
|
58
|
+
end
|
59
|
+
end
|
60
|
+
|
61
|
+
class NumberContext < InstanceContext
|
62
|
+
##
|
63
|
+
# Initialize the NumberContext
|
64
|
+
# @param [Version] version Version that contains the resource
|
65
|
+
# @param [String] destination_number The destination phone number, in
|
66
|
+
# {E.164}[https://www.twilio.com/docs/glossary/what-e164] format, for which to
|
67
|
+
# fetch the origin-based voice pricing information. E.164 format consists of a +
|
68
|
+
# followed by the country code and subscriber number.
|
69
|
+
# @return [NumberContext] NumberContext
|
70
|
+
def initialize(version, destination_number)
|
71
|
+
super(version)
|
72
|
+
|
73
|
+
# Path Solution
|
74
|
+
@solution = {destination_number: destination_number, }
|
75
|
+
@uri = "/Trunking/Numbers/#{CGI.escape(@solution[:destination_number]).gsub("+", "%20")}"
|
76
|
+
end
|
77
|
+
|
78
|
+
##
|
79
|
+
# Fetch the NumberInstance
|
80
|
+
# @param [String] origination_number The origination phone number, in
|
81
|
+
# {E.164}[https://www.twilio.com/docs/glossary/what-e164] format, for which to
|
82
|
+
# fetch the origin-based voice pricing information. E.164 format consists of a +
|
83
|
+
# followed by the country code and subscriber number.
|
84
|
+
# @return [NumberInstance] Fetched NumberInstance
|
85
|
+
def fetch(origination_number: :unset)
|
86
|
+
params = Twilio::Values.of({'OriginationNumber' => origination_number, })
|
87
|
+
|
88
|
+
payload = @version.fetch('GET', @uri, params: params)
|
89
|
+
|
90
|
+
NumberInstance.new(@version, payload, destination_number: @solution[:destination_number], )
|
91
|
+
end
|
92
|
+
|
93
|
+
##
|
94
|
+
# Provide a user friendly representation
|
95
|
+
def to_s
|
96
|
+
context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
|
97
|
+
"#<Twilio.Pricing.V2.NumberContext #{context}>"
|
98
|
+
end
|
99
|
+
|
100
|
+
##
|
101
|
+
# Provide a detailed, user friendly representation
|
102
|
+
def inspect
|
103
|
+
context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
|
104
|
+
"#<Twilio.Pricing.V2.NumberContext #{context}>"
|
105
|
+
end
|
106
|
+
end
|
107
|
+
|
108
|
+
class NumberInstance < InstanceResource
|
109
|
+
##
|
110
|
+
# Initialize the NumberInstance
|
111
|
+
# @param [Version] version Version that contains the resource
|
112
|
+
# @param [Hash] payload payload that contains response from Twilio
|
113
|
+
# @param [String] destination_number The destination phone number, in
|
114
|
+
# {E.164}[https://www.twilio.com/docs/glossary/what-e164] format, for which to
|
115
|
+
# fetch the origin-based voice pricing information. E.164 format consists of a +
|
116
|
+
# followed by the country code and subscriber number.
|
117
|
+
# @return [NumberInstance] NumberInstance
|
118
|
+
def initialize(version, payload, destination_number: nil)
|
119
|
+
super(version)
|
120
|
+
|
121
|
+
# Marshaled Properties
|
122
|
+
@properties = {
|
123
|
+
'destination_number' => payload['destination_number'],
|
124
|
+
'origination_number' => payload['origination_number'],
|
125
|
+
'country' => payload['country'],
|
126
|
+
'iso_country' => payload['iso_country'],
|
127
|
+
'terminating_prefix_prices' => payload['terminating_prefix_prices'],
|
128
|
+
'originating_call_price' => payload['originating_call_price'],
|
129
|
+
'price_unit' => payload['price_unit'],
|
130
|
+
'url' => payload['url'],
|
131
|
+
}
|
132
|
+
|
133
|
+
# Context
|
134
|
+
@instance_context = nil
|
135
|
+
@params = {'destination_number' => destination_number || @properties['destination_number'], }
|
136
|
+
end
|
137
|
+
|
138
|
+
##
|
139
|
+
# Generate an instance context for the instance, the context is capable of
|
140
|
+
# performing various actions. All instance actions are proxied to the context
|
141
|
+
# @return [NumberContext] NumberContext for this NumberInstance
|
142
|
+
def context
|
143
|
+
unless @instance_context
|
144
|
+
@instance_context = NumberContext.new(@version, @params['destination_number'], )
|
145
|
+
end
|
146
|
+
@instance_context
|
147
|
+
end
|
148
|
+
|
149
|
+
##
|
150
|
+
# @return [String] The destination phone number, in E.164 format
|
151
|
+
def destination_number
|
152
|
+
@properties['destination_number']
|
153
|
+
end
|
154
|
+
|
155
|
+
##
|
156
|
+
# @return [String] The origination phone number, in E.164 format
|
157
|
+
def origination_number
|
158
|
+
@properties['origination_number']
|
159
|
+
end
|
160
|
+
|
161
|
+
##
|
162
|
+
# @return [String] The name of the country
|
163
|
+
def country
|
164
|
+
@properties['country']
|
165
|
+
end
|
166
|
+
|
167
|
+
##
|
168
|
+
# @return [String] The ISO country code
|
169
|
+
def iso_country
|
170
|
+
@properties['iso_country']
|
171
|
+
end
|
172
|
+
|
173
|
+
##
|
174
|
+
# @return [Array[String]] The terminating_prefix_prices
|
175
|
+
def terminating_prefix_prices
|
176
|
+
@properties['terminating_prefix_prices']
|
177
|
+
end
|
178
|
+
|
179
|
+
##
|
180
|
+
# @return [String] The OriginatingCallPrice record
|
181
|
+
def originating_call_price
|
182
|
+
@properties['originating_call_price']
|
183
|
+
end
|
184
|
+
|
185
|
+
##
|
186
|
+
# @return [String] The currency in which prices are measured, in ISO 4127 format (e.g. usd, eur, jpy)
|
187
|
+
def price_unit
|
188
|
+
@properties['price_unit']
|
189
|
+
end
|
190
|
+
|
191
|
+
##
|
192
|
+
# @return [String] The absolute URL of the resource
|
193
|
+
def url
|
194
|
+
@properties['url']
|
195
|
+
end
|
196
|
+
|
197
|
+
##
|
198
|
+
# Fetch the NumberInstance
|
199
|
+
# @param [String] origination_number The origination phone number, in
|
200
|
+
# {E.164}[https://www.twilio.com/docs/glossary/what-e164] format, for which to
|
201
|
+
# fetch the origin-based voice pricing information. E.164 format consists of a +
|
202
|
+
# followed by the country code and subscriber number.
|
203
|
+
# @return [NumberInstance] Fetched NumberInstance
|
204
|
+
def fetch(origination_number: :unset)
|
205
|
+
context.fetch(origination_number: origination_number, )
|
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.Pricing.V2.NumberInstance #{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.Pricing.V2.NumberInstance #{values}>"
|
220
|
+
end
|
221
|
+
end
|
222
|
+
end
|
223
|
+
end
|
224
|
+
end
|
225
|
+
end
|
@@ -15,9 +15,46 @@ module Twilio
|
|
15
15
|
def initialize(domain)
|
16
16
|
super
|
17
17
|
@version = 'v2'
|
18
|
+
@countries = nil
|
19
|
+
@numbers = nil
|
18
20
|
@voice = nil
|
19
21
|
end
|
20
22
|
|
23
|
+
##
|
24
|
+
# @param [String] iso_country The {ISO country
|
25
|
+
# code}[https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2] of the origin-based
|
26
|
+
# voice pricing information to fetch.
|
27
|
+
# @return [Twilio::REST::Pricing::V2::CountryContext] if iso_country was passed.
|
28
|
+
# @return [Twilio::REST::Pricing::V2::CountryList]
|
29
|
+
def countries(iso_country=:unset)
|
30
|
+
if iso_country.nil?
|
31
|
+
raise ArgumentError, 'iso_country cannot be nil'
|
32
|
+
end
|
33
|
+
if iso_country == :unset
|
34
|
+
@countries ||= CountryList.new self
|
35
|
+
else
|
36
|
+
CountryContext.new(self, iso_country)
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
##
|
41
|
+
# @param [String] destination_number The destination phone number, in
|
42
|
+
# {E.164}[https://www.twilio.com/docs/glossary/what-e164] format, for which to
|
43
|
+
# fetch the origin-based voice pricing information. E.164 format consists of a +
|
44
|
+
# followed by the country code and subscriber number.
|
45
|
+
# @return [Twilio::REST::Pricing::V2::NumberContext] if destination_number was passed.
|
46
|
+
# @return [Twilio::REST::Pricing::V2::NumberList]
|
47
|
+
def numbers(destination_number=:unset)
|
48
|
+
if destination_number.nil?
|
49
|
+
raise ArgumentError, 'destination_number cannot be nil'
|
50
|
+
end
|
51
|
+
if destination_number == :unset
|
52
|
+
@numbers ||= NumberList.new self
|
53
|
+
else
|
54
|
+
NumberContext.new(self, destination_number)
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
21
58
|
##
|
22
59
|
# @return [Twilio::REST::Pricing::V2::VoiceContext]
|
23
60
|
def voice
|
@@ -53,6 +53,25 @@ module Twilio
|
|
53
53
|
self.v2.voice()
|
54
54
|
end
|
55
55
|
|
56
|
+
##
|
57
|
+
# @param [String] iso_country The {ISO country
|
58
|
+
# code}[https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2].
|
59
|
+
# @return [Twilio::REST::Pricing::V2::CountryInstance] if iso_country was passed.
|
60
|
+
# @return [Twilio::REST::Pricing::V2::CountryList]
|
61
|
+
def countries(iso_country=:unset)
|
62
|
+
self.v2.countries(iso_country)
|
63
|
+
end
|
64
|
+
|
65
|
+
##
|
66
|
+
# @param [String] destination_number The destination phone number in
|
67
|
+
# {E.164}[https://www.twilio.com/docs/glossary/what-e164] format, which consists
|
68
|
+
# of a + followed by the country code and subscriber number.
|
69
|
+
# @return [Twilio::REST::Pricing::V2::NumberInstance] if destination_number was passed.
|
70
|
+
# @return [Twilio::REST::Pricing::V2::NumberList]
|
71
|
+
def numbers(destination_number=:unset)
|
72
|
+
self.v2.numbers(destination_number)
|
73
|
+
end
|
74
|
+
|
56
75
|
##
|
57
76
|
# Provide a user friendly representation
|
58
77
|
def to_s
|
@@ -369,7 +369,7 @@ module Twilio
|
|
369
369
|
end
|
370
370
|
|
371
371
|
##
|
372
|
-
# @return [String] The
|
372
|
+
# @return [String] The domain name for all Functions and Assets deployed in the Environment
|
373
373
|
def domain_name
|
374
374
|
@properties['domain_name']
|
375
375
|
end
|
@@ -335,6 +335,7 @@ module Twilio
|
|
335
335
|
'unique_name' => payload['unique_name'],
|
336
336
|
'include_credentials' => payload['include_credentials'],
|
337
337
|
'ui_editable' => payload['ui_editable'],
|
338
|
+
'domain_base' => payload['domain_base'],
|
338
339
|
'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
|
339
340
|
'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
|
340
341
|
'url' => payload['url'],
|
@@ -393,6 +394,12 @@ module Twilio
|
|
393
394
|
@properties['ui_editable']
|
394
395
|
end
|
395
396
|
|
397
|
+
##
|
398
|
+
# @return [String] The base domain name for this Service, which is a combination of the unique name and a randomly generated string
|
399
|
+
def domain_base
|
400
|
+
@properties['domain_base']
|
401
|
+
end
|
402
|
+
|
396
403
|
##
|
397
404
|
# @return [Time] The ISO 8601 date and time in GMT when the Service resource was created
|
398
405
|
def date_created
|
@@ -140,7 +140,7 @@ module Twilio
|
|
140
140
|
# available as variable `{{contact.channel.address}}`.
|
141
141
|
# @param [String] from The Twilio phone number to send messages or initiate calls
|
142
142
|
# from during the Flow's Execution. Available as variable
|
143
|
-
# `{{flow.channel.address}}`.
|
143
|
+
# `{{flow.channel.address}}`. For SMS, this can also be a Messaging Service SID.
|
144
144
|
# @param [Hash] parameters JSON data that will be added to the Flow's context and
|
145
145
|
# that can be accessed as variables inside your Flow. For example, if you pass in
|
146
146
|
# `Parameters={"name":"Zeke"}`, a widget in your Flow can reference the variable
|
@@ -140,7 +140,7 @@ module Twilio
|
|
140
140
|
# available as variable `{{contact.channel.address}}`.
|
141
141
|
# @param [String] from The Twilio phone number to send messages or initiate calls
|
142
142
|
# from during the Flow's Execution. Available as variable
|
143
|
-
# `{{flow.channel.address}}`.
|
143
|
+
# `{{flow.channel.address}}`. For SMS, this can also be a Messaging Service SID.
|
144
144
|
# @param [Hash] parameters JSON data that will be added to the Flow's context and
|
145
145
|
# that can be accessed as variables inside your Flow. For example, if you pass in
|
146
146
|
# `Parameters={"name":"Zeke"}`, a widget in your Flow can reference the variable
|