twilio-ruby 5.74.1 → 5.74.2

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.
@@ -15,22 +15,20 @@ module Twilio
15
15
  def initialize(domain)
16
16
  super
17
17
  @version = 'v1'
18
- @assessments = nil
19
18
  @channel = nil
20
19
  @configuration = nil
21
20
  @flex_flow = nil
22
- @good_data = nil
21
+ @assessments = nil
22
+ @insights_questionnaires_category = nil
23
+ @insights_questionnaires_question = nil
24
+ @insights_session = nil
25
+ @insights_settings_answer_sets = nil
26
+ @insights_settings_comment = nil
27
+ @insights_user_roles = nil
23
28
  @interaction = nil
24
- @user_roles = nil
25
29
  @web_channel = nil
26
30
  end
27
31
 
28
- ##
29
- # @return [Twilio::REST::Flex_api::V1::AssessmentsContext]
30
- def assessments
31
- @assessments ||= AssessmentsContext.new self
32
- end
33
-
34
32
  ##
35
33
  # @param [String] sid The SID of the Flex chat channel resource to fetch.
36
34
  # @return [Twilio::REST::Flex_api::V1::ChannelContext] if sid was passed.
@@ -68,9 +66,63 @@ module Twilio
68
66
  end
69
67
 
70
68
  ##
71
- # @return [Twilio::REST::Flex_api::V1::GoodDataContext]
72
- def good_data
73
- @good_data ||= GoodDataContext.new self
69
+ # @return [Twilio::REST::Flex_api::V1::AssessmentsContext]
70
+ def assessments
71
+ @assessments ||= AssessmentsContext.new self
72
+ end
73
+
74
+ ##
75
+ # @param [String] category_id The ID of the category to be update
76
+ # @return [Twilio::REST::Flex_api::V1::InsightsQuestionnairesCategoryContext] if category_id was passed.
77
+ # @return [Twilio::REST::Flex_api::V1::InsightsQuestionnairesCategoryList]
78
+ def insights_questionnaires_category(category_id=:unset)
79
+ if category_id.nil?
80
+ raise ArgumentError, 'category_id cannot be nil'
81
+ end
82
+ if category_id == :unset
83
+ @insights_questionnaires_category ||= InsightsQuestionnairesCategoryList.new self
84
+ else
85
+ InsightsQuestionnairesCategoryContext.new(self, category_id)
86
+ end
87
+ end
88
+
89
+ ##
90
+ # @param [String] question_id The unique ID of the question
91
+ # @return [Twilio::REST::Flex_api::V1::InsightsQuestionnairesQuestionContext] if question_id was passed.
92
+ # @return [Twilio::REST::Flex_api::V1::InsightsQuestionnairesQuestionList]
93
+ def insights_questionnaires_question(question_id=:unset)
94
+ if question_id.nil?
95
+ raise ArgumentError, 'question_id cannot be nil'
96
+ end
97
+ if question_id == :unset
98
+ @insights_questionnaires_question ||= InsightsQuestionnairesQuestionList.new self
99
+ else
100
+ InsightsQuestionnairesQuestionContext.new(self, question_id)
101
+ end
102
+ end
103
+
104
+ ##
105
+ # @return [Twilio::REST::Flex_api::V1::InsightsSessionContext]
106
+ def insights_session
107
+ @insights_session ||= InsightsSessionContext.new self
108
+ end
109
+
110
+ ##
111
+ # @return [Twilio::REST::Flex_api::V1::InsightsSettingsAnswerSetsContext]
112
+ def insights_settings_answer_sets
113
+ @insights_settings_answer_sets ||= InsightsSettingsAnswerSetsList.new self
114
+ end
115
+
116
+ ##
117
+ # @return [Twilio::REST::Flex_api::V1::InsightsSettingsCommentContext]
118
+ def insights_settings_comment
119
+ @insights_settings_comment ||= InsightsSettingsCommentList.new self
120
+ end
121
+
122
+ ##
123
+ # @return [Twilio::REST::Flex_api::V1::InsightsUserRolesContext]
124
+ def insights_user_roles
125
+ @insights_user_roles ||= InsightsUserRolesContext.new self
74
126
  end
