twilio-ruby 7.7.2 → 7.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGES.md +26 -0
- data/README.md +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number_country/local.rb +3 -3
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number_country/machine_to_machine.rb +3 -3
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number_country/mobile.rb +3 -3
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number_country/national.rb +3 -3
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number_country/shared_cost.rb +3 -3
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number_country/toll_free.rb +3 -3
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number_country/voip.rb +3 -3
- data/lib/twilio-ruby/rest/api/v2010/account/recording.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/all_time.rb +4 -4
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/daily.rb +4 -4
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/last_month.rb +4 -4
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/monthly.rb +4 -4
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/this_month.rb +4 -4
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/today.rb +4 -4
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/yearly.rb +4 -4
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/yesterday.rb +4 -4
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record.rb +4 -4
- data/lib/twilio-ruby/rest/api/v2010/account/usage/trigger.rb +5 -5
- data/lib/twilio-ruby/rest/content/v1/content.rb +42 -2
- data/lib/twilio-ruby/rest/intelligence/v2/service.rb +17 -1
- data/lib/twilio-ruby/rest/intelligence/v2/transcript/encrypted_operator_results.rb +217 -0
- data/lib/twilio-ruby/rest/intelligence/v2/transcript/encrypted_sentences.rb +217 -0
- data/lib/twilio-ruby/rest/intelligence/v2/transcript.rb +43 -0
- data/lib/twilio-ruby/rest/messaging/v2/channels_sender.rb +29 -29
- data/lib/twilio-ruby/rest/messaging/v2.rb +1 -1
- data/lib/twilio-ruby/rest/numbers/v1/porting_port_in.rb +3 -3
- data/lib/twilio-ruby/rest/numbers/v3/hosted_number_order.rb +339 -0
- data/lib/twilio-ruby/rest/numbers/v3.rb +40 -0
- data/lib/twilio-ruby/rest/numbers_base.rb +5 -0
- data/lib/twilio-ruby/rest/oauth/v2/token.rb +186 -0
- data/lib/twilio-ruby/rest/oauth/v2.rb +40 -0
- data/lib/twilio-ruby/rest/oauth_base.rb +6 -1
- data/lib/twilio-ruby/rest/verify/v2/new_challenge.rb +335 -0
- data/lib/twilio-ruby/rest/verify/v2/service/new_factor.rb +297 -0
- data/lib/twilio-ruby/rest/verify/v2/service.rb +38 -0
- data/lib/twilio-ruby/rest/verify/v2.rb +15 -0
- data/lib/twilio-ruby/rest/voice_base.rb +6 -1
- data/lib/twilio-ruby/twiml/voice_response.rb +20 -0
- data/lib/twilio-ruby/version.rb +1 -1
- data/twilio-ruby.gemspec +1 -1
- metadata +12 -4
@@ -39,7 +39,7 @@ module Twilio
|
|
39
39
|
# Lists YearlyInstance records from the API as a list.
|
40
40
|
# Unlike stream(), this operation is eager and will load `limit` records into
|
41
41
|
# memory before returning.
|
42
|
-
# @param [
|
42
|
+
# @param [String] category The [usage category](https://www.twilio.com/docs/usage/api/usage-record#usage-categories) of the UsageRecord resources to read. Only UsageRecord resources in the specified category are retrieved.
|
43
43
|
# @param [Date] start_date Only include usage that has occurred on or after this date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets from the current date, such as: `-30days`, which will set the start date to be 30 days before the current date.
|
44
44
|
# @param [Date] end_date Only include usage that occurred on or before this date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets from the current date, such as: `+30days`, which will set the end date to 30 days from the current date.
|
45
45
|
# @param [Boolean] include_subaccounts Whether to include usage from the master account and all its subaccounts. Can be: `true` (the default) to include usage from the master account and all subaccounts or `false` to retrieve usage from only the specified account.
|
@@ -65,7 +65,7 @@ module Twilio
|
|
65
65
|
# Streams Instance records from the API as an Enumerable.
|
66
66
|
# This operation lazily loads records as efficiently as possible until the limit
|
67
67
|
# is reached.
|
68
|
-
# @param [
|
68
|
+
# @param [String] category The [usage category](https://www.twilio.com/docs/usage/api/usage-record#usage-categories) of the UsageRecord resources to read. Only UsageRecord resources in the specified category are retrieved.
|
69
69
|
# @param [Date] start_date Only include usage that has occurred on or after this date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets from the current date, such as: `-30days`, which will set the start date to be 30 days before the current date.
|
70
70
|
# @param [Date] end_date Only include usage that occurred on or before this date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets from the current date, such as: `+30days`, which will set the end date to 30 days from the current date.
|
71
71
|
# @param [Boolean] include_subaccounts Whether to include usage from the master account and all its subaccounts. Can be: `true` (the default) to include usage from the master account and all subaccounts or `false` to retrieve usage from only the specified account.
|
@@ -106,7 +106,7 @@ module Twilio
|
|
106
106
|
##
|
107
107
|
# Retrieve a single page of YearlyInstance records from the API.
|
108
108
|
# Request is executed immediately.
|
109
|
-
# @param [
|
109
|
+
# @param [String] category The [usage category](https://www.twilio.com/docs/usage/api/usage-record#usage-categories) of the UsageRecord resources to read. Only UsageRecord resources in the specified category are retrieved.
|
110
110
|
# @param [Date] start_date Only include usage that has occurred on or after this date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets from the current date, such as: `-30days`, which will set the start date to be 30 days before the current date.
|
111
111
|
# @param [Date] end_date Only include usage that occurred on or before this date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets from the current date, such as: `+30days`, which will set the end date to 30 days from the current date.
|
112
112
|
# @param [Boolean] include_subaccounts Whether to include usage from the master account and all its subaccounts. Can be: `true` (the default) to include usage from the master account and all subaccounts or `false` to retrieve usage from only the specified account.
|
@@ -235,7 +235,7 @@ module Twilio
|
|
235
235
|
end
|
236
236
|
|
237
237
|
##
|
238
|
-
# @return [
|
238
|
+
# @return [String] The category of usage. For more information, see [Usage Categories](https://www.twilio.com/docs/usage/api/usage-record#usage-categories).
|
239
239
|
def category
|
240
240
|
@properties['category']
|
241
241
|
end
|
@@ -39,7 +39,7 @@ module Twilio
|
|
39
39
|
# Lists YesterdayInstance records from the API as a list.
|
40
40
|
# Unlike stream(), this operation is eager and will load `limit` records into
|
41
41
|
# memory before returning.
|
42
|
-
# @param [
|
42
|
+
# @param [String] category The [usage category](https://www.twilio.com/docs/usage/api/usage-record#usage-categories) of the UsageRecord resources to read. Only UsageRecord resources in the specified category are retrieved.
|
43
43
|
# @param [Date] start_date Only include usage that has occurred on or after this date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets from the current date, such as: `-30days`, which will set the start date to be 30 days before the current date.
|
44
44
|
# @param [Date] end_date Only include usage that occurred on or before this date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets from the current date, such as: `+30days`, which will set the end date to 30 days from the current date.
|
45
45
|
# @param [Boolean] include_subaccounts Whether to include usage from the master account and all its subaccounts. Can be: `true` (the default) to include usage from the master account and all subaccounts or `false` to retrieve usage from only the specified account.
|
@@ -65,7 +65,7 @@ module Twilio
|
|
65
65
|
# Streams Instance records from the API as an Enumerable.
|
66
66
|
# This operation lazily loads records as efficiently as possible until the limit
|
67
67
|
# is reached.
|
68
|
-
# @param [
|
68
|
+
# @param [String] category The [usage category](https://www.twilio.com/docs/usage/api/usage-record#usage-categories) of the UsageRecord resources to read. Only UsageRecord resources in the specified category are retrieved.
|
69
69
|
# @param [Date] start_date Only include usage that has occurred on or after this date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets from the current date, such as: `-30days`, which will set the start date to be 30 days before the current date.
|
70
70
|
# @param [Date] end_date Only include usage that occurred on or before this date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets from the current date, such as: `+30days`, which will set the end date to 30 days from the current date.
|
71
71
|
# @param [Boolean] include_subaccounts Whether to include usage from the master account and all its subaccounts. Can be: `true` (the default) to include usage from the master account and all subaccounts or `false` to retrieve usage from only the specified account.
|
@@ -106,7 +106,7 @@ module Twilio
|
|
106
106
|
##
|
107
107
|
# Retrieve a single page of YesterdayInstance records from the API.
|
108
108
|
# Request is executed immediately.
|
109
|
-
# @param [
|
109
|
+
# @param [String] category The [usage category](https://www.twilio.com/docs/usage/api/usage-record#usage-categories) of the UsageRecord resources to read. Only UsageRecord resources in the specified category are retrieved.
|
110
110
|
# @param [Date] start_date Only include usage that has occurred on or after this date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets from the current date, such as: `-30days`, which will set the start date to be 30 days before the current date.
|
111
111
|
# @param [Date] end_date Only include usage that occurred on or before this date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets from the current date, such as: `+30days`, which will set the end date to 30 days from the current date.
|
112
112
|
# @param [Boolean] include_subaccounts Whether to include usage from the master account and all its subaccounts. Can be: `true` (the default) to include usage from the master account and all subaccounts or `false` to retrieve usage from only the specified account.
|
@@ -235,7 +235,7 @@ module Twilio
|
|
235
235
|
end
|
236
236
|
|
237
237
|
##
|
238
|
-
# @return [
|
238
|
+
# @return [String] The category of usage. For more information, see [Usage Categories](https://www.twilio.com/docs/usage/api/usage-record#usage-categories).
|
239
239
|
def category
|
240
240
|
@properties['category']
|
241
241
|
end
|
@@ -46,7 +46,7 @@ module Twilio
|
|
46
46
|
# Lists RecordInstance records from the API as a list.
|
47
47
|
# Unlike stream(), this operation is eager and will load `limit` records into
|
48
48
|
# memory before returning.
|
49
|
-
# @param [
|
49
|
+
# @param [String] category The [usage category](https://www.twilio.com/docs/usage/api/usage-record#usage-categories) of the UsageRecord resources to read. Only UsageRecord resources in the specified category are retrieved.
|
50
50
|
# @param [Date] start_date Only include usage that has occurred on or after this date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets from the current date, such as: `-30days`, which will set the start date to be 30 days before the current date.
|
51
51
|
# @param [Date] end_date Only include usage that occurred on or before this date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets from the current date, such as: `+30days`, which will set the end date to 30 days from the current date.
|
52
52
|
# @param [Boolean] include_subaccounts Whether to include usage from the master account and all its subaccounts. Can be: `true` (the default) to include usage from the master account and all subaccounts or `false` to retrieve usage from only the specified account.
|
@@ -72,7 +72,7 @@ module Twilio
|
|
72
72
|
# Streams Instance records from the API as an Enumerable.
|
73
73
|
# This operation lazily loads records as efficiently as possible until the limit
|
74
74
|
# is reached.
|
75
|
-
# @param [
|
75
|
+
# @param [String] category The [usage category](https://www.twilio.com/docs/usage/api/usage-record#usage-categories) of the UsageRecord resources to read. Only UsageRecord resources in the specified category are retrieved.
|
76
76
|
# @param [Date] start_date Only include usage that has occurred on or after this date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets from the current date, such as: `-30days`, which will set the start date to be 30 days before the current date.
|
77
77
|
# @param [Date] end_date Only include usage that occurred on or before this date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets from the current date, such as: `+30days`, which will set the end date to 30 days from the current date.
|
78
78
|
# @param [Boolean] include_subaccounts Whether to include usage from the master account and all its subaccounts. Can be: `true` (the default) to include usage from the master account and all subaccounts or `false` to retrieve usage from only the specified account.
|
@@ -113,7 +113,7 @@ module Twilio
|
|
113
113
|
##
|
114
114
|
# Retrieve a single page of RecordInstance records from the API.
|
115
115
|
# Request is executed immediately.
|
116
|
-
# @param [
|
116
|
+
# @param [String] category The [usage category](https://www.twilio.com/docs/usage/api/usage-record#usage-categories) of the UsageRecord resources to read. Only UsageRecord resources in the specified category are retrieved.
|
117
117
|
# @param [Date] start_date Only include usage that has occurred on or after this date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets from the current date, such as: `-30days`, which will set the start date to be 30 days before the current date.
|
118
118
|
# @param [Date] end_date Only include usage that occurred on or before this date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets from the current date, such as: `+30days`, which will set the end date to 30 days from the current date.
|
119
119
|
# @param [Boolean] include_subaccounts Whether to include usage from the master account and all its subaccounts. Can be: `true` (the default) to include usage from the master account and all subaccounts or `false` to retrieve usage from only the specified account.
|
@@ -298,7 +298,7 @@ module Twilio
|
|
298
298
|
end
|
299
299
|
|
300
300
|
##
|
301
|
-
# @return [
|
301
|
+
# @return [String] The category of usage. For more information, see [Usage Categories](https://www.twilio.com/docs/usage/api/usage-record#usage-categories).
|
302
302
|
def category
|
303
303
|
@properties['category']
|
304
304
|
end
|
@@ -37,7 +37,7 @@ module Twilio
|
|
37
37
|
# Create the TriggerInstance
|
38
38
|
# @param [String] callback_url The URL we should call using `callback_method` when the trigger fires.
|
39
39
|
# @param [String] trigger_value The usage value at which the trigger should fire. For convenience, you can use an offset value such as `+30` to specify a trigger_value that is 30 units more than the current usage value. Be sure to urlencode a `+` as `%2B`.
|
40
|
-
# @param [
|
40
|
+
# @param [String] usage_category The usage category that the trigger should watch. Use one of the supported [usage categories](https://www.twilio.com/docs/usage/api/usage-record#usage-categories) for this value.
|
41
41
|
# @param [String] callback_method The HTTP method we should use to call `callback_url`. Can be: `GET` or `POST` and the default is `POST`.
|
42
42
|
# @param [String] friendly_name A descriptive string that you create to describe the resource. It can be up to 64 characters long.
|
43
43
|
# @param [Recurring] recurring
|
@@ -84,7 +84,7 @@ module Twilio
|
|
84
84
|
# memory before returning.
|
85
85
|
# @param [Recurring] recurring The frequency of recurring UsageTriggers to read. Can be: `daily`, `monthly`, or `yearly` to read recurring UsageTriggers. An empty value or a value of `alltime` reads non-recurring UsageTriggers.
|
86
86
|
# @param [TriggerField] trigger_by The trigger field of the UsageTriggers to read. Can be: `count`, `usage`, or `price` as described in the [UsageRecords documentation](https://www.twilio.com/docs/usage/api/usage-record#usage-count-price).
|
87
|
-
# @param [
|
87
|
+
# @param [String] usage_category The usage category of the UsageTriggers to read. Must be a supported [usage categories](https://www.twilio.com/docs/usage/api/usage-record#usage-categories).
|
88
88
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
89
89
|
# guarantees to never return more than limit. Default is no limit
|
90
90
|
# @param [Integer] page_size Number of records to fetch per request, when
|
@@ -108,7 +108,7 @@ module Twilio
|
|
108
108
|
# is reached.
|
109
109
|
# @param [Recurring] recurring The frequency of recurring UsageTriggers to read. Can be: `daily`, `monthly`, or `yearly` to read recurring UsageTriggers. An empty value or a value of `alltime` reads non-recurring UsageTriggers.
|
110
110
|
# @param [TriggerField] trigger_by The trigger field of the UsageTriggers to read. Can be: `count`, `usage`, or `price` as described in the [UsageRecords documentation](https://www.twilio.com/docs/usage/api/usage-record#usage-count-price).
|
111
|
-
# @param [
|
111
|
+
# @param [String] usage_category The usage category of the UsageTriggers to read. Must be a supported [usage categories](https://www.twilio.com/docs/usage/api/usage-record#usage-categories).
|
112
112
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
113
113
|
# guarantees to never return more than limit. Default is no limit
|
114
114
|
# @param [Integer] page_size Number of records to fetch per request, when
|
@@ -147,7 +147,7 @@ module Twilio
|
|
147
147
|
# Request is executed immediately.
|
148
148
|
# @param [Recurring] recurring The frequency of recurring UsageTriggers to read. Can be: `daily`, `monthly`, or `yearly` to read recurring UsageTriggers. An empty value or a value of `alltime` reads non-recurring UsageTriggers.
|
149
149
|
# @param [TriggerField] trigger_by The trigger field of the UsageTriggers to read. Can be: `count`, `usage`, or `price` as described in the [UsageRecords documentation](https://www.twilio.com/docs/usage/api/usage-record#usage-count-price).
|
150
|
-
# @param [
|
150
|
+
# @param [String] usage_category The usage category of the UsageTriggers to read. Must be a supported [usage categories](https://www.twilio.com/docs/usage/api/usage-record#usage-categories).
|
151
151
|
# @param [String] page_token PageToken provided by the API
|
152
152
|
# @param [Integer] page_number Page Number, this value is simply for client state
|
153
153
|
# @param [Integer] page_size Number of records to return, defaults to 50
|
@@ -451,7 +451,7 @@ module Twilio
|
|
451
451
|
end
|
452
452
|
|
453
453
|
##
|
454
|
-
# @return [
|
454
|
+
# @return [String] The usage category the trigger watches. Must be one of the supported [usage categories](https://www.twilio.com/docs/usage/api/usage-record#usage-categories).
|
455
455
|
def usage_category
|
456
456
|
@properties['usage_category']
|
457
457
|
end
|
@@ -70,7 +70,8 @@ module Twilio
|
|
70
70
|
# @param [phone]: [String]
|
71
71
|
# @param [id]: [String]
|
72
72
|
# @param [code]: [String]
|
73
|
-
|
73
|
+
# @param [webview_size]: [WebviewSizeType]
|
74
|
+
attr_accessor :type, :title, :url, :phone, :id, :code, :webview_size
|
74
75
|
def initialize(payload)
|
75
76
|
@type = payload["type"]
|
76
77
|
@title = payload["title"]
|
@@ -78,6 +79,7 @@ module Twilio
|
|
78
79
|
@phone = payload["phone"]
|
79
80
|
@id = payload["id"]
|
80
81
|
@code = payload["code"]
|
82
|
+
@webview_size = payload["webview_size"]
|
81
83
|
end
|
82
84
|
def to_json(options = {})
|
83
85
|
{
|
@@ -87,6 +89,7 @@ module Twilio
|
|
87
89
|
"phone": @phone,
|
88
90
|
"id": @id,
|
89
91
|
"code": @code,
|
92
|
+
"webview_size": @webview_size,
|
90
93
|
}.to_json(options)
|
91
94
|
end
|
92
95
|
end
|
@@ -499,7 +502,8 @@ module Twilio
|
|
499
502
|
# @param [twilio_schedule]: [ContentList.TwilioSchedule]
|
500
503
|
# @param [whatsapp_card]: [ContentList.WhatsappCard]
|
501
504
|
# @param [whatsapp_authentication]: [ContentList.WhatsappAuthentication]
|
502
|
-
|
505
|
+
# @param [whatsapp_flows]: [ContentList.WhatsappFlows]
|
506
|
+
attr_accessor :twilio_text, :twilio_media, :twilio_location, :twilio_list_picker, :twilio_call_to_action, :twilio_quick_reply, :twilio_card, :twilio_catalog, :twilio_carousel, :twilio_flows, :twilio_schedule, :whatsapp_card, :whatsapp_authentication, :whatsapp_flows
|
503
507
|
def initialize(payload)
|
504
508
|
@twilio_text = payload["twilio_text"]
|
505
509
|
@twilio_media = payload["twilio_media"]
|
@@ -514,6 +518,7 @@ module Twilio
|
|
514
518
|
@twilio_schedule = payload["twilio_schedule"]
|
515
519
|
@whatsapp_card = payload["whatsapp_card"]
|
516
520
|
@whatsapp_authentication = payload["whatsapp_authentication"]
|
521
|
+
@whatsapp_flows = payload["whatsapp_flows"]
|
517
522
|
end
|
518
523
|
def to_json(options = {})
|
519
524
|
{
|
@@ -530,6 +535,7 @@ module Twilio
|
|
530
535
|
"twilio/schedule": @twilio_schedule,
|
531
536
|
"whatsapp/card": @whatsapp_card,
|
532
537
|
"whatsapp/authentication": @whatsapp_authentication,
|
538
|
+
"whatsapp/flows": @whatsapp_flows,
|
533
539
|
}.to_json(options)
|
534
540
|
end
|
535
541
|
end
|
@@ -578,6 +584,40 @@ module Twilio
|
|
578
584
|
end
|
579
585
|
end
|
580
586
|
|
587
|
+
class WhatsappFlows
|
588
|
+
# @param [body]: [String]
|
589
|
+
# @param [button_text]: [String]
|
590
|
+
# @param [subtitle]: [String]
|
591
|
+
# @param [media_url]: [String]
|
592
|
+
# @param [flow_id]: [String]
|
593
|
+
# @param [flow_token]: [String]
|
594
|
+
# @param [flow_first_page_id]: [String]
|
595
|
+
# @param [is_flow_first_page_endpoint]: [Boolean]
|
596
|
+
attr_accessor :body, :button_text, :subtitle, :media_url, :flow_id, :flow_token, :flow_first_page_id, :is_flow_first_page_endpoint
|
597
|
+
def initialize(payload)
|
598
|
+
@body = payload["body"]
|
599
|
+
@button_text = payload["button_text"]
|
600
|
+
@subtitle = payload["subtitle"]
|
601
|
+
@media_url = payload["media_url"]
|
602
|
+
@flow_id = payload["flow_id"]
|
603
|
+
@flow_token = payload["flow_token"]
|
604
|
+
@flow_first_page_id = payload["flow_first_page_id"]
|
605
|
+
@is_flow_first_page_endpoint = payload["is_flow_first_page_endpoint"]
|
606
|
+
end
|
607
|
+
def to_json(options = {})
|
608
|
+
{
|
609
|
+
"body": @body,
|
610
|
+
"button_text": @button_text,
|
611
|
+
"subtitle": @subtitle,
|
612
|
+
"media_url": @media_url,
|
613
|
+
"flow_id": @flow_id,
|
614
|
+
"flow_token": @flow_token,
|
615
|
+
"flow_first_page_id": @flow_first_page_id,
|
616
|
+
"is_flow_first_page_endpoint": @is_flow_first_page_endpoint,
|
617
|
+
}.to_json(options)
|
618
|
+
end
|
619
|
+
end
|
620
|
+
|
581
621
|
|
582
622
|
##
|
583
623
|
# Initialize the ContentList
|
@@ -41,6 +41,7 @@ module Twilio
|
|
41
41
|
# @param [Boolean] media_redaction Instructs the Speech Recognition service to automatically redact PII from all transcripts media made on this service. The auto_redaction flag must be enabled, results in error otherwise.
|
42
42
|
# @param [String] webhook_url The URL Twilio will request when executing the Webhook.
|
43
43
|
# @param [HttpMethod] webhook_http_method
|
44
|
+
# @param [String] encryption_credential_sid The unique SID identifier of the Public Key resource used to encrypt the sentences and operator results.
|
44
45
|
# @return [ServiceInstance] Created ServiceInstance
|
45
46
|
def create(
|
46
47
|
unique_name: nil,
|
@@ -51,7 +52,8 @@ module Twilio
|
|
51
52
|
auto_redaction: :unset,
|
52
53
|
media_redaction: :unset,
|
53
54
|
webhook_url: :unset,
|
54
|
-
webhook_http_method: :unset
|
55
|
+
webhook_http_method: :unset,
|
56
|
+
encryption_credential_sid: :unset
|
55
57
|
)
|
56
58
|
|
57
59
|
data = Twilio::Values.of({
|
@@ -64,6 +66,7 @@ module Twilio
|
|
64
66
|
'MediaRedaction' => media_redaction,
|
65
67
|
'WebhookUrl' => webhook_url,
|
66
68
|
'WebhookHttpMethod' => webhook_http_method,
|
69
|
+
'EncryptionCredentialSid' => encryption_credential_sid,
|
67
70
|
})
|
68
71
|
|
69
72
|
headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
|
@@ -232,6 +235,7 @@ module Twilio
|
|
232
235
|
# @param [Boolean] media_redaction Instructs the Speech Recognition service to automatically redact PII from all transcripts media made on this service. The auto_redaction flag must be enabled, results in error otherwise.
|
233
236
|
# @param [String] webhook_url The URL Twilio will request when executing the Webhook.
|
234
237
|
# @param [HttpMethod] webhook_http_method
|
238
|
+
# @param [String] encryption_credential_sid The unique SID identifier of the Public Key resource used to encrypt the sentences and operator results.
|
235
239
|
# @param [String] if_match The If-Match HTTP request header
|
236
240
|
# @return [ServiceInstance] Updated ServiceInstance
|
237
241
|
def update(
|
@@ -243,6 +247,7 @@ module Twilio
|
|
243
247
|
media_redaction: :unset,
|
244
248
|
webhook_url: :unset,
|
245
249
|
webhook_http_method: :unset,
|
250
|
+
encryption_credential_sid: :unset,
|
246
251
|
if_match: :unset
|
247
252
|
)
|
248
253
|
|
@@ -255,6 +260,7 @@ module Twilio
|
|
255
260
|
'MediaRedaction' => media_redaction,
|
256
261
|
'WebhookUrl' => webhook_url,
|
257
262
|
'WebhookHttpMethod' => webhook_http_method,
|
263
|
+
'EncryptionCredentialSid' => encryption_credential_sid,
|
258
264
|
})
|
259
265
|
|
260
266
|
headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', 'If-Match' => if_match, })
|
@@ -346,6 +352,7 @@ module Twilio
|
|
346
352
|
'webhook_http_method' => payload['webhook_http_method'],
|
347
353
|
'read_only_attached_operator_sids' => payload['read_only_attached_operator_sids'],
|
348
354
|
'version' => payload['version'] == nil ? payload['version'] : payload['version'].to_i,
|
355
|
+
'encryption_credential_sid' => payload['encryption_credential_sid'],
|
349
356
|
}
|
350
357
|
|
351
358
|
# Context
|
@@ -460,6 +467,12 @@ module Twilio
|
|
460
467
|
@properties['version']
|
461
468
|
end
|
462
469
|
|
470
|
+
##
|
471
|
+
# @return [String] The unique SID identifier of the Public Key resource used to encrypt the sentences and operator results.
|
472
|
+
def encryption_credential_sid
|
473
|
+
@properties['encryption_credential_sid']
|
474
|
+
end
|
475
|
+
|
463
476
|
##
|
464
477
|
# Delete the ServiceInstance
|
465
478
|
# @return [Boolean] True if delete succeeds, false otherwise
|
@@ -486,6 +499,7 @@ module Twilio
|
|
486
499
|
# @param [Boolean] media_redaction Instructs the Speech Recognition service to automatically redact PII from all transcripts media made on this service. The auto_redaction flag must be enabled, results in error otherwise.
|
487
500
|
# @param [String] webhook_url The URL Twilio will request when executing the Webhook.
|
488
501
|
# @param [HttpMethod] webhook_http_method
|
502
|
+
# @param [String] encryption_credential_sid The unique SID identifier of the Public Key resource used to encrypt the sentences and operator results.
|
489
503
|
# @param [String] if_match The If-Match HTTP request header
|
490
504
|
# @return [ServiceInstance] Updated ServiceInstance
|
491
505
|
def update(
|
@@ -497,6 +511,7 @@ module Twilio
|
|
497
511
|
media_redaction: :unset,
|
498
512
|
webhook_url: :unset,
|
499
513
|
webhook_http_method: :unset,
|
514
|
+
encryption_credential_sid: :unset,
|
500
515
|
if_match: :unset
|
501
516
|
)
|
502
517
|
|
@@ -509,6 +524,7 @@ module Twilio
|
|
509
524
|
media_redaction: media_redaction,
|
510
525
|
webhook_url: webhook_url,
|
511
526
|
webhook_http_method: webhook_http_method,
|
527
|
+
encryption_credential_sid: encryption_credential_sid,
|
512
528
|
if_match: if_match,
|
513
529
|
)
|
514
530
|
end
|
@@ -0,0 +1,217 @@
|
|
1
|
+
##
|
2
|
+
# This code was generated by
|
3
|
+
# ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
|
4
|
+
# | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
|
5
|
+
# | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
|
6
|
+
#
|
7
|
+
# Twilio - Intelligence
|
8
|
+
# This is the public Twilio REST API.
|
9
|
+
#
|
10
|
+
# NOTE: This class is auto generated by OpenAPI Generator.
|
11
|
+
# https://openapi-generator.tech
|
12
|
+
# Do not edit the class manually.
|
13
|
+
#
|
14
|
+
|
15
|
+
|
16
|
+
module Twilio
|
17
|
+
module REST
|
18
|
+
class Intelligence < IntelligenceBase
|
19
|
+
class V2 < Version
|
20
|
+
class TranscriptContext < InstanceContext
|
21
|
+
|
22
|
+
class EncryptedOperatorResultsList < ListResource
|
23
|
+
|
24
|
+
##
|
25
|
+
# Initialize the EncryptedOperatorResultsList
|
26
|
+
# @param [Version] version Version that contains the resource
|
27
|
+
# @return [EncryptedOperatorResultsList] EncryptedOperatorResultsList
|
28
|
+
def initialize(version, transcript_sid: nil)
|
29
|
+
super(version)
|
30
|
+
# Path Solution
|
31
|
+
@solution = { transcript_sid: transcript_sid }
|
32
|
+
|
33
|
+
|
34
|
+
end
|
35
|
+
|
36
|
+
|
37
|
+
|
38
|
+
# Provide a user friendly representation
|
39
|
+
def to_s
|
40
|
+
'#<Twilio.Intelligence.V2.EncryptedOperatorResultsList>'
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
44
|
+
|
45
|
+
class EncryptedOperatorResultsContext < InstanceContext
|
46
|
+
##
|
47
|
+
# Initialize the EncryptedOperatorResultsContext
|
48
|
+
# @param [Version] version Version that contains the resource
|
49
|
+
# @param [String] transcript_sid The unique SID identifier of the Transcript.
|
50
|
+
# @return [EncryptedOperatorResultsContext] EncryptedOperatorResultsContext
|
51
|
+
def initialize(version, transcript_sid)
|
52
|
+
super(version)
|
53
|
+
|
54
|
+
# Path Solution
|
55
|
+
@solution = { transcript_sid: transcript_sid, }
|
56
|
+
@uri = "/Transcripts/#{@solution[:transcript_sid]}/OperatorResults/Encrypted"
|
57
|
+
|
58
|
+
|
59
|
+
end
|
60
|
+
##
|
61
|
+
# Fetch the EncryptedOperatorResultsInstance
|
62
|
+
# @param [Boolean] redacted Grant access to PII Redacted/Unredacted Operator Results. If redaction is enabled, the default is `true` to access redacted operator results.
|
63
|
+
# @return [EncryptedOperatorResultsInstance] Fetched EncryptedOperatorResultsInstance
|
64
|
+
def fetch(
|
65
|
+
redacted: :unset
|
66
|
+
)
|
67
|
+
|
68
|
+
params = Twilio::Values.of({
|
69
|
+
'Redacted' => redacted,
|
70
|
+
})
|
71
|
+
headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
|
72
|
+
|
73
|
+
|
74
|
+
|
75
|
+
|
76
|
+
|
77
|
+
payload = @version.fetch('GET', @uri, params: params, headers: headers)
|
78
|
+
EncryptedOperatorResultsInstance.new(
|
79
|
+
@version,
|
80
|
+
payload,
|
81
|
+
transcript_sid: @solution[:transcript_sid],
|
82
|
+
)
|
83
|
+
end
|
84
|
+
|
85
|
+
|
86
|
+
##
|
87
|
+
# Provide a user friendly representation
|
88
|
+
def to_s
|
89
|
+
context = @solution.map{|k, v| "#{k}: #{v}"}.join(',')
|
90
|
+
"#<Twilio.Intelligence.V2.EncryptedOperatorResultsContext #{context}>"
|
91
|
+
end
|
92
|
+
|
93
|
+
##
|
94
|
+
# Provide a detailed, user friendly representation
|
95
|
+
def inspect
|
96
|
+
context = @solution.map{|k, v| "#{k}: #{v}"}.join(',')
|
97
|
+
"#<Twilio.Intelligence.V2.EncryptedOperatorResultsContext #{context}>"
|
98
|
+
end
|
99
|
+
end
|
100
|
+
|
101
|
+
class EncryptedOperatorResultsPage < Page
|
102
|
+
##
|
103
|
+
# Initialize the EncryptedOperatorResultsPage
|
104
|
+
# @param [Version] version Version that contains the resource
|
105
|
+
# @param [Response] response Response from the API
|
106
|
+
# @param [Hash] solution Path solution for the resource
|
107
|
+
# @return [EncryptedOperatorResultsPage] EncryptedOperatorResultsPage
|
108
|
+
def initialize(version, response, solution)
|
109
|
+
super(version, response)
|
110
|
+
|
111
|
+
# Path Solution
|
112
|
+
@solution = solution
|
113
|
+
end
|
114
|
+
|
115
|
+
##
|
116
|
+
# Build an instance of EncryptedOperatorResultsInstance
|
117
|
+
# @param [Hash] payload Payload response from the API
|
118
|
+
# @return [EncryptedOperatorResultsInstance] EncryptedOperatorResultsInstance
|
119
|
+
def get_instance(payload)
|
120
|
+
EncryptedOperatorResultsInstance.new(@version, payload, transcript_sid: @solution[:transcript_sid])
|
121
|
+
end
|
122
|
+
|
123
|
+
##
|
124
|
+
# Provide a user friendly representation
|
125
|
+
def to_s
|
126
|
+
'<Twilio.Intelligence.V2.EncryptedOperatorResultsPage>'
|
127
|
+
end
|
128
|
+
end
|
129
|
+
class EncryptedOperatorResultsInstance < InstanceResource
|
130
|
+
##
|
131
|
+
# Initialize the EncryptedOperatorResultsInstance
|
132
|
+
# @param [Version] version Version that contains the resource
|
133
|
+
# @param [Hash] payload payload that contains response from Twilio
|
134
|
+
# @param [String] account_sid The SID of the
|
135
|
+
# {Account}[https://www.twilio.com/docs/iam/api/account] that created this EncryptedOperatorResults
|
136
|
+
# resource.
|
137
|
+
# @param [String] sid The SID of the Call resource to fetch.
|
138
|
+
# @return [EncryptedOperatorResultsInstance] EncryptedOperatorResultsInstance
|
139
|
+
def initialize(version, payload , transcript_sid: nil)
|
140
|
+
super(version)
|
141
|
+
|
142
|
+
# Marshaled Properties
|
143
|
+
@properties = {
|
144
|
+
'locations' => payload['locations'],
|
145
|
+
'transcript_sid' => payload['transcript_sid'],
|
146
|
+
'url' => payload['url'],
|
147
|
+
}
|
148
|
+
|
149
|
+
# Context
|
150
|
+
@instance_context = nil
|
151
|
+
@params = { 'transcript_sid' => transcript_sid || @properties['transcript_sid'] , }
|
152
|
+
end
|
153
|
+
|
154
|
+
##
|
155
|
+
# Generate an instance context for the instance, the context is capable of
|
156
|
+
# performing various actions. All instance actions are proxied to the context
|
157
|
+
# @return [EncryptedOperatorResultsContext] CallContext for this CallInstance
|
158
|
+
def context
|
159
|
+
unless @instance_context
|
160
|
+
@instance_context = EncryptedOperatorResultsContext.new(@version , @params['transcript_sid'])
|
161
|
+
end
|
162
|
+
@instance_context
|
163
|
+
end
|
164
|
+
|
165
|
+
##
|
166
|
+
# @return [Array<String>] The locations of the encrypted operator results.
|
167
|
+
def locations
|
168
|
+
@properties['locations']
|
169
|
+
end
|
170
|
+
|
171
|
+
##
|
172
|
+
# @return [String]
|
173
|
+
def transcript_sid
|
174
|
+
@properties['transcript_sid']
|
175
|
+
end
|
176
|
+
|
177
|
+
##
|
178
|
+
# @return [String]
|
179
|
+
def url
|
180
|
+
@properties['url']
|
181
|
+
end
|
182
|
+
|
183
|
+
##
|
184
|
+
# Fetch the EncryptedOperatorResultsInstance
|
185
|
+
# @param [Boolean] redacted Grant access to PII Redacted/Unredacted Operator Results. If redaction is enabled, the default is `true` to access redacted operator results.
|
186
|
+
# @return [EncryptedOperatorResultsInstance] Fetched EncryptedOperatorResultsInstance
|
187
|
+
def fetch(
|
188
|
+
redacted: :unset
|
189
|
+
)
|
190
|
+
|
191
|
+
context.fetch(
|
192
|
+
redacted: redacted,
|
193
|
+
)
|
194
|
+
end
|
195
|
+
|
196
|
+
##
|
197
|
+
# Provide a user friendly representation
|
198
|
+
def to_s
|
199
|
+
values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
|
200
|
+
"<Twilio.Intelligence.V2.EncryptedOperatorResultsInstance #{values}>"
|
201
|
+
end
|
202
|
+
|
203
|
+
##
|
204
|
+
# Provide a detailed, user friendly representation
|
205
|
+
def inspect
|
206
|
+
values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
|
207
|
+
"<Twilio.Intelligence.V2.EncryptedOperatorResultsInstance #{values}>"
|
208
|
+
end
|
209
|
+
end
|
210
|
+
|
211
|
+
end
|
212
|
+
end
|
213
|
+
end
|
214
|
+
end
|
215
|
+
end
|
216
|
+
|
217
|
+
|