twilio-ruby 5.53.0 → 5.54.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 +20 -0
- data/README.md +2 -2
- data/lib/twilio-ruby/rest/events/v1/event_type.rb +12 -5
- data/lib/twilio-ruby/rest/events/v1/sink.rb +19 -5
- data/lib/twilio-ruby/rest/flex_api/v1/flex_flow.rb +28 -22
- data/lib/twilio-ruby/rest/messaging/v1/external_campaign.rb +7 -0
- data/lib/twilio-ruby/rest/messaging/v1/service.rb +8 -2
- data/lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb +175 -15
- data/lib/twilio-ruby/rest/supersim/v1/sim.rb +1 -1
- data/lib/twilio-ruby/rest/verify/v2/service/entity/new_factor.rb +8 -8
- data/lib/twilio-ruby/rest/video/v1/composition.rb +0 -8
- data/lib/twilio-ruby/rest/video/v1/composition_hook.rb +0 -8
- data/lib/twilio-ruby/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e5566a64b2b4292461e668ceb197a806cee70f04974c5268affc88c2d17b1998
|
4
|
+
data.tar.gz: 170fe096ae57154ce21fdfd0da343ed5081eb490dcb83e6fbd75bd1316832547
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c19fbdd472d009b389ab1d74a1d4acb44d40b7f8acbf3ccff8b24ebbb4741fe28775cc93df19a663a8d0c59efbd787237e0e1e7cf02fa06b98ff4341e7e0f195
|
7
|
+
data.tar.gz: 2886af917c2518e48f1845322b228cc8947f888aa60fc299c9010990361200eb9eaa0b5a52cc9331b3a56da8903289c91ca4f4d7fa1e3ed1e98f813be2873d52
|
data/CHANGES.md
CHANGED
@@ -1,6 +1,26 @@
|
|
1
1
|
twilio-ruby changelog
|
2
2
|
=====================
|
3
3
|
|
4
|
+
[2021-05-19] Version 5.54.0
|
5
|
+
---------------------------
|
6
|
+
**Events**
|
7
|
+
- add query param to return types filtered by Schema Id
|
8
|
+
- Add query param to return sinks filtered by status
|
9
|
+
- Add query param to return sinks used/not used by a subscription
|
10
|
+
|
11
|
+
**Messaging**
|
12
|
+
- Add fetch and delete instance endpoints to us_app_to_person api **(breaking change)**
|
13
|
+
- Remove delete list endpoint from us_app_to_person api **(breaking change)**
|
14
|
+
- Update read list endpoint to return a list of us_app_to_person compliance objects **(breaking change)**
|
15
|
+
- Add `sid` field to Preregistered US App To Person response
|
16
|
+
|
17
|
+
**Supersim**
|
18
|
+
- Mark `unique_name` in Sim, Fleet, NAP resources as not PII
|
19
|
+
|
20
|
+
**Video**
|
21
|
+
- [Composer] GA maturity level
|
22
|
+
|
23
|
+
|
4
24
|
[2021-05-05] Version 5.53.0
|
5
25
|
---------------------------
|
6
26
|
**Library - Fix**
|
data/README.md
CHANGED
@@ -35,13 +35,13 @@ This library supports the following Ruby implementations:
|
|
35
35
|
To install using [Bundler][bundler] grab the latest stable version:
|
36
36
|
|
37
37
|
```ruby
|
38
|
-
gem 'twilio-ruby', '~> 5.
|
38
|
+
gem 'twilio-ruby', '~> 5.54.0'
|
39
39
|
```
|
40
40
|
|
41
41
|
To manually install `twilio-ruby` via [Rubygems][rubygems] simply gem install:
|
42
42
|
|
43
43
|
```bash
|
44
|
-
gem install twilio-ruby -v 5.
|
44
|
+
gem install twilio-ruby -v 5.54.0
|
45
45
|
```
|
46
46
|
|
47
47
|
To build and install the development branch yourself from the latest source:
|
@@ -29,6 +29,8 @@ module Twilio
|
|
29
29
|
# Lists EventTypeInstance records from the API as a list.
|
30
30
|
# Unlike stream(), this operation is eager and will load `limit` records into
|
31
31
|
# memory before returning.
|
32
|
+
# @param [String] schema_id A string parameter filtering the results to return
|
33
|
+
# only the Event Types using a given schema.
|
32
34
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
33
35
|
# guarantees to never return more than limit. Default is no limit
|
34
36
|
# @param [Integer] page_size Number of records to fetch per request, when
|
@@ -36,14 +38,16 @@ module Twilio
|
|
36
38
|
# but a limit is defined, stream() will attempt to read the limit with the most
|
37
39
|
# efficient page size, i.e. min(limit, 1000)
|
38
40
|
# @return [Array] Array of up to limit results
|
39
|
-
def list(limit: nil, page_size: nil)
|
40
|
-
self.stream(limit: limit, page_size: page_size).entries
|
41
|
+
def list(schema_id: :unset, limit: nil, page_size: nil)
|
42
|
+
self.stream(schema_id: schema_id, limit: limit, page_size: page_size).entries
|
41
43
|
end
|
42
44
|
|
43
45
|
##
|
44
46
|
# Streams EventTypeInstance records from the API as an Enumerable.
|
45
47
|
# This operation lazily loads records as efficiently as possible until the limit
|
46
48
|
# is reached.
|
49
|
+
# @param [String] schema_id A string parameter filtering the results to return
|
50
|
+
# only the Event Types using a given schema.
|
47
51
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
48
52
|
# guarantees to never return more than limit. Default is no limit.
|
49
53
|
# @param [Integer] page_size Number of records to fetch per request, when
|
@@ -51,10 +55,10 @@ module Twilio
|
|
51
55
|
# but a limit is defined, stream() will attempt to read the limit with the most
|
52
56
|
# efficient page size, i.e. min(limit, 1000)
|
53
57
|
# @return [Enumerable] Enumerable that will yield up to limit results
|
54
|
-
def stream(limit: nil, page_size: nil)
|
58
|
+
def stream(schema_id: :unset, limit: nil, page_size: nil)
|
55
59
|
limits = @version.read_limits(limit, page_size)
|
56
60
|
|
57
|
-
page = self.page(page_size: limits[:page_size], )
|
61
|
+
page = self.page(schema_id: schema_id, page_size: limits[:page_size], )
|
58
62
|
|
59
63
|
@version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit])
|
60
64
|
end
|
@@ -76,12 +80,15 @@ module Twilio
|
|
76
80
|
##
|
77
81
|
# Retrieve a single page of EventTypeInstance records from the API.
|
78
82
|
# Request is executed immediately.
|
83
|
+
# @param [String] schema_id A string parameter filtering the results to return
|
84
|
+
# only the Event Types using a given schema.
|
79
85
|
# @param [String] page_token PageToken provided by the API
|
80
86
|
# @param [Integer] page_number Page Number, this value is simply for client state
|
81
87
|
# @param [Integer] page_size Number of records to return, defaults to 50
|
82
88
|
# @return [Page] Page of EventTypeInstance
|
83
|
-
def page(page_token: :unset, page_number: :unset, page_size: :unset)
|
89
|
+
def page(schema_id: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
|
84
90
|
params = Twilio::Values.of({
|
91
|
+
'SchemaId' => schema_id,
|
85
92
|
'PageToken' => page_token,
|
86
93
|
'Page' => page_number,
|
87
94
|
'PageSize' => page_size,
|
@@ -50,6 +50,10 @@ module Twilio
|
|
50
50
|
# Lists SinkInstance records from the API as a list.
|
51
51
|
# Unlike stream(), this operation is eager and will load `limit` records into
|
52
52
|
# memory before returning.
|
53
|
+
# @param [Boolean] in_use A boolean query parameter filtering the results to
|
54
|
+
# return sinks used/not used by a subscription.
|
55
|
+
# @param [String] status A String query parameter filtering the results by status
|
56
|
+
# `initialized`, `validating`, `active` or `failed`.
|
53
57
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
54
58
|
# guarantees to never return more than limit. Default is no limit
|
55
59
|
# @param [Integer] page_size Number of records to fetch per request, when
|
@@ -57,14 +61,18 @@ module Twilio
|
|
57
61
|
# but a limit is defined, stream() will attempt to read the limit with the most
|
58
62
|
# efficient page size, i.e. min(limit, 1000)
|
59
63
|
# @return [Array] Array of up to limit results
|
60
|
-
def list(limit: nil, page_size: nil)
|
61
|
-
self.stream(limit: limit, page_size: page_size).entries
|
64
|
+
def list(in_use: :unset, status: :unset, limit: nil, page_size: nil)
|
65
|
+
self.stream(in_use: in_use, status: status, limit: limit, page_size: page_size).entries
|
62
66
|
end
|
63
67
|
|
64
68
|
##
|
65
69
|
# Streams SinkInstance records from the API as an Enumerable.
|
66
70
|
# This operation lazily loads records as efficiently as possible until the limit
|
67
71
|
# is reached.
|
72
|
+
# @param [Boolean] in_use A boolean query parameter filtering the results to
|
73
|
+
# return sinks used/not used by a subscription.
|
74
|
+
# @param [String] status A String query parameter filtering the results by status
|
75
|
+
# `initialized`, `validating`, `active` or `failed`.
|
68
76
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
69
77
|
# guarantees to never return more than limit. Default is no limit.
|
70
78
|
# @param [Integer] page_size Number of records to fetch per request, when
|
@@ -72,10 +80,10 @@ module Twilio
|
|
72
80
|
# but a limit is defined, stream() will attempt to read the limit with the most
|
73
81
|
# efficient page size, i.e. min(limit, 1000)
|
74
82
|
# @return [Enumerable] Enumerable that will yield up to limit results
|
75
|
-
def stream(limit: nil, page_size: nil)
|
83
|
+
def stream(in_use: :unset, status: :unset, limit: nil, page_size: nil)
|
76
84
|
limits = @version.read_limits(limit, page_size)
|
77
85
|
|
78
|
-
page = self.page(page_size: limits[:page_size], )
|
86
|
+
page = self.page(in_use: in_use, status: status, page_size: limits[:page_size], )
|
79
87
|
|
80
88
|
@version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit])
|
81
89
|
end
|
@@ -97,12 +105,18 @@ module Twilio
|
|
97
105
|
##
|
98
106
|
# Retrieve a single page of SinkInstance records from the API.
|
99
107
|
# Request is executed immediately.
|
108
|
+
# @param [Boolean] in_use A boolean query parameter filtering the results to
|
109
|
+
# return sinks used/not used by a subscription.
|
110
|
+
# @param [String] status A String query parameter filtering the results by status
|
111
|
+
# `initialized`, `validating`, `active` or `failed`.
|
100
112
|
# @param [String] page_token PageToken provided by the API
|
101
113
|
# @param [Integer] page_number Page Number, this value is simply for client state
|
102
114
|
# @param [Integer] page_size Number of records to return, defaults to 50
|
103
115
|
# @return [Page] Page of SinkInstance
|
104
|
-
def page(page_token: :unset, page_number: :unset, page_size: :unset)
|
116
|
+
def page(in_use: :unset, status: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
|
105
117
|
params = Twilio::Values.of({
|
118
|
+
'InUse' => in_use,
|
119
|
+
'Status' => status,
|
106
120
|
'PageToken' => page_token,
|
107
121
|
'Page' => page_number,
|
108
122
|
'PageSize' => page_size,
|
@@ -119,8 +119,10 @@ module Twilio
|
|
119
119
|
# `facebook`, `sms`, `whatsapp`, `line` or `custom`.
|
120
120
|
# @param [String] contact_identity The channel contact's Identity.
|
121
121
|
# @param [Boolean] enabled Whether the new Flex Flow is enabled.
|
122
|
-
# @param [flex_flow.IntegrationType] integration_type The
|
123
|
-
#
|
122
|
+
# @param [flex_flow.IntegrationType] integration_type The software that will
|
123
|
+
# handle inbound messages. {Integration
|
124
|
+
# Type}[https://www.twilio.com/docs/flex/developer/messaging/manage-flows#integration-types]
|
125
|
+
# can be: `studio`, `external`, or `task`.
|
124
126
|
# @param [String] integration_flow_sid The SID of the Studio Flow. Required when
|
125
127
|
# `integrationType` is `studio`.
|
126
128
|
# @param [String] integration_url The URL of the external webhook. Required when
|
@@ -129,9 +131,9 @@ module Twilio
|
|
129
131
|
# Required when `integrationType` is `task`.
|
130
132
|
# @param [String] integration_workflow_sid The Workflow SID for a new Task.
|
131
133
|
# Required when `integrationType` is `task`.
|
132
|
-
# @param [String] integration_channel The Task Channel
|
133
|
-
# that will be created. Applicable and required
|
134
|
-
#
|
134
|
+
# @param [String] integration_channel The Task Channel SID (TCXXXX) or unique name
|
135
|
+
# (e.g., `sms`) to use for the Task that will be created. Applicable and required
|
136
|
+
# when `integrationType` is `task`. The default value is `default`.
|
135
137
|
# @param [String] integration_timeout The Task timeout in seconds for a new Task.
|
136
138
|
# Default is 86,400 seconds (24 hours). Optional when `integrationType` is `task`,
|
137
139
|
# not applicable otherwise.
|
@@ -150,8 +152,8 @@ module Twilio
|
|
150
152
|
# will remove active Proxy sessions if the associated Task is deleted outside of
|
151
153
|
# the Flex UI. Defaults to `false`.
|
152
154
|
# @param [String] integration_retry_count The number of times to retry the webhook
|
153
|
-
# if the first attempt fails. Can be an integer between 0 and 3 (
|
154
|
-
# default is
|
155
|
+
# if the first attempt fails. Can be an integer between 0 and 3 (inclusive),
|
156
|
+
# default is 3. Optional when `integrationType` is `external`, not applicable
|
155
157
|
# otherwise.
|
156
158
|
# @return [FlexFlowInstance] Created FlexFlowInstance
|
157
159
|
def create(friendly_name: nil, chat_service_sid: nil, channel_type: nil, contact_identity: :unset, enabled: :unset, integration_type: :unset, integration_flow_sid: :unset, integration_url: :unset, integration_workspace_sid: :unset, integration_workflow_sid: :unset, integration_channel: :unset, integration_timeout: :unset, integration_priority: :unset, integration_creation_on_message: :unset, long_lived: :unset, janitor_enabled: :unset, integration_retry_count: :unset)
|
@@ -248,8 +250,10 @@ module Twilio
|
|
248
250
|
# `facebook`, `sms`, `whatsapp`, `line` or `custom`.
|
249
251
|
# @param [String] contact_identity The channel contact's Identity.
|
250
252
|
# @param [Boolean] enabled Whether the new Flex Flow is enabled.
|
251
|
-
# @param [flex_flow.IntegrationType] integration_type The
|
252
|
-
#
|
253
|
+
# @param [flex_flow.IntegrationType] integration_type The software that will
|
254
|
+
# handle inbound messages. {Integration
|
255
|
+
# Type}[https://www.twilio.com/docs/flex/developer/messaging/manage-flows#integration-types]
|
256
|
+
# can be: `studio`, `external`, or `task`.
|
253
257
|
# @param [String] integration_flow_sid The SID of the Studio Flow. Required when
|
254
258
|
# `integrationType` is `studio`.
|
255
259
|
# @param [String] integration_url The URL of the external webhook. Required when
|
@@ -258,9 +262,9 @@ module Twilio
|
|
258
262
|
# Required when `integrationType` is `task`.
|
259
263
|
# @param [String] integration_workflow_sid The Workflow SID for a new Task.
|
260
264
|
# Required when `integrationType` is `task`.
|
261
|
-
# @param [String] integration_channel The Task Channel
|
262
|
-
# that will be created. Applicable and required
|
263
|
-
#
|
265
|
+
# @param [String] integration_channel The Task Channel SID (TCXXXX) or unique name
|
266
|
+
# (e.g., `sms`) to use for the Task that will be created. Applicable and required
|
267
|
+
# when `integrationType` is `task`. The default value is `default`.
|
264
268
|
# @param [String] integration_timeout The Task timeout in seconds for a new Task.
|
265
269
|
# Default is 86,400 seconds (24 hours). Optional when `integrationType` is `task`,
|
266
270
|
# not applicable otherwise.
|
@@ -279,8 +283,8 @@ module Twilio
|
|
279
283
|
# will remove active Proxy sessions if the associated Task is deleted outside of
|
280
284
|
# the Flex UI. Defaults to `false`.
|
281
285
|
# @param [String] integration_retry_count The number of times to retry the webhook
|
282
|
-
# if the first attempt fails. Can be an integer between 0 and 3 (
|
283
|
-
# default is
|
286
|
+
# if the first attempt fails. Can be an integer between 0 and 3 (inclusive),
|
287
|
+
# default is 3. Optional when `integrationType` is `external`, not applicable
|
284
288
|
# otherwise.
|
285
289
|
# @return [FlexFlowInstance] Updated FlexFlowInstance
|
286
290
|
def update(friendly_name: :unset, chat_service_sid: :unset, channel_type: :unset, contact_identity: :unset, enabled: :unset, integration_type: :unset, integration_flow_sid: :unset, integration_url: :unset, integration_workspace_sid: :unset, integration_workflow_sid: :unset, integration_channel: :unset, integration_timeout: :unset, integration_priority: :unset, integration_creation_on_message: :unset, long_lived: :unset, janitor_enabled: :unset, integration_retry_count: :unset)
|
@@ -430,7 +434,7 @@ module Twilio
|
|
430
434
|
end
|
431
435
|
|
432
436
|
##
|
433
|
-
# @return [flex_flow.IntegrationType] The
|
437
|
+
# @return [flex_flow.IntegrationType] The software that will handle inbound messages.
|
434
438
|
def integration_type
|
435
439
|
@properties['integration_type']
|
436
440
|
end
|
@@ -475,8 +479,10 @@ module Twilio
|
|
475
479
|
# `facebook`, `sms`, `whatsapp`, `line` or `custom`.
|
476
480
|
# @param [String] contact_identity The channel contact's Identity.
|
477
481
|
# @param [Boolean] enabled Whether the new Flex Flow is enabled.
|
478
|
-
# @param [flex_flow.IntegrationType] integration_type The
|
479
|
-
#
|
482
|
+
# @param [flex_flow.IntegrationType] integration_type The software that will
|
483
|
+
# handle inbound messages. {Integration
|
484
|
+
# Type}[https://www.twilio.com/docs/flex/developer/messaging/manage-flows#integration-types]
|
485
|
+
# can be: `studio`, `external`, or `task`.
|
480
486
|
# @param [String] integration_flow_sid The SID of the Studio Flow. Required when
|
481
487
|
# `integrationType` is `studio`.
|
482
488
|
# @param [String] integration_url The URL of the external webhook. Required when
|
@@ -485,9 +491,9 @@ module Twilio
|
|
485
491
|
# Required when `integrationType` is `task`.
|
486
492
|
# @param [String] integration_workflow_sid The Workflow SID for a new Task.
|
487
493
|
# Required when `integrationType` is `task`.
|
488
|
-
# @param [String] integration_channel The Task Channel
|
489
|
-
# that will be created. Applicable and required
|
490
|
-
#
|
494
|
+
# @param [String] integration_channel The Task Channel SID (TCXXXX) or unique name
|
495
|
+
# (e.g., `sms`) to use for the Task that will be created. Applicable and required
|
496
|
+
# when `integrationType` is `task`. The default value is `default`.
|
491
497
|
# @param [String] integration_timeout The Task timeout in seconds for a new Task.
|
492
498
|
# Default is 86,400 seconds (24 hours). Optional when `integrationType` is `task`,
|
493
499
|
# not applicable otherwise.
|
@@ -506,8 +512,8 @@ module Twilio
|
|
506
512
|
# will remove active Proxy sessions if the associated Task is deleted outside of
|
507
513
|
# the Flex UI. Defaults to `false`.
|
508
514
|
# @param [String] integration_retry_count The number of times to retry the webhook
|
509
|
-
# if the first attempt fails. Can be an integer between 0 and 3 (
|
510
|
-
# default is
|
515
|
+
# if the first attempt fails. Can be an integer between 0 and 3 (inclusive),
|
516
|
+
# default is 3. Optional when `integrationType` is `external`, not applicable
|
511
517
|
# otherwise.
|
512
518
|
# @return [FlexFlowInstance] Updated FlexFlowInstance
|
513
519
|
def update(friendly_name: :unset, chat_service_sid: :unset, channel_type: :unset, contact_identity: :unset, enabled: :unset, integration_type: :unset, integration_flow_sid: :unset, integration_url: :unset, integration_workspace_sid: :unset, integration_workflow_sid: :unset, integration_channel: :unset, integration_timeout: :unset, integration_priority: :unset, integration_creation_on_message: :unset, long_lived: :unset, janitor_enabled: :unset, integration_retry_count: :unset)
|
@@ -94,6 +94,7 @@ module Twilio
|
|
94
94
|
|
95
95
|
# Marshaled Properties
|
96
96
|
@properties = {
|
97
|
+
'sid' => payload['sid'],
|
97
98
|
'account_sid' => payload['account_sid'],
|
98
99
|
'campaign_id' => payload['campaign_id'],
|
99
100
|
'messaging_service_sid' => payload['messaging_service_sid'],
|
@@ -101,6 +102,12 @@ module Twilio
|
|
101
102
|
}
|
102
103
|
end
|
103
104
|
|
105
|
+
##
|
106
|
+
# @return [String] The unique string that identifies a US A2P Compliance resource
|
107
|
+
def sid
|
108
|
+
@properties['sid']
|
109
|
+
end
|
110
|
+
|
104
111
|
##
|
105
112
|
# @return [String] The SID of the Account that created the resource
|
106
113
|
def account_sid
|
@@ -385,8 +385,14 @@ module Twilio
|
|
385
385
|
##
|
386
386
|
# Access the us_app_to_person
|
387
387
|
# @return [UsAppToPersonList]
|
388
|
-
# @return [UsAppToPersonContext]
|
389
|
-
def us_app_to_person
|
388
|
+
# @return [UsAppToPersonContext] if sid was passed.
|
389
|
+
def us_app_to_person(sid=:unset)
|
390
|
+
raise ArgumentError, 'sid cannot be nil' if sid.nil?
|
391
|
+
|
392
|
+
if sid != :unset
|
393
|
+
return UsAppToPersonContext.new(@version, @solution[:sid], sid, )
|
394
|
+
end
|
395
|
+
|
390
396
|
unless @us_app_to_person
|
391
397
|
@us_app_to_person = UsAppToPersonList.new(@version, messaging_service_sid: @solution[:sid], )
|
392
398
|
end
|
@@ -62,23 +62,83 @@ module Twilio
|
|
62
62
|
end
|
63
63
|
|
64
64
|
##
|
65
|
-
#
|
66
|
-
#
|
67
|
-
|
68
|
-
|
65
|
+
# Lists UsAppToPersonInstance records from the API as a list.
|
66
|
+
# Unlike stream(), this operation is eager and will load `limit` records into
|
67
|
+
# memory before returning.
|
68
|
+
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
69
|
+
# guarantees to never return more than limit. Default is no limit
|
70
|
+
# @param [Integer] page_size Number of records to fetch per request, when
|
71
|
+
# not set will use the default value of 50 records. If no page_size is defined
|
72
|
+
# but a limit is defined, stream() will attempt to read the limit with the most
|
73
|
+
# efficient page size, i.e. min(limit, 1000)
|
74
|
+
# @return [Array] Array of up to limit results
|
75
|
+
def list(limit: nil, page_size: nil)
|
76
|
+
self.stream(limit: limit, page_size: page_size).entries
|
69
77
|
end
|
70
78
|
|
71
79
|
##
|
72
|
-
#
|
73
|
-
#
|
74
|
-
|
75
|
-
|
80
|
+
# Streams UsAppToPersonInstance records from the API as an Enumerable.
|
81
|
+
# This operation lazily loads records as efficiently as possible until the limit
|
82
|
+
# is reached.
|
83
|
+
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
84
|
+
# guarantees to never return more than limit. Default is no limit.
|
85
|
+
# @param [Integer] page_size Number of records to fetch per request, when
|
86
|
+
# not set will use the default value of 50 records. If no page_size is defined
|
87
|
+
# but a limit is defined, stream() will attempt to read the limit with the most
|
88
|
+
# efficient page size, i.e. min(limit, 1000)
|
89
|
+
# @return [Enumerable] Enumerable that will yield up to limit results
|
90
|
+
def stream(limit: nil, page_size: nil)
|
91
|
+
limits = @version.read_limits(limit, page_size)
|
92
|
+
|
93
|
+
page = self.page(page_size: limits[:page_size], )
|
94
|
+
|
95
|
+
@version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit])
|
96
|
+
end
|
76
97
|
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
98
|
+
##
|
99
|
+
# When passed a block, yields UsAppToPersonInstance records from the API.
|
100
|
+
# This operation lazily loads records as efficiently as possible until the limit
|
101
|
+
# is reached.
|
102
|
+
def each
|
103
|
+
limits = @version.read_limits
|
104
|
+
|
105
|
+
page = self.page(page_size: limits[:page_size], )
|
106
|
+
|
107
|
+
@version.stream(page,
|
108
|
+
limit: limits[:limit],
|
109
|
+
page_limit: limits[:page_limit]).each {|x| yield x}
|
110
|
+
end
|
111
|
+
|
112
|
+
##
|
113
|
+
# Retrieve a single page of UsAppToPersonInstance records from the API.
|
114
|
+
# Request is executed immediately.
|
115
|
+
# @param [String] page_token PageToken provided by the API
|
116
|
+
# @param [Integer] page_number Page Number, this value is simply for client state
|
117
|
+
# @param [Integer] page_size Number of records to return, defaults to 50
|
118
|
+
# @return [Page] Page of UsAppToPersonInstance
|
119
|
+
def page(page_token: :unset, page_number: :unset, page_size: :unset)
|
120
|
+
params = Twilio::Values.of({
|
121
|
+
'PageToken' => page_token,
|
122
|
+
'Page' => page_number,
|
123
|
+
'PageSize' => page_size,
|
124
|
+
})
|
125
|
+
|
126
|
+
response = @version.page('GET', @uri, params: params)
|
127
|
+
|
128
|
+
UsAppToPersonPage.new(@version, response, @solution)
|
129
|
+
end
|
130
|
+
|
131
|
+
##
|
132
|
+
# Retrieve a single page of UsAppToPersonInstance records from the API.
|
133
|
+
# Request is executed immediately.
|
134
|
+
# @param [String] target_url API-generated URL for the requested results page
|
135
|
+
# @return [Page] Page of UsAppToPersonInstance
|
136
|
+
def get_page(target_url)
|
137
|
+
response = @version.domain.request(
|
138
|
+
'GET',
|
139
|
+
target_url
|
81
140
|
)
|
141
|
+
UsAppToPersonPage.new(@version, response, @solution)
|
82
142
|
end
|
83
143
|
|
84
144
|
##
|
@@ -123,6 +183,62 @@ module Twilio
|
|
123
183
|
end
|
124
184
|
end
|
125
185
|
|
186
|
+
##
|
187
|
+
# PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
|
188
|
+
class UsAppToPersonContext < InstanceContext
|
189
|
+
##
|
190
|
+
# Initialize the UsAppToPersonContext
|
191
|
+
# @param [Version] version Version that contains the resource
|
192
|
+
# @param [String] messaging_service_sid The SID of the {Messaging
|
193
|
+
# Service}[https://www.twilio.com/docs/messaging/services/api] to fetch the
|
194
|
+
# resource from.
|
195
|
+
# @param [String] sid The SID of the US A2P Compliance resource to fetch
|
196
|
+
# `QE2c6890da8086d771620e9b13fadeba0b`.
|
197
|
+
# @return [UsAppToPersonContext] UsAppToPersonContext
|
198
|
+
def initialize(version, messaging_service_sid, sid)
|
199
|
+
super(version)
|
200
|
+
|
201
|
+
# Path Solution
|
202
|
+
@solution = {messaging_service_sid: messaging_service_sid, sid: sid, }
|
203
|
+
@uri = "/Services/#{@solution[:messaging_service_sid]}/Compliance/Usa2p/#{@solution[:sid]}"
|
204
|
+
end
|
205
|
+
|
206
|
+
##
|
207
|
+
# Delete the UsAppToPersonInstance
|
208
|
+
# @return [Boolean] true if delete succeeds, false otherwise
|
209
|
+
def delete
|
210
|
+
@version.delete('DELETE', @uri)
|
211
|
+
end
|
212
|
+
|
213
|
+
##
|
214
|
+
# Fetch the UsAppToPersonInstance
|
215
|
+
# @return [UsAppToPersonInstance] Fetched UsAppToPersonInstance
|
216
|
+
def fetch
|
217
|
+
payload = @version.fetch('GET', @uri)
|
218
|
+
|
219
|
+
UsAppToPersonInstance.new(
|
220
|
+
@version,
|
221
|
+
payload,
|
222
|
+
messaging_service_sid: @solution[:messaging_service_sid],
|
223
|
+
sid: @solution[:sid],
|
224
|
+
)
|
225
|
+
end
|
226
|
+
|
227
|
+
##
|
228
|
+
# Provide a user friendly representation
|
229
|
+
def to_s
|
230
|
+
context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
|
231
|
+
"#<Twilio.Messaging.V1.UsAppToPersonContext #{context}>"
|
232
|
+
end
|
233
|
+
|
234
|
+
##
|
235
|
+
# Provide a detailed, user friendly representation
|
236
|
+
def inspect
|
237
|
+
context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
|
238
|
+
"#<Twilio.Messaging.V1.UsAppToPersonContext #{context}>"
|
239
|
+
end
|
240
|
+
end
|
241
|
+
|
126
242
|
##
|
127
243
|
# PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
|
128
244
|
class UsAppToPersonInstance < InstanceResource
|
@@ -133,12 +249,15 @@ module Twilio
|
|
133
249
|
# @param [String] messaging_service_sid The SID of the {Messaging
|
134
250
|
# Service}[https://www.twilio.com/docs/messaging/services/api] that the resource
|
135
251
|
# is associated with.
|
252
|
+
# @param [String] sid The SID of the US A2P Compliance resource to fetch
|
253
|
+
# `QE2c6890da8086d771620e9b13fadeba0b`.
|
136
254
|
# @return [UsAppToPersonInstance] UsAppToPersonInstance
|
137
|
-
def initialize(version, payload, messaging_service_sid: nil)
|
255
|
+
def initialize(version, payload, messaging_service_sid: nil, sid: nil)
|
138
256
|
super(version)
|
139
257
|
|
140
258
|
# Marshaled Properties
|
141
259
|
@properties = {
|
260
|
+
'sid' => payload['sid'],
|
142
261
|
'account_sid' => payload['account_sid'],
|
143
262
|
'brand_registration_sid' => payload['brand_registration_sid'],
|
144
263
|
'messaging_service_sid' => payload['messaging_service_sid'],
|
@@ -155,6 +274,31 @@ module Twilio
|
|
155
274
|
'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
|
156
275
|
'url' => payload['url'],
|
157
276
|
}
|
277
|
+
|
278
|
+
# Context
|
279
|
+
@instance_context = nil
|
280
|
+
@params = {'messaging_service_sid' => messaging_service_sid, 'sid' => sid || @properties['sid'], }
|
281
|
+
end
|
282
|
+
|
283
|
+
##
|
284
|
+
# Generate an instance context for the instance, the context is capable of
|
285
|
+
# performing various actions. All instance actions are proxied to the context
|
286
|
+
# @return [UsAppToPersonContext] UsAppToPersonContext for this UsAppToPersonInstance
|
287
|
+
def context
|
288
|
+
unless @instance_context
|
289
|
+
@instance_context = UsAppToPersonContext.new(
|
290
|
+
@version,
|
291
|
+
@params['messaging_service_sid'],
|
292
|
+
@params['sid'],
|
293
|
+
)
|
294
|
+
end
|
295
|
+
@instance_context
|
296
|
+
end
|
297
|
+
|
298
|
+
##
|
299
|
+
# @return [String] The unique string that identifies a US A2P Compliance resource
|
300
|
+
def sid
|
301
|
+
@properties['sid']
|
158
302
|
end
|
159
303
|
|
160
304
|
##
|
@@ -247,16 +391,32 @@ module Twilio
|
|
247
391
|
@properties['url']
|
248
392
|
end
|
249
393
|
|
394
|
+
##
|
395
|
+
# Delete the UsAppToPersonInstance
|
396
|
+
# @return [Boolean] true if delete succeeds, false otherwise
|
397
|
+
def delete
|
398
|
+
context.delete
|
399
|
+
end
|
400
|
+
|
401
|
+
##
|
402
|
+
# Fetch the UsAppToPersonInstance
|
403
|
+
# @return [UsAppToPersonInstance] Fetched UsAppToPersonInstance
|
404
|
+
def fetch
|
405
|
+
context.fetch
|
406
|
+
end
|
407
|
+
|
250
408
|
##
|
251
409
|
# Provide a user friendly representation
|
252
410
|
def to_s
|
253
|
-
"
|
411
|
+
values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
|
412
|
+
"<Twilio.Messaging.V1.UsAppToPersonInstance #{values}>"
|
254
413
|
end
|
255
414
|
|
256
415
|
##
|
257
416
|
# Provide a detailed, user friendly representation
|
258
417
|
def inspect
|
259
|
-
"
|
418
|
+
values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
|
419
|
+
"<Twilio.Messaging.V1.UsAppToPersonInstance #{values}>"
|
260
420
|
end
|
261
421
|
end
|
262
422
|
end
|
@@ -30,7 +30,7 @@ module Twilio
|
|
30
30
|
# @param [String] iccid The
|
31
31
|
# {ICCID}[https://en.wikipedia.org/wiki/Subscriber_identity_module#ICCID] of the
|
32
32
|
# Super SIM to be added to your Account.
|
33
|
-
# @param [String] registration_code The 10
|
33
|
+
# @param [String] registration_code The 10-digit code required to claim the Super
|
34
34
|
# SIM for your Account.
|
35
35
|
# @return [SimInstance] Created SimInstance
|
36
36
|
def create(iccid: nil, registration_code: nil)
|
@@ -51,24 +51,24 @@ module Twilio
|
|
51
51
|
#
|
52
52
|
# Required when `factor_type` is `push`
|
53
53
|
# @param [String] config_app_id The ID that uniquely identifies your app in the
|
54
|
-
# Google or Apple store, such as `com.example.myapp`.
|
55
|
-
#
|
56
|
-
# Required when `factor_type` is `push`. If specified, it can be up to 100
|
54
|
+
# Google or Apple store, such as `com.example.myapp`. It can be up to 100
|
57
55
|
# characters long.
|
56
|
+
#
|
57
|
+
# Required when `factor_type` is `push`.
|
58
58
|
# @param [new_factor.NotificationPlatforms] config_notification_platform The
|
59
59
|
# transport technology used to generate the Notification Token. Can be `apn` or
|
60
60
|
# `fcm`.
|
61
61
|
#
|
62
|
-
# Required when `factor_type` is `push
|
62
|
+
# Required when `factor_type` is `push`.
|
63
63
|
# @param [String] config_notification_token For APN, the device token. For FCM the
|
64
|
-
# registration token. It used to send the push notifications.
|
64
|
+
# registration token. It used to send the push notifications. Must be between 32
|
65
|
+
# and 255 characters long.
|
65
66
|
#
|
66
|
-
#
|
67
|
-
# characters long.
|
67
|
+
# Required when `factor_type` is `push`.
|
68
68
|
# @param [String] config_sdk_version The Verify Push SDK version used to configure
|
69
69
|
# the factor
|
70
70
|
#
|
71
|
-
#
|
71
|
+
# Required when `factor_type` is `push`
|
72
72
|
# @param [String] binding_secret The shared secret for TOTP factors encoded in
|
73
73
|
# Base32. This can be provided when creating the Factor, otherwise it will be
|
74
74
|
# generated.
|
@@ -10,8 +10,6 @@ module Twilio
|
|
10
10
|
module REST
|
11
11
|
class Video < Domain
|
12
12
|
class V1 < Version
|
13
|
-
##
|
14
|
-
# PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
|
15
13
|
class CompositionList < ListResource
|
16
14
|
##
|
17
15
|
# Initialize the CompositionList
|
@@ -234,8 +232,6 @@ module Twilio
|
|
234
232
|
end
|
235
233
|
end
|
236
234
|
|
237
|
-
##
|
238
|
-
# PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
|
239
235
|
class CompositionPage < Page
|
240
236
|
##
|
241
237
|
# Initialize the CompositionPage
|
@@ -265,8 +261,6 @@ module Twilio
|
|
265
261
|
end
|
266
262
|
end
|
267
263
|
|
268
|
-
##
|
269
|
-
# PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
|
270
264
|
class CompositionContext < InstanceContext
|
271
265
|
##
|
272
266
|
# Initialize the CompositionContext
|
@@ -312,8 +306,6 @@ module Twilio
|
|
312
306
|
end
|
313
307
|
end
|
314
308
|
|
315
|
-
##
|
316
|
-
# PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
|
317
309
|
class CompositionInstance < InstanceResource
|
318
310
|
##
|
319
311
|
# Initialize the CompositionInstance
|
@@ -10,8 +10,6 @@ module Twilio
|
|
10
10
|
module REST
|
11
11
|
class Video < Domain
|
12
12
|
class V1 < Version
|
13
|
-
##
|
14
|
-
# PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
|
15
13
|
class CompositionHookList < ListResource
|
16
14
|
##
|
17
15
|
# Initialize the CompositionHookList
|
@@ -248,8 +246,6 @@ module Twilio
|
|
248
246
|
end
|
249
247
|
end
|
250
248
|
|
251
|
-
##
|
252
|
-
# PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
|
253
249
|
class CompositionHookPage < Page
|
254
250
|
##
|
255
251
|
# Initialize the CompositionHookPage
|
@@ -279,8 +275,6 @@ module Twilio
|
|
279
275
|
end
|
280
276
|
end
|
281
277
|
|
282
|
-
##
|
283
|
-
# PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
|
284
278
|
class CompositionHookContext < InstanceContext
|
285
279
|
##
|
286
280
|
# Initialize the CompositionHookContext
|
@@ -412,8 +406,6 @@ module Twilio
|
|
412
406
|
end
|
413
407
|
end
|
414
408
|
|
415
|
-
##
|
416
|
-
# PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
|
417
409
|
class CompositionHookInstance < InstanceResource
|
418
410
|
##
|
419
411
|
# Initialize the CompositionHookInstance
|
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: 5.
|
4
|
+
version: 5.54.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: 2021-05-
|
11
|
+
date: 2021-05-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jwt
|