75
127
 
76
128
  ##
@@ -88,12 +140,6 @@ module Twilio
88
140
  end
89
141
  end
90
142
 
91
- ##
92
- # @return [Twilio::REST::Flex_api::V1::UserRolesContext]
93
- def user_roles
94
- @user_roles ||= UserRolesContext.new self
95
- end
96
-
97
143
  ##
98
144
  # @param [String] sid The SID of the WebChannel resource to fetch.
99
145
  # @return [Twilio::REST::Flex_api::V1::WebChannelContext] if sid was passed.
@@ -35,12 +35,6 @@ module Twilio
35
35
  @v2 ||= V2.new self
36
36
  end
37
37
 
38
- ##
39
- # @return [Twilio::REST::Flex_api::V1::AssessmentsInstance]
40
- def assessments
41
- self.v1.assessments()
42
- end
43
-
44
38
  ##
45
39
  # @param [String] sid The unique string that we created to identify the Channel
46
40
  # resource.
@@ -66,9 +60,49 @@ module Twilio
66
60
  end
67
61
 
68
62
  ##
69
- # @return [Twilio::REST::Flex_api::V1::GoodDataInstance]
70
- def good_data
71
- self.v1.good_data()
63
+ # @return [Twilio::REST::Flex_api::V1::AssessmentsInstance]
64
+ def assessments
65
+ self.v1.assessments()
66
+ end
67
+
68
+ ##
69
+ # @param [String] category_id The unique ID for the category
70
+ # @return [Twilio::REST::Flex_api::V1::InsightsQuestionnairesCategoryInstance] if category_id was passed.
71
+ # @return [Twilio::REST::Flex_api::V1::InsightsQuestionnairesCategoryList]
72
+ def insights_questionnaires_category(category_id=:unset)
73
+ self.v1.insights_questionnaires_category(category_id)
74
+ end
75
+
76
+ ##
77
+ # @param [String] question_id The unique ID of the question
78
+ # @return [Twilio::REST::Flex_api::V1::InsightsQuestionnairesQuestionInstance] if question_id was passed.
79
+ # @return [Twilio::REST::Flex_api::V1::InsightsQuestionnairesQuestionList]
80
+ def insights_questionnaires_question(question_id=:unset)
81
+ self.v1.insights_questionnaires_question(question_id)
82
+ end
83
+
84
+ ##
85
+ # @return [Twilio::REST::Flex_api::V1::InsightsSessionInstance]
86
+ def insights_session
87
+ self.v1.insights_session()
88
+ end
89
+
90
+ ##
91
+ # @return [Twilio::REST::Flex_api::V1::InsightsSettingsAnswerSetsInstance]
92
+ def insights_settings_answer_sets
93
+ self.v1.insights_settings_answer_sets()
94
+ end
95
+
96
+ ##
97
+ # @return [Twilio::REST::Flex_api::V1::InsightsSettingsCommentInstance]
98
+ def insights_settings_comment
99
+ self.v1.insights_settings_comment()
100
+ end
101
+
102
+ ##
103
+ # @return [Twilio::REST::Flex_api::V1::InsightsUserRolesInstance]
104
+ def insights_user_roles
105
+ self.v1.insights_user_roles()
72
106
  end
73
107
 
74
108
  ##
@@ -80,12 +114,6 @@ module Twilio
80
114
  self.v1.interaction(sid)
81
115
  end
82
116
 
83
- ##
84
- # @return [Twilio::REST::Flex_api::V1::UserRolesInstance]
85
- def user_roles
86
- self.v1.user_roles()
87
- end
88
-
89
117
  ##
90
118
  # @param [String] sid The unique string that we created to identify the WebChannel
91
119
  # resource.
@@ -173,8 +173,10 @@ module Twilio
173
173
  # business or organization using the Tollfree number.
174
174
  # @param [String] business_contact_phone The phone number of the contact for the
175
175
  # business or organization using the Tollfree number.
176
+ # @param [String] external_reference_id An optional external reference ID supplied
177
+ # by customer and echoed back on status retrieval.
176
178
  # @return [TollfreeVerificationInstance] Created TollfreeVerificationInstance
