twilio-ruby 5.31.6 → 5.32.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -217,7 +217,6 @@ module Twilio
217
217
  @credentials_lists = nil
218
218
  @ip_access_control_lists = nil
219
219
  @phone_numbers = nil
220
- @terminating_sip_domains = nil
221
220
  end
222
221
 
223
222
  ##
@@ -368,24 +367,6 @@ module Twilio
368
367
  @phone_numbers
369
368
  end
370
369
 
371
- ##
372
- # Access the terminating_sip_domains
373
- # @return [TerminatingSipDomainList]
374
- # @return [TerminatingSipDomainContext] if sid was passed.
375
- def terminating_sip_domains(sid=:unset)
376
- raise ArgumentError, 'sid cannot be nil' if sid.nil?
377
-
378
- if sid != :unset
379
- return TerminatingSipDomainContext.new(@version, @solution[:sid], sid, )
380
- end
381
-
382
- unless @terminating_sip_domains
383
- @terminating_sip_domains = TerminatingSipDomainList.new(@version, trunk_sid: @solution[:sid], )
384
- end
385
-
386
- @terminating_sip_domains
387
- end
388
-
389
370
  ##
390
371
  # Provide a user friendly representation
391
372
  def to_s
@@ -625,13 +606,6 @@ module Twilio
625
606
  context.phone_numbers
626
607
  end
627
608
 
628
- ##
629
- # Access the terminating_sip_domains
630
- # @return [terminating_sip_domains] terminating_sip_domains
631
- def terminating_sip_domains
632
- context.terminating_sip_domains
633
- end
634
-
635
609
  ##
636
610
  # Provide a user friendly representation
637
611
  def to_s
@@ -1,3 +1,3 @@
1
1
  module Twilio
2
- VERSION = '5.31.6'
2
+ VERSION = '5.32.0'
3
3
  end
@@ -53,7 +53,7 @@ describe 'Domain' do
53
53
  "voice_status_callback_method": "POST",
54
54
  "voice_status_callback_url": null,
55
55
  "voice_url": "https://dundermifflin.example.com/twilio/app.php",
56
- "trunk_sid": "TRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
56
+ "emergency_calling_enabled": true
57
57
  }
58
58
  ],
59
59
  "start": 0,
@@ -143,7 +143,7 @@ describe 'Domain' do
143
143
  "voice_status_callback_method": "POST",
144
144
  "voice_status_callback_url": null,
145
145
  "voice_url": "https://dundermifflin.example.com/twilio/app.php",
146
- "trunk_sid": null
146
+ "emergency_calling_enabled": true
147
147
  }
148
148
  ]
149
149
  ))
@@ -197,7 +197,7 @@ describe 'Domain' do
197
197
  "voice_status_callback_method": "POST",
198
198
  "voice_status_callback_url": null,
199
199
  "voice_url": "https://dundermifflin.example.com/twilio/app.php",
200
- "trunk_sid": "TRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
200
+ "emergency_calling_enabled": true
201
201
  }
202
202
  ]
203
203
  ))
@@ -251,7 +251,7 @@ describe 'Domain' do
251
251
  "voice_status_callback_method": "POST",
252
252
  "voice_status_callback_url": null,
253
253
  "voice_url": "https://dundermifflin.example.com/twilio/app.php",
254
- "trunk_sid": "TRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
254
+ "emergency_calling_enabled": true
255
255
  }
256
256
  ]
257
257
  ))
