twilio-ruby 5.33.0 → 5.36.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/.rubocop.yml +8 -0
- data/.rubocop_todo.yml +5 -26
- data/.travis.yml +9 -1
- data/CHANGES.md +110 -0
- data/README.md +17 -2
- data/lib/twilio-ruby.rb +4 -12
- data/lib/twilio-ruby/framework/error.rb +3 -3
- data/lib/twilio-ruby/jwt/jwt.rb +6 -0
- data/lib/twilio-ruby/rest/api/v2010/account/call.rb +90 -90
- data/lib/twilio-ruby/rest/api/v2010/account/conference.rb +14 -0
- data/lib/twilio-ruby/rest/api/v2010/account/message.rb +75 -72
- data/lib/twilio-ruby/rest/api/v2010/account/queue.rb +29 -29
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb +38 -3
- data/lib/twilio-ruby/rest/autopilot.rb +6 -0
- data/lib/twilio-ruby/rest/autopilot/v1.rb +7 -0
- data/lib/twilio-ruby/rest/autopilot/v1/restore_assistant.rb +198 -0
- data/lib/twilio-ruby/rest/client.rb +35 -8
- data/lib/twilio-ruby/rest/conversations/v1/conversation.rb +19 -3
- data/lib/twilio-ruby/rest/conversations/v1/conversation/participant.rb +27 -4
- data/lib/twilio-ruby/rest/flex_api/v1/channel.rb +2 -1
- data/lib/twilio-ruby/rest/flex_api/v1/configuration.rb +7 -0
- data/lib/twilio-ruby/rest/flex_api/v1/flex_flow.rb +20 -11
- data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle.rb +26 -0
- data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle/evaluation.rb +324 -0
- data/lib/twilio-ruby/rest/preview/trusted_comms/business.rb +26 -0
- data/lib/twilio-ruby/rest/preview/trusted_comms/business/brand.rb +239 -0
- data/lib/twilio-ruby/rest/preview/trusted_comms/business/brand/branded_channel.rb +266 -0
- data/lib/twilio-ruby/rest/preview/trusted_comms/business/brand/branded_channel/channel.rb +197 -0
- data/lib/twilio-ruby/rest/serverless/v1/service/environment/log.rb +7 -0
- data/lib/twilio-ruby/rest/studio.rb +2 -2
- data/lib/twilio-ruby/rest/studio/v1/flow/execution.rb +26 -0
- data/lib/twilio-ruby/rest/studio/v2.rb +3 -3
- data/lib/twilio-ruby/rest/studio/v2/flow.rb +7 -0
- data/lib/twilio-ruby/rest/studio/v2/flow/execution.rb +71 -24
- data/lib/twilio-ruby/rest/studio/v2/flow/execution/execution_context.rb +12 -11
- data/lib/twilio-ruby/rest/studio/v2/flow/execution/execution_step.rb +21 -20
- data/lib/twilio-ruby/rest/studio/v2/flow/execution/execution_step/execution_step_context.rb +18 -15
- data/lib/twilio-ruby/rest/supersim.rb +18 -0
- data/lib/twilio-ruby/rest/supersim/v1.rb +30 -0
- data/lib/twilio-ruby/rest/supersim/v1/fleet.rb +53 -10
- data/lib/twilio-ruby/rest/supersim/v1/network.rb +315 -0
- data/lib/twilio-ruby/rest/supersim/v1/network_access_profile.rb +378 -0
- data/lib/twilio-ruby/rest/supersim/v1/network_access_profile/network_access_profile_network.rb +352 -0
- data/lib/twilio-ruby/rest/verify.rb +9 -0
- data/lib/twilio-ruby/rest/verify/v2.rb +16 -0
- data/lib/twilio-ruby/rest/verify/v2/form.rb +197 -0
- data/lib/twilio-ruby/rest/verify/v2/service.rb +48 -3
- data/lib/twilio-ruby/rest/verify/v2/service/entity.rb +379 -0
- data/lib/twilio-ruby/rest/verify/v2/service/entity/factor.rb +500 -0
- data/lib/twilio-ruby/rest/verify/v2/service/entity/factor/challenge.rb +494 -0
- data/lib/twilio-ruby/rest/verify/v2/service/verification.rb +3 -3
- data/lib/twilio-ruby/rest/video/v1/composition_settings.rb +8 -12
- data/lib/twilio-ruby/rest/video/v1/recording_settings.rb +8 -12
- data/lib/twilio-ruby/rest/voice.rb +36 -0
- data/lib/twilio-ruby/rest/voice/v1.rb +64 -0
- data/lib/twilio-ruby/rest/voice/v1/byoc_trunk.rb +513 -0
- data/lib/twilio-ruby/rest/voice/v1/connection_policy.rb +379 -0
- data/lib/twilio-ruby/rest/voice/v1/connection_policy/connection_policy_target.rb +458 -0
- data/lib/twilio-ruby/rest/voice/v1/ip_record.rb +366 -0
- data/lib/twilio-ruby/rest/voice/v1/source_ip_mapping.rb +346 -0
- data/lib/twilio-ruby/twiml/twiml.rb +4 -0
- data/lib/twilio-ruby/twiml/voice_response.rb +3 -2
- data/lib/twilio-ruby/util/configuration.rb +9 -1
- data/lib/twilio-ruby/version.rb +1 -1
- data/spec/integration/api/v2010/account/call_spec.rb +5 -5
- data/spec/integration/api/v2010/account/conference_spec.rb +42 -14
- data/spec/integration/api/v2010/account/sip/domain_spec.rb +12 -4
- data/spec/integration/api/v2010/account/token_spec.rb +23 -11
- data/spec/integration/autopilot/v1/restore_assistant_spec.rb +53 -0
- data/spec/integration/bulkexports/v1/export/day_spec.rb +1 -1
- data/spec/integration/conversations/v1/conversation/participant_spec.rb +7 -0
- data/spec/integration/conversations/v1/conversation_spec.rb +4 -0
- data/spec/integration/flex_api/v1/configuration_spec.rb +3 -0
- data/spec/integration/numbers/v2/regulatory_compliance/bundle/evaluation_spec.rb +623 -0
- data/spec/integration/numbers/v2/regulatory_compliance/bundle_spec.rb +4 -0
- data/spec/integration/preview/bulk_exports/export/day_spec.rb +1 -1
- data/spec/integration/preview/trusted_comms/business/brand/branded_channel/channel_spec.rb +54 -0
- data/spec/integration/preview/trusted_comms/business/brand/branded_channel_spec.rb +52 -0
- data/spec/integration/preview/trusted_comms/business/brand_spec.rb +49 -0
- data/spec/integration/preview/trusted_comms/business_spec.rb +1 -0
- data/spec/integration/serverless/v1/service/asset/asset_version_spec.rb +1 -1
- data/spec/integration/serverless/v1/service/build_spec.rb +4 -4
- data/spec/integration/serverless/v1/service/environment/log_spec.rb +1 -0
- data/spec/integration/serverless/v1/service/function/function_version_spec.rb +1 -1
- data/spec/integration/studio/v1/flow/execution_spec.rb +46 -0
- data/spec/integration/studio/v2/flow/execution_spec.rb +45 -0
- data/spec/integration/studio/v2/flow_spec.rb +4 -0
- data/spec/integration/studio/v2/flow_validate_spec.rb +2 -2
- data/spec/integration/supersim/v1/fleet_spec.rb +12 -4
- data/spec/integration/supersim/v1/network_access_profile/network_access_profile_network_spec.rb +179 -0
- data/spec/integration/supersim/v1/network_access_profile_spec.rb +223 -0
- data/spec/integration/supersim/v1/network_spec.rb +139 -0
- data/spec/integration/trunking/v1/trunk/credential_list_spec.rb +13 -13
- data/spec/integration/trunking/v1/trunk/ip_access_control_list_spec.rb +23 -23
- data/spec/integration/trunking/v1/trunk/origination_url_spec.rb +28 -28
- data/spec/integration/trunking/v1/trunk/phone_number_spec.rb +17 -17
- data/spec/integration/trunking/v1/trunk_spec.rb +33 -33
- data/spec/integration/verify/v2/form_spec.rb +48 -0
- data/spec/integration/verify/v2/service/entity/factor/challenge_spec.rb +353 -0
- data/spec/integration/verify/v2/service/entity/factor_spec.rb +298 -0
- data/spec/integration/verify/v2/service/entity_spec.rb +201 -0
- data/spec/integration/verify/v2/service_spec.rb +28 -4
- data/spec/integration/video/v1/composition_settings_spec.rb +2 -2
- data/spec/integration/video/v1/recording_settings_spec.rb +2 -2
- data/spec/integration/video/v1/recording_spec.rb +2 -2
- data/spec/integration/video/v1/room/recording_spec.rb +2 -2
- data/spec/integration/voice/v1/byoc_trunk_spec.rb +250 -0
- data/spec/integration/voice/v1/connection_policy/connection_policy_target_spec.rb +246 -0
- data/spec/integration/voice/v1/connection_policy_spec.rb +226 -0
- data/spec/integration/voice/v1/ip_record_spec.rb +223 -0
- data/spec/integration/voice/v1/source_ip_mapping_spec.rb +219 -0
- data/spec/rest/client_spec.rb +173 -23
- data/spec/util/configuration_spec.rb +12 -0
- data/twilio-ruby.gemspec +4 -4
- metadata +67 -10
|
@@ -363,6 +363,8 @@ module Twilio
|
|
|
363
363
|
'status' => payload['status'],
|
|
364
364
|
'uri' => payload['uri'],
|
|
365
365
|
'subresource_uris' => payload['subresource_uris'],
|
|
366
|
+
'reason_conference_ended' => payload['reason_conference_ended'],
|
|
367
|
+
'call_sid_ending_conference' => payload['call_sid_ending_conference'],
|
|
366
368
|
}
|
|
367
369
|
|
|
368
370
|
# Context
|
|
@@ -441,6 +443,18 @@ module Twilio
|
|
|
441
443
|
@properties['subresource_uris']
|
|
442
444
|
end
|
|
443
445
|
|
|
446
|
+
##
|
|
447
|
+
# @return [conference.ReasonConferenceEnded] The reason why a conference ended.
|
|
448
|
+
def reason_conference_ended
|
|
449
|
+
@properties['reason_conference_ended']
|
|
450
|
+
end
|
|
451
|
+
|
|
452
|
+
##
|
|
453
|
+
# @return [String] The call SID that caused the conference to end
|
|
454
|
+
def call_sid_ending_conference
|
|
455
|
+
@properties['call_sid_ending_conference']
|
|
456
|
+
end
|
|
457
|
+
|
|
444
458
|
##
|
|
445
459
|
# Fetch a ConferenceInstance
|
|
446
460
|
# @return [ConferenceInstance] Fetched ConferenceInstance
|
|
@@ -63,6 +63,8 @@ module Twilio
|
|
|
63
63
|
# action and you intend to confirm delivery of the message using the [Message
|
|
64
64
|
# Feedback API](https://www.twilio.com/docs/sms/api/message-feedback-resource).
|
|
65
65
|
# This parameter is `false` by default.
|
|
66
|
+
# @param [String] attempt Total number of attempts made ( including this ) to send
|
|
67
|
+
# out the message regardless of the provider used
|
|
66
68
|
# @param [String] validity_period How long in seconds the message can remain in
|
|
67
69
|
# our outgoing message queue. After this period elapses, the message fails and we
|
|
68
70
|
# call your status callback. Can be between 1 and the default value of 14,400
|
|
@@ -100,7 +102,7 @@ module Twilio
|
|
|
100
102
|
# parameters in the POST request. You can include up to 10 `media_url` parameters
|
|
101
103
|
# per message. You can send images in an SMS message in only the US and Canada.
|
|
102
104
|
# @return [MessageInstance] Newly created MessageInstance
|
|
103
|
-
def create(to: nil, status_callback: :unset, application_sid: :unset, max_price: :unset, provide_feedback: :unset, validity_period: :unset, force_delivery: :unset, content_retention: :unset, address_retention: :unset, smart_encoded: :unset, persistent_action: :unset, from: :unset, messaging_service_sid: :unset, body: :unset, media_url: :unset)
|
|
105
|
+
def create(to: nil, status_callback: :unset, application_sid: :unset, max_price: :unset, provide_feedback: :unset, attempt: :unset, validity_period: :unset, force_delivery: :unset, content_retention: :unset, address_retention: :unset, smart_encoded: :unset, persistent_action: :unset, from: :unset, messaging_service_sid: :unset, body: :unset, media_url: :unset)
|
|
104
106
|
data = Twilio::Values.of({
|
|
105
107
|
'To' => to,
|
|
106
108
|
'From' => from,
|
|
@@ -111,6 +113,7 @@ module Twilio
|
|
|
111
113
|
'ApplicationSid' => application_sid,
|
|
112
114
|
'MaxPrice' => max_price,
|
|
113
115
|
'ProvideFeedback' => provide_feedback,
|
|
116
|
+
'Attempt' => attempt,
|
|
114
117
|
'ValidityPeriod' => validity_period,
|
|
115
118
|
'ForceDelivery' => force_delivery,
|
|
116
119
|
'ContentRetention' => content_retention,
|
|
@@ -410,26 +413,26 @@ module Twilio
|
|
|
410
413
|
|
|
411
414
|
# Marshaled Properties
|
|
412
415
|
@properties = {
|
|
413
|
-
'account_sid' => payload['account_sid'],
|
|
414
|
-
'api_version' => payload['api_version'],
|
|
415
416
|
'body' => payload['body'],
|
|
416
|
-
'
|
|
417
|
-
'date_updated' => Twilio.deserialize_rfc2822(payload['date_updated']),
|
|
418
|
-
'date_sent' => Twilio.deserialize_rfc2822(payload['date_sent']),
|
|
417
|
+
'num_segments' => payload['num_segments'],
|
|
419
418
|
'direction' => payload['direction'],
|
|
420
|
-
'error_code' => payload['error_code'] == nil ? payload['error_code'] : payload['error_code'].to_i,
|
|
421
|
-
'error_message' => payload['error_message'],
|
|
422
419
|
'from' => payload['from'],
|
|
423
|
-
'
|
|
424
|
-
'
|
|
425
|
-
'num_segments' => payload['num_segments'],
|
|
420
|
+
'to' => payload['to'],
|
|
421
|
+
'date_updated' => Twilio.deserialize_rfc2822(payload['date_updated']),
|
|
426
422
|
'price' => payload['price'],
|
|
427
|
-
'
|
|
428
|
-
'
|
|
423
|
+
'error_message' => payload['error_message'],
|
|
424
|
+
'uri' => payload['uri'],
|
|
425
|
+
'account_sid' => payload['account_sid'],
|
|
426
|
+
'num_media' => payload['num_media'],
|
|
429
427
|
'status' => payload['status'],
|
|
428
|
+
'messaging_service_sid' => payload['messaging_service_sid'],
|
|
429
|
+
'sid' => payload['sid'],
|
|
430
|
+
'date_sent' => Twilio.deserialize_rfc2822(payload['date_sent']),
|
|
431
|
+
'date_created' => Twilio.deserialize_rfc2822(payload['date_created']),
|
|
432
|
+
'error_code' => payload['error_code'] == nil ? payload['error_code'] : payload['error_code'].to_i,
|
|
433
|
+
'price_unit' => payload['price_unit'],
|
|
434
|
+
'api_version' => payload['api_version'],
|
|
430
435
|
'subresource_uris' => payload['subresource_uris'],
|
|
431
|
-
'to' => payload['to'],
|
|
432
|
-
'uri' => payload['uri'],
|
|
433
436
|
}
|
|
434
437
|
|
|
435
438
|
# Context
|
|
@@ -448,18 +451,6 @@ module Twilio
|
|
|
448
451
|
@instance_context
|
|
449
452
|
end
|
|
450
453
|
|
|
451
|
-
##
|
|
452
|
-
# @return [String] The SID of the Account that created the resource
|
|
453
|
-
def account_sid
|
|
454
|
-
@properties['account_sid']
|
|
455
|
-
end
|
|
456
|
-
|
|
457
|
-
##
|
|
458
|
-
# @return [String] The API version used to process the message
|
|
459
|
-
def api_version
|
|
460
|
-
@properties['api_version']
|
|
461
|
-
end
|
|
462
|
-
|
|
463
454
|
##
|
|
464
455
|
# @return [String] The message text
|
|
465
456
|
def body
|
|
@@ -467,33 +458,39 @@ module Twilio
|
|
|
467
458
|
end
|
|
468
459
|
|
|
469
460
|
##
|
|
470
|
-
# @return [
|
|
471
|
-
def
|
|
472
|
-
@properties['
|
|
461
|
+
# @return [String] The number of messages used to deliver the message body
|
|
462
|
+
def num_segments
|
|
463
|
+
@properties['num_segments']
|
|
473
464
|
end
|
|
474
465
|
|
|
475
466
|
##
|
|
476
|
-
# @return [
|
|
477
|
-
def
|
|
478
|
-
@properties['
|
|
467
|
+
# @return [message.Direction] The direction of the message
|
|
468
|
+
def direction
|
|
469
|
+
@properties['direction']
|
|
479
470
|
end
|
|
480
471
|
|
|
481
472
|
##
|
|
482
|
-
# @return [
|
|
483
|
-
def
|
|
484
|
-
@properties['
|
|
473
|
+
# @return [String] The phone number that initiated the message
|
|
474
|
+
def from
|
|
475
|
+
@properties['from']
|
|
485
476
|
end
|
|
486
477
|
|
|
487
478
|
##
|
|
488
|
-
# @return [
|
|
489
|
-
def
|
|
490
|
-
@properties['
|
|
479
|
+
# @return [String] The phone number that received the message
|
|
480
|
+
def to
|
|
481
|
+
@properties['to']
|
|
491
482
|
end
|
|
492
483
|
|
|
493
484
|
##
|
|
494
|
-
# @return [
|
|
495
|
-
def
|
|
496
|
-
@properties['
|
|
485
|
+
# @return [Time] The RFC 2822 date and time in GMT that the resource was last updated
|
|
486
|
+
def date_updated
|
|
487
|
+
@properties['date_updated']
|
|
488
|
+
end
|
|
489
|
+
|
|
490
|
+
##
|
|
491
|
+
# @return [String] The amount billed for the message
|
|
492
|
+
def price
|
|
493
|
+
@properties['price']
|
|
497
494
|
end
|
|
498
495
|
|
|
499
496
|
##
|
|
@@ -503,15 +500,15 @@ module Twilio
|
|
|
503
500
|
end
|
|
504
501
|
|
|
505
502
|
##
|
|
506
|
-
# @return [String] The
|
|
507
|
-
def
|
|
508
|
-
@properties['
|
|
503
|
+
# @return [String] The URI of the resource, relative to `https://api.twilio.com`
|
|
504
|
+
def uri
|
|
505
|
+
@properties['uri']
|
|
509
506
|
end
|
|
510
507
|
|
|
511
508
|
##
|
|
512
|
-
# @return [String] The SID of the
|
|
513
|
-
def
|
|
514
|
-
@properties['
|
|
509
|
+
# @return [String] The SID of the Account that created the resource
|
|
510
|
+
def account_sid
|
|
511
|
+
@properties['account_sid']
|
|
515
512
|
end
|
|
516
513
|
|
|
517
514
|
##
|
|
@@ -521,21 +518,15 @@ module Twilio
|
|
|
521
518
|
end
|
|
522
519
|
|
|
523
520
|
##
|
|
524
|
-
# @return [
|
|
525
|
-
def
|
|
526
|
-
@properties['
|
|
527
|
-
end
|
|
528
|
-
|
|
529
|
-
##
|
|
530
|
-
# @return [String] The amount billed for the message
|
|
531
|
-
def price
|
|
532
|
-
@properties['price']
|
|
521
|
+
# @return [message.Status] The status of the message
|
|
522
|
+
def status
|
|
523
|
+
@properties['status']
|
|
533
524
|
end
|
|
534
525
|
|
|
535
526
|
##
|
|
536
|
-
# @return [String] The
|
|
537
|
-
def
|
|
538
|
-
@properties['
|
|
527
|
+
# @return [String] The SID of the Messaging Service used with the message.
|
|
528
|
+
def messaging_service_sid
|
|
529
|
+
@properties['messaging_service_sid']
|
|
539
530
|
end
|
|
540
531
|
|
|
541
532
|
##
|
|
@@ -545,27 +536,39 @@ module Twilio
|
|
|
545
536
|
end
|
|
546
537
|
|
|
547
538
|
##
|
|
548
|
-
# @return [
|
|
549
|
-
def
|
|
550
|
-
@properties['
|
|
539
|
+
# @return [Time] The RFC 2822 date and time in GMT when the message was sent
|
|
540
|
+
def date_sent
|
|
541
|
+
@properties['date_sent']
|
|
551
542
|
end
|
|
552
543
|
|
|
553
544
|
##
|
|
554
|
-
# @return [
|
|
555
|
-
def
|
|
556
|
-
@properties['
|
|
545
|
+
# @return [Time] The RFC 2822 date and time in GMT that the resource was created
|
|
546
|
+
def date_created
|
|
547
|
+
@properties['date_created']
|
|
557
548
|
end
|
|
558
549
|
|
|
559
550
|
##
|
|
560
|
-
# @return [String] The
|
|
561
|
-
def
|
|
562
|
-
@properties['
|
|
551
|
+
# @return [String] The error code associated with the message
|
|
552
|
+
def error_code
|
|
553
|
+
@properties['error_code']
|
|
563
554
|
end
|
|
564
555
|
|
|
565
556
|
##
|
|
566
|
-
# @return [String] The
|
|
567
|
-
def
|
|
568
|
-
@properties['
|
|
557
|
+
# @return [String] The currency in which price is measured
|
|
558
|
+
def price_unit
|
|
559
|
+
@properties['price_unit']
|
|
560
|
+
end
|
|
561
|
+
|
|
562
|
+
##
|
|
563
|
+
# @return [String] The API version used to process the message
|
|
564
|
+
def api_version
|
|
565
|
+
@properties['api_version']
|
|
566
|
+
end
|
|
567
|
+
|
|
568
|
+
##
|
|
569
|
+
# @return [String] A list of related resources identified by their relative URIs
|
|
570
|
+
def subresource_uris
|
|
571
|
+
@properties['subresource_uris']
|
|
569
572
|
end
|
|
570
573
|
|
|
571
574
|
##
|
|
@@ -280,15 +280,15 @@ module Twilio
|
|
|
280
280
|
|
|
281
281
|
# Marshaled Properties
|
|
282
282
|
@properties = {
|
|
283
|
+
'date_updated' => Twilio.deserialize_rfc2822(payload['date_updated']),
|
|
284
|
+
'current_size' => payload['current_size'].to_i,
|
|
285
|
+
'friendly_name' => payload['friendly_name'],
|
|
286
|
+
'uri' => payload['uri'],
|
|
283
287
|
'account_sid' => payload['account_sid'],
|
|
284
288
|
'average_wait_time' => payload['average_wait_time'].to_i,
|
|
285
|
-
'
|
|
289
|
+
'sid' => payload['sid'],
|
|
286
290
|
'date_created' => Twilio.deserialize_rfc2822(payload['date_created']),
|
|
287
|
-
'date_updated' => Twilio.deserialize_rfc2822(payload['date_updated']),
|
|
288
|
-
'friendly_name' => payload['friendly_name'],
|
|
289
291
|
'max_size' => payload['max_size'].to_i,
|
|
290
|
-
'sid' => payload['sid'],
|
|
291
|
-
'uri' => payload['uri'],
|
|
292
292
|
}
|
|
293
293
|
|
|
294
294
|
# Context
|
|
@@ -308,15 +308,9 @@ module Twilio
|
|
|
308
308
|
end
|
|
309
309
|
|
|
310
310
|
##
|
|
311
|
-
# @return [
|
|
312
|
-
def
|
|
313
|
-
@properties['
|
|
314
|
-
end
|
|
315
|
-
|
|
316
|
-
##
|
|
317
|
-
# @return [String] Average wait time of members in the queue
|
|
318
|
-
def average_wait_time
|
|
319
|
-
@properties['average_wait_time']
|
|
311
|
+
# @return [Time] The RFC 2822 date and time in GMT that this resource was last updated
|
|
312
|
+
def date_updated
|
|
313
|
+
@properties['date_updated']
|
|
320
314
|
end
|
|
321
315
|
|
|
322
316
|
##
|
|
@@ -326,27 +320,27 @@ module Twilio
|
|
|
326
320
|
end
|
|
327
321
|
|
|
328
322
|
##
|
|
329
|
-
# @return [
|
|
330
|
-
def
|
|
331
|
-
@properties['
|
|
323
|
+
# @return [String] A string that you assigned to describe this resource
|
|
324
|
+
def friendly_name
|
|
325
|
+
@properties['friendly_name']
|
|
332
326
|
end
|
|
333
327
|
|
|
334
328
|
##
|
|
335
|
-
# @return [
|
|
336
|
-
def
|
|
337
|
-
@properties['
|
|
329
|
+
# @return [String] The URI of this resource, relative to `https://api.twilio.com`
|
|
330
|
+
def uri
|
|
331
|
+
@properties['uri']
|
|
338
332
|
end
|
|
339
333
|
|
|
340
334
|
##
|
|
341
|
-
# @return [String]
|
|
342
|
-
def
|
|
343
|
-
@properties['
|
|
335
|
+
# @return [String] The SID of the Account that created this resource
|
|
336
|
+
def account_sid
|
|
337
|
+
@properties['account_sid']
|
|
344
338
|
end
|
|
345
339
|
|
|
346
340
|
##
|
|
347
|
-
# @return [String]
|
|
348
|
-
def
|
|
349
|
-
@properties['
|
|
341
|
+
# @return [String] Average wait time of members in the queue
|
|
342
|
+
def average_wait_time
|
|
343
|
+
@properties['average_wait_time']
|
|
350
344
|
end
|
|
351
345
|
|
|
352
346
|
##
|
|
@@ -356,9 +350,15 @@ module Twilio
|
|
|
356
350
|
end
|
|
357
351
|
|
|
358
352
|
##
|
|
359
|
-
# @return [
|
|
360
|
-
def
|
|
361
|
-
@properties['
|
|
353
|
+
# @return [Time] The RFC 2822 date and time in GMT that this resource was created
|
|
354
|
+
def date_created
|
|
355
|
+
@properties['date_created']
|
|
356
|
+
end
|
|
357
|
+
|
|
358
|
+
##
|
|
359
|
+
# @return [String] The max number of calls allowed in the queue
|
|
360
|
+
def max_size
|
|
361
|
+
@properties['max_size']
|
|
362
362
|
end
|
|
363
363
|
|
|
364
364
|
##
|
|
@@ -136,8 +136,13 @@ module Twilio
|
|
|
136
136
|
# @param [Boolean] secure Whether secure SIP is enabled for the domain. If
|
|
137
137
|
# enabled, TLS will be enforced and SRTP will be negotiated on all incoming calls
|
|
138
138
|
# to this sip domain.
|
|
139
|
+
# @param [String] byoc_trunk_sid The SID of the BYOC Trunk(Bring Your Own Carrier)
|
|
140
|
+
# resource that the Sip Domain will be associated with.
|
|
141
|
+
# @param [String] emergency_caller_sid Whether an emergency caller sid is
|
|
142
|
+
# configured for the domain. If present, this phone number will be used as the
|
|
143
|
+
# callback for the emergency call.
|
|
139
144
|
# @return [DomainInstance] Newly created DomainInstance
|
|
140
|
-
def create(domain_name: nil, friendly_name: :unset, voice_url: :unset, voice_method: :unset, voice_fallback_url: :unset, voice_fallback_method: :unset, voice_status_callback_url: :unset, voice_status_callback_method: :unset, sip_registration: :unset, emergency_calling_enabled: :unset, secure: :unset)
|
|
145
|
+
def create(domain_name: nil, friendly_name: :unset, voice_url: :unset, voice_method: :unset, voice_fallback_url: :unset, voice_fallback_method: :unset, voice_status_callback_url: :unset, voice_status_callback_method: :unset, sip_registration: :unset, emergency_calling_enabled: :unset, secure: :unset, byoc_trunk_sid: :unset, emergency_caller_sid: :unset)
|
|
141
146
|
data = Twilio::Values.of({
|
|
142
147
|
'DomainName' => domain_name,
|
|
143
148
|
'FriendlyName' => friendly_name,
|
|
@@ -150,6 +155,8 @@ module Twilio
|
|
|
150
155
|
'SipRegistration' => sip_registration,
|
|
151
156
|
'EmergencyCallingEnabled' => emergency_calling_enabled,
|
|
152
157
|
'Secure' => secure,
|
|
158
|
+
'ByocTrunkSid' => byoc_trunk_sid,
|
|
159
|
+
'EmergencyCallerSid' => emergency_caller_sid,
|
|
153
160
|
})
|
|
154
161
|
|
|
155
162
|
payload = @version.create(
|
|
@@ -261,8 +268,13 @@ module Twilio
|
|
|
261
268
|
# @param [Boolean] secure Whether secure SIP is enabled for the domain. If
|
|
262
269
|
# enabled, TLS will be enforced and SRTP will be negotiated on all incoming calls
|
|
263
270
|
# to this sip domain.
|
|
271
|
+
# @param [String] byoc_trunk_sid The SID of the BYOC Trunk(Bring Your Own Carrier)
|
|
272
|
+
# resource that the Sip Domain will be associated with.
|
|
273
|
+
# @param [String] emergency_caller_sid Whether an emergency caller sid is
|
|
274
|
+
# configured for the domain. If present, this phone number will be used as the
|
|
275
|
+
# callback for the emergency call.
|
|
264
276
|
# @return [DomainInstance] Updated DomainInstance
|
|
265
|
-
def update(friendly_name: :unset, voice_fallback_method: :unset, voice_fallback_url: :unset, voice_method: :unset, voice_status_callback_method: :unset, voice_status_callback_url: :unset, voice_url: :unset, sip_registration: :unset, domain_name: :unset, emergency_calling_enabled: :unset, secure: :unset)
|
|
277
|
+
def update(friendly_name: :unset, voice_fallback_method: :unset, voice_fallback_url: :unset, voice_method: :unset, voice_status_callback_method: :unset, voice_status_callback_url: :unset, voice_url: :unset, sip_registration: :unset, domain_name: :unset, emergency_calling_enabled: :unset, secure: :unset, byoc_trunk_sid: :unset, emergency_caller_sid: :unset)
|
|
266
278
|
data = Twilio::Values.of({
|
|
267
279
|
'FriendlyName' => friendly_name,
|
|
268
280
|
'VoiceFallbackMethod' => voice_fallback_method,
|
|
@@ -275,6 +287,8 @@ module Twilio
|
|
|
275
287
|
'DomainName' => domain_name,
|
|
276
288
|
'EmergencyCallingEnabled' => emergency_calling_enabled,
|
|
277
289
|
'Secure' => secure,
|
|
290
|
+
'ByocTrunkSid' => byoc_trunk_sid,
|
|
291
|
+
'EmergencyCallerSid' => emergency_caller_sid,
|
|
278
292
|
})
|
|
279
293
|
|
|
280
294
|
payload = @version.update(
|
|
@@ -407,6 +421,8 @@ module Twilio
|
|
|
407
421
|
'sip_registration' => payload['sip_registration'],
|
|
408
422
|
'emergency_calling_enabled' => payload['emergency_calling_enabled'],
|
|
409
423
|
'secure' => payload['secure'],
|
|
424
|
+
'byoc_trunk_sid' => payload['byoc_trunk_sid'],
|
|
425
|
+
'emergency_caller_sid' => payload['emergency_caller_sid'],
|
|
410
426
|
}
|
|
411
427
|
|
|
412
428
|
# Context
|
|
@@ -539,6 +555,18 @@ module Twilio
|
|
|
539
555
|
@properties['secure']
|
|
540
556
|
end
|
|
541
557
|
|
|
558
|
+
##
|
|
559
|
+
# @return [String] The SID of the BYOC Trunk resource.
|
|
560
|
+
def byoc_trunk_sid
|
|
561
|
+
@properties['byoc_trunk_sid']
|
|
562
|
+
end
|
|
563
|
+
|
|
564
|
+
##
|
|
565
|
+
# @return [String] Whether an emergency caller sid is configured for the domain.
|
|
566
|
+
def emergency_caller_sid
|
|
567
|
+
@properties['emergency_caller_sid']
|
|
568
|
+
end
|
|
569
|
+
|
|
542
570
|
##
|
|
543
571
|
# Fetch a DomainInstance
|
|
544
572
|
# @return [DomainInstance] Fetched DomainInstance
|
|
@@ -572,8 +600,13 @@ module Twilio
|
|
|
572
600
|
# @param [Boolean] secure Whether secure SIP is enabled for the domain. If
|
|
573
601
|
# enabled, TLS will be enforced and SRTP will be negotiated on all incoming calls
|
|
574
602
|
# to this sip domain.
|
|
603
|
+
# @param [String] byoc_trunk_sid The SID of the BYOC Trunk(Bring Your Own Carrier)
|
|
604
|
+
# resource that the Sip Domain will be associated with.
|
|
605
|
+
# @param [String] emergency_caller_sid Whether an emergency caller sid is
|
|
606
|
+
# configured for the domain. If present, this phone number will be used as the
|
|
607
|
+
# callback for the emergency call.
|
|
575
608
|
# @return [DomainInstance] Updated DomainInstance
|
|
576
|
-
def update(friendly_name: :unset, voice_fallback_method: :unset, voice_fallback_url: :unset, voice_method: :unset, voice_status_callback_method: :unset, voice_status_callback_url: :unset, voice_url: :unset, sip_registration: :unset, domain_name: :unset, emergency_calling_enabled: :unset, secure: :unset)
|
|
609
|
+
def update(friendly_name: :unset, voice_fallback_method: :unset, voice_fallback_url: :unset, voice_method: :unset, voice_status_callback_method: :unset, voice_status_callback_url: :unset, voice_url: :unset, sip_registration: :unset, domain_name: :unset, emergency_calling_enabled: :unset, secure: :unset, byoc_trunk_sid: :unset, emergency_caller_sid: :unset)
|
|
577
610
|
context.update(
|
|
578
611
|
friendly_name: friendly_name,
|
|
579
612
|
voice_fallback_method: voice_fallback_method,
|
|
@@ -586,6 +619,8 @@ module Twilio
|
|
|
586
619
|
domain_name: domain_name,
|
|
587
620
|
emergency_calling_enabled: emergency_calling_enabled,
|
|
588
621
|
secure: secure,
|
|
622
|
+
byoc_trunk_sid: byoc_trunk_sid,
|
|
623
|
+
emergency_caller_sid: emergency_caller_sid,
|
|
589
624
|
)
|
|
590
625
|
end
|
|
591
626
|
|