177
- def create(business_name: nil, business_website: nil, notification_email: nil, use_case_categories: nil, use_case_summary: nil, production_message_sample: nil, opt_in_image_urls: nil, opt_in_type: nil, message_volume: nil, tollfree_phone_number_sid: nil, customer_profile_sid: :unset, business_street_address: :unset, business_street_address2: :unset, business_city: :unset, business_state_province_region: :unset, business_postal_code: :unset, business_country: :unset, additional_information: :unset, business_contact_first_name: :unset, business_contact_last_name: :unset, business_contact_email: :unset, business_contact_phone: :unset)
179
+ def create(business_name: nil, business_website: nil, notification_email: nil, use_case_categories: nil, use_case_summary: nil, production_message_sample: nil, opt_in_image_urls: nil, opt_in_type: nil, message_volume: nil, tollfree_phone_number_sid: nil, customer_profile_sid: :unset, business_street_address: :unset, business_street_address2: :unset, business_city: :unset, business_state_province_region: :unset, business_postal_code: :unset, business_country: :unset, additional_information: :unset, business_contact_first_name: :unset, business_contact_last_name: :unset, business_contact_email: :unset, business_contact_phone: :unset, external_reference_id: :unset)
178
180
  data = Twilio::Values.of({
179
181
  'BusinessName' => business_name,
180
182
  'BusinessWebsite' => business_website,
@@ -198,6 +200,7 @@ module Twilio
198
200
  'BusinessContactLastName' => business_contact_last_name,
199
201
  'BusinessContactEmail' => business_contact_email,
200
202
  'BusinessContactPhone' => business_contact_phone,
203
+ 'ExternalReferenceId' => external_reference_id,
201
204
  })
202
205
 
203
206
  payload = @version.create('POST', @uri, data: data)
@@ -400,6 +403,7 @@ module Twilio
400
403
  'status' => payload['status'],
401
404
  'url' => payload['url'],
402
405
  'resource_links' => payload['resource_links'],
406
+ 'external_reference_id' => payload['external_reference_id'],
403
407
  }
404
408
 
405
409
  # Context
@@ -604,6 +608,12 @@ module Twilio
604
608
  @properties['resource_links']
605
609
  end
606
610
 
611
+ ##
612
+ # @return [String] An optional external reference ID supplied by customer and echoed back on status retrieval
613
+ def external_reference_id
614
+ @properties['external_reference_id']
615
+ end
616
+
607
617
  ##
608
618
  # Fetch the TollfreeVerificationInstance
609
619
  # @return [TollfreeVerificationInstance] Fetched TollfreeVerificationInstance
@@ -34,7 +34,7 @@ module Twilio
34
34
  # be in {E.164 format}[https://www.twilio.com/docs/glossary/what-e164].
35
35
  # @param [String] channel The verification method to use. One of:
36
36
  # {`email`}[https://www.twilio.com/docs/verify/email], `sms`, `whatsapp`, `call`,
37
- # or `sna`.
37
+ # `sna` or `auto`.
38
38
  # @param [String] custom_friendly_name A custom user defined friendly name that
39
39
  # overwrites the existing one in the verification message
40
40
  # @param [String] custom_message The text of a custom message to use for the
@@ -74,8 +74,10 @@ module Twilio
74
74
  # @param [String] template_custom_substitutions A stringified JSON object in which
75
75
  # the keys are the template's special variables and the values are the variables
76
76
  # substitutions.
77
+ # @param [String] device_ip The IP address of the client's device. If provided, it
78
+ # has to be a valid IPv4 or IPv6 address.
77
79
  # @return [VerificationInstance] Created VerificationInstance
