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
@@ -34,6 +34,7 @@ module Twilio
|
|
34
34
|
# @param [Boolean] beta The beta
|
35
35
|
# @param [String] friendly_name The friendly_name
|
36
36
|
# @param [String] phone_number The phone_number
|
37
|
+
# @param [String] origin The origin
|
37
38
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
38
39
|
# guarantees to never return more than limit. Default is no limit
|
39
40
|
# @param [Integer] page_size Number of records to fetch per request, when not set will use
|
@@ -41,11 +42,12 @@ module Twilio
|
|
41
42
|
# but a limit is defined, stream() will attempt to read the
|
42
43
|
# limit with the most efficient page size, i.e. min(limit, 1000)
|
43
44
|
# @return [Array] Array of up to limit results
|
44
|
-
def list(beta: :unset, friendly_name: :unset, phone_number: :unset, limit: nil, page_size: nil)
|
45
|
+
def list(beta: :unset, friendly_name: :unset, phone_number: :unset, origin: :unset, limit: nil, page_size: nil)
|
45
46
|
self.stream(
|
46
47
|
beta: beta,
|
47
48
|
friendly_name: friendly_name,
|
48
49
|
phone_number: phone_number,
|
50
|
+
origin: origin,
|
49
51
|
limit: limit,
|
50
52
|
page_size: page_size
|
51
53
|
).entries
|
@@ -58,6 +60,7 @@ module Twilio
|
|
58
60
|
# @param [Boolean] beta The beta
|
59
61
|
# @param [String] friendly_name The friendly_name
|
60
62
|
# @param [String] phone_number The phone_number
|
63
|
+
# @param [String] origin The origin
|
61
64
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
62
65
|
# guarantees to never return more than limit. Default is no limit
|
63
66
|
# @param [Integer] page_size Number of records to fetch per request, when not set will use
|
@@ -65,13 +68,14 @@ module Twilio
|
|
65
68
|
# but a limit is defined, stream() will attempt to read the
|
66
69
|
# limit with the most efficient page size, i.e. min(limit, 1000)
|
67
70
|
# @return [Enumerable] Enumerable that will yield up to limit results
|
68
|
-
def stream(beta: :unset, friendly_name: :unset, phone_number: :unset, limit: nil, page_size: nil)
|
71
|
+
def stream(beta: :unset, friendly_name: :unset, phone_number: :unset, origin: :unset, limit: nil, page_size: nil)
|
69
72
|
limits = @version.read_limits(limit, page_size)
|
70
73
|
|
71
74
|
page = self.page(
|
72
75
|
beta: beta,
|
73
76
|
friendly_name: friendly_name,
|
74
77
|
phone_number: phone_number,
|
78
|
+
origin: origin,
|
75
79
|
page_size: limits[:page_size],
|
76
80
|
)
|
77
81
|
|
@@ -85,6 +89,7 @@ module Twilio
|
|
85
89
|
# @param [Boolean] beta The beta
|
86
90
|
# @param [String] friendly_name The friendly_name
|
87
91
|
# @param [String] phone_number The phone_number
|
92
|
+
# @param [String] origin The origin
|
88
93
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
89
94
|
# guarantees to never return more than limit. Default is no limit
|
90
95
|
# @param [Integer] page_size Number of records to fetch per request, when not set will use
|
@@ -109,15 +114,17 @@ module Twilio
|
|
109
114
|
# @param [Boolean] beta The beta
|
110
115
|
# @param [String] friendly_name The friendly_name
|
111
116
|
# @param [String] phone_number The phone_number
|
117
|
+
# @param [String] origin The origin
|
112
118
|
# @param [String] page_token PageToken provided by the API
|
113
119
|
# @param [Integer] page_number Page Number, this value is simply for client state
|
114
120
|
# @param [Integer] page_size Number of records to return, defaults to 50
|
115
121
|
# @return [Page] Page of LocalInstance
|
116
|
-
def page(beta: :unset, friendly_name: :unset, phone_number: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
|
122
|
+
def page(beta: :unset, friendly_name: :unset, phone_number: :unset, origin: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
|
117
123
|
params = Twilio::Values.of({
|
118
124
|
'Beta' => beta,
|
119
125
|
'FriendlyName' => friendly_name,
|
120
126
|
'PhoneNumber' => phone_number,
|
127
|
+
'Origin' => origin,
|
121
128
|
'PageToken' => page_token,
|
122
129
|
'Page' => page_number,
|
123
130
|
'PageSize' => page_size,
|
@@ -260,6 +267,7 @@ module Twilio
|
|
260
267
|
'date_updated' => Twilio.deserialize_rfc2822(payload['date_updated']),
|
261
268
|
'friendly_name' => payload['friendly_name'],
|
262
269
|
'phone_number' => payload['phone_number'],
|
270
|
+
'origin' => payload['origin'],
|
263
271
|
'sid' => payload['sid'],
|
264
272
|
'sms_application_sid' => payload['sms_application_sid'],
|
265
273
|
'sms_fallback_method' => payload['sms_fallback_method'],
|
@@ -315,6 +323,10 @@ module Twilio
|
|
315
323
|
@properties['phone_number']
|
316
324
|
end
|
317
325
|
|
326
|
+
def origin
|
327
|
+
@properties['origin']
|
328
|
+
end
|
329
|
+
|
318
330
|
def sid
|
319
331
|
@properties['sid']
|
320
332
|
end
|
@@ -34,6 +34,7 @@ module Twilio
|
|
34
34
|
# @param [Boolean] beta The beta
|
35
35
|
# @param [String] friendly_name The friendly_name
|
36
36
|
# @param [String] phone_number The phone_number
|
37
|
+
# @param [String] origin The origin
|
37
38
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
38
39
|
# guarantees to never return more than limit. Default is no limit
|
39
40
|
# @param [Integer] page_size Number of records to fetch per request, when not set will use
|
@@ -41,11 +42,12 @@ module Twilio
|
|
41
42
|
# but a limit is defined, stream() will attempt to read the
|
42
43
|
# limit with the most efficient page size, i.e. min(limit, 1000)
|
43
44
|
# @return [Array] Array of up to limit results
|
44
|
-
def list(beta: :unset, friendly_name: :unset, phone_number: :unset, limit: nil, page_size: nil)
|
45
|
+
def list(beta: :unset, friendly_name: :unset, phone_number: :unset, origin: :unset, limit: nil, page_size: nil)
|
45
46
|
self.stream(
|
46
47
|
beta: beta,
|
47
48
|
friendly_name: friendly_name,
|
48
49
|
phone_number: phone_number,
|
50
|
+
origin: origin,
|
49
51
|
limit: limit,
|
50
52
|
page_size: page_size
|
51
53
|
).entries
|
@@ -58,6 +60,7 @@ module Twilio
|
|
58
60
|
# @param [Boolean] beta The beta
|
59
61
|
# @param [String] friendly_name The friendly_name
|
60
62
|
# @param [String] phone_number The phone_number
|
63
|
+
# @param [String] origin The origin
|
61
64
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
62
65
|
# guarantees to never return more than limit. Default is no limit
|
63
66
|
# @param [Integer] page_size Number of records to fetch per request, when not set will use
|
@@ -65,13 +68,14 @@ module Twilio
|
|
65
68
|
# but a limit is defined, stream() will attempt to read the
|
66
69
|
# limit with the most efficient page size, i.e. min(limit, 1000)
|
67
70
|
# @return [Enumerable] Enumerable that will yield up to limit results
|
68
|
-
def stream(beta: :unset, friendly_name: :unset, phone_number: :unset, limit: nil, page_size: nil)
|
71
|
+
def stream(beta: :unset, friendly_name: :unset, phone_number: :unset, origin: :unset, limit: nil, page_size: nil)
|
69
72
|
limits = @version.read_limits(limit, page_size)
|
70
73
|
|
71
74
|
page = self.page(
|
72
75
|
beta: beta,
|
73
76
|
friendly_name: friendly_name,
|
74
77
|
phone_number: phone_number,
|
78
|
+
origin: origin,
|
75
79
|
page_size: limits[:page_size],
|
76
80
|
)
|
77
81
|
|
@@ -85,6 +89,7 @@ module Twilio
|
|
85
89
|
# @param [Boolean] beta The beta
|
86
90
|
# @param [String] friendly_name The friendly_name
|
87
91
|
# @param [String] phone_number The phone_number
|
92
|
+
# @param [String] origin The origin
|
88
93
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
89
94
|
# guarantees to never return more than limit. Default is no limit
|
90
95
|
# @param [Integer] page_size Number of records to fetch per request, when not set will use
|
@@ -109,15 +114,17 @@ module Twilio
|
|
109
114
|
# @param [Boolean] beta The beta
|
110
115
|
# @param [String] friendly_name The friendly_name
|
111
116
|
# @param [String] phone_number The phone_number
|
117
|
+
# @param [String] origin The origin
|
112
118
|
# @param [String] page_token PageToken provided by the API
|
113
119
|
# @param [Integer] page_number Page Number, this value is simply for client state
|
114
120
|
# @param [Integer] page_size Number of records to return, defaults to 50
|
115
121
|
# @return [Page] Page of MobileInstance
|
116
|
-
def page(beta: :unset, friendly_name: :unset, phone_number: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
|
122
|
+
def page(beta: :unset, friendly_name: :unset, phone_number: :unset, origin: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
|
117
123
|
params = Twilio::Values.of({
|
118
124
|
'Beta' => beta,
|
119
125
|
'FriendlyName' => friendly_name,
|
120
126
|
'PhoneNumber' => phone_number,
|
127
|
+
'Origin' => origin,
|
121
128
|
'PageToken' => page_token,
|
122
129
|
'Page' => page_number,
|
123
130
|
'PageSize' => page_size,
|
@@ -260,6 +267,7 @@ module Twilio
|
|
260
267
|
'date_updated' => Twilio.deserialize_rfc2822(payload['date_updated']),
|
261
268
|
'friendly_name' => payload['friendly_name'],
|
262
269
|
'phone_number' => payload['phone_number'],
|
270
|
+
'origin' => payload['origin'],
|
263
271
|
'sid' => payload['sid'],
|
264
272
|
'sms_application_sid' => payload['sms_application_sid'],
|
265
273
|
'sms_fallback_method' => payload['sms_fallback_method'],
|
@@ -315,6 +323,10 @@ module Twilio
|
|
315
323
|
@properties['phone_number']
|
316
324
|
end
|
317
325
|
|
326
|
+
def origin
|
327
|
+
@properties['origin']
|
328
|
+
end
|
329
|
+
|
318
330
|
def sid
|
319
331
|
@properties['sid']
|
320
332
|
end
|
@@ -34,6 +34,7 @@ module Twilio
|
|
34
34
|
# @param [Boolean] beta The beta
|
35
35
|
# @param [String] friendly_name The friendly_name
|
36
36
|
# @param [String] phone_number The phone_number
|
37
|
+
# @param [String] origin The origin
|
37
38
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
38
39
|
# guarantees to never return more than limit. Default is no limit
|
39
40
|
# @param [Integer] page_size Number of records to fetch per request, when not set will use
|
@@ -41,11 +42,12 @@ module Twilio
|
|
41
42
|
# but a limit is defined, stream() will attempt to read the
|
42
43
|
# limit with the most efficient page size, i.e. min(limit, 1000)
|
43
44
|
# @return [Array] Array of up to limit results
|
44
|
-
def list(beta: :unset, friendly_name: :unset, phone_number: :unset, limit: nil, page_size: nil)
|
45
|
+
def list(beta: :unset, friendly_name: :unset, phone_number: :unset, origin: :unset, limit: nil, page_size: nil)
|
45
46
|
self.stream(
|
46
47
|
beta: beta,
|
47
48
|
friendly_name: friendly_name,
|
48
49
|
phone_number: phone_number,
|
50
|
+
origin: origin,
|
49
51
|
limit: limit,
|
50
52
|
page_size: page_size
|
51
53
|
).entries
|
@@ -58,6 +60,7 @@ module Twilio
|
|
58
60
|
# @param [Boolean] beta The beta
|
59
61
|
# @param [String] friendly_name The friendly_name
|
60
62
|
# @param [String] phone_number The phone_number
|
63
|
+
# @param [String] origin The origin
|
61
64
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
62
65
|
# guarantees to never return more than limit. Default is no limit
|
63
66
|
# @param [Integer] page_size Number of records to fetch per request, when not set will use
|
@@ -65,13 +68,14 @@ module Twilio
|
|
65
68
|
# but a limit is defined, stream() will attempt to read the
|
66
69
|
# limit with the most efficient page size, i.e. min(limit, 1000)
|
67
70
|
# @return [Enumerable] Enumerable that will yield up to limit results
|
68
|
-
def stream(beta: :unset, friendly_name: :unset, phone_number: :unset, limit: nil, page_size: nil)
|
71
|
+
def stream(beta: :unset, friendly_name: :unset, phone_number: :unset, origin: :unset, limit: nil, page_size: nil)
|
69
72
|
limits = @version.read_limits(limit, page_size)
|
70
73
|
|
71
74
|
page = self.page(
|
72
75
|
beta: beta,
|
73
76
|
friendly_name: friendly_name,
|
74
77
|
phone_number: phone_number,
|
78
|
+
origin: origin,
|
75
79
|
page_size: limits[:page_size],
|
76
80
|
)
|
77
81
|
|
@@ -85,6 +89,7 @@ module Twilio
|
|
85
89
|
# @param [Boolean] beta The beta
|
86
90
|
# @param [String] friendly_name The friendly_name
|
87
91
|
# @param [String] phone_number The phone_number
|
92
|
+
# @param [String] origin The origin
|
88
93
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
89
94
|
# guarantees to never return more than limit. Default is no limit
|
90
95
|
# @param [Integer] page_size Number of records to fetch per request, when not set will use
|
@@ -109,15 +114,17 @@ module Twilio
|
|
109
114
|
# @param [Boolean] beta The beta
|
110
115
|
# @param [String] friendly_name The friendly_name
|
111
116
|
# @param [String] phone_number The phone_number
|
117
|
+
# @param [String] origin The origin
|
112
118
|
# @param [String] page_token PageToken provided by the API
|
113
119
|
# @param [Integer] page_number Page Number, this value is simply for client state
|
114
120
|
# @param [Integer] page_size Number of records to return, defaults to 50
|
115
121
|
# @return [Page] Page of TollFreeInstance
|
116
|
-
def page(beta: :unset, friendly_name: :unset, phone_number: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
|
122
|
+
def page(beta: :unset, friendly_name: :unset, phone_number: :unset, origin: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
|
117
123
|
params = Twilio::Values.of({
|
118
124
|
'Beta' => beta,
|
119
125
|
'FriendlyName' => friendly_name,
|
120
126
|
'PhoneNumber' => phone_number,
|
127
|
+
'Origin' => origin,
|
121
128
|
'PageToken' => page_token,
|
122
129
|
'Page' => page_number,
|
123
130
|
'PageSize' => page_size,
|
@@ -260,6 +267,7 @@ module Twilio
|
|
260
267
|
'date_updated' => Twilio.deserialize_rfc2822(payload['date_updated']),
|
261
268
|
'friendly_name' => payload['friendly_name'],
|
262
269
|
'phone_number' => payload['phone_number'],
|
270
|
+
'origin' => payload['origin'],
|
263
271
|
'sid' => payload['sid'],
|
264
272
|
'sms_application_sid' => payload['sms_application_sid'],
|
265
273
|
'sms_fallback_method' => payload['sms_fallback_method'],
|
@@ -315,6 +323,10 @@ module Twilio
|
|
315
323
|
@properties['phone_number']
|
316
324
|
end
|
317
325
|
|
326
|
+
def origin
|
327
|
+
@properties['origin']
|
328
|
+
end
|
329
|
+
|
318
330
|
def sid
|
319
331
|
@properties['sid']
|
320
332
|
end
|
@@ -25,10 +25,14 @@ module Twilio
|
|
25
25
|
# Lists FaxInstance records from the API as a list.
|
26
26
|
# Unlike stream(), this operation is eager and will load `limit` records into
|
27
27
|
# memory before returning.
|
28
|
-
# @param [String] from
|
29
|
-
#
|
30
|
-
# @param [
|
31
|
-
#
|
28
|
+
# @param [String] from Filters the returned list to only include faxes sent from
|
29
|
+
# the supplied number, given in E.164 format.
|
30
|
+
# @param [String] to Filters the returned list to only include faxes sent to the
|
31
|
+
# supplied number, given in E.164 format.
|
32
|
+
# @param [Time] date_created_on_or_before Filters the returned list to only
|
33
|
+
# include faxes created on or before the supplied date, given in ISO 8601 format.
|
34
|
+
# @param [Time] date_created_after Filters the returned list to only include faxes
|
35
|
+
# created after the supplied date, given in ISO 8601 format.
|
32
36
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
33
37
|
# guarantees to never return more than limit. Default is no limit
|
34
38
|
# @param [Integer] page_size Number of records to fetch per request, when not set will use
|
@@ -51,10 +55,14 @@ module Twilio
|
|
51
55
|
# Streams FaxInstance records from the API as an Enumerable.
|
52
56
|
# This operation lazily loads records as efficiently as possible until the limit
|
53
57
|
# is reached.
|
54
|
-
# @param [String] from
|
55
|
-
#
|
56
|
-
# @param [
|
57
|
-
#
|
58
|
+
# @param [String] from Filters the returned list to only include faxes sent from
|
59
|
+
# the supplied number, given in E.164 format.
|
60
|
+
# @param [String] to Filters the returned list to only include faxes sent to the
|
61
|
+
# supplied number, given in E.164 format.
|
62
|
+
# @param [Time] date_created_on_or_before Filters the returned list to only
|
63
|
+
# include faxes created on or before the supplied date, given in ISO 8601 format.
|
64
|
+
# @param [Time] date_created_after Filters the returned list to only include faxes
|
65
|
+
# created after the supplied date, given in ISO 8601 format.
|
58
66
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
59
67
|
# guarantees to never return more than limit. Default is no limit
|
60
68
|
# @param [Integer] page_size Number of records to fetch per request, when not set will use
|
@@ -80,10 +88,14 @@ module Twilio
|
|
80
88
|
# When passed a block, yields FaxInstance records from the API.
|
81
89
|
# This operation lazily loads records as efficiently as possible until the limit
|
82
90
|
# is reached.
|
83
|
-
# @param [String] from
|
84
|
-
#
|
85
|
-
# @param [
|
86
|
-
#
|
91
|
+
# @param [String] from Filters the returned list to only include faxes sent from
|
92
|
+
# the supplied number, given in E.164 format.
|
93
|
+
# @param [String] to Filters the returned list to only include faxes sent to the
|
94
|
+
# supplied number, given in E.164 format.
|
95
|
+
# @param [Time] date_created_on_or_before Filters the returned list to only
|
96
|
+
# include faxes created on or before the supplied date, given in ISO 8601 format.
|
97
|
+
# @param [Time] date_created_after Filters the returned list to only include faxes
|
98
|
+
# created after the supplied date, given in ISO 8601 format.
|
87
99
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
88
100
|
# guarantees to never return more than limit. Default is no limit
|
89
101
|
# @param [Integer] page_size Number of records to fetch per request, when not set will use
|
@@ -105,10 +117,14 @@ module Twilio
|
|
105
117
|
##
|
106
118
|
# Retrieve a single page of FaxInstance records from the API.
|
107
119
|
# Request is executed immediately.
|
108
|
-
# @param [String] from
|
109
|
-
#
|
110
|
-
# @param [
|
111
|
-
#
|
120
|
+
# @param [String] from Filters the returned list to only include faxes sent from
|
121
|
+
# the supplied number, given in E.164 format.
|
122
|
+
# @param [String] to Filters the returned list to only include faxes sent to the
|
123
|
+
# supplied number, given in E.164 format.
|
124
|
+
# @param [Time] date_created_on_or_before Filters the returned list to only
|
125
|
+
# include faxes created on or before the supplied date, given in ISO 8601 format.
|
126
|
+
# @param [Time] date_created_after Filters the returned list to only include faxes
|
127
|
+
# created after the supplied date, given in ISO 8601 format.
|
112
128
|
# @param [String] page_token PageToken provided by the API
|
113
129
|
# @param [Integer] page_number Page Number, this value is simply for client state
|
114
130
|
# @param [Integer] page_size Number of records to return, defaults to 50
|
@@ -147,15 +163,27 @@ module Twilio
|
|
147
163
|
##
|
148
164
|
# Retrieve a single page of FaxInstance records from the API.
|
149
165
|
# Request is executed immediately.
|
150
|
-
# @param [String] to The to
|
151
|
-
#
|
152
|
-
# @param [
|
153
|
-
#
|
154
|
-
# @param [
|
155
|
-
#
|
156
|
-
# @param [String]
|
166
|
+
# @param [String] to The phone number or SIP address to send the fax to,
|
167
|
+
# E.164-formatted.
|
168
|
+
# @param [String] media_url The URL that Twilio will request to obtain the fax
|
169
|
+
# media to send, which must be a PDF file.
|
170
|
+
# @param [fax.Quality] quality The quality setting to use for this fax. One of
|
171
|
+
# `standard`, `fine` or `superfine`.
|
172
|
+
# @param [String] status_callback The URL that Twilio will request when the status
|
173
|
+
# of the fax changes.
|
174
|
+
# @param [String] from The phone number to use as the caller id, E.164-formatted.
|
175
|
+
# If using a phone number, it must be a Twilio number or a verified outgoing
|
176
|
+
# caller id for your account. If sending to a SIP address, this can be any
|
177
|
+
# alphanumeric string (plus the characters `+`, `_`, `.`, and `-`) to use in the
|
178
|
+
# From header of the SIP request.
|
179
|
+
# @param [String] sip_auth_username The username to use for authentication when
|
180
|
+
# sending to a SIP address.
|
181
|
+
# @param [String] sip_auth_password The password to use for authentication when
|
182
|
+
# sending to a SIP address.
|
183
|
+
# @param [Boolean] store_media Whether or not to store a copy of the sent media on
|
184
|
+
# Twilio's servers for later retrieval (defaults to `true`)
|
157
185
|
# @return [FaxInstance] Newly created FaxInstance
|
158
|
-
def create(to: nil, media_url: nil, quality: :unset, status_callback: :unset, from: :unset, sip_auth_username: :unset, sip_auth_password: :unset)
|
186
|
+
def create(to: nil, media_url: nil, quality: :unset, status_callback: :unset, from: :unset, sip_auth_username: :unset, sip_auth_password: :unset, store_media: :unset)
|
159
187
|
data = Twilio::Values.of({
|
160
188
|
'To' => to,
|
161
189
|
'MediaUrl' => media_url,
|
@@ -164,6 +192,7 @@ module Twilio
|
|
164
192
|
'From' => from,
|
165
193
|
'SipAuthUsername' => sip_auth_username,
|
166
194
|
'SipAuthPassword' => sip_auth_password,
|
195
|
+
'StoreMedia' => store_media,
|
167
196
|
})
|
168
197
|
|
169
198
|
payload = @version.create(
|
@@ -221,7 +250,7 @@ module Twilio
|
|
221
250
|
##
|
222
251
|
# Initialize the FaxContext
|
223
252
|
# @param [Version] version Version that contains the resource
|
224
|
-
# @param [String] sid
|
253
|
+
# @param [String] sid A 34 character string that uniquely identifies this fax.
|
225
254
|
# @return [FaxContext] FaxContext
|
226
255
|
def initialize(version, sid)
|
227
256
|
super(version)
|
@@ -257,7 +286,9 @@ module Twilio
|
|
257
286
|
|
258
287
|
##
|
259
288
|
# Update the FaxInstance
|
260
|
-
# @param [fax.UpdateStatus] status The status
|
289
|
+
# @param [fax.UpdateStatus] status The updated status of this fax. The only valid
|
290
|
+
# option is `canceled`. This may fail if the status has already started
|
291
|
+
# transmission.
|
261
292
|
# @return [FaxInstance] Updated FaxInstance
|
262
293
|
def update(status: :unset)
|
263
294
|
data = Twilio::Values.of({
|
@@ -319,7 +350,7 @@ module Twilio
|
|
319
350
|
# Initialize the FaxInstance
|
320
351
|
# @param [Version] version Version that contains the resource
|
321
352
|
# @param [Hash] payload payload that contains response from Twilio
|
322
|
-
# @param [String] sid
|
353
|
+
# @param [String] sid A 34 character string that uniquely identifies this fax.
|
323
354
|
# @return [FaxInstance] FaxInstance
|
324
355
|
def initialize(version, payload, sid: nil)
|
325
356
|
super(version)
|
@@ -449,7 +480,9 @@ module Twilio
|
|
449
480
|
|
450
481
|
##
|
451
482
|
# Update the FaxInstance
|
452
|
-
# @param [fax.UpdateStatus] status The status
|
483
|
+
# @param [fax.UpdateStatus] status The updated status of this fax. The only valid
|
484
|
+
# option is `canceled`. This may fail if the status has already started
|
485
|
+
# transmission.
|
453
486
|
# @return [FaxInstance] Updated FaxInstance
|
454
487
|
def update(status: :unset)
|
455
488
|
context.update(
|
@@ -13,7 +13,8 @@ module Twilio
|
|
13
13
|
##
|
14
14
|
# Initialize the FaxMediaList
|
15
15
|
# @param [Version] version Version that contains the resource
|
16
|
-
# @param [String] fax_sid The
|
16
|
+
# @param [String] fax_sid The unique SID identifier of the fax for which this
|
17
|
+
# media is associated.
|
17
18
|
# @return [FaxMediaList] FaxMediaList
|
18
19
|
def initialize(version, fax_sid: nil)
|
19
20
|
super(version)
|
@@ -133,7 +134,8 @@ module Twilio
|
|
133
134
|
# @param [Version] version Version that contains the resource
|
134
135
|
# @param [Response] response Response from the API
|
135
136
|
# @param [Hash] solution Path solution for the resource
|
136
|
-
# @param [String] fax_sid The
|
137
|
+
# @param [String] fax_sid The unique SID identifier of the fax for which this
|
138
|
+
# media is associated.
|
137
139
|
# @return [FaxMediaPage] FaxMediaPage
|
138
140
|
def initialize(version, response, solution)
|
139
141
|
super(version, response)
|
@@ -165,8 +167,9 @@ module Twilio
|
|
165
167
|
##
|
166
168
|
# Initialize the FaxMediaContext
|
167
169
|
# @param [Version] version Version that contains the resource
|
168
|
-
# @param [String] fax_sid The
|
169
|
-
# @param [String] sid
|
170
|
+
# @param [String] fax_sid The unique SID identifier of the fax.
|
171
|
+
# @param [String] sid A 34 character string that uniquely identifies this fax
|
172
|
+
# media.
|
170
173
|
# @return [FaxMediaContext] FaxMediaContext
|
171
174
|
def initialize(version, fax_sid, sid)
|
172
175
|
super(version)
|
@@ -219,8 +222,10 @@ module Twilio
|
|
219
222
|
# Initialize the FaxMediaInstance
|
220
223
|
# @param [Version] version Version that contains the resource
|
221
224
|
# @param [Hash] payload payload that contains response from Twilio
|
222
|
-
# @param [String] fax_sid The
|
223
|
-
#
|
225
|
+
# @param [String] fax_sid The unique SID identifier of the fax for which this
|
226
|
+
# media is associated.
|
227
|
+
# @param [String] sid A 34 character string that uniquely identifies this fax
|
228
|
+
# media.
|
224
229
|
# @return [FaxMediaInstance] FaxMediaInstance
|
225
230
|
def initialize(version, payload, fax_sid: nil, sid: nil)
|
226
231
|
super(version)
|