twilio-ruby 7.0.1 → 7.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGES.md +55 -0
- data/Gemfile +1 -0
- data/README.md +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/call/stream.rb +6 -6
- data/lib/twilio-ruby/rest/api/v2010/account/message.rb +1 -1
- data/lib/twilio-ruby/rest/client.rb +0 -5
- data/lib/twilio-ruby/rest/content/v2/content.rb +259 -0
- data/lib/twilio-ruby/rest/content/v2/content_and_approvals.rb +252 -0
- data/lib/twilio-ruby/rest/content/v2.rb +46 -0
- data/lib/twilio-ruby/rest/content_base.rb +6 -1
- data/lib/twilio-ruby/rest/flex_api/v1/interaction.rb +1 -1
- data/lib/twilio-ruby/rest/flex_api/v1/plugin/plugin_versions.rb +8 -1
- data/lib/twilio-ruby/rest/flex_api/v2/flex_user.rb +289 -0
- data/lib/twilio-ruby/rest/flex_api/v2/web_channels.rb +5 -2
- data/lib/twilio-ruby/rest/flex_api/v2.rb +37 -0
- data/lib/twilio-ruby/rest/intelligence/v2/custom_operator.rb +444 -0
- data/lib/twilio-ruby/rest/intelligence/v2/operator.rb +355 -0
- data/lib/twilio-ruby/rest/intelligence/v2/operator_attachment.rb +215 -0
- data/lib/twilio-ruby/rest/intelligence/v2/operator_attachments.rb +196 -0
- data/lib/twilio-ruby/rest/intelligence/v2/operator_type.rb +357 -0
- data/lib/twilio-ruby/rest/intelligence/v2/prebuilt_operator.rb +355 -0
- data/lib/twilio-ruby/rest/intelligence/v2/service.rb +9 -8
- data/lib/twilio-ruby/rest/intelligence/v2/transcript.rb +18 -18
- data/lib/twilio-ruby/rest/intelligence/v2.rb +112 -0
- data/lib/twilio-ruby/rest/messaging/v1/service.rb +0 -7
- data/lib/twilio-ruby/rest/numbers/v1/porting_port_in.rb +154 -4
- data/lib/twilio-ruby/rest/numbers/v1/porting_port_in_phone_number.rb +292 -0
- data/lib/twilio-ruby/rest/numbers/v1/porting_webhook_configuration.rb +148 -0
- data/lib/twilio-ruby/rest/numbers/v1/porting_webhook_configuration_delete.rb +167 -0
- data/lib/twilio-ruby/rest/numbers/v1/porting_webhook_configuration_fetch.rb +160 -0
- data/lib/twilio-ruby/rest/numbers/v1.rb +63 -20
- data/lib/twilio-ruby/rest/preview/sync/service/document.rb +1 -1
- data/lib/twilio-ruby/rest/preview/sync/service/sync_list.rb +2 -2
- data/lib/twilio-ruby/rest/preview/sync/service/sync_map.rb +2 -2
- data/lib/twilio-ruby/rest/preview/sync/service.rb +2 -2
- data/lib/twilio-ruby/rest/sync/v1/service/document.rb +1 -1
- data/lib/twilio-ruby/rest/sync/v1/service/sync_list.rb +2 -2
- data/lib/twilio-ruby/rest/sync/v1/service/sync_map.rb +2 -2
- data/lib/twilio-ruby/rest/sync/v1/service/sync_stream.rb +1 -1
- data/lib/twilio-ruby/rest/sync/v1/service.rb +3 -3
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task.rb +33 -4
- data/lib/twilio-ruby/rest/trusthub/v1/compliance_tollfree_inquiries.rb +4 -1
- data/lib/twilio-ruby/rest/trusthub/v1/customer_profiles.rb +7 -0
- data/lib/twilio-ruby/rest/trusthub/v1/trust_products.rb +7 -0
- data/lib/twilio-ruby/rest/verify/v2/service/verification.rb +1 -1
- data/lib/twilio-ruby/rest/verify/v2/service/verification_check.rb +1 -1
- data/lib/twilio-ruby/rest/verify/v2/service.rb +1 -1
- data/lib/twilio-ruby/version.rb +1 -1
- metadata +16 -9
- data/lib/twilio-ruby/rest/numbers/v1/porting_bulk_portability.rb +0 -230
- data/lib/twilio-ruby/rest/numbers/v1/porting_port_in_fetch.rb +0 -252
- data/lib/twilio-ruby/rest/preview_messaging/v1/broadcast.rb +0 -164
- data/lib/twilio-ruby/rest/preview_messaging/v1/message.rb +0 -235
- data/lib/twilio-ruby/rest/preview_messaging/v1.rb +0 -46
- data/lib/twilio-ruby/rest/preview_messaging.rb +0 -12
- data/lib/twilio-ruby/rest/preview_messaging_base.rb +0 -38
@@ -40,6 +40,9 @@ module Twilio
|
|
40
40
|
# @param [String] workflow_sid The SID of the Workflow that you would like to handle routing for the new Task. If there is only one Workflow defined for the Workspace that you are posting the new task to, this parameter is optional.
|
41
41
|
# @param [String] attributes A URL-encoded JSON string with the attributes of the new task. This value is passed to the Workflow's `assignment_callback_url` when the Task is assigned to a Worker. For example: `{ \\\"task_type\\\": \\\"call\\\", \\\"twilio_call_sid\\\": \\\"CAxxx\\\", \\\"customer_ticket_number\\\": \\\"12345\\\" }`.
|
42
42
|
# @param [Time] virtual_start_time The virtual start time to assign the new task and override the default. When supplied, the new task will have this virtual start time. When not supplied, the new task will have the virtual start time equal to `date_created`. Value can't be in the future.
|
43
|
+
# @param [String] routing_target A SID of a Worker, Queue, or Workflow to route a Task to
|
44
|
+
# @param [String] ignore_capacity A boolean indicating if a new task should respect a worker's capacity during assignment
|
45
|
+
# @param [String] task_queue_sid The SID of the TaskQueue in which the Task belongs
|
43
46
|
# @return [TaskInstance] Created TaskInstance
|
44
47
|
def create(
|
45
48
|
timeout: :unset,
|
@@ -47,7 +50,10 @@ module Twilio
|
|
47
50
|
task_channel: :unset,
|
48
51
|
workflow_sid: :unset,
|
49
52
|
attributes: :unset,
|
50
|
-
virtual_start_time: :unset
|
53
|
+
virtual_start_time: :unset,
|
54
|
+
routing_target: :unset,
|
55
|
+
ignore_capacity: :unset,
|
56
|
+
task_queue_sid: :unset
|
51
57
|
)
|
52
58
|
|
53
59
|
data = Twilio::Values.of({
|
@@ -57,6 +63,9 @@ module Twilio
|
|
57
63
|
'WorkflowSid' => workflow_sid,
|
58
64
|
'Attributes' => attributes,
|
59
65
|
'VirtualStartTime' => Twilio.serialize_iso8601_datetime(virtual_start_time),
|
66
|
+
'RoutingTarget' => routing_target,
|
67
|
+
'IgnoreCapacity' => ignore_capacity,
|
68
|
+
'TaskQueueSid' => task_queue_sid,
|
60
69
|
})
|
61
70
|
|
62
71
|
|
@@ -80,6 +89,7 @@ module Twilio
|
|
80
89
|
# @param [String] task_queue_sid The SID of the TaskQueue with the Tasks to read. Returns the Tasks waiting in the TaskQueue identified by this SID.
|
81
90
|
# @param [String] task_queue_name The `friendly_name` of the TaskQueue with the Tasks to read. Returns the Tasks waiting in the TaskQueue identified by this friendly name.
|
82
91
|
# @param [String] evaluate_task_attributes The attributes of the Tasks to read. Returns the Tasks that match the attributes specified in this parameter.
|
92
|
+
# @param [String] routing_target A SID of a Worker, Queue, or Workflow to route a Task to
|
83
93
|
# @param [String] ordering How to order the returned Task resources. By default, Tasks are sorted by ascending DateCreated. This value is specified as: `Attribute:Order`, where `Attribute` can be either `DateCreated`, `Priority`, or `VirtualStartTime` and `Order` can be either `asc` or `desc`. For example, `Priority:desc` returns Tasks ordered in descending order of their Priority. Pairings of sort orders can be specified in a comma-separated list such as `Priority:desc,DateCreated:asc`, which returns the Tasks in descending Priority order and ascending DateCreated Order. The only ordering pairing not allowed is DateCreated and VirtualStartTime.
|
84
94
|
# @param [Boolean] has_addons Whether to read Tasks with Add-ons. If `true`, returns only Tasks with Add-ons. If `false`, returns only Tasks without Add-ons.
|
85
95
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
@@ -89,7 +99,7 @@ module Twilio
|
|
89
99
|
# but a limit is defined, stream() will attempt to read the limit with the most
|
90
100
|
# efficient page size, i.e. min(limit, 1000)
|
91
101
|
# @return [Array] Array of up to limit results
|
92
|
-
def list(priority: :unset, assignment_status: :unset, workflow_sid: :unset, workflow_name: :unset, task_queue_sid: :unset, task_queue_name: :unset, evaluate_task_attributes: :unset, ordering: :unset, has_addons: :unset, limit: nil, page_size: nil)
|
102
|
+
def list(priority: :unset, assignment_status: :unset, workflow_sid: :unset, workflow_name: :unset, task_queue_sid: :unset, task_queue_name: :unset, evaluate_task_attributes: :unset, routing_target: :unset, ordering: :unset, has_addons: :unset, limit: nil, page_size: nil)
|
93
103
|
self.stream(
|
94
104
|
priority: priority,
|
95
105
|
assignment_status: assignment_status,
|
@@ -98,6 +108,7 @@ module Twilio
|
|
98
108
|
task_queue_sid: task_queue_sid,
|
99
109
|
task_queue_name: task_queue_name,
|
100
110
|
evaluate_task_attributes: evaluate_task_attributes,
|
111
|
+
routing_target: routing_target,
|
101
112
|
ordering: ordering,
|
102
113
|
has_addons: has_addons,
|
103
114
|
limit: limit,
|
@@ -116,6 +127,7 @@ module Twilio
|
|
116
127
|
# @param [String] task_queue_sid The SID of the TaskQueue with the Tasks to read. Returns the Tasks waiting in the TaskQueue identified by this SID.
|
117
128
|
# @param [String] task_queue_name The `friendly_name` of the TaskQueue with the Tasks to read. Returns the Tasks waiting in the TaskQueue identified by this friendly name.
|
118
129
|
# @param [String] evaluate_task_attributes The attributes of the Tasks to read. Returns the Tasks that match the attributes specified in this parameter.
|
130
|
+
# @param [String] routing_target A SID of a Worker, Queue, or Workflow to route a Task to
|
119
131
|
# @param [String] ordering How to order the returned Task resources. By default, Tasks are sorted by ascending DateCreated. This value is specified as: `Attribute:Order`, where `Attribute` can be either `DateCreated`, `Priority`, or `VirtualStartTime` and `Order` can be either `asc` or `desc`. For example, `Priority:desc` returns Tasks ordered in descending order of their Priority. Pairings of sort orders can be specified in a comma-separated list such as `Priority:desc,DateCreated:asc`, which returns the Tasks in descending Priority order and ascending DateCreated Order. The only ordering pairing not allowed is DateCreated and VirtualStartTime.
|
120
132
|
# @param [Boolean] has_addons Whether to read Tasks with Add-ons. If `true`, returns only Tasks with Add-ons. If `false`, returns only Tasks without Add-ons.
|
121
133
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
@@ -125,7 +137,7 @@ module Twilio
|
|
125
137
|
# but a limit is defined, stream() will attempt to read the limit with the most
|
126
138
|
# efficient page size, i.e. min(limit, 1000)
|
127
139
|
# @return [Enumerable] Enumerable that will yield up to limit results
|
128
|
-
def stream(priority: :unset, assignment_status: :unset, workflow_sid: :unset, workflow_name: :unset, task_queue_sid: :unset, task_queue_name: :unset, evaluate_task_attributes: :unset, ordering: :unset, has_addons: :unset, limit: nil, page_size: nil)
|
140
|
+
def stream(priority: :unset, assignment_status: :unset, workflow_sid: :unset, workflow_name: :unset, task_queue_sid: :unset, task_queue_name: :unset, evaluate_task_attributes: :unset, routing_target: :unset, ordering: :unset, has_addons: :unset, limit: nil, page_size: nil)
|
129
141
|
limits = @version.read_limits(limit, page_size)
|
130
142
|
|
131
143
|
page = self.page(
|
@@ -136,6 +148,7 @@ module Twilio
|
|
136
148
|
task_queue_sid: task_queue_sid,
|
137
149
|
task_queue_name: task_queue_name,
|
138
150
|
evaluate_task_attributes: evaluate_task_attributes,
|
151
|
+
routing_target: routing_target,
|
139
152
|
ordering: ordering,
|
140
153
|
has_addons: has_addons,
|
141
154
|
page_size: limits[:page_size], )
|
@@ -167,13 +180,14 @@ module Twilio
|
|
167
180
|
# @param [String] task_queue_sid The SID of the TaskQueue with the Tasks to read. Returns the Tasks waiting in the TaskQueue identified by this SID.
|
168
181
|
# @param [String] task_queue_name The `friendly_name` of the TaskQueue with the Tasks to read. Returns the Tasks waiting in the TaskQueue identified by this friendly name.
|
169
182
|
# @param [String] evaluate_task_attributes The attributes of the Tasks to read. Returns the Tasks that match the attributes specified in this parameter.
|
183
|
+
# @param [String] routing_target A SID of a Worker, Queue, or Workflow to route a Task to
|
170
184
|
# @param [String] ordering How to order the returned Task resources. By default, Tasks are sorted by ascending DateCreated. This value is specified as: `Attribute:Order`, where `Attribute` can be either `DateCreated`, `Priority`, or `VirtualStartTime` and `Order` can be either `asc` or `desc`. For example, `Priority:desc` returns Tasks ordered in descending order of their Priority. Pairings of sort orders can be specified in a comma-separated list such as `Priority:desc,DateCreated:asc`, which returns the Tasks in descending Priority order and ascending DateCreated Order. The only ordering pairing not allowed is DateCreated and VirtualStartTime.
|
171
185
|
# @param [Boolean] has_addons Whether to read Tasks with Add-ons. If `true`, returns only Tasks with Add-ons. If `false`, returns only Tasks without Add-ons.
|
172
186
|
# @param [String] page_token PageToken provided by the API
|
173
187
|
# @param [Integer] page_number Page Number, this value is simply for client state
|
174
188
|
# @param [Integer] page_size Number of records to return, defaults to 50
|
175
189
|
# @return [Page] Page of TaskInstance
|
176
|
-
def page(priority: :unset, assignment_status: :unset, workflow_sid: :unset, workflow_name: :unset, task_queue_sid: :unset, task_queue_name: :unset, evaluate_task_attributes: :unset, ordering: :unset, has_addons: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
|
190
|
+
def page(priority: :unset, assignment_status: :unset, workflow_sid: :unset, workflow_name: :unset, task_queue_sid: :unset, task_queue_name: :unset, evaluate_task_attributes: :unset, routing_target: :unset, ordering: :unset, has_addons: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
|
177
191
|
params = Twilio::Values.of({
|
178
192
|
'Priority' => priority,
|
179
193
|
|
@@ -183,6 +197,7 @@ module Twilio
|
|
183
197
|
'TaskQueueSid' => task_queue_sid,
|
184
198
|
'TaskQueueName' => task_queue_name,
|
185
199
|
'EvaluateTaskAttributes' => evaluate_task_attributes,
|
200
|
+
'RoutingTarget' => routing_target,
|
186
201
|
'Ordering' => ordering,
|
187
202
|
'HasAddons' => has_addons,
|
188
203
|
'PageToken' => page_token,
|
@@ -402,6 +417,8 @@ module Twilio
|
|
402
417
|
'url' => payload['url'],
|
403
418
|
'links' => payload['links'],
|
404
419
|
'virtual_start_time' => Twilio.deserialize_iso8601_datetime(payload['virtual_start_time']),
|
420
|
+
'ignore_capacity' => payload['ignore_capacity'],
|
421
|
+
'routing_target' => payload['routing_target'],
|
405
422
|
}
|
406
423
|
|
407
424
|
# Context
|
@@ -552,6 +569,18 @@ module Twilio
|
|
552
569
|
@properties['virtual_start_time']
|
553
570
|
end
|
554
571
|
|
572
|
+
##
|
573
|
+
# @return [Boolean] A boolean indicating if a new task should respect a worker's capacity during assignment
|
574
|
+
def ignore_capacity
|
575
|
+
@properties['ignore_capacity']
|
576
|
+
end
|
577
|
+
|
578
|
+
##
|
579
|
+
# @return [String] A SID of a Worker, Queue, or Workflow to route a Task to
|
580
|
+
def routing_target
|
581
|
+
@properties['routing_target']
|
582
|
+
end
|
583
|
+
|
555
584
|
##
|
556
585
|
# Delete the TaskInstance
|
557
586
|
# @param [String] if_match If provided, deletes this Task if (and only if) the [ETag](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/ETag) header of the Task matches the provided value. This matches the semantics of (and is implemented with) the HTTP [If-Match header](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/If-Match).
|
@@ -53,6 +53,7 @@ module Twilio
|
|
53
53
|
# @param [String] business_contact_last_name The last name of the contact for the business or organization using the Tollfree number.
|
54
54
|
# @param [String] business_contact_email The email address of the contact for the business or organization using the Tollfree number.
|
55
55
|
# @param [String] business_contact_phone The phone number of the contact for the business or organization using the Tollfree number.
|
56
|
+
# @param [String] theme_set_id Theme id for styling the inquiry form.
|
56
57
|
# @return [ComplianceTollfreeInquiriesInstance] Created ComplianceTollfreeInquiriesInstance
|
57
58
|
def create(
|
58
59
|
tollfree_phone_number: nil,
|
@@ -75,7 +76,8 @@ module Twilio
|
|
75
76
|
business_contact_first_name: :unset,
|
76
77
|
business_contact_last_name: :unset,
|
77
78
|
business_contact_email: :unset,
|
78
|
-
business_contact_phone: :unset
|
79
|
+
business_contact_phone: :unset,
|
80
|
+
theme_set_id: :unset
|
79
81
|
)
|
80
82
|
|
81
83
|
data = Twilio::Values.of({
|
@@ -100,6 +102,7 @@ module Twilio
|
|
100
102
|
'BusinessContactLastName' => business_contact_last_name,
|
101
103
|
'BusinessContactEmail' => business_contact_email,
|
102
104
|
'BusinessContactPhone' => business_contact_phone,
|
105
|
+
'ThemeSetId' => theme_set_id,
|
103
106
|
})
|
104
107
|
|
105
108
|
|
@@ -370,6 +370,7 @@ module Twilio
|
|
370
370
|
'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
|
371
371
|
'url' => payload['url'],
|
372
372
|
'links' => payload['links'],
|
373
|
+
'errors' => payload['errors'],
|
373
374
|
}
|
374
375
|
|
375
376
|
# Context
|
@@ -460,6 +461,12 @@ module Twilio
|
|
460
461
|
@properties['links']
|
461
462
|
end
|
462
463
|
|
464
|
+
##
|
465
|
+
# @return [Array<Hash>] The error codes associated with the rejection of the Customer-Profile.
|
466
|
+
def errors
|
467
|
+
@properties['errors']
|
468
|
+
end
|
469
|
+
|
463
470
|
##
|
464
471
|
# Delete the CustomerProfilesInstance
|
465
472
|
# @return [Boolean] True if delete succeeds, false otherwise
|
@@ -370,6 +370,7 @@ module Twilio
|
|
370
370
|
'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
|
371
371
|
'url' => payload['url'],
|
372
372
|
'links' => payload['links'],
|
373
|
+
'errors' => payload['errors'],
|
373
374
|
}
|
374
375
|
|
375
376
|
# Context
|
@@ -460,6 +461,12 @@ module Twilio
|
|
460
461
|
@properties['links']
|
461
462
|
end
|
462
463
|
|
464
|
+
##
|
465
|
+
# @return [Array<Hash>] The error codes associated with the rejection of the Trust Product.
|
466
|
+
def errors
|
467
|
+
@properties['errors']
|
468
|
+
end
|
469
|
+
|
463
470
|
##
|
464
471
|
# Delete the TrustProductsInstance
|
465
472
|
# @return [Boolean] True if delete succeeds, false otherwise
|
@@ -287,7 +287,7 @@ module Twilio
|
|
287
287
|
end
|
288
288
|
|
289
289
|
##
|
290
|
-
# @return [String] The status of the verification.
|
290
|
+
# @return [String] The status of the verification. Can be: `pending`, `approved`, `canceled`, `max_attempts_reached`, `deleted`, `failed` or `expired`.
|
291
291
|
def status
|
292
292
|
@properties['status']
|
293
293
|
end
|
@@ -164,7 +164,7 @@ module Twilio
|
|
164
164
|
end
|
165
165
|
|
166
166
|
##
|
167
|
-
# @return [String] The status of the verification. Can be: `pending`, `approved`, or `
|
167
|
+
# @return [String] The status of the verification. Can be: `pending`, `approved`, `canceled`, `max_attempts_reached`, `deleted`, `failed` or `expired`.
|
168
168
|
def status
|
169
169
|
@properties['status']
|
170
170
|
end
|
@@ -559,7 +559,7 @@ module Twilio
|
|
559
559
|
end
|
560
560
|
|
561
561
|
##
|
562
|
-
# @return [String] The
|
562
|
+
# @return [String] The name that appears in the body of your verification messages. It can be up to 30 characters long and can include letters, numbers, spaces, dashes, underscores. Phone numbers, special characters or links are NOT allowed. **This value should not contain PII.**
|
563
563
|
def friendly_name
|
564
564
|
@properties['friendly_name']
|
565
565
|
end
|
data/lib/twilio-ruby/version.rb
CHANGED
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: 7.0
|
4
|
+
version: 7.1.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: 2024-
|
11
|
+
date: 2024-05-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jwt
|
@@ -375,6 +375,9 @@ files:
|
|
375
375
|
- lib/twilio-ruby/rest/content/v1/content/approval_fetch.rb
|
376
376
|
- lib/twilio-ruby/rest/content/v1/content_and_approvals.rb
|
377
377
|
- lib/twilio-ruby/rest/content/v1/legacy_content.rb
|
378
|
+
- lib/twilio-ruby/rest/content/v2.rb
|
379
|
+
- lib/twilio-ruby/rest/content/v2/content.rb
|
380
|
+
- lib/twilio-ruby/rest/content/v2/content_and_approvals.rb
|
378
381
|
- lib/twilio-ruby/rest/content_base.rb
|
379
382
|
- lib/twilio-ruby/rest/conversations.rb
|
380
383
|
- lib/twilio-ruby/rest/conversations/v1.rb
|
@@ -448,6 +451,7 @@ files:
|
|
448
451
|
- lib/twilio-ruby/rest/flex_api/v1/provisioning_status.rb
|
449
452
|
- lib/twilio-ruby/rest/flex_api/v1/web_channel.rb
|
450
453
|
- lib/twilio-ruby/rest/flex_api/v2.rb
|
454
|
+
- lib/twilio-ruby/rest/flex_api/v2/flex_user.rb
|
451
455
|
- lib/twilio-ruby/rest/flex_api/v2/web_channels.rb
|
452
456
|
- lib/twilio-ruby/rest/flex_api_base.rb
|
453
457
|
- lib/twilio-ruby/rest/frontline_api.rb
|
@@ -470,6 +474,12 @@ files:
|
|
470
474
|
- lib/twilio-ruby/rest/insights_base.rb
|
471
475
|
- lib/twilio-ruby/rest/intelligence.rb
|
472
476
|
- lib/twilio-ruby/rest/intelligence/v2.rb
|
477
|
+
- lib/twilio-ruby/rest/intelligence/v2/custom_operator.rb
|
478
|
+
- lib/twilio-ruby/rest/intelligence/v2/operator.rb
|
479
|
+
- lib/twilio-ruby/rest/intelligence/v2/operator_attachment.rb
|
480
|
+
- lib/twilio-ruby/rest/intelligence/v2/operator_attachments.rb
|
481
|
+
- lib/twilio-ruby/rest/intelligence/v2/operator_type.rb
|
482
|
+
- lib/twilio-ruby/rest/intelligence/v2/prebuilt_operator.rb
|
473
483
|
- lib/twilio-ruby/rest/intelligence/v2/service.rb
|
474
484
|
- lib/twilio-ruby/rest/intelligence/v2/transcript.rb
|
475
485
|
- lib/twilio-ruby/rest/intelligence/v2/transcript/media.rb
|
@@ -555,10 +565,12 @@ files:
|
|
555
565
|
- lib/twilio-ruby/rest/numbers/v1.rb
|
556
566
|
- lib/twilio-ruby/rest/numbers/v1/bulk_eligibility.rb
|
557
567
|
- lib/twilio-ruby/rest/numbers/v1/eligibility.rb
|
558
|
-
- lib/twilio-ruby/rest/numbers/v1/porting_bulk_portability.rb
|
559
568
|
- lib/twilio-ruby/rest/numbers/v1/porting_port_in.rb
|
560
|
-
- lib/twilio-ruby/rest/numbers/v1/
|
569
|
+
- lib/twilio-ruby/rest/numbers/v1/porting_port_in_phone_number.rb
|
561
570
|
- lib/twilio-ruby/rest/numbers/v1/porting_portability.rb
|
571
|
+
- lib/twilio-ruby/rest/numbers/v1/porting_webhook_configuration.rb
|
572
|
+
- lib/twilio-ruby/rest/numbers/v1/porting_webhook_configuration_delete.rb
|
573
|
+
- lib/twilio-ruby/rest/numbers/v1/porting_webhook_configuration_fetch.rb
|
562
574
|
- lib/twilio-ruby/rest/numbers/v2.rb
|
563
575
|
- lib/twilio-ruby/rest/numbers/v2/authorization_document.rb
|
564
576
|
- lib/twilio-ruby/rest/numbers/v2/authorization_document/dependent_hosted_number_order.rb
|
@@ -613,11 +625,6 @@ files:
|
|
613
625
|
- lib/twilio-ruby/rest/preview/wireless/sim.rb
|
614
626
|
- lib/twilio-ruby/rest/preview/wireless/sim/usage.rb
|
615
627
|
- lib/twilio-ruby/rest/preview_base.rb
|
616
|
-
- lib/twilio-ruby/rest/preview_messaging.rb
|
617
|
-
- lib/twilio-ruby/rest/preview_messaging/v1.rb
|
618
|
-
- lib/twilio-ruby/rest/preview_messaging/v1/broadcast.rb
|
619
|
-
- lib/twilio-ruby/rest/preview_messaging/v1/message.rb
|
620
|
-
- lib/twilio-ruby/rest/preview_messaging_base.rb
|
621
628
|
- lib/twilio-ruby/rest/pricing.rb
|
622
629
|
- lib/twilio-ruby/rest/pricing/v1.rb
|
623
630
|
- lib/twilio-ruby/rest/pricing/v1/messaging.rb
|
@@ -1,230 +0,0 @@
|
|
1
|
-
##
|
2
|
-
# This code was generated by
|
3
|
-
# ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
|
4
|
-
# | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
|
5
|
-
# | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
|
6
|
-
#
|
7
|
-
# Twilio - Numbers
|
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 Numbers < NumbersBase
|
19
|
-
class V1 < Version
|
20
|
-
class PortingBulkPortabilityList < ListResource
|
21
|
-
|
22
|
-
##
|
23
|
-
# Initialize the PortingBulkPortabilityList
|
24
|
-
# @param [Version] version Version that contains the resource
|
25
|
-
# @return [PortingBulkPortabilityList] PortingBulkPortabilityList
|
26
|
-
def initialize(version)
|
27
|
-
super(version)
|
28
|
-
# Path Solution
|
29
|
-
@solution = { }
|
30
|
-
@uri = "/Porting/Portability"
|
31
|
-
|
32
|
-
end
|
33
|
-
##
|
34
|
-
# Create the PortingBulkPortabilityInstance
|
35
|
-
# @param [Array[String]] phone_numbers The phone numbers which portability is to be checked. This should be a list of strings. Phone numbers are in E.164 format (e.g. +16175551212). .
|
36
|
-
# @return [PortingBulkPortabilityInstance] Created PortingBulkPortabilityInstance
|
37
|
-
def create(
|
38
|
-
phone_numbers: nil
|
39
|
-
)
|
40
|
-
|
41
|
-
data = Twilio::Values.of({
|
42
|
-
'PhoneNumbers' => Twilio.serialize_list(phone_numbers) { |e| e },
|
43
|
-
})
|
44
|
-
|
45
|
-
|
46
|
-
payload = @version.create('POST', @uri, data: data)
|
47
|
-
PortingBulkPortabilityInstance.new(
|
48
|
-
@version,
|
49
|
-
payload,
|
50
|
-
)
|
51
|
-
end
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
# Provide a user friendly representation
|
57
|
-
def to_s
|
58
|
-
'#<Twilio.Numbers.V1.PortingBulkPortabilityList>'
|
59
|
-
end
|
60
|
-
end
|
61
|
-
|
62
|
-
|
63
|
-
class PortingBulkPortabilityContext < InstanceContext
|
64
|
-
##
|
65
|
-
# Initialize the PortingBulkPortabilityContext
|
66
|
-
# @param [Version] version Version that contains the resource
|
67
|
-
# @param [String] sid A 34 character string that uniquely identifies the Portability check.
|
68
|
-
# @return [PortingBulkPortabilityContext] PortingBulkPortabilityContext
|
69
|
-
def initialize(version, sid)
|
70
|
-
super(version)
|
71
|
-
|
72
|
-
# Path Solution
|
73
|
-
@solution = { sid: sid, }
|
74
|
-
@uri = "/Porting/Portability/#{@solution[:sid]}"
|
75
|
-
|
76
|
-
|
77
|
-
end
|
78
|
-
##
|
79
|
-
# Fetch the PortingBulkPortabilityInstance
|
80
|
-
# @return [PortingBulkPortabilityInstance] Fetched PortingBulkPortabilityInstance
|
81
|
-
def fetch
|
82
|
-
|
83
|
-
|
84
|
-
payload = @version.fetch('GET', @uri)
|
85
|
-
PortingBulkPortabilityInstance.new(
|
86
|
-
@version,
|
87
|
-
payload,
|
88
|
-
sid: @solution[:sid],
|
89
|
-
)
|
90
|
-
end
|
91
|
-
|
92
|
-
|
93
|
-
##
|
94
|
-
# Provide a user friendly representation
|
95
|
-
def to_s
|
96
|
-
context = @solution.map{|k, v| "#{k}: #{v}"}.join(',')
|
97
|
-
"#<Twilio.Numbers.V1.PortingBulkPortabilityContext #{context}>"
|
98
|
-
end
|
99
|
-
|
100
|
-
##
|
101
|
-
# Provide a detailed, user friendly representation
|
102
|
-
def inspect
|
103
|
-
context = @solution.map{|k, v| "#{k}: #{v}"}.join(',')
|
104
|
-
"#<Twilio.Numbers.V1.PortingBulkPortabilityContext #{context}>"
|
105
|
-
end
|
106
|
-
end
|
107
|
-
|
108
|
-
class PortingBulkPortabilityPage < Page
|
109
|
-
##
|
110
|
-
# Initialize the PortingBulkPortabilityPage
|
111
|
-
# @param [Version] version Version that contains the resource
|
112
|
-
# @param [Response] response Response from the API
|
113
|
-
# @param [Hash] solution Path solution for the resource
|
114
|
-
# @return [PortingBulkPortabilityPage] PortingBulkPortabilityPage
|
115
|
-
def initialize(version, response, solution)
|
116
|
-
super(version, response)
|
117
|
-
|
118
|
-
# Path Solution
|
119
|
-
@solution = solution
|
120
|
-
end
|
121
|
-
|
122
|
-
##
|
123
|
-
# Build an instance of PortingBulkPortabilityInstance
|
124
|
-
# @param [Hash] payload Payload response from the API
|
125
|
-
# @return [PortingBulkPortabilityInstance] PortingBulkPortabilityInstance
|
126
|
-
def get_instance(payload)
|
127
|
-
PortingBulkPortabilityInstance.new(@version, payload)
|
128
|
-
end
|
129
|
-
|
130
|
-
##
|
131
|
-
# Provide a user friendly representation
|
132
|
-
def to_s
|
133
|
-
'<Twilio.Numbers.V1.PortingBulkPortabilityPage>'
|
134
|
-
end
|
135
|
-
end
|
136
|
-
class PortingBulkPortabilityInstance < InstanceResource
|
137
|
-
##
|
138
|
-
# Initialize the PortingBulkPortabilityInstance
|
139
|
-
# @param [Version] version Version that contains the resource
|
140
|
-
# @param [Hash] payload payload that contains response from Twilio
|
141
|
-
# @param [String] account_sid The SID of the
|
142
|
-
# {Account}[https://www.twilio.com/docs/iam/api/account] that created this PortingBulkPortability
|
143
|
-
# resource.
|
144
|
-
# @param [String] sid The SID of the Call resource to fetch.
|
145
|
-
# @return [PortingBulkPortabilityInstance] PortingBulkPortabilityInstance
|
146
|
-
def initialize(version, payload , sid: nil)
|
147
|
-
super(version)
|
148
|
-
|
149
|
-
# Marshaled Properties
|
150
|
-
@properties = {
|
151
|
-
'sid' => payload['sid'],
|
152
|
-
'status' => payload['status'],
|
153
|
-
'datetime_created' => Twilio.deserialize_iso8601_datetime(payload['datetime_created']),
|
154
|
-
'phone_numbers' => payload['phone_numbers'],
|
155
|
-
'url' => payload['url'],
|
156
|
-
}
|
157
|
-
|
158
|
-
# Context
|
159
|
-
@instance_context = nil
|
160
|
-
@params = { 'sid' => sid || @properties['sid'] , }
|
161
|
-
end
|
162
|
-
|
163
|
-
##
|
164
|
-
# Generate an instance context for the instance, the context is capable of
|
165
|
-
# performing various actions. All instance actions are proxied to the context
|
166
|
-
# @return [PortingBulkPortabilityContext] CallContext for this CallInstance
|
167
|
-
def context
|
168
|
-
unless @instance_context
|
169
|
-
@instance_context = PortingBulkPortabilityContext.new(@version , @params['sid'])
|
170
|
-
end
|
171
|
-
@instance_context
|
172
|
-
end
|
173
|
-
|
174
|
-
##
|
175
|
-
# @return [String] A 34 character string that uniquely identifies this Portability check.
|
176
|
-
def sid
|
177
|
-
@properties['sid']
|
178
|
-
end
|
179
|
-
|
180
|
-
##
|
181
|
-
# @return [Status]
|
182
|
-
def status
|
183
|
-
@properties['status']
|
184
|
-
end
|
185
|
-
|
186
|
-
##
|
187
|
-
# @return [Time] The date that the Portability check was created, given in ISO 8601 format.
|
188
|
-
def datetime_created
|
189
|
-
@properties['datetime_created']
|
190
|
-
end
|
191
|
-
|
192
|
-
##
|
193
|
-
# @return [Array<Hash>] Contains a list with all the information of the requested phone numbers. Each phone number contains the following properties: `phone_number`: The phone number which portability is to be checked. `portable`: Boolean flag specifying if phone number is portable or not. `not_portable_reason`: Reason why the phone number cannot be ported into Twilio, `null` otherwise. `not_portable_reason_code`: The Portability Reason Code for the phone number if it cannot be ported in Twilio, `null` otherwise. `pin_and_account_number_required`: Boolean flag specifying if PIN and account number is required for the phone number. `number_type`: The type of the requested phone number. `country` Country the phone number belongs to. `messaging_carrier` Current messaging carrier of the phone number. `voice_carrier` Current voice carrier of the phone number.
|
194
|
-
def phone_numbers
|
195
|
-
@properties['phone_numbers']
|
196
|
-
end
|
197
|
-
|
198
|
-
##
|
199
|
-
# @return [String] This is the url of the request that you're trying to reach out to locate the resource.
|
200
|
-
def url
|
201
|
-
@properties['url']
|
202
|
-
end
|
203
|
-
|
204
|
-
##
|
205
|
-
# Fetch the PortingBulkPortabilityInstance
|
206
|
-
# @return [PortingBulkPortabilityInstance] Fetched PortingBulkPortabilityInstance
|
207
|
-
def fetch
|
208
|
-
|
209
|
-
context.fetch
|
210
|
-
end
|
211
|
-
|
212
|
-
##
|
213
|
-
# Provide a user friendly representation
|
214
|
-
def to_s
|
215
|
-
values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
|
216
|
-
"<Twilio.Numbers.V1.PortingBulkPortabilityInstance #{values}>"
|
217
|
-
end
|
218
|
-
|
219
|
-
##
|
220
|
-
# Provide a detailed, user friendly representation
|
221
|
-
def inspect
|
222
|
-
values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
|
223
|
-
"<Twilio.Numbers.V1.PortingBulkPortabilityInstance #{values}>"
|
224
|
-
end
|
225
|
-
end
|
226
|
-
|
227
|
-
end
|
228
|
-
end
|
229
|
-
end
|
230
|
-
end
|