78
- def create(to: nil, channel: nil, custom_friendly_name: :unset, custom_message: :unset, send_digits: :unset, locale: :unset, custom_code: :unset, amount: :unset, payee: :unset, rate_limits: :unset, channel_configuration: :unset, app_hash: :unset, template_sid: :unset, template_custom_substitutions: :unset)
80
+ def create(to: nil, channel: nil, custom_friendly_name: :unset, custom_message: :unset, send_digits: :unset, locale: :unset, custom_code: :unset, amount: :unset, payee: :unset, rate_limits: :unset, channel_configuration: :unset, app_hash: :unset, template_sid: :unset, template_custom_substitutions: :unset, device_ip: :unset)
79
81
  data = Twilio::Values.of({
80
82
  'To' => to,
81
83
  'Channel' => channel,
@@ -91,6 +93,7 @@ module Twilio
91
93
  'AppHash' => app_hash,
92
94
  'TemplateSid' => template_sid,
93
95
  'TemplateCustomSubstitutions' => template_custom_substitutions,
96
+ 'DeviceIp' => device_ip,
94
97
  })
95
98
 
96
99
  payload = @version.create('POST', @uri, data: data)
@@ -114,7 +114,10 @@ module Twilio
114
114
  # Create a new <Hangup> element
115
115
  # keyword_args:: additional attributes
116
116
  def hangup(**keyword_args)
117
- append(Hangup.new(**keyword_args))
117
+ hangup = Hangup.new(**keyword_args)
118
+
119
+ yield(hangup) if block_given?
120
+ append(hangup)
118
121
  end
119
122
 
120
123
  ##
@@ -187,7 +190,10 @@ module Twilio
187
190
  # reason:: Rejection reason
188
191
  # keyword_args:: additional attributes
189
192
  def reject(reason: nil, **keyword_args)
190
- append(Reject.new(reason: reason, **keyword_args))
193
+ reject = Reject.new(reason: reason, **keyword_args)
194
+
195
+ yield(reject) if block_given?
196
+ append(reject)
191
197
  end
192
198
 
193
199
  ##
@@ -1366,6 +1372,15 @@ module Twilio
1366
1372
 
1367
1373
  yield(self) if block_given?
1368
1374
  end
1375
+
1376
+ ##
1377
+ # Create a new <Parameter> element
1378
+ # name:: The name of the custom parameter
1379
+ # value:: The value of the custom parameter
1380
+ # keyword_args:: additional attributes
1381
+ def parameter(name: nil, value: nil, **keyword_args)
1382
+ append(Parameter.new(name: name, value: value, **keyword_args))
1383
+ end
1369
1384
  end
1370
1385
 
1371
1386
  ##
@@ -1421,6 +1436,15 @@ module Twilio
1421
1436
 
1422
1437
  yield(self) if block_given?
1423
1438
  end
1439
+
1440
+ ##
1441
+ # Create a new <Parameter> element
1442
+ # name:: The name of the custom parameter
1443
+ # value:: The value of the custom parameter
1444
+ # keyword_args:: additional attributes
1445
+ def parameter(name: nil, value: nil, **keyword_args)
1446
+ append(Parameter.new(name: name, value: value, **keyword_args))
1447
+ end
1424
1448
  end
1425
1449
 
1426
1450
  ##
@@ -1626,6 +1650,63 @@ module Twilio
1626
1650
  def sip(sip_url, username: nil, password: nil, url: nil, method: nil, status_callback_event: nil, status_callback: nil, status_callback_method: nil, machine_detection: nil, amd_status_callback_method: nil, amd_status_callback: nil, machine_detection_timeout: nil, machine_detection_speech_threshold: nil, machine_detection_speech_end_threshold: nil, machine_detection_silence_timeout: nil, **keyword_args)
1627
1651
  append(Sip.new(sip_url, username: username, password: password, url: url, method: method, status_callback_event: status_callback_event, status_callback: status_callback, status_callback_method: status_callback_method, machine_detection: machine_detection, amd_status_callback_method: amd_status_callback_method, amd_status_callback: amd_status_callback, machine_detection_timeout: machine_detection_timeout, machine_detection_speech_threshold: machine_detection_speech_threshold, machine_detection_speech_end_threshold: machine_detection_speech_end_threshold, machine_detection_silence_timeout: machine_detection_silence_timeout, **keyword_args))
1628
1652
  end
