twilio-ruby 5.0.0.rc7 → 5.0.0.rc8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGES.md +7 -0
- data/lib/twilio-ruby/rest/api/v2010/account/message.rb +3 -1
- data/lib/twilio-ruby/rest/notifications/v1/service.rb +25 -3
- data/lib/twilio-ruby/rest/notifications/v1/service/notification.rb +9 -2
- data/lib/twilio-ruby/version.rb +1 -1
- data/spec/integration/notifications/v1/service/notification_spec.rb +2 -1
- data/spec/integration/notifications/v1/service_spec.rb +8 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6889f9f70ebbb5ddec4b5e6eb8f0f377df903bd8
|
4
|
+
data.tar.gz: 73648a1b4bcb39fb388f34608f3203d73d260195
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a61afda7883943ef133d6965cf95f74267dbd43270bfb2d33dcd6f39b237ab9378ca2b4cefdc5b05d6c522ce5887e00cb2057a646b93b66073e57ea75403661a
|
7
|
+
data.tar.gz: 12b6ca5bb785544e669771fa24d04e506269593ecd610420ed7f7cd529efe84680a020cd8a88ddd3a58695ec731cb2f552d4537d1ea850b5b4c1f4bab698ab94
|
data/CHANGES.md
CHANGED
@@ -38,11 +38,12 @@ module Twilio
|
|
38
38
|
# @param [String] application_sid Twilio the POST MessageSid as well as
|
39
39
|
# MessageStatus to the URL in the MessageStatusCallback property of this
|
40
40
|
# Application
|
41
|
+
# @param [Boolean] provide_feedback The provide_feedback
|
41
42
|
# @param [String] body The body
|
42
43
|
# @param [String] media_url The media_url
|
43
44
|
|
44
45
|
# @return [MessageInstance] Newly created MessageInstance
|
45
|
-
def create(to: nil, from: nil, status_callback: nil, application_sid: nil, body: nil, media_url: nil)
|
46
|
+
def create(to: nil, from: nil, status_callback: nil, application_sid: nil, provide_feedback: nil, body: nil, media_url: nil)
|
46
47
|
data = {
|
47
48
|
'To' => to,
|
48
49
|
'From' => from,
|
@@ -50,6 +51,7 @@ module Twilio
|
|
50
51
|
'MediaUrl' => media_url,
|
51
52
|
'StatusCallback' => status_callback,
|
52
53
|
'ApplicationSid' => application_sid,
|
54
|
+
'ProvideFeedback' => provide_feedback,
|
53
55
|
}
|
54
56
|
|
55
57
|
payload = @version.create(
|
@@ -28,17 +28,21 @@ module Twilio
|
|
28
28
|
# @param [String] friendly_name The friendly_name
|
29
29
|
# @param [String] apn_credential_sid The apn_credential_sid
|
30
30
|
# @param [String] gcm_credential_sid The gcm_credential_sid
|
31
|
+
# @param [String] messaging_service_sid The messaging_service_sid
|
32
|
+
# @param [String] facebook_messenger_page_id The facebook_messenger_page_id
|
31
33
|
# @param [String] default_apn_notification_protocol_version The
|
32
34
|
# default_apn_notification_protocol_version
|
33
35
|
# @param [String] default_gcm_notification_protocol_version The
|
34
36
|
# default_gcm_notification_protocol_version
|
35
37
|
|
36
38
|
# @return [ServiceInstance] Newly created ServiceInstance
|
37
|
-
def create(friendly_name: nil, apn_credential_sid: nil, gcm_credential_sid: nil, default_apn_notification_protocol_version: nil, default_gcm_notification_protocol_version: nil)
|
39
|
+
def create(friendly_name: nil, apn_credential_sid: nil, gcm_credential_sid: nil, messaging_service_sid: nil, facebook_messenger_page_id: nil, default_apn_notification_protocol_version: nil, default_gcm_notification_protocol_version: nil)
|
38
40
|
data = {
|
39
41
|
'FriendlyName' => friendly_name,
|
40
42
|
'ApnCredentialSid' => apn_credential_sid,
|
41
43
|
'GcmCredentialSid' => gcm_credential_sid,
|
44
|
+
'MessagingServiceSid' => messaging_service_sid,
|
45
|
+
'FacebookMessengerPageId' => facebook_messenger_page_id,
|
42
46
|
'DefaultApnNotificationProtocolVersion' => default_apn_notification_protocol_version,
|
43
47
|
'DefaultGcmNotificationProtocolVersion' => default_gcm_notification_protocol_version,
|
44
48
|
}
|
@@ -240,17 +244,21 @@ module Twilio
|
|
240
244
|
# @param [String] friendly_name The friendly_name
|
241
245
|
# @param [String] apn_credential_sid The apn_credential_sid
|
242
246
|
# @param [String] gcm_credential_sid The gcm_credential_sid
|
247
|
+
# @param [String] messaging_service_sid The messaging_service_sid
|
248
|
+
# @param [String] facebook_messenger_page_id The facebook_messenger_page_id
|
243
249
|
# @param [String] default_apn_notification_protocol_version The
|
244
250
|
# default_apn_notification_protocol_version
|
245
251
|
# @param [String] default_gcm_notification_protocol_version The
|
246
252
|
# default_gcm_notification_protocol_version
|
247
253
|
|
248
254
|
# @return [ServiceInstance] Updated ServiceInstance
|
249
|
-
def update(friendly_name: nil, apn_credential_sid: nil, gcm_credential_sid: nil, default_apn_notification_protocol_version: nil, default_gcm_notification_protocol_version: nil)
|
255
|
+
def update(friendly_name: nil, apn_credential_sid: nil, gcm_credential_sid: nil, messaging_service_sid: nil, facebook_messenger_page_id: nil, default_apn_notification_protocol_version: nil, default_gcm_notification_protocol_version: nil)
|
250
256
|
data = {
|
251
257
|
'FriendlyName' => friendly_name,
|
252
258
|
'ApnCredentialSid' => apn_credential_sid,
|
253
259
|
'GcmCredentialSid' => gcm_credential_sid,
|
260
|
+
'MessagingServiceSid' => messaging_service_sid,
|
261
|
+
'FacebookMessengerPageId' => facebook_messenger_page_id,
|
254
262
|
'DefaultApnNotificationProtocolVersion' => default_apn_notification_protocol_version,
|
255
263
|
'DefaultGcmNotificationProtocolVersion' => default_gcm_notification_protocol_version,
|
256
264
|
}
|
@@ -332,6 +340,8 @@ module Twilio
|
|
332
340
|
'date_updated' => Twilio.deserialize_iso8601(payload['date_updated']),
|
333
341
|
'apn_credential_sid' => payload['apn_credential_sid'],
|
334
342
|
'gcm_credential_sid' => payload['gcm_credential_sid'],
|
343
|
+
'messaging_service_sid' => payload['messaging_service_sid'],
|
344
|
+
'facebook_messenger_page_id' => payload['facebook_messenger_page_id'],
|
335
345
|
'default_apn_notification_protocol_version' => payload['default_apn_notification_protocol_version'],
|
336
346
|
'default_gcm_notification_protocol_version' => payload['default_gcm_notification_protocol_version'],
|
337
347
|
'url' => payload['url'],
|
@@ -389,6 +399,14 @@ module Twilio
|
|
389
399
|
@properties['gcm_credential_sid']
|
390
400
|
end
|
391
401
|
|
402
|
+
def messaging_service_sid
|
403
|
+
@properties['messaging_service_sid']
|
404
|
+
end
|
405
|
+
|
406
|
+
def facebook_messenger_page_id
|
407
|
+
@properties['facebook_messenger_page_id']
|
408
|
+
end
|
409
|
+
|
392
410
|
def default_apn_notification_protocol_version
|
393
411
|
@properties['default_apn_notification_protocol_version']
|
394
412
|
end
|
@@ -424,16 +442,20 @@ module Twilio
|
|
424
442
|
# @param [String] friendly_name The friendly_name
|
425
443
|
# @param [String] apn_credential_sid The apn_credential_sid
|
426
444
|
# @param [String] gcm_credential_sid The gcm_credential_sid
|
445
|
+
# @param [String] messaging_service_sid The messaging_service_sid
|
446
|
+
# @param [String] facebook_messenger_page_id The facebook_messenger_page_id
|
427
447
|
# @param [String] default_apn_notification_protocol_version The
|
428
448
|
# default_apn_notification_protocol_version
|
429
449
|
# @param [String] default_gcm_notification_protocol_version The
|
430
450
|
# default_gcm_notification_protocol_version
|
431
451
|
|
432
452
|
# @return [ServiceInstance] Updated ServiceInstance
|
433
|
-
def update(friendly_name: nil, apn_credential_sid: nil, gcm_credential_sid: nil, default_apn_notification_protocol_version: nil, default_gcm_notification_protocol_version: nil)
|
453
|
+
def update(friendly_name: nil, apn_credential_sid: nil, gcm_credential_sid: nil, messaging_service_sid: nil, facebook_messenger_page_id: nil, default_apn_notification_protocol_version: nil, default_gcm_notification_protocol_version: nil)
|
434
454
|
@context.update(
|
435
455
|
apn_credential_sid: apn_credential_sid,
|
436
456
|
gcm_credential_sid: gcm_credential_sid,
|
457
|
+
messaging_service_sid: messaging_service_sid,
|
458
|
+
facebook_messenger_page_id: facebook_messenger_page_id,
|
437
459
|
default_apn_notification_protocol_version: default_apn_notification_protocol_version,
|
438
460
|
default_gcm_notification_protocol_version: default_gcm_notification_protocol_version,
|
439
461
|
)
|
@@ -32,7 +32,7 @@ module Twilio
|
|
32
32
|
# @param [String] identity The identity
|
33
33
|
# @param [String] tag The tag
|
34
34
|
# @param [String] body The body
|
35
|
-
# @param [
|
35
|
+
# @param [notification.Priority] priority The priority
|
36
36
|
# @param [String] ttl The ttl
|
37
37
|
# @param [String] title The title
|
38
38
|
# @param [String] sound The sound
|
@@ -40,9 +40,10 @@ module Twilio
|
|
40
40
|
# @param [String] data The data
|
41
41
|
# @param [String] apn The apn
|
42
42
|
# @param [String] gcm The gcm
|
43
|
+
# @param [String] facebook_messenger The facebook_messenger
|
43
44
|
|
44
45
|
# @return [NotificationInstance] Newly created NotificationInstance
|
45
|
-
def create(identity: nil, tag: nil, body: nil, priority: nil, ttl: nil, title: nil, sound: nil, action: nil, data: nil, apn: nil, gcm: nil)
|
46
|
+
def create(identity: nil, tag: nil, body: nil, priority: nil, ttl: nil, title: nil, sound: nil, action: nil, data: nil, apn: nil, gcm: nil, facebook_messenger: nil)
|
46
47
|
data = {
|
47
48
|
'Identity' => identity,
|
48
49
|
'Tag' => tag,
|
@@ -55,6 +56,7 @@ module Twilio
|
|
55
56
|
'Data' => data,
|
56
57
|
'Apn' => apn,
|
57
58
|
'Gcm' => gcm,
|
59
|
+
'FacebookMessenger' => facebook_messenger,
|
58
60
|
}
|
59
61
|
|
60
62
|
payload = @version.create(
|
@@ -141,6 +143,7 @@ module Twilio
|
|
141
143
|
'data' => payload['data'],
|
142
144
|
'apn' => payload['apn'],
|
143
145
|
'gcm' => payload['gcm'],
|
146
|
+
'facebook_messenger' => payload['facebook_messenger'],
|
144
147
|
}
|
145
148
|
end
|
146
149
|
|
@@ -204,6 +207,10 @@ module Twilio
|
|
204
207
|
@properties['gcm']
|
205
208
|
end
|
206
209
|
|
210
|
+
def facebook_messenger
|
211
|
+
@properties['facebook_messenger']
|
212
|
+
end
|
213
|
+
|
207
214
|
##
|
208
215
|
# Provide a user friendly representation
|
209
216
|
def to_s
|
data/lib/twilio-ruby/version.rb
CHANGED
@@ -34,6 +34,8 @@ describe 'Service' do
|
|
34
34
|
"date_updated": "2016-03-09T20:22:31Z",
|
35
35
|
"apn_credential_sid": null,
|
36
36
|
"gcm_credential_sid": null,
|
37
|
+
"messaging_service_sid": null,
|
38
|
+
"facebook_messenger_page_id": "4",
|
37
39
|
"default_apn_notification_protocol_version": "3",
|
38
40
|
"default_gcm_notification_protocol_version": "3",
|
39
41
|
"url": "https://notifications.stage.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
@@ -103,6 +105,8 @@ describe 'Service' do
|
|
103
105
|
"date_updated": "2016-03-09T20:22:31Z",
|
104
106
|
"apn_credential_sid": null,
|
105
107
|
"gcm_credential_sid": null,
|
108
|
+
"messaging_service_sid": null,
|
109
|
+
"facebook_messenger_page_id": "4",
|
106
110
|
"default_apn_notification_protocol_version": "3",
|
107
111
|
"default_gcm_notification_protocol_version": "3",
|
108
112
|
"url": "https://notifications.stage.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
@@ -157,6 +161,8 @@ describe 'Service' do
|
|
157
161
|
"date_updated": "2016-03-09T20:22:31Z",
|
158
162
|
"apn_credential_sid": null,
|
159
163
|
"gcm_credential_sid": null,
|
164
|
+
"messaging_service_sid": null,
|
165
|
+
"facebook_messenger_page_id": "4",
|
160
166
|
"default_apn_notification_protocol_version": "3",
|
161
167
|
"default_gcm_notification_protocol_version": "3",
|
162
168
|
"url": "https://notifications.stage.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
@@ -228,6 +234,8 @@ describe 'Service' do
|
|
228
234
|
"gcm_credential_sid": null,
|
229
235
|
"default_apn_notification_protocol_version": "3",
|
230
236
|
"default_gcm_notification_protocol_version": "3",
|
237
|
+
"messaging_service_sid": null,
|
238
|
+
"facebook_messenger_page_id": "4",
|
231
239
|
"url": "https://notifications.stage.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
232
240
|
"links": {
|
233
241
|
"bindings": "https://notifications.stage.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Bindings",
|
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.0.0.
|
4
|
+
version: 5.0.0.rc8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Benton
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-07-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: builder
|