twilio-ruby 5.42.0 → 5.46.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/.travis.yml +1 -0
- data/CHANGES.md +95 -0
- data/LICENSE +1 -1
- data/README.md +18 -2
- data/lib/twilio-ruby.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/authorized_connect_app.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/call.rb +34 -9
- data/lib/twilio-ruby/rest/api/v2010/account/call/event.rb +201 -0
- data/lib/twilio-ruby/rest/api/v2010/account/call/feedback.rb +13 -13
- data/lib/twilio-ruby/rest/api/v2010/account/call/feedback_summary.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/call/recording.rb +17 -5
- data/lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb +17 -12
- data/lib/twilio-ruby/rest/api/v2010/account/connect_app.rb +3 -3
- data/lib/twilio-ruby/rest/api/v2010/account/message.rb +5 -5
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb +6 -3
- data/lib/twilio-ruby/rest/api/v2010/account/token.rb +1 -1
- data/lib/twilio-ruby/rest/bulkexports.rb +4 -2
- data/lib/twilio-ruby/rest/bulkexports/v1.rb +4 -2
- data/lib/twilio-ruby/rest/bulkexports/v1/export.rb +7 -4
- data/lib/twilio-ruby/rest/bulkexports/v1/export/day.rb +7 -4
- data/lib/twilio-ruby/rest/bulkexports/v1/export/export_custom_job.rb +5 -3
- data/lib/twilio-ruby/rest/bulkexports/v1/export/job.rb +5 -3
- data/lib/twilio-ruby/rest/bulkexports/v1/export_configuration.rb +5 -3
- data/lib/twilio-ruby/rest/chat/v1/service.rb +5 -5
- data/lib/twilio-ruby/rest/chat/v1/service/channel.rb +6 -6
- data/lib/twilio-ruby/rest/chat/v1/service/channel/invite.rb +3 -3
- data/lib/twilio-ruby/rest/chat/v1/service/channel/member.rb +3 -3
- data/lib/twilio-ruby/rest/chat/v1/service/role.rb +9 -9
- data/lib/twilio-ruby/rest/chat/v2/service.rb +5 -5
- data/lib/twilio-ruby/rest/chat/v2/service/binding.rb +7 -7
- data/lib/twilio-ruby/rest/chat/v2/service/channel.rb +6 -6
- data/lib/twilio-ruby/rest/chat/v2/service/channel/invite.rb +3 -3
- data/lib/twilio-ruby/rest/chat/v2/service/channel/member.rb +3 -3
- data/lib/twilio-ruby/rest/chat/v2/service/channel/webhook.rb +27 -24
- data/lib/twilio-ruby/rest/chat/v2/service/role.rb +9 -9
- data/lib/twilio-ruby/rest/chat/v2/service/user/user_binding.rb +10 -10
- data/lib/twilio-ruby/rest/client.rb +29 -3
- data/lib/twilio-ruby/rest/conversations/v1/configuration/webhook.rb +9 -9
- data/lib/twilio-ruby/rest/conversations/v1/conversation/message.rb +1 -1
- data/lib/twilio-ruby/rest/conversations/v1/conversation/participant.rb +32 -2
- data/lib/twilio-ruby/rest/conversations/v1/conversation/webhook.rb +9 -9
- data/lib/twilio-ruby/rest/conversations/v1/role.rb +9 -9
- data/lib/twilio-ruby/rest/conversations/v1/service/binding.rb +7 -7
- data/lib/twilio-ruby/rest/conversations/v1/service/configuration.rb +17 -2
- data/lib/twilio-ruby/rest/conversations/v1/service/conversation/message.rb +1 -1
- data/lib/twilio-ruby/rest/conversations/v1/service/conversation/participant.rb +32 -2
- data/lib/twilio-ruby/rest/conversations/v1/service/conversation/webhook.rb +9 -9
- data/lib/twilio-ruby/rest/conversations/v1/service/role.rb +9 -9
- data/lib/twilio-ruby/rest/conversations/v1/service/user.rb +8 -1
- data/lib/twilio-ruby/rest/conversations/v1/user.rb +8 -1
- data/lib/twilio-ruby/rest/events/v1/sink.rb +2 -1
- data/lib/twilio-ruby/rest/events/v1/subscription.rb +14 -7
- data/lib/twilio-ruby/rest/flex_api.rb +1 -1
- data/lib/twilio-ruby/rest/flex_api/v1.rb +1 -1
- data/lib/twilio-ruby/rest/flex_api/v1/channel.rb +5 -5
- data/lib/twilio-ruby/rest/flex_api/v1/configuration.rb +4 -4
- data/lib/twilio-ruby/rest/flex_api/v1/flex_flow.rb +88 -76
- data/lib/twilio-ruby/rest/flex_api/v1/web_channel.rb +2 -2
- data/lib/twilio-ruby/rest/insights/v1/call/summary.rb +8 -9
- data/lib/twilio-ruby/rest/insights/v1/room.rb +7 -7
- data/lib/twilio-ruby/rest/insights/v1/room/participant.rb +2 -9
- data/lib/twilio-ruby/rest/ip_messaging/v1/service.rb +3 -3
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel.rb +3 -3
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel/invite.rb +3 -3
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel/member.rb +3 -3
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/role.rb +4 -4
- data/lib/twilio-ruby/rest/ip_messaging/v2/service.rb +3 -3
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/binding.rb +7 -7
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel.rb +3 -3
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/invite.rb +3 -3
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/member.rb +3 -3
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/webhook.rb +6 -6
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/role.rb +4 -4
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/user/user_binding.rb +4 -4
- data/lib/twilio-ruby/rest/lookups/v1/phone_number.rb +16 -16
- data/lib/twilio-ruby/rest/messaging/v1/service/alpha_sender.rb +1 -1
- data/lib/twilio-ruby/rest/messaging/v1/service/phone_number.rb +1 -1
- data/lib/twilio-ruby/rest/messaging/v1/service/short_code.rb +1 -1
- data/lib/twilio-ruby/rest/notify/v1/service/binding.rb +16 -15
- data/lib/twilio-ruby/rest/notify/v1/service/notification.rb +18 -18
- data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle/evaluation.rb +1 -1
- data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/end_user_type.rb +1 -1
- data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/supporting_document_type.rb +1 -1
- data/lib/twilio-ruby/rest/preview.rb +4 -23
- data/lib/twilio-ruby/rest/preview/bulk_exports.rb +4 -2
- data/lib/twilio-ruby/rest/preview/bulk_exports/export.rb +7 -4
- data/lib/twilio-ruby/rest/preview/bulk_exports/export/day.rb +7 -4
- data/lib/twilio-ruby/rest/preview/bulk_exports/export/export_custom_job.rb +5 -3
- data/lib/twilio-ruby/rest/preview/bulk_exports/export/job.rb +5 -3
- data/lib/twilio-ruby/rest/preview/bulk_exports/export_configuration.rb +5 -3
- data/lib/twilio-ruby/rest/preview/hosted_numbers/authorization_document.rb +13 -13
- data/lib/twilio-ruby/rest/preview/hosted_numbers/authorization_document/dependent_hosted_number_order.rb +2 -2
- data/lib/twilio-ruby/rest/preview/hosted_numbers/hosted_number_order.rb +8 -8
- data/lib/twilio-ruby/rest/preview/trusted_comms.rb +0 -30
- data/lib/twilio-ruby/rest/preview/wireless/rate_plan.rb +2 -2
- data/lib/twilio-ruby/rest/pricing/v1/messaging/country.rb +2 -2
- data/lib/twilio-ruby/rest/pricing/v1/phone_number/country.rb +1 -1
- data/lib/twilio-ruby/rest/pricing/v1/voice/country.rb +2 -2
- data/lib/twilio-ruby/rest/pricing/v2/voice/country.rb +2 -2
- data/lib/twilio-ruby/rest/pricing/v2/voice/number.rb +1 -1
- data/lib/twilio-ruby/rest/proxy/v1/service/session.rb +1 -1
- data/lib/twilio-ruby/rest/proxy/v1/service/session/participant/message_interaction.rb +1 -1
- data/lib/twilio-ruby/rest/serverless/v1/service.rb +5 -5
- data/lib/twilio-ruby/rest/serverless/v1/service/asset.rb +4 -4
- data/lib/twilio-ruby/rest/serverless/v1/service/asset/asset_version.rb +4 -4
- data/lib/twilio-ruby/rest/serverless/v1/service/build.rb +10 -10
- data/lib/twilio-ruby/rest/serverless/v1/service/build/build_status.rb +4 -4
- data/lib/twilio-ruby/rest/serverless/v1/service/environment.rb +4 -4
- data/lib/twilio-ruby/rest/serverless/v1/service/environment/deployment.rb +4 -4
- data/lib/twilio-ruby/rest/serverless/v1/service/environment/log.rb +4 -4
- data/lib/twilio-ruby/rest/serverless/v1/service/environment/variable.rb +4 -4
- data/lib/twilio-ruby/rest/serverless/v1/service/function.rb +4 -4
- data/lib/twilio-ruby/rest/serverless/v1/service/function/function_version.rb +4 -4
- data/lib/twilio-ruby/rest/serverless/v1/service/function/function_version/function_version_content.rb +4 -4
- data/lib/twilio-ruby/rest/studio/v2/flow.rb +2 -2
- data/lib/twilio-ruby/rest/studio/v2/flow/flow_revision.rb +1 -1
- data/lib/twilio-ruby/rest/studio/v2/flow/test_user.rb +3 -3
- data/lib/twilio-ruby/rest/supersim/v1/network.rb +1 -1
- data/lib/twilio-ruby/rest/supersim/v1/network_access_profile.rb +2 -2
- data/lib/twilio-ruby/rest/supersim/v1/network_access_profile/network_access_profile_network.rb +1 -1
- data/lib/twilio-ruby/rest/sync/v1/service/document.rb +7 -5
- data/lib/twilio-ruby/rest/sync/v1/service/sync_list.rb +4 -2
- data/lib/twilio-ruby/rest/sync/v1/service/sync_list/sync_list_item.rb +3 -3
- data/lib/twilio-ruby/rest/sync/v1/service/sync_map.rb +4 -2
- data/lib/twilio-ruby/rest/sync/v1/service/sync_map/sync_map_item.rb +4 -4
- data/lib/twilio-ruby/rest/sync/v1/service/sync_map/sync_map_permission.rb +1 -1
- data/lib/twilio-ruby/rest/sync/v1/service/sync_stream/stream_message.rb +1 -1
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task.rb +12 -9
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task/reservation.rb +10 -10
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_channel.rb +16 -16
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_real_time_statistics.rb +1 -1
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/reservation.rb +10 -10
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/workers_cumulative_statistics.rb +1 -1
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/workers_real_time_statistics.rb +1 -1
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workspace_real_time_statistics.rb +1 -1
- data/lib/twilio-ruby/rest/trunking/v1/trunk.rb +1 -1
- data/lib/twilio-ruby/rest/trunking/v1/trunk/recording.rb +21 -24
- data/lib/twilio-ruby/rest/verify/v2/service.rb +3 -3
- data/lib/twilio-ruby/rest/verify/v2/service/entity.rb +3 -1
- data/lib/twilio-ruby/rest/verify/v2/service/entity/challenge.rb +8 -6
- data/lib/twilio-ruby/rest/verify/v2/service/verification.rb +1 -1
- data/lib/twilio-ruby/rest/verify/v2/service/webhook.rb +10 -10
- data/lib/twilio-ruby/rest/video/v1/composition.rb +16 -15
- data/lib/twilio-ruby/rest/video/v1/composition_hook.rb +26 -26
- data/lib/twilio-ruby/rest/video/v1/composition_settings.rb +6 -6
- data/lib/twilio-ruby/rest/video/v1/recording.rb +6 -6
- data/lib/twilio-ruby/rest/video/v1/recording_settings.rb +6 -6
- data/lib/twilio-ruby/rest/video/v1/room.rb +10 -3
- data/lib/twilio-ruby/rest/video/v1/room/room_participant/room_participant_subscribe_rule.rb +1 -1
- data/lib/twilio-ruby/rest/video/v1/room/room_recording_rule.rb +1 -1
- data/lib/twilio-ruby/rest/voice/v1/dialing_permissions/country.rb +1 -1
- data/lib/twilio-ruby/rest/wireless/v1/rate_plan.rb +4 -4
- data/lib/twilio-ruby/twiml/voice_response.rb +8 -4
- data/lib/twilio-ruby/util/configuration.rb +5 -1
- data/lib/twilio-ruby/version.rb +1 -1
- data/spec/integration/api/v2010/account/call/event_spec.rb +102 -0
- data/spec/integration/api/v2010/account/call/recording_spec.rb +4 -0
- data/spec/integration/api/v2010/account/call_spec.rb +20 -10
- data/spec/integration/api/v2010/account/conference/participant_spec.rb +30 -0
- data/spec/integration/conversations/v1/conversation/participant_spec.rb +30 -10
- data/spec/integration/conversations/v1/service/configuration_spec.rb +2 -0
- data/spec/integration/conversations/v1/service/conversation/participant_spec.rb +30 -10
- data/spec/integration/conversations/v1/service/user_spec.rb +9 -4
- data/spec/integration/conversations/v1/user_spec.rb +9 -4
- data/spec/integration/events/v1/sink_spec.rb +14 -0
- data/spec/integration/events/v1/subscription_spec.rb +49 -0
- data/spec/integration/insights/v1/call/summary_spec.rb +1 -0
- data/spec/integration/insights/v1/room/participant_spec.rb +0 -2
- data/spec/integration/lookups/v1/phone_number_spec.rb +7 -7
- data/spec/integration/taskrouter/v1/workspace/worker/worker_channel_spec.rb +1 -1
- data/spec/integration/trunking/v1/trunk/recording_spec.rb +2 -6
- data/spec/integration/video/v1/room_spec.rb +5 -0
- data/spec/rest/client_spec.rb +24 -2
- data/spec/twiml/voice_response_spec.rb +1 -1
- data/twilio-ruby.gemspec +1 -0
- metadata +19 -17
- data/lib/twilio-ruby/rest/preview/trusted_comms/branded_call.rb +0 -243
- data/lib/twilio-ruby/rest/preview/trusted_comms/business.rb +0 -213
- data/lib/twilio-ruby/rest/preview/trusted_comms/business/insights.rb +0 -108
- data/lib/twilio-ruby/rest/preview/trusted_comms/business/insights/impressions_rate.rb +0 -260
- data/lib/twilio-ruby/rest/preview/trusted_comms/phone_call.rb +0 -342
- data/spec/integration/preview/trusted_comms/branded_call_spec.rb +0 -59
- data/spec/integration/preview/trusted_comms/business/insights/impressions_rate_spec.rb +0 -56
- data/spec/integration/preview/trusted_comms/business/insights_spec.rb +0 -12
- data/spec/integration/preview/trusted_comms/business_spec.rb +0 -45
- data/spec/integration/preview/trusted_comms/phone_call_spec.rb +0 -59
data/spec/rest/client_spec.rb
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
require 'spec_helper'
|
|
2
|
+
require 'logger'
|
|
2
3
|
|
|
3
4
|
describe Twilio::REST::ObsoleteClient do
|
|
4
5
|
it 'raise an exception' do
|
|
@@ -57,6 +58,7 @@ describe Twilio::REST::Client do
|
|
|
57
58
|
config.http_client = 'someClient'
|
|
58
59
|
config.region = 'someRegion'
|
|
59
60
|
config.edge = 'someEdge'
|
|
61
|
+
config.logger = 'someLogger'
|
|
60
62
|
end
|
|
61
63
|
end
|
|
62
64
|
|
|
@@ -67,16 +69,18 @@ describe Twilio::REST::Client do
|
|
|
67
69
|
expect(@client.http_client).to eq('someClient')
|
|
68
70
|
expect(@client.region).to eq('someRegion')
|
|
69
71
|
expect(@client.edge).to eq('someEdge')
|
|
72
|
+
expect(@client.logger).to eq('someLogger')
|
|
70
73
|
end
|
|
71
74
|
|
|
72
75
|
it 'uses the arguments over global configuration' do
|
|
73
|
-
@client = Twilio::REST::Client.new('myUser', 'myPassword', nil, 'myRegion', 'myClient')
|
|
76
|
+
@client = Twilio::REST::Client.new('myUser', 'myPassword', nil, 'myRegion', 'myClient', 'myLogger')
|
|
74
77
|
@client.edge = 'myEdge'
|
|
75
78
|
expect(@client.account_sid).to eq('myUser')
|
|
76
79
|
expect(@client.auth_token).to eq('myPassword')
|
|
77
80
|
expect(@client.http_client).to eq('myClient')
|
|
78
81
|
expect(@client.region).to eq('myRegion')
|
|
79
82
|
expect(@client.edge).to eq('myEdge')
|
|
83
|
+
expect(@client.logger).to eq('myLogger')
|
|
80
84
|
end
|
|
81
85
|
|
|
82
86
|
class MyVersion < Twilio::REST::Version
|
|
@@ -97,13 +101,14 @@ describe Twilio::REST::Client do
|
|
|
97
101
|
end
|
|
98
102
|
|
|
99
103
|
context 'validation' do
|
|
100
|
-
before do
|
|
104
|
+
before :all do
|
|
101
105
|
Twilio.configure do |config|
|
|
102
106
|
config.account_sid = 'someSid'
|
|
103
107
|
config.auth_token = 'someToken'
|
|
104
108
|
config.http_client = 'someClient'
|
|
105
109
|
config.region = nil
|
|
106
110
|
config.edge = nil
|
|
111
|
+
config.logger = nil
|
|
107
112
|
end
|
|
108
113
|
end
|
|
109
114
|
|
|
@@ -142,6 +147,23 @@ describe Twilio::REST::Client do
|
|
|
142
147
|
end
|
|
143
148
|
end
|
|
144
149
|
|
|
150
|
+
context 'logging' do
|
|
151
|
+
it 'logs the call details' do
|
|
152
|
+
@client.logger = Logger.new(STDOUT)
|
|
153
|
+
@holodeck.mock Twilio::Response.new(200, {})
|
|
154
|
+
expect {
|
|
155
|
+
@client.request('host', 'port', 'GET', 'http://foobar.com')
|
|
156
|
+
}.to output(/Host:foobar.com/).to_stdout_from_any_process
|
|
157
|
+
end
|
|
158
|
+
|
|
159
|
+
it 'does not log when the logger instance is not passed' do
|
|
160
|
+
@holodeck.mock Twilio::Response.new(200, {})
|
|
161
|
+
expect {
|
|
162
|
+
@client.request('host', 'port', 'GET', 'http://foobar.com')
|
|
163
|
+
}.to_not output(/Host:foobar.com/).to_stdout_from_any_process
|
|
164
|
+
end
|
|
165
|
+
end
|
|
166
|
+
|
|
145
167
|
describe '#build_uri' do
|
|
146
168
|
before(:all) do
|
|
147
169
|
Twilio.configure do |config|
|
|
@@ -575,7 +575,7 @@ describe Twilio::TwiML::VoiceResponse do
|
|
|
575
575
|
</Response>
|
|
576
576
|
XML
|
|
577
577
|
enqueue_elem = Twilio::TwiML::Enqueue.new(name: nil, workflow_sid: '123123123')
|
|
578
|
-
enqueue_elem.task(account_sid: 'AC123123123')
|
|
578
|
+
enqueue_elem.task({ account_sid: 'AC123123123' })
|
|
579
579
|
|
|
580
580
|
response = Twilio::TwiML::VoiceResponse.new
|
|
581
581
|
response.append(enqueue_elem)
|
data/twilio-ruby.gemspec
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.46.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:
|
|
11
|
+
date: 2021-01-13 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: jwt
|
|
@@ -188,6 +188,20 @@ dependencies:
|
|
|
188
188
|
- - "~>"
|
|
189
189
|
- !ruby/object:Gem::Version
|
|
190
190
|
version: 0.9.9
|
|
191
|
+
- !ruby/object:Gem::Dependency
|
|
192
|
+
name: logger
|
|
193
|
+
requirement: !ruby/object:Gem::Requirement
|
|
194
|
+
requirements:
|
|
195
|
+
- - "~>"
|
|
196
|
+
- !ruby/object:Gem::Version
|
|
197
|
+
version: 1.4.2
|
|
198
|
+
type: :development
|
|
199
|
+
prerelease: false
|
|
200
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
201
|
+
requirements:
|
|
202
|
+
- - "~>"
|
|
203
|
+
- !ruby/object:Gem::Version
|
|
204
|
+
version: 1.4.2
|
|
191
205
|
description: The official library for communicating with the Twilio REST API, building
|
|
192
206
|
TwiML, and generating Twilio JWT Capability Tokens
|
|
193
207
|
email:
|
|
@@ -263,6 +277,7 @@ files:
|
|
|
263
277
|
- lib/twilio-ruby/rest/api/v2010/account/available_phone_number/voip.rb
|
|
264
278
|
- lib/twilio-ruby/rest/api/v2010/account/balance.rb
|
|
265
279
|
- lib/twilio-ruby/rest/api/v2010/account/call.rb
|
|
280
|
+
- lib/twilio-ruby/rest/api/v2010/account/call/event.rb
|
|
266
281
|
- lib/twilio-ruby/rest/api/v2010/account/call/feedback.rb
|
|
267
282
|
- lib/twilio-ruby/rest/api/v2010/account/call/feedback_summary.rb
|
|
268
283
|
- lib/twilio-ruby/rest/api/v2010/account/call/notification.rb
|
|
@@ -510,16 +525,11 @@ files:
|
|
|
510
525
|
- lib/twilio-ruby/rest/preview/sync/service/sync_map/sync_map_item.rb
|
|
511
526
|
- lib/twilio-ruby/rest/preview/sync/service/sync_map/sync_map_permission.rb
|
|
512
527
|
- lib/twilio-ruby/rest/preview/trusted_comms.rb
|
|
513
|
-
- lib/twilio-ruby/rest/preview/trusted_comms/branded_call.rb
|
|
514
528
|
- lib/twilio-ruby/rest/preview/trusted_comms/branded_channel.rb
|
|
515
529
|
- lib/twilio-ruby/rest/preview/trusted_comms/branded_channel/channel.rb
|
|
516
530
|
- lib/twilio-ruby/rest/preview/trusted_comms/brands_information.rb
|
|
517
|
-
- lib/twilio-ruby/rest/preview/trusted_comms/business.rb
|
|
518
|
-
- lib/twilio-ruby/rest/preview/trusted_comms/business/insights.rb
|
|
519
|
-
- lib/twilio-ruby/rest/preview/trusted_comms/business/insights/impressions_rate.rb
|
|
520
531
|
- lib/twilio-ruby/rest/preview/trusted_comms/cps.rb
|
|
521
532
|
- lib/twilio-ruby/rest/preview/trusted_comms/current_call.rb
|
|
522
|
-
- lib/twilio-ruby/rest/preview/trusted_comms/phone_call.rb
|
|
523
533
|
- lib/twilio-ruby/rest/preview/understand.rb
|
|
524
534
|
- lib/twilio-ruby/rest/preview/understand/assistant.rb
|
|
525
535
|
- lib/twilio-ruby/rest/preview/understand/assistant/assistant_fallback_actions.rb
|
|
@@ -733,6 +743,7 @@ files:
|
|
|
733
743
|
- spec/integration/api/v2010/account/available_phone_number/voip_spec.rb
|
|
734
744
|
- spec/integration/api/v2010/account/available_phone_number_spec.rb
|
|
735
745
|
- spec/integration/api/v2010/account/balance_spec.rb
|
|
746
|
+
- spec/integration/api/v2010/account/call/event_spec.rb
|
|
736
747
|
- spec/integration/api/v2010/account/call/feedback_spec.rb
|
|
737
748
|
- spec/integration/api/v2010/account/call/feedback_summary_spec.rb
|
|
738
749
|
- spec/integration/api/v2010/account/call/notification_spec.rb
|
|
@@ -944,16 +955,11 @@ files:
|
|
|
944
955
|
- spec/integration/preview/sync/service/sync_map/sync_map_permission_spec.rb
|
|
945
956
|
- spec/integration/preview/sync/service/sync_map_spec.rb
|
|
946
957
|
- spec/integration/preview/sync/service_spec.rb
|
|
947
|
-
- spec/integration/preview/trusted_comms/branded_call_spec.rb
|
|
948
958
|
- spec/integration/preview/trusted_comms/branded_channel/channel_spec.rb
|
|
949
959
|
- spec/integration/preview/trusted_comms/branded_channel_spec.rb
|
|
950
960
|
- spec/integration/preview/trusted_comms/brands_information_spec.rb
|
|
951
|
-
- spec/integration/preview/trusted_comms/business/insights/impressions_rate_spec.rb
|
|
952
|
-
- spec/integration/preview/trusted_comms/business/insights_spec.rb
|
|
953
|
-
- spec/integration/preview/trusted_comms/business_spec.rb
|
|
954
961
|
- spec/integration/preview/trusted_comms/cps_spec.rb
|
|
955
962
|
- spec/integration/preview/trusted_comms/current_call_spec.rb
|
|
956
|
-
- spec/integration/preview/trusted_comms/phone_call_spec.rb
|
|
957
963
|
- spec/integration/preview/understand/assistant/assistant_fallback_actions_spec.rb
|
|
958
964
|
- spec/integration/preview/understand/assistant/assistant_initiation_actions_spec.rb
|
|
959
965
|
- spec/integration/preview/understand/assistant/dialogue_spec.rb
|
|
@@ -1177,6 +1183,7 @@ test_files:
|
|
|
1177
1183
|
- spec/integration/api/v2010/account/available_phone_number/voip_spec.rb
|
|
1178
1184
|
- spec/integration/api/v2010/account/available_phone_number_spec.rb
|
|
1179
1185
|
- spec/integration/api/v2010/account/balance_spec.rb
|
|
1186
|
+
- spec/integration/api/v2010/account/call/event_spec.rb
|
|
1180
1187
|
- spec/integration/api/v2010/account/call/feedback_spec.rb
|
|
1181
1188
|
- spec/integration/api/v2010/account/call/feedback_summary_spec.rb
|
|
1182
1189
|
- spec/integration/api/v2010/account/call/notification_spec.rb
|
|
@@ -1388,16 +1395,11 @@ test_files:
|
|
|
1388
1395
|
- spec/integration/preview/sync/service/sync_map/sync_map_permission_spec.rb
|
|
1389
1396
|
- spec/integration/preview/sync/service/sync_map_spec.rb
|
|
1390
1397
|
- spec/integration/preview/sync/service_spec.rb
|
|
1391
|
-
- spec/integration/preview/trusted_comms/branded_call_spec.rb
|
|
1392
1398
|
- spec/integration/preview/trusted_comms/branded_channel/channel_spec.rb
|
|
1393
1399
|
- spec/integration/preview/trusted_comms/branded_channel_spec.rb
|
|
1394
1400
|
- spec/integration/preview/trusted_comms/brands_information_spec.rb
|
|
1395
|
-
- spec/integration/preview/trusted_comms/business/insights/impressions_rate_spec.rb
|
|
1396
|
-
- spec/integration/preview/trusted_comms/business/insights_spec.rb
|
|
1397
|
-
- spec/integration/preview/trusted_comms/business_spec.rb
|
|
1398
1401
|
- spec/integration/preview/trusted_comms/cps_spec.rb
|
|
1399
1402
|
- spec/integration/preview/trusted_comms/current_call_spec.rb
|
|
1400
|
-
- spec/integration/preview/trusted_comms/phone_call_spec.rb
|
|
1401
1403
|
- spec/integration/preview/understand/assistant/assistant_fallback_actions_spec.rb
|
|
1402
1404
|
- spec/integration/preview/understand/assistant/assistant_initiation_actions_spec.rb
|
|
1403
1405
|
- spec/integration/preview/understand/assistant/dialogue_spec.rb
|
|
@@ -1,243 +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 BrandedCallList < ListResource
|
|
16
|
-
##
|
|
17
|
-
# Initialize the BrandedCallList
|
|
18
|
-
# @param [Version] version Version that contains the resource
|
|
19
|
-
# @return [BrandedCallList] BrandedCallList
|
|
20
|
-
def initialize(version)
|
|
21
|
-
super(version)
|
|
22
|
-
|
|
23
|
-
# Path Solution
|
|
24
|
-
@solution = {}
|
|
25
|
-
@uri = "/Business/BrandedCalls"
|
|
26
|
-
end
|
|
27
|
-
|
|
28
|
-
##
|
|
29
|
-
# Create the BrandedCallInstance
|
|
30
|
-
# @param [String] from The phone number to use as the caller id, given in {E.164
|
|
31
|
-
# format}[https://www.twilio.com/docs/glossary/what-e164]. It must be a Twilio
|
|
32
|
-
# number that has been set up as a Branded Number in the Business Profile section
|
|
33
|
-
# for your account.
|
|
34
|
-
# @param [String] to The terminating Phone Number, given in {E.164
|
|
35
|
-
# format}[https://www.twilio.com/docs/glossary/what-e164].
|
|
36
|
-
# @param [String] reason The business reason for this phone call that will appear
|
|
37
|
-
# in the terminating device's screen. Max 50 characters.
|
|
38
|
-
# @param [String] call_sid The Call sid this Branded Call should link to.
|
|
39
|
-
# @return [BrandedCallInstance] Created BrandedCallInstance
|
|
40
|
-
def create(from: nil, to: nil, reason: nil, call_sid: :unset)
|
|
41
|
-
data = Twilio::Values.of({'From' => from, 'To' => to, 'Reason' => reason, 'CallSid' => call_sid, })
|
|
42
|
-
|
|
43
|
-
payload = @version.create('POST', @uri, data: data)
|
|
44
|
-
|
|
45
|
-
BrandedCallInstance.new(@version, payload, )
|
|
46
|
-
end
|
|
47
|
-
|
|
48
|
-
##
|
|
49
|
-
# Provide a user friendly representation
|
|
50
|
-
def to_s
|
|
51
|
-
'#<Twilio.Preview.TrustedComms.BrandedCallList>'
|
|
52
|
-
end
|
|
53
|
-
end
|
|
54
|
-
|
|
55
|
-
##
|
|
56
|
-
# 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.
|
|
57
|
-
class BrandedCallPage < Page
|
|
58
|
-
##
|
|
59
|
-
# Initialize the BrandedCallPage
|
|
60
|
-
# @param [Version] version Version that contains the resource
|
|
61
|
-
# @param [Response] response Response from the API
|
|
62
|
-
# @param [Hash] solution Path solution for the resource
|
|
63
|
-
# @return [BrandedCallPage] BrandedCallPage
|
|
64
|
-
def initialize(version, response, solution)
|
|
65
|
-
super(version, response)
|
|
66
|
-
|
|
67
|
-
# Path Solution
|
|
68
|
-
@solution = solution
|
|
69
|
-
end
|
|
70
|
-
|
|
71
|
-
##
|
|
72
|
-
# Build an instance of BrandedCallInstance
|
|
73
|
-
# @param [Hash] payload Payload response from the API
|
|
74
|
-
# @return [BrandedCallInstance] BrandedCallInstance
|
|
75
|
-
def get_instance(payload)
|
|
76
|
-
BrandedCallInstance.new(@version, payload, )
|
|
77
|
-
end
|
|
78
|
-
|
|
79
|
-
##
|
|
80
|
-
# Provide a user friendly representation
|
|
81
|
-
def to_s
|
|
82
|
-
'<Twilio.Preview.TrustedComms.BrandedCallPage>'
|
|
83
|
-
end
|
|
84
|
-
end
|
|
85
|
-
|
|
86
|
-
##
|
|
87
|
-
# 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.
|
|
88
|
-
class BrandedCallInstance < InstanceResource
|
|
89
|
-
##
|
|
90
|
-
# Initialize the BrandedCallInstance
|
|
91
|
-
# @param [Version] version Version that contains the resource
|
|
92
|
-
# @param [Hash] payload payload that contains response from Twilio
|
|
93
|
-
# @return [BrandedCallInstance] BrandedCallInstance
|
|
94
|
-
def initialize(version, payload)
|
|
95
|
-
super(version)
|
|
96
|
-
|
|
97
|
-
# Marshaled Properties
|
|
98
|
-
@properties = {
|
|
99
|
-
'account_sid' => payload['account_sid'],
|
|
100
|
-
'bg_color' => payload['bg_color'],
|
|
101
|
-
'brand_sid' => payload['brand_sid'],
|
|
102
|
-
'branded_channel_sid' => payload['branded_channel_sid'],
|
|
103
|
-
'business_sid' => payload['business_sid'],
|
|
104
|
-
'call_sid' => payload['call_sid'],
|
|
105
|
-
'caller' => payload['caller'],
|
|
106
|
-
'created_at' => Twilio.deserialize_iso8601_datetime(payload['created_at']),
|
|
107
|
-
'font_color' => payload['font_color'],
|
|
108
|
-
'from' => payload['from'],
|
|
109
|
-
'logo' => payload['logo'],
|
|
110
|
-
'phone_number_sid' => payload['phone_number_sid'],
|
|
111
|
-
'reason' => payload['reason'],
|
|
112
|
-
'sid' => payload['sid'],
|
|
113
|
-
'status' => payload['status'],
|
|
114
|
-
'to' => payload['to'],
|
|
115
|
-
'url' => payload['url'],
|
|
116
|
-
'use_case' => payload['use_case'],
|
|
117
|
-
}
|
|
118
|
-
end
|
|
119
|
-
|
|
120
|
-
##
|
|
121
|
-
# @return [String] Account Sid.
|
|
122
|
-
def account_sid
|
|
123
|
-
@properties['account_sid']
|
|
124
|
-
end
|
|
125
|
-
|
|
126
|
-
##
|
|
127
|
-
# @return [String] Background color of the current phone call
|
|
128
|
-
def bg_color
|
|
129
|
-
@properties['bg_color']
|
|
130
|
-
end
|
|
131
|
-
|
|
132
|
-
##
|
|
133
|
-
# @return [String] Brand Sid.
|
|
134
|
-
def brand_sid
|
|
135
|
-
@properties['brand_sid']
|
|
136
|
-
end
|
|
137
|
-
|
|
138
|
-
##
|
|
139
|
-
# @return [String] Branded Channel Sid.
|
|
140
|
-
def branded_channel_sid
|
|
141
|
-
@properties['branded_channel_sid']
|
|
142
|
-
end
|
|
143
|
-
|
|
144
|
-
##
|
|
145
|
-
# @return [String] Business Sid.
|
|
146
|
-
def business_sid
|
|
147
|
-
@properties['business_sid']
|
|
148
|
-
end
|
|
149
|
-
|
|
150
|
-
##
|
|
151
|
-
# @return [String] A string that uniquely identifies this phone call.
|
|
152
|
-
def call_sid
|
|
153
|
-
@properties['call_sid']
|
|
154
|
-
end
|
|
155
|
-
|
|
156
|
-
##
|
|
157
|
-
# @return [String] Caller name of the current phone call
|
|
158
|
-
def caller
|
|
159
|
-
@properties['caller']
|
|
160
|
-
end
|
|
161
|
-
|
|
162
|
-
##
|
|
163
|
-
# @return [Time] The date this current phone call was created
|
|
164
|
-
def created_at
|
|
165
|
-
@properties['created_at']
|
|
166
|
-
end
|
|
167
|
-
|
|
168
|
-
##
|
|
169
|
-
# @return [String] Font color of the current phone call
|
|
170
|
-
def font_color
|
|
171
|
-
@properties['font_color']
|
|
172
|
-
end
|
|
173
|
-
|
|
174
|
-
##
|
|
175
|
-
# @return [String] The originating phone number
|
|
176
|
-
def from
|
|
177
|
-
@properties['from']
|
|
178
|
-
end
|
|
179
|
-
|
|
180
|
-
##
|
|
181
|
-
# @return [String] Logo URL of the caller
|
|
182
|
-
def logo
|
|
183
|
-
@properties['logo']
|
|
184
|
-
end
|
|
185
|
-
|
|
186
|
-
##
|
|
187
|
-
# @return [String] Phone Number Sid.
|
|
188
|
-
def phone_number_sid
|
|
189
|
-
@properties['phone_number_sid']
|
|
190
|
-
end
|
|
191
|
-
|
|
192
|
-
##
|
|
193
|
-
# @return [String] The business reason for this current phone call
|
|
194
|
-
def reason
|
|
195
|
-
@properties['reason']
|
|
196
|
-
end
|
|
197
|
-
|
|
198
|
-
##
|
|
199
|
-
# @return [String] A string that uniquely identifies this current branded phone call.
|
|
200
|
-
def sid
|
|
201
|
-
@properties['sid']
|
|
202
|
-
end
|
|
203
|
-
|
|
204
|
-
##
|
|
205
|
-
# @return [String] The status of the current phone call
|
|
206
|
-
def status
|
|
207
|
-
@properties['status']
|
|
208
|
-
end
|
|
209
|
-
|
|
210
|
-
##
|
|
211
|
-
# @return [String] The terminating phone number
|
|
212
|
-
def to
|
|
213
|
-
@properties['to']
|
|
214
|
-
end
|
|
215
|
-
|
|
216
|
-
##
|
|
217
|
-
# @return [String] The URL of this resource.
|
|
218
|
-
def url
|
|
219
|
-
@properties['url']
|
|
220
|
-
end
|
|
221
|
-
|
|
222
|
-
##
|
|
223
|
-
# @return [String] The use case for the current phone call
|
|
224
|
-
def use_case
|
|
225
|
-
@properties['use_case']
|
|
226
|
-
end
|
|
227
|
-
|
|
228
|
-
##
|
|
229
|
-
# Provide a user friendly representation
|
|
230
|
-
def to_s
|
|
231
|
-
"<Twilio.Preview.TrustedComms.BrandedCallInstance>"
|
|
232
|
-
end
|
|
233
|
-
|
|
234
|
-
##
|
|
235
|
-
# Provide a detailed, user friendly representation
|
|
236
|
-
def inspect
|
|
237
|
-
"<Twilio.Preview.TrustedComms.BrandedCallInstance>"
|
|
238
|
-
end
|
|
239
|
-
end
|
|
240
|
-
end
|
|
241
|
-
end
|
|
242
|
-
end
|
|
243
|
-
end
|
|
@@ -1,213 +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 BusinessList < ListResource
|
|
16
|
-
##
|
|
17
|
-
# Initialize the BusinessList
|
|
18
|
-
# @param [Version] version Version that contains the resource
|
|
19
|
-
# @return [BusinessList] BusinessList
|
|
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.BusinessList>'
|
|
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 BusinessPage < Page
|
|
37
|
-
##
|
|
38
|
-
# Initialize the BusinessPage
|
|
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 [BusinessPage] BusinessPage
|
|
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 BusinessInstance
|
|
52
|
-
# @param [Hash] payload Payload response from the API
|
|
53
|
-
# @return [BusinessInstance] BusinessInstance
|
|
54
|
-
def get_instance(payload)
|
|
55
|
-
BusinessInstance.new(@version, payload, )
|
|
56
|
-
end
|
|
57
|
-
|
|
58
|
-
##
|
|
59
|
-
# Provide a user friendly representation
|
|
60
|
-
def to_s
|
|
61
|
-
'<Twilio.Preview.TrustedComms.BusinessPage>'
|
|
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 BusinessContext < InstanceContext
|
|
68
|
-
##
|
|
69
|
-
# Initialize the BusinessContext
|
|
70
|
-
# @param [Version] version Version that contains the resource
|
|
71
|
-
# @param [String] sid A 34 character string that uniquely identifies this
|
|
72
|
-
# Business.
|
|
73
|
-
# @return [BusinessContext] BusinessContext
|
|
74
|
-
def initialize(version, sid)
|
|
75
|
-
super(version)
|
|
76
|
-
|
|
77
|
-
# Path Solution
|
|
78
|
-
@solution = {sid: sid, }
|
|
79
|
-
@uri = "/Businesses/#{@solution[:sid]}"
|
|
80
|
-
|
|
81
|
-
# Dependents
|
|
82
|
-
@insights = nil
|
|
83
|
-
end
|
|
84
|
-
|
|
85
|
-
##
|
|
86
|
-
# Fetch the BusinessInstance
|
|
87
|
-
# @return [BusinessInstance] Fetched BusinessInstance
|
|
88
|
-
def fetch
|
|
89
|
-
payload = @version.fetch('GET', @uri)
|
|
90
|
-
|
|
91
|
-
BusinessInstance.new(@version, payload, sid: @solution[:sid], )
|
|
92
|
-
end
|
|
93
|
-
|
|
94
|
-
##
|
|
95
|
-
# Access the insights
|
|
96
|
-
# @return [InsightsList]
|
|
97
|
-
# @return [InsightsContext]
|
|
98
|
-
def insights
|
|
99
|
-
unless @insights
|
|
100
|
-
@insights = InsightsList.new(@version, business_sid: @solution[:sid], )
|
|
101
|
-
end
|
|
102
|
-
|
|
103
|
-
@insights
|
|
104
|
-
end
|
|
105
|
-
|
|
106
|
-
##
|
|
107
|
-
# Provide a user friendly representation
|
|
108
|
-
def to_s
|
|
109
|
-
context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
|
|
110
|
-
"#<Twilio.Preview.TrustedComms.BusinessContext #{context}>"
|
|
111
|
-
end
|
|
112
|
-
|
|
113
|
-
##
|
|
114
|
-
# Provide a detailed, user friendly representation
|
|
115
|
-
def inspect
|
|
116
|
-
context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
|
|
117
|
-
"#<Twilio.Preview.TrustedComms.BusinessContext #{context}>"
|
|
118
|
-
end
|
|
119
|
-
end
|
|
120
|
-
|
|
121
|
-
##
|
|
122
|
-
# 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.
|
|
123
|
-
class BusinessInstance < InstanceResource
|
|
124
|
-
##
|
|
125
|
-
# Initialize the BusinessInstance
|
|
126
|
-
# @param [Version] version Version that contains the resource
|
|
127
|
-
# @param [Hash] payload payload that contains response from Twilio
|
|
128
|
-
# @param [String] sid A 34 character string that uniquely identifies this
|
|
129
|
-
# Business.
|
|
130
|
-
# @return [BusinessInstance] BusinessInstance
|
|
131
|
-
def initialize(version, payload, sid: nil)
|
|
132
|
-
super(version)
|
|
133
|
-
|
|
134
|
-
# Marshaled Properties
|
|
135
|
-
@properties = {
|
|
136
|
-
'account_sid' => payload['account_sid'],
|
|
137
|
-
'sid' => payload['sid'],
|
|
138
|
-
'url' => payload['url'],
|
|
139
|
-
'links' => payload['links'],
|
|
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 [BusinessContext] BusinessContext for this BusinessInstance
|
|
151
|
-
def context
|
|
152
|
-
unless @instance_context
|
|
153
|
-
@instance_context = BusinessContext.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] A string that uniquely identifies this Business.
|
|
166
|
-
def sid
|
|
167
|
-
@properties['sid']
|
|
168
|
-
end
|
|
169
|
-
|
|
170
|
-
##
|
|
171
|
-
# @return [String] The URL of this resource.
|
|
172
|
-
def url
|
|
173
|
-
@properties['url']
|
|
174
|
-
end
|
|
175
|
-
|
|
176
|
-
##
|
|
177
|
-
# @return [String] Nested resource URLs.
|
|
178
|
-
def links
|
|
179
|
-
@properties['links']
|
|
180
|
-
end
|
|
181
|
-
|
|
182
|
-
##
|
|
183
|
-
# Fetch the BusinessInstance
|
|
184
|
-
# @return [BusinessInstance] Fetched BusinessInstance
|
|
185
|
-
def fetch
|
|
186
|
-
context.fetch
|
|
187
|
-
end
|
|
188
|
-
|
|
189
|
-
##
|
|
190
|
-
# Access the insights
|
|
191
|
-
# @return [insights] insights
|
|
192
|
-
def insights
|
|
193
|
-
context.insights
|
|
194
|
-
end
|
|
195
|
-
|
|
196
|
-
##
|
|
197
|
-
# Provide a user friendly representation
|
|
198
|
-
def to_s
|
|
199
|
-
values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
|
|
200
|
-
"<Twilio.Preview.TrustedComms.BusinessInstance #{values}>"
|
|
201
|
-
end
|
|
202
|
-
|
|
203
|
-
##
|
|
204
|
-
# Provide a detailed, user friendly representation
|
|
205
|
-
def inspect
|
|
206
|
-
values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
|
|
207
|
-
"<Twilio.Preview.TrustedComms.BusinessInstance #{values}>"
|
|
208
|
-
end
|
|
209
|
-
end
|
|
210
|
-
end
|
|
211
|
-
end
|
|
212
|
-
end
|
|
213
|
-
end
|