twilio-ruby 5.0.0.rc22 → 5.0.0.rc23
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGES.md +10 -0
- data/lib/twilio-ruby/jwt/client_capability.rb +17 -8
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/local.rb +15 -3
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/mobile.rb +15 -3
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/toll_free.rb +15 -3
- data/lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb +10 -2
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number.rb +15 -3
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/local.rb +15 -3
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/mobile.rb +15 -3
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/toll_free.rb +15 -3
- data/lib/twilio-ruby/rest/fax/v1/fax.rb +61 -28
- data/lib/twilio-ruby/rest/fax/v1/fax/fax_media.rb +11 -6
- data/lib/twilio-ruby/rest/notify/v1/service.rb +28 -3
- data/lib/twilio-ruby/rest/notify/v1/service/notification.rb +8 -1
- data/lib/twilio-ruby/rest/preview/hosted_numbers/hosted_number_order.rb +1 -4
- data/lib/twilio-ruby/twiml/voice_response.rb +5 -20
- data/lib/twilio-ruby/version.rb +1 -1
- data/spec/integration/api/v2010/account/available_phone_number/local_spec.rb +1 -0
- data/spec/integration/api/v2010/account/available_phone_number/mobile_spec.rb +1 -0
- data/spec/integration/api/v2010/account/available_phone_number/toll_free_spec.rb +1 -0
- data/spec/integration/api/v2010/account/incoming_phone_number/local_spec.rb +2 -0
- data/spec/integration/api/v2010/account/incoming_phone_number/mobile_spec.rb +2 -0
- data/spec/integration/api/v2010/account/incoming_phone_number/toll_free_spec.rb +2 -0
- data/spec/integration/api/v2010/account/incoming_phone_number_spec.rb +4 -0
- data/spec/integration/notify/v1/service/notification_spec.rb +2 -1
- data/spec/integration/notify/v1/service/user/user_binding_spec.rb +34 -0
- data/spec/integration/notify/v1/service_spec.rb +8 -0
- data/spec/integration/preview/hosted_numbers/hosted_number_order_spec.rb +2 -3
- data/spec/integration/taskrouter/v1/workspace/worker_spec.rb +57 -41
- data/spec/integration/taskrouter/v1/workspace_spec.rb +38 -30
- data/spec/jwt/client_capability_spec.rb +9 -9
- data/spec/twiml/voice_response_spec.rb +5 -5
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 27d0c2725f763ee3e94eef5bfcce66a248e68f2f
|
4
|
+
data.tar.gz: 03b533162b0b36375f262daf6546887f3b9be898
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: aeb7534c11020286795582015a4464a2509bd79d1511aa2da9c085c2fb4fb3e397747c444c504e67cfe9ab27ace6f7e98e01aa0e0d64fe21ce0e887d33e06f9f
|
7
|
+
data.tar.gz: a8f0ef0b4b43ec7063da19d049df005c83ca32e3e31a16b47ccffbea0d0c763bdb7d7e86a9aea4d18245718e8d7821a18948940fccc39c411594e9101c890fd3
|
data/CHANGES.md
CHANGED
@@ -1,5 +1,15 @@
|
|
1
1
|
twilio-ruby changelog
|
2
2
|
=====================
|
3
|
+
[2017-06-19] Version 5.0.0-rc23
|
4
|
+
-------------------------------
|
5
|
+
- Fixed ClientCapability parameter encoded bug.
|
6
|
+
- Optional URL parameter for TwiML Play verb.
|
7
|
+
|
8
|
+
[2017-06-15] Version 5.0.0-rc22
|
9
|
+
-------------------------------
|
10
|
+
- Refactor JWT token constructors
|
11
|
+
|
12
|
+
|
3
13
|
[2017-05-24] Version 5.0.0-rc21
|
4
14
|
-------------------------------
|
5
15
|
- Add HostedNumbers preview support.
|
@@ -52,7 +52,10 @@ module Twilio
|
|
52
52
|
end
|
53
53
|
|
54
54
|
def _generate_payload
|
55
|
-
"scope:client:incoming
|
55
|
+
prefix = "scope:client:incoming"
|
56
|
+
suffix = "clientName=" + CGI.escape("#{@client_name}")
|
57
|
+
|
58
|
+
[prefix, suffix].join('?')
|
56
59
|
end
|
57
60
|
|
58
61
|
end
|
@@ -68,16 +71,15 @@ module Twilio
|
|
68
71
|
|
69
72
|
def _generate_payload
|
70
73
|
prefix = "scope:client:outgoing"
|
71
|
-
application_sid = "appSid=#{@application_sid}"
|
74
|
+
application_sid = "appSid=#{CGI.escape(@application_sid)}"
|
72
75
|
unless @client_name.nil?
|
73
|
-
client_name = "clientName=#{@client_name}"
|
76
|
+
client_name = "clientName=#{CGI.escape(@client_name)}"
|
74
77
|
end
|
75
78
|
unless @params.empty?
|
76
|
-
params = "appParams=" + @params.map {|k, v| "#{k}=#{v}"}.join('&')
|
79
|
+
params = "appParams=" + @params.map {|k, v| CGI.escape("#{k}=#{v}")}.join('&')
|
77
80
|
end
|
78
81
|
|
79
|
-
suffix =
|
80
|
-
|
82
|
+
suffix = [application_sid, client_name, params].compact.join('&')
|
81
83
|
[prefix, suffix].join('?')
|
82
84
|
end
|
83
85
|
end
|
@@ -87,11 +89,18 @@ module Twilio
|
|
87
89
|
|
88
90
|
def initialize(filters = {})
|
89
91
|
@filters = filters
|
90
|
-
@
|
92
|
+
@path = '/2010-04-01/Events'
|
91
93
|
end
|
92
94
|
|
93
95
|
def _generate_payload
|
94
|
-
"scope:stream:subscribe
|
96
|
+
prefix = "scope:stream:subscribe"
|
97
|
+
path = "path=#{CGI.escape(@path)}"
|
98
|
+
unless @filters.empty?
|
99
|
+
filters = "params=" + @filters.map {|k, v| CGI.escape("#{k}=#{v}")}.join('&')
|
100
|
+
end
|
101
|
+
|
102
|
+
suffix = [path, filters].compact.join('&')
|
103
|
+
[prefix, suffix].join('?')
|
95
104
|
end
|
96
105
|
end
|
97
106
|
end
|
@@ -51,6 +51,7 @@ module Twilio
|
|
51
51
|
# @param [String] in_region The in_region
|
52
52
|
# @param [String] in_rate_center The in_rate_center
|
53
53
|
# @param [String] in_lata The in_lata
|
54
|
+
# @param [String] in_locality The in_locality
|
54
55
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
55
56
|
# guarantees to never return more than limit. Default is no limit
|
56
57
|
# @param [Integer] page_size Number of records to fetch per request, when not set will use
|
@@ -58,7 +59,7 @@ module Twilio
|
|
58
59
|
# but a limit is defined, stream() will attempt to read the
|
59
60
|
# limit with the most efficient page size, i.e. min(limit, 1000)
|
60
61
|
# @return [Array] Array of up to limit results
|
61
|
-
def list(area_code: :unset, contains: :unset, sms_enabled: :unset, mms_enabled: :unset, voice_enabled: :unset, exclude_all_address_required: :unset, exclude_local_address_required: :unset, exclude_foreign_address_required: :unset, beta: :unset, near_number: :unset, near_lat_long: :unset, distance: :unset, in_postal_code: :unset, in_region: :unset, in_rate_center: :unset, in_lata: :unset, limit: nil, page_size: nil)
|
62
|
+
def list(area_code: :unset, contains: :unset, sms_enabled: :unset, mms_enabled: :unset, voice_enabled: :unset, exclude_all_address_required: :unset, exclude_local_address_required: :unset, exclude_foreign_address_required: :unset, beta: :unset, near_number: :unset, near_lat_long: :unset, distance: :unset, in_postal_code: :unset, in_region: :unset, in_rate_center: :unset, in_lata: :unset, in_locality: :unset, limit: nil, page_size: nil)
|
62
63
|
self.stream(
|
63
64
|
area_code: area_code,
|
64
65
|
contains: contains,
|
@@ -76,6 +77,7 @@ module Twilio
|
|
76
77
|
in_region: in_region,
|
77
78
|
in_rate_center: in_rate_center,
|
78
79
|
in_lata: in_lata,
|
80
|
+
in_locality: in_locality,
|
79
81
|
limit: limit,
|
80
82
|
page_size: page_size
|
81
83
|
).entries
|
@@ -103,6 +105,7 @@ module Twilio
|
|
103
105
|
# @param [String] in_region The in_region
|
104
106
|
# @param [String] in_rate_center The in_rate_center
|
105
107
|
# @param [String] in_lata The in_lata
|
108
|
+
# @param [String] in_locality The in_locality
|
106
109
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
107
110
|
# guarantees to never return more than limit. Default is no limit
|
108
111
|
# @param [Integer] page_size Number of records to fetch per request, when not set will use
|
@@ -110,7 +113,7 @@ module Twilio
|
|
110
113
|
# but a limit is defined, stream() will attempt to read the
|
111
114
|
# limit with the most efficient page size, i.e. min(limit, 1000)
|
112
115
|
# @return [Enumerable] Enumerable that will yield up to limit results
|
113
|
-
def stream(area_code: :unset, contains: :unset, sms_enabled: :unset, mms_enabled: :unset, voice_enabled: :unset, exclude_all_address_required: :unset, exclude_local_address_required: :unset, exclude_foreign_address_required: :unset, beta: :unset, near_number: :unset, near_lat_long: :unset, distance: :unset, in_postal_code: :unset, in_region: :unset, in_rate_center: :unset, in_lata: :unset, limit: nil, page_size: nil)
|
116
|
+
def stream(area_code: :unset, contains: :unset, sms_enabled: :unset, mms_enabled: :unset, voice_enabled: :unset, exclude_all_address_required: :unset, exclude_local_address_required: :unset, exclude_foreign_address_required: :unset, beta: :unset, near_number: :unset, near_lat_long: :unset, distance: :unset, in_postal_code: :unset, in_region: :unset, in_rate_center: :unset, in_lata: :unset, in_locality: :unset, limit: nil, page_size: nil)
|
114
117
|
limits = @version.read_limits(limit, page_size)
|
115
118
|
|
116
119
|
page = self.page(
|
@@ -130,6 +133,7 @@ module Twilio
|
|
130
133
|
in_region: in_region,
|
131
134
|
in_rate_center: in_rate_center,
|
132
135
|
in_lata: in_lata,
|
136
|
+
in_locality: in_locality,
|
133
137
|
page_size: limits[:page_size],
|
134
138
|
)
|
135
139
|
|
@@ -158,6 +162,7 @@ module Twilio
|
|
158
162
|
# @param [String] in_region The in_region
|
159
163
|
# @param [String] in_rate_center The in_rate_center
|
160
164
|
# @param [String] in_lata The in_lata
|
165
|
+
# @param [String] in_locality The in_locality
|
161
166
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
162
167
|
# guarantees to never return more than limit. Default is no limit
|
163
168
|
# @param [Integer] page_size Number of records to fetch per request, when not set will use
|
@@ -197,11 +202,12 @@ module Twilio
|
|
197
202
|
# @param [String] in_region The in_region
|
198
203
|
# @param [String] in_rate_center The in_rate_center
|
199
204
|
# @param [String] in_lata The in_lata
|
205
|
+
# @param [String] in_locality The in_locality
|
200
206
|
# @param [String] page_token PageToken provided by the API
|
201
207
|
# @param [Integer] page_number Page Number, this value is simply for client state
|
202
208
|
# @param [Integer] page_size Number of records to return, defaults to 50
|
203
209
|
# @return [Page] Page of LocalInstance
|
204
|
-
def page(area_code: :unset, contains: :unset, sms_enabled: :unset, mms_enabled: :unset, voice_enabled: :unset, exclude_all_address_required: :unset, exclude_local_address_required: :unset, exclude_foreign_address_required: :unset, beta: :unset, near_number: :unset, near_lat_long: :unset, distance: :unset, in_postal_code: :unset, in_region: :unset, in_rate_center: :unset, in_lata: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
|
210
|
+
def page(area_code: :unset, contains: :unset, sms_enabled: :unset, mms_enabled: :unset, voice_enabled: :unset, exclude_all_address_required: :unset, exclude_local_address_required: :unset, exclude_foreign_address_required: :unset, beta: :unset, near_number: :unset, near_lat_long: :unset, distance: :unset, in_postal_code: :unset, in_region: :unset, in_rate_center: :unset, in_lata: :unset, in_locality: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
|
205
211
|
params = Twilio::Values.of({
|
206
212
|
'AreaCode' => area_code,
|
207
213
|
'Contains' => contains,
|
@@ -219,6 +225,7 @@ module Twilio
|
|
219
225
|
'InRegion' => in_region,
|
220
226
|
'InRateCenter' => in_rate_center,
|
221
227
|
'InLata' => in_lata,
|
228
|
+
'InLocality' => in_locality,
|
222
229
|
'PageToken' => page_token,
|
223
230
|
'Page' => page_number,
|
224
231
|
'PageSize' => page_size,
|
@@ -305,6 +312,7 @@ module Twilio
|
|
305
312
|
'friendly_name' => payload['friendly_name'],
|
306
313
|
'phone_number' => payload['phone_number'],
|
307
314
|
'lata' => payload['lata'],
|
315
|
+
'locality' => payload['locality'],
|
308
316
|
'rate_center' => payload['rate_center'],
|
309
317
|
'latitude' => payload['latitude'].to_f,
|
310
318
|
'longitude' => payload['longitude'].to_f,
|
@@ -329,6 +337,10 @@ module Twilio
|
|
329
337
|
@properties['lata']
|
330
338
|
end
|
331
339
|
|
340
|
+
def locality
|
341
|
+
@properties['locality']
|
342
|
+
end
|
343
|
+
|
332
344
|
def rate_center
|
333
345
|
@properties['rate_center']
|
334
346
|
end
|
@@ -51,6 +51,7 @@ module Twilio
|
|
51
51
|
# @param [String] in_region The in_region
|
52
52
|
# @param [String] in_rate_center The in_rate_center
|
53
53
|
# @param [String] in_lata The in_lata
|
54
|
+
# @param [String] in_locality The in_locality
|
54
55
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
55
56
|
# guarantees to never return more than limit. Default is no limit
|
56
57
|
# @param [Integer] page_size Number of records to fetch per request, when not set will use
|
@@ -58,7 +59,7 @@ module Twilio
|
|
58
59
|
# but a limit is defined, stream() will attempt to read the
|
59
60
|
# limit with the most efficient page size, i.e. min(limit, 1000)
|
60
61
|
# @return [Array] Array of up to limit results
|
61
|
-
def list(area_code: :unset, contains: :unset, sms_enabled: :unset, mms_enabled: :unset, voice_enabled: :unset, exclude_all_address_required: :unset, exclude_local_address_required: :unset, exclude_foreign_address_required: :unset, beta: :unset, near_number: :unset, near_lat_long: :unset, distance: :unset, in_postal_code: :unset, in_region: :unset, in_rate_center: :unset, in_lata: :unset, limit: nil, page_size: nil)
|
62
|
+
def list(area_code: :unset, contains: :unset, sms_enabled: :unset, mms_enabled: :unset, voice_enabled: :unset, exclude_all_address_required: :unset, exclude_local_address_required: :unset, exclude_foreign_address_required: :unset, beta: :unset, near_number: :unset, near_lat_long: :unset, distance: :unset, in_postal_code: :unset, in_region: :unset, in_rate_center: :unset, in_lata: :unset, in_locality: :unset, limit: nil, page_size: nil)
|
62
63
|
self.stream(
|
63
64
|
area_code: area_code,
|
64
65
|
contains: contains,
|
@@ -76,6 +77,7 @@ module Twilio
|
|
76
77
|
in_region: in_region,
|
77
78
|
in_rate_center: in_rate_center,
|
78
79
|
in_lata: in_lata,
|
80
|
+
in_locality: in_locality,
|
79
81
|
limit: limit,
|
80
82
|
page_size: page_size
|
81
83
|
).entries
|
@@ -103,6 +105,7 @@ module Twilio
|
|
103
105
|
# @param [String] in_region The in_region
|
104
106
|
# @param [String] in_rate_center The in_rate_center
|
105
107
|
# @param [String] in_lata The in_lata
|
108
|
+
# @param [String] in_locality The in_locality
|
106
109
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
107
110
|
# guarantees to never return more than limit. Default is no limit
|
108
111
|
# @param [Integer] page_size Number of records to fetch per request, when not set will use
|
@@ -110,7 +113,7 @@ module Twilio
|
|
110
113
|
# but a limit is defined, stream() will attempt to read the
|
111
114
|
# limit with the most efficient page size, i.e. min(limit, 1000)
|
112
115
|
# @return [Enumerable] Enumerable that will yield up to limit results
|
113
|
-
def stream(area_code: :unset, contains: :unset, sms_enabled: :unset, mms_enabled: :unset, voice_enabled: :unset, exclude_all_address_required: :unset, exclude_local_address_required: :unset, exclude_foreign_address_required: :unset, beta: :unset, near_number: :unset, near_lat_long: :unset, distance: :unset, in_postal_code: :unset, in_region: :unset, in_rate_center: :unset, in_lata: :unset, limit: nil, page_size: nil)
|
116
|
+
def stream(area_code: :unset, contains: :unset, sms_enabled: :unset, mms_enabled: :unset, voice_enabled: :unset, exclude_all_address_required: :unset, exclude_local_address_required: :unset, exclude_foreign_address_required: :unset, beta: :unset, near_number: :unset, near_lat_long: :unset, distance: :unset, in_postal_code: :unset, in_region: :unset, in_rate_center: :unset, in_lata: :unset, in_locality: :unset, limit: nil, page_size: nil)
|
114
117
|
limits = @version.read_limits(limit, page_size)
|
115
118
|
|
116
119
|
page = self.page(
|
@@ -130,6 +133,7 @@ module Twilio
|
|
130
133
|
in_region: in_region,
|
131
134
|
in_rate_center: in_rate_center,
|
132
135
|
in_lata: in_lata,
|
136
|
+
in_locality: in_locality,
|
133
137
|
page_size: limits[:page_size],
|
134
138
|
)
|
135
139
|
|
@@ -158,6 +162,7 @@ module Twilio
|
|
158
162
|
# @param [String] in_region The in_region
|
159
163
|
# @param [String] in_rate_center The in_rate_center
|
160
164
|
# @param [String] in_lata The in_lata
|
165
|
+
# @param [String] in_locality The in_locality
|
161
166
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
162
167
|
# guarantees to never return more than limit. Default is no limit
|
163
168
|
# @param [Integer] page_size Number of records to fetch per request, when not set will use
|
@@ -197,11 +202,12 @@ module Twilio
|
|
197
202
|
# @param [String] in_region The in_region
|
198
203
|
# @param [String] in_rate_center The in_rate_center
|
199
204
|
# @param [String] in_lata The in_lata
|
205
|
+
# @param [String] in_locality The in_locality
|
200
206
|
# @param [String] page_token PageToken provided by the API
|
201
207
|
# @param [Integer] page_number Page Number, this value is simply for client state
|
202
208
|
# @param [Integer] page_size Number of records to return, defaults to 50
|
203
209
|
# @return [Page] Page of MobileInstance
|
204
|
-
def page(area_code: :unset, contains: :unset, sms_enabled: :unset, mms_enabled: :unset, voice_enabled: :unset, exclude_all_address_required: :unset, exclude_local_address_required: :unset, exclude_foreign_address_required: :unset, beta: :unset, near_number: :unset, near_lat_long: :unset, distance: :unset, in_postal_code: :unset, in_region: :unset, in_rate_center: :unset, in_lata: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
|
210
|
+
def page(area_code: :unset, contains: :unset, sms_enabled: :unset, mms_enabled: :unset, voice_enabled: :unset, exclude_all_address_required: :unset, exclude_local_address_required: :unset, exclude_foreign_address_required: :unset, beta: :unset, near_number: :unset, near_lat_long: :unset, distance: :unset, in_postal_code: :unset, in_region: :unset, in_rate_center: :unset, in_lata: :unset, in_locality: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
|
205
211
|
params = Twilio::Values.of({
|
206
212
|
'AreaCode' => area_code,
|
207
213
|
'Contains' => contains,
|
@@ -219,6 +225,7 @@ module Twilio
|
|
219
225
|
'InRegion' => in_region,
|
220
226
|
'InRateCenter' => in_rate_center,
|
221
227
|
'InLata' => in_lata,
|
228
|
+
'InLocality' => in_locality,
|
222
229
|
'PageToken' => page_token,
|
223
230
|
'Page' => page_number,
|
224
231
|
'PageSize' => page_size,
|
@@ -305,6 +312,7 @@ module Twilio
|
|
305
312
|
'friendly_name' => payload['friendly_name'],
|
306
313
|
'phone_number' => payload['phone_number'],
|
307
314
|
'lata' => payload['lata'],
|
315
|
+
'locality' => payload['locality'],
|
308
316
|
'rate_center' => payload['rate_center'],
|
309
317
|
'latitude' => payload['latitude'].to_f,
|
310
318
|
'longitude' => payload['longitude'].to_f,
|
@@ -329,6 +337,10 @@ module Twilio
|
|
329
337
|
@properties['lata']
|
330
338
|
end
|
331
339
|
|
340
|
+
def locality
|
341
|
+
@properties['locality']
|
342
|
+
end
|
343
|
+
|
332
344
|
def rate_center
|
333
345
|
@properties['rate_center']
|
334
346
|
end
|
@@ -51,6 +51,7 @@ module Twilio
|
|
51
51
|
# @param [String] in_region The in_region
|
52
52
|
# @param [String] in_rate_center The in_rate_center
|
53
53
|
# @param [String] in_lata The in_lata
|
54
|
+
# @param [String] in_locality The in_locality
|
54
55
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
55
56
|
# guarantees to never return more than limit. Default is no limit
|
56
57
|
# @param [Integer] page_size Number of records to fetch per request, when not set will use
|
@@ -58,7 +59,7 @@ module Twilio
|
|
58
59
|
# but a limit is defined, stream() will attempt to read the
|
59
60
|
# limit with the most efficient page size, i.e. min(limit, 1000)
|
60
61
|
# @return [Array] Array of up to limit results
|
61
|
-
def list(area_code: :unset, contains: :unset, sms_enabled: :unset, mms_enabled: :unset, voice_enabled: :unset, exclude_all_address_required: :unset, exclude_local_address_required: :unset, exclude_foreign_address_required: :unset, beta: :unset, near_number: :unset, near_lat_long: :unset, distance: :unset, in_postal_code: :unset, in_region: :unset, in_rate_center: :unset, in_lata: :unset, limit: nil, page_size: nil)
|
62
|
+
def list(area_code: :unset, contains: :unset, sms_enabled: :unset, mms_enabled: :unset, voice_enabled: :unset, exclude_all_address_required: :unset, exclude_local_address_required: :unset, exclude_foreign_address_required: :unset, beta: :unset, near_number: :unset, near_lat_long: :unset, distance: :unset, in_postal_code: :unset, in_region: :unset, in_rate_center: :unset, in_lata: :unset, in_locality: :unset, limit: nil, page_size: nil)
|
62
63
|
self.stream(
|
63
64
|
area_code: area_code,
|
64
65
|
contains: contains,
|
@@ -76,6 +77,7 @@ module Twilio
|
|
76
77
|
in_region: in_region,
|
77
78
|
in_rate_center: in_rate_center,
|
78
79
|
in_lata: in_lata,
|
80
|
+
in_locality: in_locality,
|
79
81
|
limit: limit,
|
80
82
|
page_size: page_size
|
81
83
|
).entries
|
@@ -103,6 +105,7 @@ module Twilio
|
|
103
105
|
# @param [String] in_region The in_region
|
104
106
|
# @param [String] in_rate_center The in_rate_center
|
105
107
|
# @param [String] in_lata The in_lata
|
108
|
+
# @param [String] in_locality The in_locality
|
106
109
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
107
110
|
# guarantees to never return more than limit. Default is no limit
|
108
111
|
# @param [Integer] page_size Number of records to fetch per request, when not set will use
|
@@ -110,7 +113,7 @@ module Twilio
|
|
110
113
|
# but a limit is defined, stream() will attempt to read the
|
111
114
|
# limit with the most efficient page size, i.e. min(limit, 1000)
|
112
115
|
# @return [Enumerable] Enumerable that will yield up to limit results
|
113
|
-
def stream(area_code: :unset, contains: :unset, sms_enabled: :unset, mms_enabled: :unset, voice_enabled: :unset, exclude_all_address_required: :unset, exclude_local_address_required: :unset, exclude_foreign_address_required: :unset, beta: :unset, near_number: :unset, near_lat_long: :unset, distance: :unset, in_postal_code: :unset, in_region: :unset, in_rate_center: :unset, in_lata: :unset, limit: nil, page_size: nil)
|
116
|
+
def stream(area_code: :unset, contains: :unset, sms_enabled: :unset, mms_enabled: :unset, voice_enabled: :unset, exclude_all_address_required: :unset, exclude_local_address_required: :unset, exclude_foreign_address_required: :unset, beta: :unset, near_number: :unset, near_lat_long: :unset, distance: :unset, in_postal_code: :unset, in_region: :unset, in_rate_center: :unset, in_lata: :unset, in_locality: :unset, limit: nil, page_size: nil)
|
114
117
|
limits = @version.read_limits(limit, page_size)
|
115
118
|
|
116
119
|
page = self.page(
|
@@ -130,6 +133,7 @@ module Twilio
|
|
130
133
|
in_region: in_region,
|
131
134
|
in_rate_center: in_rate_center,
|
132
135
|
in_lata: in_lata,
|
136
|
+
in_locality: in_locality,
|
133
137
|
page_size: limits[:page_size],
|
134
138
|
)
|
135
139
|
|
@@ -158,6 +162,7 @@ module Twilio
|
|
158
162
|
# @param [String] in_region The in_region
|
159
163
|
# @param [String] in_rate_center The in_rate_center
|
160
164
|
# @param [String] in_lata The in_lata
|
165
|
+
# @param [String] in_locality The in_locality
|
161
166
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
162
167
|
# guarantees to never return more than limit. Default is no limit
|
163
168
|
# @param [Integer] page_size Number of records to fetch per request, when not set will use
|
@@ -197,11 +202,12 @@ module Twilio
|
|
197
202
|
# @param [String] in_region The in_region
|
198
203
|
# @param [String] in_rate_center The in_rate_center
|
199
204
|
# @param [String] in_lata The in_lata
|
205
|
+
# @param [String] in_locality The in_locality
|
200
206
|
# @param [String] page_token PageToken provided by the API
|
201
207
|
# @param [Integer] page_number Page Number, this value is simply for client state
|
202
208
|
# @param [Integer] page_size Number of records to return, defaults to 50
|
203
209
|
# @return [Page] Page of TollFreeInstance
|
204
|
-
def page(area_code: :unset, contains: :unset, sms_enabled: :unset, mms_enabled: :unset, voice_enabled: :unset, exclude_all_address_required: :unset, exclude_local_address_required: :unset, exclude_foreign_address_required: :unset, beta: :unset, near_number: :unset, near_lat_long: :unset, distance: :unset, in_postal_code: :unset, in_region: :unset, in_rate_center: :unset, in_lata: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
|
210
|
+
def page(area_code: :unset, contains: :unset, sms_enabled: :unset, mms_enabled: :unset, voice_enabled: :unset, exclude_all_address_required: :unset, exclude_local_address_required: :unset, exclude_foreign_address_required: :unset, beta: :unset, near_number: :unset, near_lat_long: :unset, distance: :unset, in_postal_code: :unset, in_region: :unset, in_rate_center: :unset, in_lata: :unset, in_locality: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
|
205
211
|
params = Twilio::Values.of({
|
206
212
|
'AreaCode' => area_code,
|
207
213
|
'Contains' => contains,
|
@@ -219,6 +225,7 @@ module Twilio
|
|
219
225
|
'InRegion' => in_region,
|
220
226
|
'InRateCenter' => in_rate_center,
|
221
227
|
'InLata' => in_lata,
|
228
|
+
'InLocality' => in_locality,
|
222
229
|
'PageToken' => page_token,
|
223
230
|
'Page' => page_number,
|
224
231
|
'PageSize' => page_size,
|
@@ -305,6 +312,7 @@ module Twilio
|
|
305
312
|
'friendly_name' => payload['friendly_name'],
|
306
313
|
'phone_number' => payload['phone_number'],
|
307
314
|
'lata' => payload['lata'],
|
315
|
+
'locality' => payload['locality'],
|
308
316
|
'rate_center' => payload['rate_center'],
|
309
317
|
'latitude' => payload['latitude'].to_f,
|
310
318
|
'longitude' => payload['longitude'].to_f,
|
@@ -329,6 +337,10 @@ module Twilio
|
|
329
337
|
@properties['lata']
|
330
338
|
end
|
331
339
|
|
340
|
+
def locality
|
341
|
+
@properties['locality']
|
342
|
+
end
|
343
|
+
|
332
344
|
def rate_center
|
333
345
|
@properties['rate_center']
|
334
346
|
end
|
@@ -315,13 +315,17 @@ module Twilio
|
|
315
315
|
# @param [Boolean] hold The hold
|
316
316
|
# @param [String] hold_url The hold_url
|
317
317
|
# @param [String] hold_method The hold_method
|
318
|
+
# @param [String] announce_url The announce_url
|
319
|
+
# @param [String] announce_url_method The announce_url_method
|
318
320
|
# @return [ParticipantInstance] Updated ParticipantInstance
|
319
|
-
def update(muted: :unset, hold: :unset, hold_url: :unset, hold_method: :unset)
|
321
|
+
def update(muted: :unset, hold: :unset, hold_url: :unset, hold_method: :unset, announce_url: :unset, announce_url_method: :unset)
|
320
322
|
data = Twilio::Values.of({
|
321
323
|
'Muted' => muted,
|
322
324
|
'Hold' => hold,
|
323
325
|
'HoldUrl' => hold_url,
|
324
326
|
'HoldMethod' => hold_method,
|
327
|
+
'AnnounceUrl' => announce_url,
|
328
|
+
'AnnounceUrlMethod' => announce_url_method,
|
325
329
|
})
|
326
330
|
|
327
331
|
payload = @version.update(
|
@@ -466,13 +470,17 @@ module Twilio
|
|
466
470
|
# @param [Boolean] hold The hold
|
467
471
|
# @param [String] hold_url The hold_url
|
468
472
|
# @param [String] hold_method The hold_method
|
473
|
+
# @param [String] announce_url The announce_url
|
474
|
+
# @param [String] announce_url_method The announce_url_method
|
469
475
|
# @return [ParticipantInstance] Updated ParticipantInstance
|
470
|
-
def update(muted: :unset, hold: :unset, hold_url: :unset, hold_method: :unset)
|
476
|
+
def update(muted: :unset, hold: :unset, hold_url: :unset, hold_method: :unset, announce_url: :unset, announce_url_method: :unset)
|
471
477
|
context.update(
|
472
478
|
muted: muted,
|
473
479
|
hold: hold,
|
474
480
|
hold_url: hold_url,
|
475
481
|
hold_method: hold_method,
|
482
|
+
announce_url: announce_url,
|
483
|
+
announce_url_method: announce_url_method,
|
476
484
|
)
|
477
485
|
end
|
478
486
|
|
@@ -40,6 +40,7 @@ module Twilio
|
|
40
40
|
# friendly names that exactly match this name
|
41
41
|
# @param [String] phone_number Only show the incoming phone number resources that
|
42
42
|
# match this pattern
|
43
|
+
# @param [String] origin The origin
|
43
44
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
44
45
|
# guarantees to never return more than limit. Default is no limit
|
45
46
|
# @param [Integer] page_size Number of records to fetch per request, when not set will use
|
@@ -47,11 +48,12 @@ module Twilio
|
|
47
48
|
# but a limit is defined, stream() will attempt to read the
|
48
49
|
# limit with the most efficient page size, i.e. min(limit, 1000)
|
49
50
|
# @return [Array] Array of up to limit results
|
50
|
-
def list(beta: :unset, friendly_name: :unset, phone_number: :unset, limit: nil, page_size: nil)
|
51
|
+
def list(beta: :unset, friendly_name: :unset, phone_number: :unset, origin: :unset, limit: nil, page_size: nil)
|
51
52
|
self.stream(
|
52
53
|
beta: beta,
|
53
54
|
friendly_name: friendly_name,
|
54
55
|
phone_number: phone_number,
|
56
|
+
origin: origin,
|
55
57
|
limit: limit,
|
56
58
|
page_size: page_size
|
57
59
|
).entries
|
@@ -66,6 +68,7 @@ module Twilio
|
|
66
68
|
# friendly names that exactly match this name
|
67
69
|
# @param [String] phone_number Only show the incoming phone number resources that
|
68
70
|
# match this pattern
|
71
|
+
# @param [String] origin The origin
|
69
72
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
70
73
|
# guarantees to never return more than limit. Default is no limit
|
71
74
|
# @param [Integer] page_size Number of records to fetch per request, when not set will use
|
@@ -73,13 +76,14 @@ module Twilio
|
|
73
76
|
# but a limit is defined, stream() will attempt to read the
|
74
77
|
# limit with the most efficient page size, i.e. min(limit, 1000)
|
75
78
|
# @return [Enumerable] Enumerable that will yield up to limit results
|
76
|
-
def stream(beta: :unset, friendly_name: :unset, phone_number: :unset, limit: nil, page_size: nil)
|
79
|
+
def stream(beta: :unset, friendly_name: :unset, phone_number: :unset, origin: :unset, limit: nil, page_size: nil)
|
77
80
|
limits = @version.read_limits(limit, page_size)
|
78
81
|
|
79
82
|
page = self.page(
|
80
83
|
beta: beta,
|
81
84
|
friendly_name: friendly_name,
|
82
85
|
phone_number: phone_number,
|
86
|
+
origin: origin,
|
83
87
|
page_size: limits[:page_size],
|
84
88
|
)
|
85
89
|
|
@@ -95,6 +99,7 @@ module Twilio
|
|
95
99
|
# friendly names that exactly match this name
|
96
100
|
# @param [String] phone_number Only show the incoming phone number resources that
|
97
101
|
# match this pattern
|
102
|
+
# @param [String] origin The origin
|
98
103
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
99
104
|
# guarantees to never return more than limit. Default is no limit
|
100
105
|
# @param [Integer] page_size Number of records to fetch per request, when not set will use
|
@@ -121,15 +126,17 @@ module Twilio
|
|
121
126
|
# friendly names that exactly match this name
|
122
127
|
# @param [String] phone_number Only show the incoming phone number resources that
|
123
128
|
# match this pattern
|
129
|
+
# @param [String] origin The origin
|
124
130
|
# @param [String] page_token PageToken provided by the API
|
125
131
|
# @param [Integer] page_number Page Number, this value is simply for client state
|
126
132
|
# @param [Integer] page_size Number of records to return, defaults to 50
|
127
133
|
# @return [Page] Page of IncomingPhoneNumberInstance
|
128
|
-
def page(beta: :unset, friendly_name: :unset, phone_number: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
|
134
|
+
def page(beta: :unset, friendly_name: :unset, phone_number: :unset, origin: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
|
129
135
|
params = Twilio::Values.of({
|
130
136
|
'Beta' => beta,
|
131
137
|
'FriendlyName' => friendly_name,
|
132
138
|
'PhoneNumber' => phone_number,
|
139
|
+
'Origin' => origin,
|
133
140
|
'PageToken' => page_token,
|
134
141
|
'Page' => page_number,
|
135
142
|
'PageSize' => page_size,
|
@@ -506,6 +513,7 @@ module Twilio
|
|
506
513
|
'date_updated' => Twilio.deserialize_rfc2822(payload['date_updated']),
|
507
514
|
'friendly_name' => payload['friendly_name'],
|
508
515
|
'phone_number' => payload['phone_number'],
|
516
|
+
'origin' => payload['origin'],
|
509
517
|
'sid' => payload['sid'],
|
510
518
|
'sms_application_sid' => payload['sms_application_sid'],
|
511
519
|
'sms_fallback_method' => payload['sms_fallback_method'],
|
@@ -586,6 +594,10 @@ module Twilio
|
|
586
594
|
@properties['phone_number']
|
587
595
|
end
|
588
596
|
|
597
|
+
def origin
|
598
|
+
@properties['origin']
|
599
|
+
end
|
600
|
+
|
589
601
|
def sid
|
590
602
|
@properties['sid']
|
591
603
|
end
|