@@ -15,10 +15,15 @@ describe 'Factor' do
15
15
  expect {
16
16
  @client.authy.v1.services('ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
17
17
  .entities('identity') \
18
- .factors.create(binding: 'binding', friendly_name: 'friendly_name', factor_type: 'app-push')
18
+ .factors.create(binding: 'binding', friendly_name: 'friendly_name', factor_type: 'app-push', config: 'config')
19
19
  }.to raise_exception(Twilio::REST::TwilioError)
20
20
 
21
- values = {'Binding' => 'binding', 'FriendlyName' => 'friendly_name', 'FactorType' => 'app-push', }
21
+ values = {
22
+ 'Binding' => 'binding',
23
+ 'FriendlyName' => 'friendly_name',
24
+ 'FactorType' => 'app-push',
25
+ 'Config' => 'config',
26
+ }
22
27
  expect(
23
28
  @holodeck.has_request?(Holodeck::Request.new(
24
29
  method: 'post',
@@ -41,7 +46,13 @@ describe 'Factor' do
41
46
  "date_updated": "2015-07-30T20:00:00Z",
42
47
  "friendly_name": "friendly_name",
43
48
  "status": "unverified",
44
- "factor_type": "sms",
49
+ "factor_type": "push",
50
+ "config": {
51
+ "sdk_version": "1.0",
52
+ "app_id": "com.authy.authy",
53
+ "notification_platform": "fcm",
54
+ "notification_token": "test_token"
55
+ },
45
56
  "url": "https://authy.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities/ff483d1ff591898a9942916050d2ca3f/Factors/YFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
46
57
  "links": {
47
58
  "challenges": "https://authy.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities/ff483d1ff591898a9942916050d2ca3f/Factors/YFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Challenges"
@@ -52,7 +63,7 @@ describe 'Factor' do
52
63
 
53
64
  actual = @client.authy.v1.services('ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
54
65
  .entities('identity') \
55
- .factors.create(binding: 'binding', friendly_name: 'friendly_name', factor_type: 'app-push')
66
+ .factors.create(binding: 'binding', friendly_name: 'friendly_name', factor_type: 'app-push', config: 'config')
56
67
 
57
68
  expect(actual).to_not eq(nil)
58
69
  end
@@ -118,7 +129,13 @@ describe 'Factor' do
118
129
  "date_updated": "2015-07-30T20:00:00Z",
119
130
  "friendly_name": "friendly_name",
120
131
  "status": "unverified",
121
- "factor_type": "sms",
132
+ "factor_type": "push",
133
+ "config": {
134
+ "sdk_version": "1.0",
135
+ "app_id": "com.authy.authy",
136
+ "notification_platform": "fcm",
137
+ "notification_token": "test_token"
138
+ },
122
139
  "url": "https://authy.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities/ff483d1ff591898a9942916050d2ca3f/Factors/YFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
123
140
  "links": {
124
141
  "challenges": "https://authy.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities/ff483d1ff591898a9942916050d2ca3f/Factors/YFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Challenges"
@@ -193,7 +210,13 @@ describe 'Factor' do
193
210
  "date_updated": "2015-07-30T20:00:00Z",
194
211
  "friendly_name": "friendly_name",
195
212
  "status": "unverified",
196
- "factor_type": "sms",
213
+ "factor_type": "push",
214
+ "config": {
215
+ "sdk_version": "1.0",
216
+ "app_id": "com.authy.authy",
217
+ "notification_platform": "fcm",
218
+ "notification_token": "test_token"
219
+ },
197
220
  "url": "https://authy.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities/ff483d1ff591898a9942916050d2ca3f/Factors/YFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
198
221
  "links": {
199
222
  "challenges": "https://authy.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities/ff483d1ff591898a9942916050d2ca3f/Factors/YFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Challenges"
@@ -251,7 +274,13 @@ describe 'Factor' do
251
274
  "date_updated": "2015-07-30T20:00:00Z",
252
275
  "friendly_name": "friendly_name",
253
276
  "status": "verified",
254
- "factor_type": "sms",
277
+ "factor_type": "push",
278
+ "config": {
279
+ "sdk_version": "1.0",
280
+ "app_id": "com.authy.authy",
281
+ "notification_platform": "fcm",
282
+ "notification_token": "test_token"
283
+ },
255
284
  "url": "https://authy.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities/ff483d1ff591898a9942916050d2ca3f/Factors/YFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
256
285
  "links": {
257
286
  "challenges": "https://authy.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities/ff483d1ff591898a9942916050d2ca3f/Factors/YFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Challenges"
@@ -30,7 +30,7 @@ describe 'Day' do
30
30
  200,
31
31
  %q[
32
32
  {
33
- "redirect_to": "https://com.twilio.dev-us1.exports.s3.amazonaws.com/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
33
+ "redirect_to": "https://api.bulkexports.twilio.s3.amazonaws.com/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
34
34
  }
35
35
  ]
36
36
  ))
@@ -8,21 +8,21 @@
8
8
 
9
9
  require 'spec_helper.rb'
10
10
 
11
- describe 'SuccessRate' do
11
+ describe 'ImpressionsRate' do
12
12
  it "can fetch" do
13
13
  @holodeck.mock(Twilio::Response.new(500, ''))
14
14
 
15
15
  expect {
16
16
  @client.preview.trusted_comms.businesses('BXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
17
17
  .insights \
18
- .success_rate().fetch()
18
+ .impressions_rate().fetch()
19
19
  }.to raise_exception(Twilio::REST::TwilioError)
20
20
 
21
21
  values = {}
22
22
  expect(
23
23
  @holodeck.has_request?(Holodeck::Request.new(
24
24
  method: 'get',
25
- url: 'https://preview.twilio.com/TrustedComms/Businesses/BXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Insights/SuccessRate',
25
+ url: 'https://preview.twilio.com/TrustedComms/Businesses/BXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Insights/ImpressionsRate',
26
26
  ))).to eq(true)
27
27
  end
28
28
 
@@ -37,21 +37,20 @@ describe 'SuccessRate' do
37
37
  "end": "2015-07-30T21:00:00Z",
38
38
  "interval": "minute",
39
39
  "reports": {
40
- "success_rate": {
40
+ "impressions_rate": {
41
41
  "timestamp": "2015-07-30T20:00:00",
42
42
  "calls": 1200,
43
- "branded": 800,
44
- "value": 66.67
43
+ "impressions": 800
45
44
  }
46
45
  },
47
- "url": "https://preview.twilio.com/TrustedComms/Businesses/BXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Insights/SuccessRate"
46
+ "url": "https://preview.twilio.com/TrustedComms/Businesses/BXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Insights/ImpressionsRate"
48
47
  }
49
48
  ]
50
49
  ))
51
50
 
52
51
  actual = @client.preview.trusted_comms.businesses('BXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
53
52
  .insights \
54
- .success_rate().fetch()
53
+ .impressions_rate().fetch()
55
54
 
56
55
  expect(actual).to_not eq(nil)
57
56
  end
@@ -43,7 +43,6 @@ describe 'Trunk' do
43
43
  },
44
44
  "auth_type": "",
45
45
  "auth_type_set": [],
46
- "origination_from_domain_sid": "SDaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
47
46
  "date_created": "2015-01-02T11:23:45Z",
48
47
  "date_updated": "2015-01-02T11:23:45Z",
49
48
  "url": "https://trunking.twilio.com/v1/Trunks/TRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
@@ -51,8 +50,7 @@ describe 'Trunk' do
51
50
  "origination_urls": "https://trunking.twilio.com/v1/Trunks/TRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/OriginationUrls",
52
51
  "credential_lists": "https://trunking.twilio.com/v1/Trunks/TRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/CredentialLists",
53
52
  "ip_access_control_lists": "https://trunking.twilio.com/v1/Trunks/TRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IpAccessControlLists",
54
- "phone_numbers": "https://trunking.twilio.com/v1/Trunks/TRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/PhoneNumbers",
55
- "terminating_sip_domains": "https://trunking.twilio.com/v1/Trunks/TRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/TerminatingSipDomains"
53
+ "phone_numbers": "https://trunking.twilio.com/v1/Trunks/TRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/PhoneNumbers"
56
54
  }
57
55
  }
58
56
  ]
@@ -123,7 +121,6 @@ describe 'Trunk' do
123
121
  },
124
122
  "auth_type": "",
125
123
  "auth_type_set": [],
126
- "origination_from_domain_sid": "SDaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
127
124
  "date_created": "2015-01-02T11:23:45Z",
128
125
  "date_updated": "2015-01-02T11:23:45Z",
129
126
  "url": "https://trunking.twilio.com/v1/Trunks/TRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
@@ -131,8 +128,7 @@ describe 'Trunk' do
131
128
  "origination_urls": "https://trunking.twilio.com/v1/Trunks/TRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/OriginationUrls",
132
129
  "credential_lists": "https://trunking.twilio.com/v1/Trunks/TRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/CredentialLists",
133
130
  "ip_access_control_lists": "https://trunking.twilio.com/v1/Trunks/TRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IpAccessControlLists",
134
- "phone_numbers": "https://trunking.twilio.com/v1/Trunks/TRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/PhoneNumbers",
135
- "terminating_sip_domains": "https://trunking.twilio.com/v1/Trunks/TRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/TerminatingSipDomains"
131
+ "phone_numbers": "https://trunking.twilio.com/v1/Trunks/TRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/PhoneNumbers"
136
132
  }
