twilio-ruby 5.40.2 → 5.40.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 +4 -4
- data/CHANGES.md +15 -0
- data/README.md +2 -2
- data/lib/twilio-ruby/framework/version.rb +2 -1
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/local.rb +12 -3
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/machine_to_machine.rb +12 -3
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/mobile.rb +12 -3
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/national.rb +12 -3
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/shared_cost.rb +12 -3
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/toll_free.rb +12 -3
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/voip.rb +12 -3
- data/lib/twilio-ruby/rest/api/v2010/account/call.rb +2 -1
- data/lib/twilio-ruby/rest/api/v2010/account/call/payment.rb +8 -2
- data/lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb +5 -2
- data/lib/twilio-ruby/rest/api/v2010/account/message.rb +8 -1
- data/lib/twilio-ruby/rest/api/v2010/account/message/feedback.rb +3 -1
- data/lib/twilio-ruby/rest/api/v2010/account/usage/trigger.rb +2 -1
- data/lib/twilio-ruby/rest/autopilot/v1/assistant/field_type/field_value.rb +8 -4
- data/lib/twilio-ruby/rest/autopilot/v1/assistant/query.rb +11 -4
- data/lib/twilio-ruby/rest/autopilot/v1/assistant/task/sample.rb +13 -6
- data/lib/twilio-ruby/rest/conversations.rb +0 -16
- data/lib/twilio-ruby/rest/conversations/v1.rb +0 -24
- data/lib/twilio-ruby/rest/conversations/v1/configuration.rb +17 -7
- data/lib/twilio-ruby/rest/conversations/v1/configuration/webhook.rb +262 -0
- data/lib/twilio-ruby/rest/conversations/v1/conversation.rb +6 -6
- data/lib/twilio-ruby/rest/conversations/v1/conversation/message.rb +13 -10
- data/lib/twilio-ruby/rest/conversations/v1/conversation/message/delivery_receipt.rb +22 -16
- data/lib/twilio-ruby/rest/conversations/v1/conversation/participant.rb +42 -36
- data/lib/twilio-ruby/rest/conversations/v1/conversation/webhook.rb +14 -11
- data/lib/twilio-ruby/rest/conversations/v1/credential.rb +1 -1
- data/lib/twilio-ruby/rest/conversations/v1/role.rb +4 -2
- data/lib/twilio-ruby/rest/conversations/v1/service.rb +1 -1
- data/lib/twilio-ruby/rest/conversations/v1/service/binding.rb +28 -25
- data/lib/twilio-ruby/rest/conversations/v1/service/configuration.rb +30 -18
- data/lib/twilio-ruby/rest/conversations/v1/service/configuration/notification.rb +315 -0
- data/lib/twilio-ruby/rest/conversations/v1/service/conversation.rb +10 -10
- data/lib/twilio-ruby/rest/conversations/v1/service/conversation/message.rb +23 -20
- data/lib/twilio-ruby/rest/conversations/v1/service/conversation/message/delivery_receipt.rb +32 -26
- data/lib/twilio-ruby/rest/conversations/v1/service/conversation/participant.rb +52 -46
- data/lib/twilio-ruby/rest/conversations/v1/service/conversation/webhook.rb +24 -21
- data/lib/twilio-ruby/rest/conversations/v1/service/role.rb +13 -11
- data/lib/twilio-ruby/rest/conversations/v1/service/user.rb +23 -23
- data/lib/twilio-ruby/rest/conversations/v1/user.rb +14 -14
- data/lib/twilio-ruby/rest/events.rb +10 -1
- data/lib/twilio-ruby/rest/events/v1.rb +17 -1
- data/lib/twilio-ruby/rest/events/v1/event_type.rb +8 -8
- data/lib/twilio-ruby/rest/events/v1/schema.rb +226 -0
- data/lib/twilio-ruby/rest/events/v1/schema/schema_version.rb +290 -0
- data/lib/twilio-ruby/rest/events/v1/subscription.rb +28 -8
- data/lib/twilio-ruby/rest/events/v1/subscription/subscribed_event.rb +3 -109
- data/lib/twilio-ruby/rest/fax/v1/fax.rb +2 -1
- data/lib/twilio-ruby/rest/messaging/v1/service.rb +6 -3
- data/lib/twilio-ruby/rest/notify/v1/credential.rb +12 -6
- data/lib/twilio-ruby/rest/notify/v1/service/notification.rb +10 -2
- data/lib/twilio-ruby/rest/preview/hosted_numbers/authorization_document.rb +10 -5
- data/lib/twilio-ruby/rest/preview/hosted_numbers/authorization_document/dependent_hosted_number_order.rb +6 -3
- data/lib/twilio-ruby/rest/preview/trusted_comms/business/insights.rb +1 -4
- data/lib/twilio-ruby/rest/proxy/v1/service/phone_number.rb +3 -1
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task/reservation.rb +6 -2
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker.rb +1 -4
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/reservation.rb +6 -2
- data/lib/twilio-ruby/rest/trunking/v1/trunk.rb +19 -26
- data/lib/twilio-ruby/rest/trunking/v1/trunk/ip_access_control_list.rb +2 -1
- data/lib/twilio-ruby/rest/trunking/v1/trunk/phone_number.rb +2 -1
- data/lib/twilio-ruby/rest/trunking/v1/trunk/recording.rb +201 -0
- data/lib/twilio-ruby/rest/verify/v2/service/verification.rb +3 -1
- data/lib/twilio-ruby/rest/video/v1/composition.rb +7 -3
- data/lib/twilio-ruby/rest/video/v1/composition_hook.rb +18 -9
- data/lib/twilio-ruby/rest/video/v1/room.rb +2 -1
- data/lib/twilio-ruby/rest/voice/v1/dialing_permissions.rb +1 -4
- data/lib/twilio-ruby/rest/wireless/v1/rate_plan.rb +2 -1
- data/lib/twilio-ruby/version.rb +1 -1
- data/spec/framework/version_spec.rb +11 -0
- data/spec/integration/conversations/v1/{webhook_spec.rb → configuration/webhook_spec.rb} +12 -8
- data/spec/integration/conversations/v1/configuration_spec.rb +4 -2
- data/spec/integration/conversations/v1/{notification_spec.rb → service/configuration/notification_spec.rb} +12 -4
- data/spec/integration/events/v1/schema/schema_version_spec.rb +126 -0
- data/spec/integration/events/v1/schema_spec.rb +46 -0
- data/spec/integration/events/v1/subscription/subscribed_event_spec.rb +0 -121
- data/spec/integration/events/v1/subscription_spec.rb +38 -0
- data/spec/integration/trunking/v1/trunk/recording_spec.rb +79 -0
- metadata +17 -8
- data/lib/twilio-ruby/rest/conversations/v1/notification.rb +0 -310
- data/lib/twilio-ruby/rest/conversations/v1/webhook.rb +0 -262
|
@@ -88,125 +88,4 @@ describe 'SubscribedEvent' do
|
|
|
88
88
|
|
|
89
89
|
expect(actual).to_not eq(nil)
|
|
90
90
|
end
|
|
91
|
-
|
|
92
|
-
it "can create" do
|
|
93
|
-
@holodeck.mock(Twilio::Response.new(500, ''))
|
|
94
|
-
|
|
95
|
-
expect {
|
|
96
|
-
@client.events.v1.subscriptions('DFXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
|
97
|
-
.subscribed_events.create(type: 'type')
|
|
98
|
-
}.to raise_exception(Twilio::REST::TwilioError)
|
|
99
|
-
|
|
100
|
-
values = {'Type' => 'type', }
|
|
101
|
-
expect(
|
|
102
|
-
@holodeck.has_request?(Holodeck::Request.new(
|
|
103
|
-
method: 'post',
|
|
104
|
-
url: 'https://events.twilio.com/v1/Subscriptions/DFXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SubscribedEvents',
|
|
105
|
-
data: values,
|
|
106
|
-
))).to eq(true)
|
|
107
|
-
end
|
|
108
|
-
|
|
109
|
-
it "receives create_all_fields responses" do
|
|
110
|
-
@holodeck.mock(Twilio::Response.new(
|
|
111
|
-
201,
|
|
112
|
-
%q[
|
|
113
|
-
{
|
|
114
|
-
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
|
115
|
-
"type": "com.twilio.voice.call.initiated",
|
|
116
|
-
"version": 5,
|
|
117
|
-
"subscription_sid": "DFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
|
118
|
-
"url": "https://events.twilio.com/v1/Subscriptions/DFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/SubscribedEvents/com.twilio.voice.call.initiated"
|
|
119
|
-
}
|
|
120
|
-
]
|
|
121
|
-
))
|
|
122
|
-
|
|
123
|
-
actual = @client.events.v1.subscriptions('DFXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
|
124
|
-
.subscribed_events.create(type: 'type')
|
|
125
|
-
|
|
126
|
-
expect(actual).to_not eq(nil)
|
|
127
|
-
end
|
|
128
|
-
|
|
129
|
-
it "receives create_no_version responses" do
|
|
130
|
-
@holodeck.mock(Twilio::Response.new(
|
|
131
|
-
201,
|
|
132
|
-
%q[
|
|
133
|
-
{
|
|
134
|
-
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
|
135
|
-
"type": "com.twilio.voice.call.recorded",
|
|
136
|
-
"version": 2,
|
|
137
|
-
"subscription_sid": "DFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
|
138
|
-
"url": "https://events.twilio.com/v1/Subscriptions/DFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/SubscribedEvents/com.twilio.voice.call.recorded"
|
|
139
|
-
}
|
|
140
|
-
]
|
|
141
|
-
))
|
|
142
|
-
|
|
143
|
-
actual = @client.events.v1.subscriptions('DFXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
|
144
|
-
.subscribed_events.create(type: 'type')
|
|
145
|
-
|
|
146
|
-
expect(actual).to_not eq(nil)
|
|
147
|
-
end
|
|
148
|
-
|
|
149
|
-
it "can update" do
|
|
150
|
-
@holodeck.mock(Twilio::Response.new(500, ''))
|
|
151
|
-
|
|
152
|
-
expect {
|
|
153
|
-
@client.events.v1.subscriptions('DFXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
|
154
|
-
.subscribed_events('type').update(version: 1)
|
|
155
|
-
}.to raise_exception(Twilio::REST::TwilioError)
|
|
156
|
-
|
|
157
|
-
values = {'Version' => 1, }
|
|
158
|
-
expect(
|
|
159
|
-
@holodeck.has_request?(Holodeck::Request.new(
|
|
160
|
-
method: 'post',
|
|
161
|
-
url: 'https://events.twilio.com/v1/Subscriptions/DFXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SubscribedEvents/type',
|
|
162
|
-
data: values,
|
|
163
|
-
))).to eq(true)
|
|
164
|
-
end
|
|
165
|
-
|
|
166
|
-
it "receives update responses" do
|
|
167
|
-
@holodeck.mock(Twilio::Response.new(
|
|
168
|
-
200,
|
|
169
|
-
%q[
|
|
170
|
-
{
|
|
171
|
-
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
|
172
|
-
"type": "com.twilio.voice.call.initiated",
|
|
173
|
-
"version": 6,
|
|
174
|
-
"subscription_sid": "DFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
|
175
|
-
"url": "https://events.twilio.com/v1/Subscriptions/DFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/SubscribedEvents/com.twilio.voice.call.initiated"
|
|
176
|
-
}
|
|
177
|
-
]
|
|
178
|
-
))
|
|
179
|
-
|
|
180
|
-
actual = @client.events.v1.subscriptions('DFXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
|
181
|
-
.subscribed_events('type').update(version: 1)
|
|
182
|
-
|
|
183
|
-
expect(actual).to_not eq(nil)
|
|
184
|
-
end
|
|
185
|
-
|
|
186
|
-
it "can delete" do
|
|
187
|
-
@holodeck.mock(Twilio::Response.new(500, ''))
|
|
188
|
-
|
|
189
|
-
expect {
|
|
190
|
-
@client.events.v1.subscriptions('DFXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
|
191
|
-
.subscribed_events('type').delete()
|
|
192
|
-
}.to raise_exception(Twilio::REST::TwilioError)
|
|
193
|
-
|
|
194
|
-
expect(
|
|
195
|
-
@holodeck.has_request?(Holodeck::Request.new(
|
|
196
|
-
method: 'delete',
|
|
197
|
-
url: 'https://events.twilio.com/v1/Subscriptions/DFXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SubscribedEvents/type',
|
|
198
|
-
))).to eq(true)
|
|
199
|
-
end
|
|
200
|
-
|
|
201
|
-
it "receives delete responses" do
|
|
202
|
-
@holodeck.mock(Twilio::Response.new(
|
|
203
|
-
204,
|
|
204
|
-
nil,
|
|
205
|
-
))
|
|
206
|
-
|
|
207
|
-
actual = @client.events.v1.subscriptions('DFXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
|
208
|
-
.subscribed_events('type').delete()
|
|
209
|
-
|
|
210
|
-
expect(actual).to eq(true)
|
|
211
|
-
end
|
|
212
91
|
end
|
|
@@ -178,6 +178,44 @@ describe 'Subscription' do
|
|
|
178
178
|
expect(actual).to_not eq(nil)
|
|
179
179
|
end
|
|
180
180
|
|
|
181
|
+
it "can update" do
|
|
182
|
+
@holodeck.mock(Twilio::Response.new(500, ''))
|
|
183
|
+
|
|
184
|
+
expect {
|
|
185
|
+
@client.events.v1.subscriptions('DFXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').update()
|
|
186
|
+
}.to raise_exception(Twilio::REST::TwilioError)
|
|
187
|
+
|
|
188
|
+
expect(
|
|
189
|
+
@holodeck.has_request?(Holodeck::Request.new(
|
|
190
|
+
method: 'post',
|
|
191
|
+
url: 'https://events.twilio.com/v1/Subscriptions/DFXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
|
|
192
|
+
))).to eq(true)
|
|
193
|
+
end
|
|
194
|
+
|
|
195
|
+
it "receives update responses" do
|
|
196
|
+
@holodeck.mock(Twilio::Response.new(
|
|
197
|
+
200,
|
|
198
|
+
%q[
|
|
199
|
+
{
|
|
200
|
+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
|
201
|
+
"date_created": "2015-07-30T20:00:00Z",
|
|
202
|
+
"date_updated": "2020-07-30T20:01:33Z",
|
|
203
|
+
"sid": "DFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
|
204
|
+
"sink_sid": "DGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaab",
|
|
205
|
+
"description": "Updated description",
|
|
206
|
+
"url": "https://events.twilio.com/v1/Subscriptions/DFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
|
207
|
+
"links": {
|
|
208
|
+
"subscribed_events": "https://events.twilio.com/v1/Subscriptions/DFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/SubscribedEvents"
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
]
|
|
212
|
+
))
|
|
213
|
+
|
|
214
|
+
actual = @client.events.v1.subscriptions('DFXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').update()
|
|
215
|
+
|
|
216
|
+
expect(actual).to_not eq(nil)
|
|
217
|
+
end
|
|
218
|
+
|
|
181
219
|
it "can delete" do
|
|
182
220
|
@holodeck.mock(Twilio::Response.new(500, ''))
|
|
183
221
|
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
##
|
|
2
|
+
# This code was generated by
|
|
3
|
+
# \ / _ _ _| _ _
|
|
4
|
+
# | (_)\/(_)(_|\/| |(/_ v1.0.0
|
|
5
|
+
# / /
|
|
6
|
+
#
|
|
7
|
+
# frozen_string_literal: true
|
|
8
|
+
|
|
9
|
+
require 'spec_helper.rb'
|
|
10
|
+
|
|
11
|
+
describe 'Recording' do
|
|
12
|
+
it "can fetch" do
|
|
13
|
+
@holodeck.mock(Twilio::Response.new(500, ''))
|
|
14
|
+
|
|
15
|
+
expect {
|
|
16
|
+
@client.trunking.v1.trunks('TKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
|
17
|
+
.recordings().fetch()
|
|
18
|
+
}.to raise_exception(Twilio::REST::TwilioError)
|
|
19
|
+
|
|
20
|
+
expect(
|
|
21
|
+
@holodeck.has_request?(Holodeck::Request.new(
|
|
22
|
+
method: 'get',
|
|
23
|
+
url: 'https://trunking.twilio.com/v1/Trunks/TKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Recording',
|
|
24
|
+
))).to eq(true)
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
it "receives fetch responses" do
|
|
28
|
+
@holodeck.mock(Twilio::Response.new(
|
|
29
|
+
200,
|
|
30
|
+
%q[
|
|
31
|
+
{
|
|
32
|
+
"mode": "do-not-record",
|
|
33
|
+
"trim": "do-not-trim",
|
|
34
|
+
"url": "https://trunking.twilio.com/v1/Trunks/TKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Recording",
|
|
35
|
+
"trunk_sid": "TKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
|
|
36
|
+
}
|
|
37
|
+
]
|
|
38
|
+
))
|
|
39
|
+
|
|
40
|
+
actual = @client.trunking.v1.trunks('TKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
|
41
|
+
.recordings().fetch()
|
|
42
|
+
|
|
43
|
+
expect(actual).to_not eq(nil)
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
it "can update" do
|
|
47
|
+
@holodeck.mock(Twilio::Response.new(500, ''))
|
|
48
|
+
|
|
49
|
+
expect {
|
|
50
|
+
@client.trunking.v1.trunks('TKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
|
51
|
+
.recordings().update()
|
|
52
|
+
}.to raise_exception(Twilio::REST::TwilioError)
|
|
53
|
+
|
|
54
|
+
expect(
|
|
55
|
+
@holodeck.has_request?(Holodeck::Request.new(
|
|
56
|
+
method: 'post',
|
|
57
|
+
url: 'https://trunking.twilio.com/v1/Trunks/TKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Recording',
|
|
58
|
+
))).to eq(true)
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
it "receives update responses" do
|
|
62
|
+
@holodeck.mock(Twilio::Response.new(
|
|
63
|
+
200,
|
|
64
|
+
%q[
|
|
65
|
+
{
|
|
66
|
+
"mode": "do-not-record",
|
|
67
|
+
"trim": "do-not-trim",
|
|
68
|
+
"url": "https://trunking.twilio.com/v1/Trunks/TKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Recording",
|
|
69
|
+
"trunk_sid": "TKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
|
|
70
|
+
}
|
|
71
|
+
]
|
|
72
|
+
))
|
|
73
|
+
|
|
74
|
+
actual = @client.trunking.v1.trunks('TKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
|
75
|
+
.recordings().update()
|
|
76
|
+
|
|
77
|
+
expect(actual).to_not eq(nil)
|
|
78
|
+
end
|
|
79
|
+
end
|
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.40.
|
|
4
|
+
version: 5.40.3
|
|
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: 2020-09-
|
|
11
|
+
date: 2020-09-21 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: jwt
|
|
@@ -372,17 +372,18 @@ files:
|
|
|
372
372
|
- lib/twilio-ruby/rest/conversations.rb
|
|
373
373
|
- lib/twilio-ruby/rest/conversations/v1.rb
|
|
374
374
|
- lib/twilio-ruby/rest/conversations/v1/configuration.rb
|
|
375
|
+
- lib/twilio-ruby/rest/conversations/v1/configuration/webhook.rb
|
|
375
376
|
- lib/twilio-ruby/rest/conversations/v1/conversation.rb
|
|
376
377
|
- lib/twilio-ruby/rest/conversations/v1/conversation/message.rb
|
|
377
378
|
- lib/twilio-ruby/rest/conversations/v1/conversation/message/delivery_receipt.rb
|
|
378
379
|
- lib/twilio-ruby/rest/conversations/v1/conversation/participant.rb
|
|
379
380
|
- lib/twilio-ruby/rest/conversations/v1/conversation/webhook.rb
|
|
380
381
|
- lib/twilio-ruby/rest/conversations/v1/credential.rb
|
|
381
|
-
- lib/twilio-ruby/rest/conversations/v1/notification.rb
|
|
382
382
|
- lib/twilio-ruby/rest/conversations/v1/role.rb
|
|
383
383
|
- lib/twilio-ruby/rest/conversations/v1/service.rb
|
|
384
384
|
- lib/twilio-ruby/rest/conversations/v1/service/binding.rb
|
|
385
385
|
- lib/twilio-ruby/rest/conversations/v1/service/configuration.rb
|
|
386
|
+
- lib/twilio-ruby/rest/conversations/v1/service/configuration/notification.rb
|
|
386
387
|
- lib/twilio-ruby/rest/conversations/v1/service/conversation.rb
|
|
387
388
|
- lib/twilio-ruby/rest/conversations/v1/service/conversation/message.rb
|
|
388
389
|
- lib/twilio-ruby/rest/conversations/v1/service/conversation/message/delivery_receipt.rb
|
|
@@ -391,10 +392,11 @@ files:
|
|
|
391
392
|
- lib/twilio-ruby/rest/conversations/v1/service/role.rb
|
|
392
393
|
- lib/twilio-ruby/rest/conversations/v1/service/user.rb
|
|
393
394
|
- lib/twilio-ruby/rest/conversations/v1/user.rb
|
|
394
|
-
- lib/twilio-ruby/rest/conversations/v1/webhook.rb
|
|
395
395
|
- lib/twilio-ruby/rest/events.rb
|
|
396
396
|
- lib/twilio-ruby/rest/events/v1.rb
|
|
397
397
|
- lib/twilio-ruby/rest/events/v1/event_type.rb
|
|
398
|
+
- lib/twilio-ruby/rest/events/v1/schema.rb
|
|
399
|
+
- lib/twilio-ruby/rest/events/v1/schema/schema_version.rb
|
|
398
400
|
- lib/twilio-ruby/rest/events/v1/sink.rb
|
|
399
401
|
- lib/twilio-ruby/rest/events/v1/sink/sink_test.rb
|
|
400
402
|
- lib/twilio-ruby/rest/events/v1/sink/sink_validate.rb
|
|
@@ -646,6 +648,7 @@ files:
|
|
|
646
648
|
- lib/twilio-ruby/rest/trunking/v1/trunk/ip_access_control_list.rb
|
|
647
649
|
- lib/twilio-ruby/rest/trunking/v1/trunk/origination_url.rb
|
|
648
650
|
- lib/twilio-ruby/rest/trunking/v1/trunk/phone_number.rb
|
|
651
|
+
- lib/twilio-ruby/rest/trunking/v1/trunk/recording.rb
|
|
649
652
|
- lib/twilio-ruby/rest/verify.rb
|
|
650
653
|
- lib/twilio-ruby/rest/verify/v2.rb
|
|
651
654
|
- lib/twilio-ruby/rest/verify/v2/form.rb
|
|
@@ -825,6 +828,7 @@ files:
|
|
|
825
828
|
- spec/integration/chat/v2/service/user/user_channel_spec.rb
|
|
826
829
|
- spec/integration/chat/v2/service/user_spec.rb
|
|
827
830
|
- spec/integration/chat/v2/service_spec.rb
|
|
831
|
+
- spec/integration/conversations/v1/configuration/webhook_spec.rb
|
|
828
832
|
- spec/integration/conversations/v1/configuration_spec.rb
|
|
829
833
|
- spec/integration/conversations/v1/conversation/message/delivery_receipt_spec.rb
|
|
830
834
|
- spec/integration/conversations/v1/conversation/message_spec.rb
|
|
@@ -832,9 +836,9 @@ files:
|
|
|
832
836
|
- spec/integration/conversations/v1/conversation/webhook_spec.rb
|
|
833
837
|
- spec/integration/conversations/v1/conversation_spec.rb
|
|
834
838
|
- spec/integration/conversations/v1/credential_spec.rb
|
|
835
|
-
- spec/integration/conversations/v1/notification_spec.rb
|
|
836
839
|
- spec/integration/conversations/v1/role_spec.rb
|
|
837
840
|
- spec/integration/conversations/v1/service/binding_spec.rb
|
|
841
|
+
- spec/integration/conversations/v1/service/configuration/notification_spec.rb
|
|
838
842
|
- spec/integration/conversations/v1/service/configuration_spec.rb
|
|
839
843
|
- spec/integration/conversations/v1/service/conversation/message/delivery_receipt_spec.rb
|
|
840
844
|
- spec/integration/conversations/v1/service/conversation/message_spec.rb
|
|
@@ -845,8 +849,9 @@ files:
|
|
|
845
849
|
- spec/integration/conversations/v1/service/user_spec.rb
|
|
846
850
|
- spec/integration/conversations/v1/service_spec.rb
|
|
847
851
|
- spec/integration/conversations/v1/user_spec.rb
|
|
848
|
-
- spec/integration/conversations/v1/webhook_spec.rb
|
|
849
852
|
- spec/integration/events/v1/event_type_spec.rb
|
|
853
|
+
- spec/integration/events/v1/schema/schema_version_spec.rb
|
|
854
|
+
- spec/integration/events/v1/schema_spec.rb
|
|
850
855
|
- spec/integration/events/v1/sink/sink_test_spec.rb
|
|
851
856
|
- spec/integration/events/v1/sink/sink_validate_spec.rb
|
|
852
857
|
- spec/integration/events/v1/sink_spec.rb
|
|
@@ -1051,6 +1056,7 @@ files:
|
|
|
1051
1056
|
- spec/integration/trunking/v1/trunk/ip_access_control_list_spec.rb
|
|
1052
1057
|
- spec/integration/trunking/v1/trunk/origination_url_spec.rb
|
|
1053
1058
|
- spec/integration/trunking/v1/trunk/phone_number_spec.rb
|
|
1059
|
+
- spec/integration/trunking/v1/trunk/recording_spec.rb
|
|
1054
1060
|
- spec/integration/trunking/v1/trunk_spec.rb
|
|
1055
1061
|
- spec/integration/verify/v2/form_spec.rb
|
|
1056
1062
|
- spec/integration/verify/v2/service/access_token_spec.rb
|
|
@@ -1261,6 +1267,7 @@ test_files:
|
|
|
1261
1267
|
- spec/integration/chat/v2/service/user/user_channel_spec.rb
|
|
1262
1268
|
- spec/integration/chat/v2/service/user_spec.rb
|
|
1263
1269
|
- spec/integration/chat/v2/service_spec.rb
|
|
1270
|
+
- spec/integration/conversations/v1/configuration/webhook_spec.rb
|
|
1264
1271
|
- spec/integration/conversations/v1/configuration_spec.rb
|
|
1265
1272
|
- spec/integration/conversations/v1/conversation/message/delivery_receipt_spec.rb
|
|
1266
1273
|
- spec/integration/conversations/v1/conversation/message_spec.rb
|
|
@@ -1268,9 +1275,9 @@ test_files:
|
|
|
1268
1275
|
- spec/integration/conversations/v1/conversation/webhook_spec.rb
|
|
1269
1276
|
- spec/integration/conversations/v1/conversation_spec.rb
|
|
1270
1277
|
- spec/integration/conversations/v1/credential_spec.rb
|
|
1271
|
-
- spec/integration/conversations/v1/notification_spec.rb
|
|
1272
1278
|
- spec/integration/conversations/v1/role_spec.rb
|
|
1273
1279
|
- spec/integration/conversations/v1/service/binding_spec.rb
|
|
1280
|
+
- spec/integration/conversations/v1/service/configuration/notification_spec.rb
|
|
1274
1281
|
- spec/integration/conversations/v1/service/configuration_spec.rb
|
|
1275
1282
|
- spec/integration/conversations/v1/service/conversation/message/delivery_receipt_spec.rb
|
|
1276
1283
|
- spec/integration/conversations/v1/service/conversation/message_spec.rb
|
|
@@ -1281,8 +1288,9 @@ test_files:
|
|
|
1281
1288
|
- spec/integration/conversations/v1/service/user_spec.rb
|
|
1282
1289
|
- spec/integration/conversations/v1/service_spec.rb
|
|
1283
1290
|
- spec/integration/conversations/v1/user_spec.rb
|
|
1284
|
-
- spec/integration/conversations/v1/webhook_spec.rb
|
|
1285
1291
|
- spec/integration/events/v1/event_type_spec.rb
|
|
1292
|
+
- spec/integration/events/v1/schema/schema_version_spec.rb
|
|
1293
|
+
- spec/integration/events/v1/schema_spec.rb
|
|
1286
1294
|
- spec/integration/events/v1/sink/sink_test_spec.rb
|
|
1287
1295
|
- spec/integration/events/v1/sink/sink_validate_spec.rb
|
|
1288
1296
|
- spec/integration/events/v1/sink_spec.rb
|
|
@@ -1487,6 +1495,7 @@ test_files:
|
|
|
1487
1495
|
- spec/integration/trunking/v1/trunk/ip_access_control_list_spec.rb
|
|
1488
1496
|
- spec/integration/trunking/v1/trunk/origination_url_spec.rb
|
|
1489
1497
|
- spec/integration/trunking/v1/trunk/phone_number_spec.rb
|
|
1498
|
+
- spec/integration/trunking/v1/trunk/recording_spec.rb
|
|
1490
1499
|
- spec/integration/trunking/v1/trunk_spec.rb
|
|
1491
1500
|
- spec/integration/verify/v2/form_spec.rb
|
|
1492
1501
|
- spec/integration/verify/v2/service/access_token_spec.rb
|
|
@@ -1,310 +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 Conversations < Domain
|
|
12
|
-
class V1 < Version
|
|
13
|
-
##
|
|
14
|
-
# PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
|
|
15
|
-
class NotificationList < ListResource
|
|
16
|
-
##
|
|
17
|
-
# Initialize the NotificationList
|
|
18
|
-
# @param [Version] version Version that contains the resource
|
|
19
|
-
# @return [NotificationList] NotificationList
|
|
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.Conversations.V1.NotificationList>'
|
|
31
|
-
end
|
|
32
|
-
end
|
|
33
|
-
|
|
34
|
-
##
|
|
35
|
-
# PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
|
|
36
|
-
class NotificationPage < Page
|
|
37
|
-
##
|
|
38
|
-
# Initialize the NotificationPage
|
|
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 [NotificationPage] NotificationPage
|
|
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 NotificationInstance
|
|
52
|
-
# @param [Hash] payload Payload response from the API
|
|
53
|
-
# @return [NotificationInstance] NotificationInstance
|
|
54
|
-
def get_instance(payload)
|
|
55
|
-
NotificationInstance.new(@version, payload, )
|
|
56
|
-
end
|
|
57
|
-
|
|
58
|
-
##
|
|
59
|
-
# Provide a user friendly representation
|
|
60
|
-
def to_s
|
|
61
|
-
'<Twilio.Conversations.V1.NotificationPage>'
|
|
62
|
-
end
|
|
63
|
-
end
|
|
64
|
-
|
|
65
|
-
##
|
|
66
|
-
# PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
|
|
67
|
-
class NotificationContext < InstanceContext
|
|
68
|
-
##
|
|
69
|
-
# Initialize the NotificationContext
|
|
70
|
-
# @param [Version] version Version that contains the resource
|
|
71
|
-
# @param [String] chat_service_sid The SID of the [Chat
|
|
72
|
-
# Service](https://www.twilio.com/docs/chat/rest/service-resource) the
|
|
73
|
-
# Configuration applies to.
|
|
74
|
-
# @return [NotificationContext] NotificationContext
|
|
75
|
-
def initialize(version, chat_service_sid)
|
|
76
|
-
super(version)
|
|
77
|
-
|
|
78
|
-
# Path Solution
|
|
79
|
-
@solution = {chat_service_sid: chat_service_sid, }
|
|
80
|
-
@uri = "/Services/#{@solution[:chat_service_sid]}/Configuration/Notifications"
|
|
81
|
-
end
|
|
82
|
-
|
|
83
|
-
##
|
|
84
|
-
# Update the NotificationInstance
|
|
85
|
-
# @param [Boolean] log_enabled Weather the notification logging is enabled.
|
|
86
|
-
# @param [Boolean] new_message_enabled Whether to send a notification when a new
|
|
87
|
-
# message is added to a conversation. The default is `false`.
|
|
88
|
-
# @param [String] new_message_template The template to use to create the
|
|
89
|
-
# notification text displayed when a new message is added to a conversation and
|
|
90
|
-
# `new_message.enabled` is `true`.
|
|
91
|
-
# @param [String] new_message_sound The name of the sound to play when a new
|
|
92
|
-
# message is added to a conversation and `new_message.enabled` is `true`.
|
|
93
|
-
# @param [Boolean] new_message_badge_count_enabled Whether the new message badge
|
|
94
|
-
# is enabled. The default is `false`.
|
|
95
|
-
# @param [Boolean] added_to_conversation_enabled Whether to send a notification
|
|
96
|
-
# when a participant is added to a conversation. The default is `false`.
|
|
97
|
-
# @param [String] added_to_conversation_template The template to use to create the
|
|
98
|
-
# notification text displayed when a participant is added to a conversation and
|
|
99
|
-
# `added_to_conversation.enabled` is `true`.
|
|
100
|
-
# @param [String] added_to_conversation_sound The name of the sound to play when a
|
|
101
|
-
# participant is added to a conversation and `added_to_conversation.enabled` is
|
|
102
|
-
# `true`.
|
|
103
|
-
# @param [Boolean] removed_from_conversation_enabled Whether to send a
|
|
104
|
-
# notification to a user when they are removed from a conversation. The default is
|
|
105
|
-
# `false`.
|
|
106
|
-
# @param [String] removed_from_conversation_template The template to use to create
|
|
107
|
-
# the notification text displayed to a user when they are removed from a
|
|
108
|
-
# conversation and `removed_from_conversation.enabled` is `true`.
|
|
109
|
-
# @param [String] removed_from_conversation_sound The name of the sound to play to
|
|
110
|
-
# a user when they are removed from a conversation and
|
|
111
|
-
# `removed_from_conversation.enabled` is `true`.
|
|
112
|
-
# @return [NotificationInstance] Updated NotificationInstance
|
|
113
|
-
def update(log_enabled: :unset, new_message_enabled: :unset, new_message_template: :unset, new_message_sound: :unset, new_message_badge_count_enabled: :unset, added_to_conversation_enabled: :unset, added_to_conversation_template: :unset, added_to_conversation_sound: :unset, removed_from_conversation_enabled: :unset, removed_from_conversation_template: :unset, removed_from_conversation_sound: :unset)
|
|
114
|
-
data = Twilio::Values.of({
|
|
115
|
-
'LogEnabled' => log_enabled,
|
|
116
|
-
'NewMessage.Enabled' => new_message_enabled,
|
|
117
|
-
'NewMessage.Template' => new_message_template,
|
|
118
|
-
'NewMessage.Sound' => new_message_sound,
|
|
119
|
-
'NewMessage.BadgeCountEnabled' => new_message_badge_count_enabled,
|
|
120
|
-
'AddedToConversation.Enabled' => added_to_conversation_enabled,
|
|
121
|
-
'AddedToConversation.Template' => added_to_conversation_template,
|
|
122
|
-
'AddedToConversation.Sound' => added_to_conversation_sound,
|
|
123
|
-
'RemovedFromConversation.Enabled' => removed_from_conversation_enabled,
|
|
124
|
-
'RemovedFromConversation.Template' => removed_from_conversation_template,
|
|
125
|
-
'RemovedFromConversation.Sound' => removed_from_conversation_sound,
|
|
126
|
-
})
|
|
127
|
-
|
|
128
|
-
payload = @version.update('POST', @uri, data: data)
|
|
129
|
-
|
|
130
|
-
NotificationInstance.new(@version, payload, chat_service_sid: @solution[:chat_service_sid], )
|
|
131
|
-
end
|
|
132
|
-
|
|
133
|
-
##
|
|
134
|
-
# Fetch the NotificationInstance
|
|
135
|
-
# @return [NotificationInstance] Fetched NotificationInstance
|
|
136
|
-
def fetch
|
|
137
|
-
payload = @version.fetch('GET', @uri)
|
|
138
|
-
|
|
139
|
-
NotificationInstance.new(@version, payload, chat_service_sid: @solution[:chat_service_sid], )
|
|
140
|
-
end
|
|
141
|
-
|
|
142
|
-
##
|
|
143
|
-
# Provide a user friendly representation
|
|
144
|
-
def to_s
|
|
145
|
-
context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
|
|
146
|
-
"#<Twilio.Conversations.V1.NotificationContext #{context}>"
|
|
147
|
-
end
|
|
148
|
-
|
|
149
|
-
##
|
|
150
|
-
# Provide a detailed, user friendly representation
|
|
151
|
-
def inspect
|
|
152
|
-
context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
|
|
153
|
-
"#<Twilio.Conversations.V1.NotificationContext #{context}>"
|
|
154
|
-
end
|
|
155
|
-
end
|
|
156
|
-
|
|
157
|
-
##
|
|
158
|
-
# PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
|
|
159
|
-
class NotificationInstance < InstanceResource
|
|
160
|
-
##
|
|
161
|
-
# Initialize the NotificationInstance
|
|
162
|
-
# @param [Version] version Version that contains the resource
|
|
163
|
-
# @param [Hash] payload payload that contains response from Twilio
|
|
164
|
-
# @param [String] chat_service_sid The SID of the [Chat
|
|
165
|
-
# Service](https://www.twilio.com/docs/chat/rest/service-resource) the
|
|
166
|
-
# Configuration applies to.
|
|
167
|
-
# @return [NotificationInstance] NotificationInstance
|
|
168
|
-
def initialize(version, payload, chat_service_sid: nil)
|
|
169
|
-
super(version)
|
|
170
|
-
|
|
171
|
-
# Marshaled Properties
|
|
172
|
-
@properties = {
|
|
173
|
-
'account_sid' => payload['account_sid'],
|
|
174
|
-
'chat_service_sid' => payload['chat_service_sid'],
|
|
175
|
-
'new_message' => payload['new_message'],
|
|
176
|
-
'added_to_conversation' => payload['added_to_conversation'],
|
|
177
|
-
'removed_from_conversation' => payload['removed_from_conversation'],
|
|
178
|
-
'log_enabled' => payload['log_enabled'],
|
|
179
|
-
'url' => payload['url'],
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
# Context
|
|
183
|
-
@instance_context = nil
|
|
184
|
-
@params = {'chat_service_sid' => chat_service_sid || @properties['chat_service_sid'], }
|
|
185
|
-
end
|
|
186
|
-
|
|
187
|
-
##
|
|
188
|
-
# Generate an instance context for the instance, the context is capable of
|
|
189
|
-
# performing various actions. All instance actions are proxied to the context
|
|
190
|
-
# @return [NotificationContext] NotificationContext for this NotificationInstance
|
|
191
|
-
def context
|
|
192
|
-
unless @instance_context
|
|
193
|
-
@instance_context = NotificationContext.new(@version, @params['chat_service_sid'], )
|
|
194
|
-
end
|
|
195
|
-
@instance_context
|
|
196
|
-
end
|
|
197
|
-
|
|
198
|
-
##
|
|
199
|
-
# @return [String] The unique id of the Account responsible for this configuration.
|
|
200
|
-
def account_sid
|
|
201
|
-
@properties['account_sid']
|
|
202
|
-
end
|
|
203
|
-
|
|
204
|
-
##
|
|
205
|
-
# @return [String] The SID of the Chat Service that the Configuration applies to.
|
|
206
|
-
def chat_service_sid
|
|
207
|
-
@properties['chat_service_sid']
|
|
208
|
-
end
|
|
209
|
-
|
|
210
|
-
##
|
|
211
|
-
# @return [Hash] The Push Notification configuration for New Messages.
|
|
212
|
-
def new_message
|
|
213
|
-
@properties['new_message']
|
|
214
|
-
end
|
|
215
|
-
|
|
216
|
-
##
|
|
217
|
-
# @return [Hash] The Push Notification configuration for being added to a Conversation.
|
|
218
|
-
def added_to_conversation
|
|
219
|
-
@properties['added_to_conversation']
|
|
220
|
-
end
|
|
221
|
-
|
|
222
|
-
##
|
|
223
|
-
# @return [Hash] The Push Notification configuration for being removed from a Conversation.
|
|
224
|
-
def removed_from_conversation
|
|
225
|
-
@properties['removed_from_conversation']
|
|
226
|
-
end
|
|
227
|
-
|
|
228
|
-
##
|
|
229
|
-
# @return [Boolean] Weather the notification logging is enabled.
|
|
230
|
-
def log_enabled
|
|
231
|
-
@properties['log_enabled']
|
|
232
|
-
end
|
|
233
|
-
|
|
234
|
-
##
|
|
235
|
-
# @return [String] An absolute URL for this configuration.
|
|
236
|
-
def url
|
|
237
|
-
@properties['url']
|
|
238
|
-
end
|
|
239
|
-
|
|
240
|
-
##
|
|
241
|
-
# Update the NotificationInstance
|
|
242
|
-
# @param [Boolean] log_enabled Weather the notification logging is enabled.
|
|
243
|
-
# @param [Boolean] new_message_enabled Whether to send a notification when a new
|
|
244
|
-
# message is added to a conversation. The default is `false`.
|
|
245
|
-
# @param [String] new_message_template The template to use to create the
|
|
246
|
-
# notification text displayed when a new message is added to a conversation and
|
|
247
|
-
# `new_message.enabled` is `true`.
|
|
248
|
-
# @param [String] new_message_sound The name of the sound to play when a new
|
|
249
|
-
# message is added to a conversation and `new_message.enabled` is `true`.
|
|
250
|
-
# @param [Boolean] new_message_badge_count_enabled Whether the new message badge
|
|
251
|
-
# is enabled. The default is `false`.
|
|
252
|
-
# @param [Boolean] added_to_conversation_enabled Whether to send a notification
|
|
253
|
-
# when a participant is added to a conversation. The default is `false`.
|
|
254
|
-
# @param [String] added_to_conversation_template The template to use to create the
|
|
255
|
-
# notification text displayed when a participant is added to a conversation and
|
|
256
|
-
# `added_to_conversation.enabled` is `true`.
|
|
257
|
-
# @param [String] added_to_conversation_sound The name of the sound to play when a
|
|
258
|
-
# participant is added to a conversation and `added_to_conversation.enabled` is
|
|
259
|
-
# `true`.
|
|
260
|
-
# @param [Boolean] removed_from_conversation_enabled Whether to send a
|
|
261
|
-
# notification to a user when they are removed from a conversation. The default is
|
|
262
|
-
# `false`.
|
|
263
|
-
# @param [String] removed_from_conversation_template The template to use to create
|
|
264
|
-
# the notification text displayed to a user when they are removed from a
|
|
265
|
-
# conversation and `removed_from_conversation.enabled` is `true`.
|
|
266
|
-
# @param [String] removed_from_conversation_sound The name of the sound to play to
|
|
267
|
-
# a user when they are removed from a conversation and
|
|
268
|
-
# `removed_from_conversation.enabled` is `true`.
|
|
269
|
-
# @return [NotificationInstance] Updated NotificationInstance
|
|
270
|
-
def update(log_enabled: :unset, new_message_enabled: :unset, new_message_template: :unset, new_message_sound: :unset, new_message_badge_count_enabled: :unset, added_to_conversation_enabled: :unset, added_to_conversation_template: :unset, added_to_conversation_sound: :unset, removed_from_conversation_enabled: :unset, removed_from_conversation_template: :unset, removed_from_conversation_sound: :unset)
|
|
271
|
-
context.update(
|
|
272
|
-
log_enabled: log_enabled,
|
|
273
|
-
new_message_enabled: new_message_enabled,
|
|
274
|
-
new_message_template: new_message_template,
|
|
275
|
-
new_message_sound: new_message_sound,
|
|
276
|
-
new_message_badge_count_enabled: new_message_badge_count_enabled,
|
|
277
|
-
added_to_conversation_enabled: added_to_conversation_enabled,
|
|
278
|
-
added_to_conversation_template: added_to_conversation_template,
|
|
279
|
-
added_to_conversation_sound: added_to_conversation_sound,
|
|
280
|
-
removed_from_conversation_enabled: removed_from_conversation_enabled,
|
|
281
|
-
removed_from_conversation_template: removed_from_conversation_template,
|
|
282
|
-
removed_from_conversation_sound: removed_from_conversation_sound,
|
|
283
|
-
)
|
|
284
|
-
end
|
|
285
|
-
|
|
286
|
-
##
|
|
287
|
-
# Fetch the NotificationInstance
|
|
288
|
-
# @return [NotificationInstance] Fetched NotificationInstance
|
|
289
|
-
def fetch
|
|
290
|
-
context.fetch
|
|
291
|
-
end
|
|
292
|
-
|
|
293
|
-
##
|
|
294
|
-
# Provide a user friendly representation
|
|
295
|
-
def to_s
|
|
296
|
-
values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
|
|
297
|
-
"<Twilio.Conversations.V1.NotificationInstance #{values}>"
|
|
298
|
-
end
|
|
299
|
-
|
|
300
|
-
##
|
|
301
|
-
# Provide a detailed, user friendly representation
|
|
302
|
-
def inspect
|
|
303
|
-
values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
|
|
304
|
-
"<Twilio.Conversations.V1.NotificationInstance #{values}>"
|
|
305
|
-
end
|
|
306
|
-
end
|
|
307
|
-
end
|
|
308
|
-
end
|
|
309
|
-
end
|
|
310
|
-
end
|