1653
+
1654
+ ##
1655
+ # Create a new <Application> element
1656
+ # application_sid:: Application sid
1657
+ # url:: TwiML URL
1658
+ # method:: TwiML URL Method
1659
+ # status_callback_event:: Events to trigger status callback
1660
+ # status_callback:: Status Callback URL
1661
+ # status_callback_method:: Status Callback URL Method
1662
+ # customer_id:: Identity of the customer calling application
1663
+ # copy_parent_to:: Copy parent call To field to called application side, otherwise use the application sid as To field
1664
+ # keyword_args:: additional attributes
1665
+ def application(application_sid: nil, url: nil, method: nil, status_callback_event: nil, status_callback: nil, status_callback_method: nil, customer_id: nil, copy_parent_to: nil, **keyword_args)
1666
+ application = Application.new(application_sid: application_sid, url: url, method: method, status_callback_event: status_callback_event, status_callback: status_callback, status_callback_method: status_callback_method, customer_id: customer_id, copy_parent_to: copy_parent_to, **keyword_args)
1667
+
1668
+ yield(application) if block_given?
1669
+ append(application)
1670
+ end
1671
+ end
1672
+
1673
+ ##
1674
+ # <Application> TwiML Noun
1675
+ class Application < TwiML
1676
+ def initialize(application_sid: nil, **keyword_args)
1677
+ super(**keyword_args)
1678
+ @name = 'Application'
1679
+ @value = application_sid unless application_sid.nil?
1680
+ yield(self) if block_given?
1681
+ end
1682
+
1683
+ ##
1684
+ # Create a new <ApplicationSid> element
1685
+ # sid:: Application sid to dial
1686
+ # keyword_args:: additional attributes
1687
+ def application_sid(sid, **keyword_args)
1688
+ append(ApplicationSid.new(sid, **keyword_args))
1689
+ end
1690
+
1691
+ ##
1692
+ # Create a new <Parameter> element
1693
+ # name:: The name of the custom parameter
1694
+ # value:: The value of the custom parameter
1695
+ # keyword_args:: additional attributes
1696
+ def parameter(name: nil, value: nil, **keyword_args)
1697
+ append(Parameter.new(name: name, value: value, **keyword_args))
1698
+ end
1699
+ end
1700
+
1701
+ ##
1702
+ # <ApplicationSid> TwiML Noun
1703
+ class ApplicationSid < TwiML
1704
+ def initialize(sid, **keyword_args)
1705
+ super(**keyword_args)
1706
+ @name = 'ApplicationSid'
1707
+ @value = sid
1708
+ yield(self) if block_given?
1709
+ end
1629
1710
  end
1630
1711
 
1631
1712
  ##
@@ -1,3 +1,3 @@
1
1
  module Twilio
2
- VERSION = '5.74.1'
2
+ VERSION = '5.74.2'
3
3
  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.74.1
4
+ version: 5.74.2
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: 2023-01-11 00:00:00.000000000 Z
11
+ date: 2023-01-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jwt
@@ -430,12 +430,16 @@ files:
430
430
  - lib/twilio-ruby/rest/flex_api/v1/channel.rb
431
431
  - lib/twilio-ruby/rest/flex_api/v1/configuration.rb
432
432
  - lib/twilio-ruby/rest/flex_api/v1/flex_flow.rb
433
- - lib/twilio-ruby/rest/flex_api/v1/good_data.rb
433
+ - lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires_category.rb
434
+ - lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires_question.rb
435
+ - lib/twilio-ruby/rest/flex_api/v1/insights_session.rb
436
+ - lib/twilio-ruby/rest/flex_api/v1/insights_settings_answersets.rb
437
+ - lib/twilio-ruby/rest/flex_api/v1/insights_settings_comment.rb
438
+ - lib/twilio-ruby/rest/flex_api/v1/insights_user_roles.rb
434
439
  - lib/twilio-ruby/rest/flex_api/v1/interaction.rb
435
440
  - lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel.rb
436
441
  - lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel/interaction_channel_invite.rb
437
442
  - lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel/interaction_channel_participant.rb
438
- - lib/twilio-ruby/rest/flex_api/v1/user_roles.rb
439
443
  - lib/twilio-ruby/rest/flex_api/v1/web_channel.rb
440
444
  - lib/twilio-ruby/rest/flex_api/v2.rb
441
445
  - lib/twilio-ruby/rest/flex_api/v2/web_channels.rb