137
133
  }
138
134
  ]
@@ -188,7 +184,6 @@ describe 'Trunk' do
188
184
  },
189
185
  "auth_type": "",
190
186
  "auth_type_set": [],
191
- "origination_from_domain_sid": "SDaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
192
187
  "date_created": "2015-01-02T11:23:45Z",
193
188
  "date_updated": "2015-01-02T11:23:45Z",
194
189
  "url": "https://trunking.twilio.com/v1/Trunks/TRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
@@ -196,8 +191,7 @@ describe 'Trunk' do
196
191
  "origination_urls": "https://trunking.twilio.com/v1/Trunks/TRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/OriginationUrls",
197
192
  "credential_lists": "https://trunking.twilio.com/v1/Trunks/TRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/CredentialLists",
198
193
  "ip_access_control_lists": "https://trunking.twilio.com/v1/Trunks/TRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IpAccessControlLists",
199
- "phone_numbers": "https://trunking.twilio.com/v1/Trunks/TRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/PhoneNumbers",
200
- "terminating_sip_domains": "https://trunking.twilio.com/v1/Trunks/TRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/TerminatingSipDomains"
194
+ "phone_numbers": "https://trunking.twilio.com/v1/Trunks/TRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/PhoneNumbers"
201
195
  }
202
196
  }
203
197
  ]
@@ -268,7 +262,6 @@ describe 'Trunk' do
268
262
  },
269
263
  "auth_type": "",
270
264
  "auth_type_set": [],
271
- "origination_from_domain_sid": null,
272
265
  "date_created": "2015-01-02T11:23:45Z",
273
266
  "date_updated": "2015-01-02T11:23:45Z",
274
267
  "url": "https://trunking.twilio.com/v1/Trunks/TRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
@@ -276,86 +269,7 @@ describe 'Trunk' do
276
269
  "origination_urls": "https://trunking.twilio.com/v1/Trunks/TRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/OriginationUrls",
277
270
  "credential_lists": "https://trunking.twilio.com/v1/Trunks/TRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/CredentialLists",
278
271
  "ip_access_control_lists": "https://trunking.twilio.com/v1/Trunks/TRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IpAccessControlLists",
279
- "phone_numbers": "https://trunking.twilio.com/v1/Trunks/TRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/PhoneNumbers",
280
- "terminating_sip_domains": "https://trunking.twilio.com/v1/Trunks/TRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/TerminatingSipDomains"
281
- }
282
- }
283
- ]
284
- ))
285
-
286
- actual = @client.trunking.v1.trunks('TRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').update()
287
-
288
- expect(actual).to_not eq(nil)
289
- end
290
-
291
- it "receives update_set_from_domain responses" do
292
- @holodeck.mock(Twilio::Response.new(
293
- 200,
294
- %q[
295
- {
296
- "sid": "TRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
297
- "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
298
- "domain_name": "test.pstn.twilio.com",
299
- "disaster_recovery_method": "GET",
300
- "disaster_recovery_url": "http://updated-recovery.com",
301
- "friendly_name": "updated_name",
302
- "secure": true,
303
- "cnam_lookup_enabled": true,
304
- "recording": {
305
- "mode": "do-not-record",
306
- "trim": "do-not-trim"
307
- },
308
- "auth_type": "",
309
- "auth_type_set": [],
310
- "origination_from_domain_sid": "SDaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
311
- "date_created": "2015-01-02T11:23:45Z",
312
- "date_updated": "2015-01-02T11:23:45Z",
313
- "url": "https://trunking.twilio.com/v1/Trunks/TRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
314
- "links": {
315
- "origination_urls": "https://trunking.twilio.com/v1/Trunks/TRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/OriginationUrls",
316
- "credential_lists": "https://trunking.twilio.com/v1/Trunks/TRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/CredentialLists",
317
- "ip_access_control_lists": "https://trunking.twilio.com/v1/Trunks/TRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IpAccessControlLists",
318
- "phone_numbers": "https://trunking.twilio.com/v1/Trunks/TRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/PhoneNumbers",
319
- "terminating_sip_domains": "https://trunking.twilio.com/v1/Trunks/TRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/TerminatingSipDomains"
320
- }
321
- }
322
- ]
323
- ))
324
-
325
- actual = @client.trunking.v1.trunks('TRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').update()
326
-
327
- expect(actual).to_not eq(nil)
328
- end
329
-
330
- it "receives update_clear_from_domain responses" do
331
- @holodeck.mock(Twilio::Response.new(
332
- 200,
333
- %q[
334
- {
335
- "sid": "TRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
336
- "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
337
- "domain_name": "test.pstn.twilio.com",
338
- "disaster_recovery_method": "GET",
339
- "disaster_recovery_url": "http://updated-recovery.com",
340
- "friendly_name": "updated_name",
341
- "secure": true,
342
- "cnam_lookup_enabled": true,
343
- "recording": {
344
- "mode": "do-not-record",
345
- "trim": "do-not-trim"
346
- },
347
- "auth_type": "",
348
- "auth_type_set": [],
349
- "origination_from_domain_sid": null,
350
- "date_created": "2015-01-02T11:23:45Z",
351
- "date_updated": "2015-01-02T11:23:45Z",
352
- "url": "https://trunking.twilio.com/v1/Trunks/TRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
353
- "links": {
354
- "origination_urls": "https://trunking.twilio.com/v1/Trunks/TRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/OriginationUrls",
355
- "credential_lists": "https://trunking.twilio.com/v1/Trunks/TRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/CredentialLists",
356
- "ip_access_control_lists": "https://trunking.twilio.com/v1/Trunks/TRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IpAccessControlLists",
357
- "phone_numbers": "https://trunking.twilio.com/v1/Trunks/TRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/PhoneNumbers",
358
- "terminating_sip_domains": "https://trunking.twilio.com/v1/Trunks/TRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/TerminatingSipDomains"
272
+ "phone_numbers": "https://trunking.twilio.com/v1/Trunks/TRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/PhoneNumbers"
359
273
  }
360
274
  }
361
275
  ]
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.31.6
4
+ version: 5.32.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: 2020-03-04 00:00:00.000000000 Z
11
+ date: 2020-03-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jwt
@@ -475,7 +475,7 @@ files:
475
475
  - lib/twilio-ruby/rest/preview/trusted_comms/branded_call.rb
476
476
  - lib/twilio-ruby/rest/preview/trusted_comms/business.rb
477
477
  - lib/twilio-ruby/rest/preview/trusted_comms/business/insights.rb
478
- - lib/twilio-ruby/rest/preview/trusted_comms/business/insights/success_rate.rb
478
+ - lib/twilio-ruby/rest/preview/trusted_comms/business/insights/impressions_rate.rb
479
479
  - lib/twilio-ruby/rest/preview/trusted_comms/cps.rb
480
480
  - lib/twilio-ruby/rest/preview/trusted_comms/current_call.rb
481
481
  - lib/twilio-ruby/rest/preview/trusted_comms/phone_call.rb
@@ -606,7 +606,6 @@ files:
606
606
  - lib/twilio-ruby/rest/trunking/v1/trunk/ip_access_control_list.rb
607
607
  - lib/twilio-ruby/rest/trunking/v1/trunk/origination_url.rb
608
608
  - lib/twilio-ruby/rest/trunking/v1/trunk/phone_number.rb
609
- - lib/twilio-ruby/rest/trunking/v1/trunk/terminating_sip_domain.rb
610
609
  - lib/twilio-ruby/rest/verify.rb
611
610
  - lib/twilio-ruby/rest/verify/v2.rb
612
611
  - lib/twilio-ruby/rest/verify/v2/service.rb
@@ -856,7 +855,7 @@ files:
856
855
  - spec/integration/preview/sync/service/sync_map_spec.rb
857
856
  - spec/integration/preview/sync/service_spec.rb
858
857
  - spec/integration/preview/trusted_comms/branded_call_spec.rb
859
- - spec/integration/preview/trusted_comms/business/insights/success_rate_spec.rb
858
+ - spec/integration/preview/trusted_comms/business/insights/impressions_rate_spec.rb
860
859
  - spec/integration/preview/trusted_comms/business/insights_spec.rb
861
860
  - spec/integration/preview/trusted_comms/business_spec.rb
862
861
  - spec/integration/preview/trusted_comms/cps_spec.rb
@@ -968,7 +967,6 @@ files:
968
967
  - spec/integration/trunking/v1/trunk/ip_access_control_list_spec.rb
969
968
  - spec/integration/trunking/v1/trunk/origination_url_spec.rb
970
969
  - spec/integration/trunking/v1/trunk/phone_number_spec.rb
971
- - spec/integration/trunking/v1/trunk/terminating_sip_domain_spec.rb
972
970
  - spec/integration/trunking/v1/trunk_spec.rb
973
971
  - spec/integration/verify/v2/service/messaging_configuration_spec.rb
974
972
  - spec/integration/verify/v2/service/rate_limit/bucket_spec.rb
@@ -1249,7 +1247,7 @@ test_files:
1249
1247
  - spec/integration/preview/sync/service/sync_map_spec.rb
1250
1248
  - spec/integration/preview/sync/service_spec.rb
1251
1249
  - spec/integration/preview/trusted_comms/branded_call_spec.rb
1252
- - spec/integration/preview/trusted_comms/business/insights/success_rate_spec.rb
1250
+ - spec/integration/preview/trusted_comms/business/insights/impressions_rate_spec.rb
1253
1251
  - spec/integration/preview/trusted_comms/business/insights_spec.rb
1254
1252
  - spec/integration/preview/trusted_comms/business_spec.rb
1255
1253
  - spec/integration/preview/trusted_comms/cps_spec.rb
@@ -1361,7 +1359,6 @@ test_files:
1361
1359
  - spec/integration/trunking/v1/trunk/ip_access_control_list_spec.rb
1362
1360
  - spec/integration/trunking/v1/trunk/origination_url_spec.rb
1363
1361
  - spec/integration/trunking/v1/trunk/phone_number_spec.rb
1364
- - spec/integration/trunking/v1/trunk/terminating_sip_domain_spec.rb
1365
1362
  - spec/integration/trunking/v1/trunk_spec.rb
1366
1363
  - spec/integration/verify/v2/service/messaging_configuration_spec.rb
1367
1364
  - spec/integration/verify/v2/service/rate_limit/bucket_spec.rb
@@ -1,418 +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 Trunking < Domain
12
- class V1 < Version
13
- class TrunkContext < InstanceContext
14
- class TerminatingSipDomainList < ListResource
15
- ##
16
- # Initialize the TerminatingSipDomainList
17
- # @param [Version] version Version that contains the resource
18
- # @param [String] trunk_sid The SID of the Trunk to which we should route calls
19
- # that arrive at the domain. If a `trunk_sid` is present, we ignore all of the
20
- # voice URLs present and terminate calls through the specified trunk.
21
- # @return [TerminatingSipDomainList] TerminatingSipDomainList
22
- def initialize(version, trunk_sid: nil)
23
- super(version)
24
-
25
- # Path Solution
26
- @solution = {trunk_sid: trunk_sid}
27
- @uri = "/Trunks/#{@solution[:trunk_sid]}/TerminatingSipDomains"
28
- end
29
-
30
- ##
31
- # Retrieve a single page of TerminatingSipDomainInstance records from the API.
32
- # Request is executed immediately.
33
- # @param [String] sip_domain_sid The SID of the [SIP
34
- # Domain](https://www.twilio.com/docs/voice/sip/api/sip-domain-resource) that you
35
- # want to associate with the trunk.
36
- # @return [TerminatingSipDomainInstance] Newly created TerminatingSipDomainInstance
37
- def create(sip_domain_sid: nil)
38
- data = Twilio::Values.of({'SipDomainSid' => sip_domain_sid, })
39
-
40
- payload = @version.create(
41
- 'POST',
42
- @uri,
43
- data: data
44
- )
45
-
46
- TerminatingSipDomainInstance.new(@version, payload, trunk_sid: @solution[:trunk_sid], )
47
- end
48
-
49
- ##
50
- # Lists TerminatingSipDomainInstance records from the API as a list.
51
- # Unlike stream(), this operation is eager and will load `limit` records into
52
- # memory before returning.
53
- # @param [Integer] limit Upper limit for the number of records to return. stream()
54
- # guarantees to never return more than limit. Default is no limit
55
- # @param [Integer] page_size Number of records to fetch per request, when
56
- # not set will use the default value of 50 records. If no page_size is defined
57
- # but a limit is defined, stream() will attempt to read the limit with the most
58
- # efficient page size, i.e. min(limit, 1000)
59
- # @return [Array] Array of up to limit results
60
- def list(limit: nil, page_size: nil)
61
- self.stream(limit: limit, page_size: page_size).entries
62
- end
63
-
64
- ##
65
- # Streams TerminatingSipDomainInstance records from the API as an Enumerable.
66
- # This operation lazily loads records as efficiently as possible until the limit
67
- # is reached.
68
- # @param [Integer] limit Upper limit for the number of records to return. stream()
69
- # guarantees to never return more than limit. Default is no limit.
70
- # @param [Integer] page_size Number of records to fetch per request, when
71
- # not set will use the default value of 50 records. If no page_size is defined
72
- # but a limit is defined, stream() will attempt to read the limit with the most
73
- # efficient page size, i.e. min(limit, 1000)
74
- # @return [Enumerable] Enumerable that will yield up to limit results
75
- def stream(limit: nil, page_size: nil)
76
- limits = @version.read_limits(limit, page_size)
77
-
78
- page = self.page(page_size: limits[:page_size], )
79
-
80
- @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit])
81
- end
82
-
83
- ##
84
- # When passed a block, yields TerminatingSipDomainInstance records from the API.
85
- # This operation lazily loads records as efficiently as possible until the limit
86
- # is reached.
87
- def each
88
- limits = @version.read_limits
89
-
90
- page = self.page(page_size: limits[:page_size], )
91
-
92
- @version.stream(page,
93
- limit: limits[:limit],
94
- page_limit: limits[:page_limit]).each {|x| yield x}
95
- end
96
-
97
- ##
98
- # Retrieve a single page of TerminatingSipDomainInstance records from the API.
99
- # Request is executed immediately.
100
- # @param [String] page_token PageToken provided by the API
101
- # @param [Integer] page_number Page Number, this value is simply for client state
102
- # @param [Integer] page_size Number of records to return, defaults to 50
103
- # @return [Page] Page of TerminatingSipDomainInstance
104
- def page(page_token: :unset, page_number: :unset, page_size: :unset)
105
- params = Twilio::Values.of({
106
- 'PageToken' => page_token,
107
- 'Page' => page_number,
108
- 'PageSize' => page_size,
109
- })
110
- response = @version.page(
111
- 'GET',
112
- @uri,
113
- params
114
- )
115
- TerminatingSipDomainPage.new(@version, response, @solution)
116
- end
117
-
118
- ##
119
- # Retrieve a single page of TerminatingSipDomainInstance records from the API.
120
- # Request is executed immediately.
121
- # @param [String] target_url API-generated URL for the requested results page
122
- # @return [Page] Page of TerminatingSipDomainInstance
123
- def get_page(target_url)
124
- response = @version.domain.request(
125
- 'GET',
126
- target_url
127
- )
128
- TerminatingSipDomainPage.new(@version, response, @solution)
129
- end
130
-
131
- ##
132
- # Provide a user friendly representation
133
- def to_s
134
- '#<Twilio.Trunking.V1.TerminatingSipDomainList>'
135
- end
136
- end
137
-
138
- class TerminatingSipDomainPage < Page
139
- ##
140
- # Initialize the TerminatingSipDomainPage
141
- # @param [Version] version Version that contains the resource
142
- # @param [Response] response Response from the API
143
- # @param [Hash] solution Path solution for the resource
144
- # @return [TerminatingSipDomainPage] TerminatingSipDomainPage
145
- def initialize(version, response, solution)
146
- super(version, response)
147
-
148
- # Path Solution
149
- @solution = solution
150
- end
151
-
152
- ##
153
- # Build an instance of TerminatingSipDomainInstance
154
- # @param [Hash] payload Payload response from the API
155
- # @return [TerminatingSipDomainInstance] TerminatingSipDomainInstance
156
- def get_instance(payload)
157
- TerminatingSipDomainInstance.new(@version, payload, trunk_sid: @solution[:trunk_sid], )
158
- end
159
-
160
- ##
161
- # Provide a user friendly representation
162
- def to_s
163
- '<Twilio.Trunking.V1.TerminatingSipDomainPage>'
164
- end
165
- end
166
-
167
- class TerminatingSipDomainContext < InstanceContext
168
- ##
169
- # Initialize the TerminatingSipDomainContext
170
- # @param [Version] version Version that contains the resource
171
- # @param [String] trunk_sid The SID of the Trunk with the TerminatingSipDomain
172
- # resource to fetch.
173
- # @param [String] sid The unique string that we created to identify the
174
- # TerminatingSipDomain resource to fetch.
175
- # @return [TerminatingSipDomainContext] TerminatingSipDomainContext
176
- def initialize(version, trunk_sid, sid)
177
- super(version)
178
-
179
- # Path Solution
180
- @solution = {trunk_sid: trunk_sid, sid: sid, }
181
- @uri = "/Trunks/#{@solution[:trunk_sid]}/TerminatingSipDomains/#{@solution[:sid]}"
182
- end
183
-
184
- ##
185
- # Fetch a TerminatingSipDomainInstance
186
- # @return [TerminatingSipDomainInstance] Fetched TerminatingSipDomainInstance
187
- def fetch
188
- params = Twilio::Values.of({})
189
-
190
- payload = @version.fetch(
191
- 'GET',
192
- @uri,
193
- params,
194
- )
195
-
196
- TerminatingSipDomainInstance.new(
197
- @version,
198
- payload,
199
- trunk_sid: @solution[:trunk_sid],
200
- sid: @solution[:sid],
201
- )
202
- end
203
-
204
- ##
205
- # Deletes the TerminatingSipDomainInstance
206
- # @return [Boolean] true if delete succeeds, false otherwise
207
- def delete
208
- @version.delete('delete', @uri)
209
- end
210
-
211
- ##
212
- # Provide a user friendly representation
213
- def to_s
214
- context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
215
- "#<Twilio.Trunking.V1.TerminatingSipDomainContext #{context}>"
216
- end
217
-
218
- ##
219
- # Provide a detailed, user friendly representation
220
- def inspect
221
- context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
222
- "#<Twilio.Trunking.V1.TerminatingSipDomainContext #{context}>"
223
- end
224
- end
225
-
226
- class TerminatingSipDomainInstance < InstanceResource
227
- ##
228
- # Initialize the TerminatingSipDomainInstance
229
- # @param [Version] version Version that contains the resource
230
- # @param [Hash] payload payload that contains response from Twilio
231
- # @param [String] trunk_sid The SID of the Trunk to which we should route calls
232
- # that arrive at the domain. If a `trunk_sid` is present, we ignore all of the
233
- # voice URLs present and terminate calls through the specified trunk.
234
- # @param [String] sid The unique string that we created to identify the
235
- # TerminatingSipDomain resource to fetch.
236
- # @return [TerminatingSipDomainInstance] TerminatingSipDomainInstance
237
- def initialize(version, payload, trunk_sid: nil, sid: nil)
238
- super(version)
239
-
240
- # Marshaled Properties
241
- @properties = {
242
- 'account_sid' => payload['account_sid'],
243
- 'api_version' => payload['api_version'],
244
- 'auth_type' => payload['auth_type'],
245
- 'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
246
- 'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
247
- 'domain_name' => payload['domain_name'],
248
- 'friendly_name' => payload['friendly_name'],
249
- 'sid' => payload['sid'],
250
- 'url' => payload['url'],
251
- 'voice_fallback_method' => payload['voice_fallback_method'],
252
- 'voice_fallback_url' => payload['voice_fallback_url'],
253
- 'voice_method' => payload['voice_method'],
254
- 'voice_status_callback_method' => payload['voice_status_callback_method'],
255
- 'voice_status_callback_url' => payload['voice_status_callback_url'],
256
- 'voice_url' => payload['voice_url'],
257
- 'sip_registration' => payload['sip_registration'],
258
- 'trunk_sid' => payload['trunk_sid'],
259
- 'links' => payload['links'],
260
- }
261
-
262
- # Context
263
- @instance_context = nil
264
- @params = {'trunk_sid' => trunk_sid, 'sid' => sid || @properties['sid'], }
265
- end
266
-
267
- ##
268
- # Generate an instance context for the instance, the context is capable of
269
- # performing various actions. All instance actions are proxied to the context
270
- # @return [TerminatingSipDomainContext] TerminatingSipDomainContext for this TerminatingSipDomainInstance
271
- def context
272
- unless @instance_context
273
- @instance_context = TerminatingSipDomainContext.new(@version, @params['trunk_sid'], @params['sid'], )
274
- end
275
- @instance_context
276
- end
277
-
278
- ##
279
- # @return [String] The SID of the Account that created the resource
280
- def account_sid
281
- @properties['account_sid']
282
- end
283
-
284
- ##
285
- # @return [String] The API version used to process the call
286
- def api_version
287
- @properties['api_version']
288
- end
289
-
290
- ##
291
- # @return [String] The types of authentication mapped to the domain
292
- def auth_type
293
- @properties['auth_type']
294
- end
295
-
296
- ##
297
- # @return [Time] The RFC 2822 date and time in GMT when the resource was created
298
- def date_created
299
- @properties['date_created']
300
- end
301
-
302
- ##
303
- # @return [Time] The RFC 2822 date and time in GMT when the resource was last updated
304
- def date_updated
305
- @properties['date_updated']
306
- end
307
-
308
- ##
309
- # @return [String] The unique address you reserve on Twilio to which you route your SIP traffic
310
- def domain_name
311
- @properties['domain_name']
312
- end
313
-
314
- ##
315
- # @return [String] The string that you assigned to describe the resource
316
- def friendly_name
317
- @properties['friendly_name']
318
- end
319
-
320
- ##
321
- # @return [String] The unique string that identifies the resource
322
- def sid
323
- @properties['sid']
324
- end
325
-
326
- ##
327
- # @return [String] The absolute URL of the resource
328
- def url
329
- @properties['url']
330
- end
331
-
332
- ##
333
- # @return [String] The HTTP method used with voice_fallback_url
334
- def voice_fallback_method
335
- @properties['voice_fallback_method']
336
- end
337
-
338
- ##
339
- # @return [String] The URL that we call when an error occurs in executing TwiML
340
- def voice_fallback_url
341
- @properties['voice_fallback_url']
342
- end
343
-
344
- ##
345
- # @return [String] The HTTP method used with voice_url
346
- def voice_method
347
- @properties['voice_method']
348
- end
349
-
350
- ##
351
- # @return [String] The HTTP method that we use to call the voice_status_callback_url
352
- def voice_status_callback_method
353
- @properties['voice_status_callback_method']
354
- end
355
-
356
- ##
357
- # @return [String] The URL that we call to pass status parameters to your application
358
- def voice_status_callback_url
359
- @properties['voice_status_callback_url']
360
- end
361
-
362
- ##
363
- # @return [String] The URL we call when the domain receives a call
364
- def voice_url
365
- @properties['voice_url']
366
- end
367
-
368
- ##
369
- # @return [Boolean] Whether SIP Endpoints can register with the domain to receive calls
370
- def sip_registration
371
- @properties['sip_registration']
372
- end
373
-
374
- ##
375
- # @return [String] The SID of the Trunk to which we should route calls
376
- def trunk_sid
377
- @properties['trunk_sid']
378
- end
379
-
380
- ##
381
- # @return [String] The URLs of related resources
382
- def links
383
- @properties['links']
384
- end
385
-
386
- ##
387
- # Fetch a TerminatingSipDomainInstance
388
- # @return [TerminatingSipDomainInstance] Fetched TerminatingSipDomainInstance
389
- def fetch
390
- context.fetch
391
- end
392
-
393
- ##
394
- # Deletes the TerminatingSipDomainInstance
395
- # @return [Boolean] true if delete succeeds, false otherwise
396
- def delete
397
- context.delete
398
- end
399
-
400
- ##
401
- # Provide a user friendly representation
402
- def to_s
403
- values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
404
- "<Twilio.Trunking.V1.TerminatingSipDomainInstance #{values}>"
405
- end
406
-
407
- ##
408
- # Provide a detailed, user friendly representation
409
- def inspect
410
- values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
411
- "<Twilio.Trunking.V1.TerminatingSipDomainInstance #{values}>"
412
- end
413
- end
414
- end
415
- end
416
- end
417
- end
418
- end