twilio-ruby 5.63.1 → 5.64.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -443,6 +443,7 @@ module Twilio
443
443
  @events = nil
444
444
  @payments = nil
445
445
  @siprec = nil
446
+ @streams = nil
446
447
  end
447
448
 
448
449
  ##
@@ -617,6 +618,24 @@ module Twilio
617
618
  @siprec
618
619
  end
619
620
 
621
+ ##
622
+ # Access the streams
623
+ # @return [StreamList]
624
+ # @return [StreamContext] if sid was passed.
625
+ def streams(sid=:unset)
626
+ raise ArgumentError, 'sid cannot be nil' if sid.nil?
627
+
628
+ if sid != :unset
629
+ return StreamContext.new(@version, @solution[:account_sid], @solution[:sid], sid, )
630
+ end
631
+
632
+ unless @streams
633
+ @streams = StreamList.new(@version, account_sid: @solution[:account_sid], call_sid: @solution[:sid], )
634
+ end
635
+
636
+ @streams
637
+ end
638
+
620
639
  ##
621
640
  # Provide a user friendly representation
622
641
  def to_s
@@ -958,6 +977,13 @@ module Twilio
958
977
  context.siprec
959
978
  end
960
979
 
980
+ ##
981
+ # Access the streams
982
+ # @return [streams] streams
983
+ def streams
984
+ context.streams
985
+ end
986
+
961
987
  ##
962
988
  # Provide a user friendly representation
963
989
  def to_s
@@ -0,0 +1,435 @@
1
+ ##
2
+ # This code was generated by
3
+ # \ / _ _ _| _ _
4
+ # | (_)\/(_)(_|\/| |(/_ v1.0.0
5
+ # / /
6
+ #
7
+ # frozen_string_literal: true
8
+
9
+ module Twilio
10
+ module REST
11
+ class Conversations < Domain
12
+ class V1 < Version
13
+ class AddressConfigurationList < ListResource
14
+ ##
15
+ # Initialize the AddressConfigurationList
16
+ # @param [Version] version Version that contains the resource
17
+ # @return [AddressConfigurationList] AddressConfigurationList
18
+ def initialize(version)
19
+ super(version)
20
+
21
+ # Path Solution
22
+ @solution = {}
23
+ @uri = "/Configuration/Addresses"
24
+ end
25
+
26
+ ##
27
+ # Lists AddressConfigurationInstance records from the API as a list.
28
+ # Unlike stream(), this operation is eager and will load `limit` records into
29
+ # memory before returning.
30
+ # @param [Integer] limit Upper limit for the number of records to return. stream()
31
+ # guarantees to never return more than limit. Default is no limit
32
+ # @param [Integer] page_size Number of records to fetch per request, when
33
+ # not set will use the default value of 50 records. If no page_size is defined
34
+ # but a limit is defined, stream() will attempt to read the limit with the most
35
+ # efficient page size, i.e. min(limit, 1000)
36
+ # @return [Array] Array of up to limit results
37
+ def list(limit: nil, page_size: nil)
38
+ self.stream(limit: limit, page_size: page_size).entries
39
+ end
40
+
41
+ ##
42
+ # Streams AddressConfigurationInstance records from the API as an Enumerable.
43
+ # This operation lazily loads records as efficiently as possible until the limit
44
+ # is reached.
45
+ # @param [Integer] limit Upper limit for the number of records to return. stream()
46
+ # guarantees to never return more than limit. Default is no limit.
47
+ # @param [Integer] page_size Number of records to fetch per request, when
48
+ # not set will use the default value of 50 records. If no page_size is defined
49
+ # but a limit is defined, stream() will attempt to read the limit with the most
50
+ # efficient page size, i.e. min(limit, 1000)
51
+ # @return [Enumerable] Enumerable that will yield up to limit results
52
+ def stream(limit: nil, page_size: nil)
53
+ limits = @version.read_limits(limit, page_size)
54
+
55
+ page = self.page(page_size: limits[:page_size], )
56
+
57
+ @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit])
58
+ end
59
+
60
+ ##
61
+ # When passed a block, yields AddressConfigurationInstance records from the API.
62
+ # This operation lazily loads records as efficiently as possible until the limit
63
+ # is reached.
64
+ def each
65
+ limits = @version.read_limits
66
+
67
+ page = self.page(page_size: limits[:page_size], )
68
+
69
+ @version.stream(page,
70
+ limit: limits[:limit],
71
+ page_limit: limits[:page_limit]).each {|x| yield x}
72
+ end
73
+
74
+ ##
75
+ # Retrieve a single page of AddressConfigurationInstance records from the API.
76
+ # Request is executed immediately.
77
+ # @param [String] page_token PageToken provided by the API
78
+ # @param [Integer] page_number Page Number, this value is simply for client state
79
+ # @param [Integer] page_size Number of records to return, defaults to 50
80
+ # @return [Page] Page of AddressConfigurationInstance
81
+ def page(page_token: :unset, page_number: :unset, page_size: :unset)
82
+ params = Twilio::Values.of({
83
+ 'PageToken' => page_token,
84
+ 'Page' => page_number,
85
+ 'PageSize' => page_size,
86
+ })
87
+
88
+ response = @version.page('GET', @uri, params: params)
89
+
90
+ AddressConfigurationPage.new(@version, response, @solution)
91
+ end
92
+
93
+ ##
94
+ # Retrieve a single page of AddressConfigurationInstance records from the API.
95
+ # Request is executed immediately.
96
+ # @param [String] target_url API-generated URL for the requested results page
97
+ # @return [Page] Page of AddressConfigurationInstance
98
+ def get_page(target_url)
99
+ response = @version.domain.request(
100
+ 'GET',
101
+ target_url
102
+ )
103
+ AddressConfigurationPage.new(@version, response, @solution)
104
+ end
105
+
106
+ ##
107
+ # Create the AddressConfigurationInstance
108
+ # @param [address_configuration.Type] type Type of Address. Value can be
109
+ # `whatsapp` or `sms`.
110
+ # @param [String] address The unique address to be configured. The address can be
111
+ # a whatsapp address or phone number
112
+ # @param [String] friendly_name The human-readable name of this configuration,
113
+ # limited to 256 characters. Optional.
114
+ # @param [Boolean] auto_creation_enabled Enable/Disable auto-creating
115
+ # conversations for messages to this address
116
+ # @param [address_configuration.AutoCreationType] auto_creation_type Type of Auto
117
+ # Creation. Value can be one of `webhook`, `studio`, `default`.
118
+ # @param [String] auto_creation_conversation_service_sid Conversation Service for
119
+ # the auto-created conversation. If not set, the conversation is created in the
120
+ # default service.
121
+ # @param [String] auto_creation_webhook_url For type `webhook`, the url for the
122
+ # webhook request.
123
+ # @param [address_configuration.Method] auto_creation_webhook_method For type
124
+ # `webhook`, the HTTP method to be used when sending a webhook request.
125
+ # @param [Array[String]] auto_creation_webhook_filters The list of events, firing
126
+ # webhook event for this Conversation.
127
+ # @param [String] auto_creation_studio_flow_sid For type `studio`, the studio flow
128
+ # SID, where the webhook should be sent to.
129
+ # @param [String] auto_creation_studio_retry_count For type `studio`, number of
130
+ # times to retry the webhook request
131
+ # @return [AddressConfigurationInstance] Created AddressConfigurationInstance
132
+ def create(type: nil, address: nil, friendly_name: :unset, auto_creation_enabled: :unset, auto_creation_type: :unset, auto_creation_conversation_service_sid: :unset, auto_creation_webhook_url: :unset, auto_creation_webhook_method: :unset, auto_creation_webhook_filters: :unset, auto_creation_studio_flow_sid: :unset, auto_creation_studio_retry_count: :unset)
133
+ data = Twilio::Values.of({
134
+ 'Type' => type,
135
+ 'Address' => address,
136
+ 'FriendlyName' => friendly_name,
137
+ 'AutoCreation.Enabled' => auto_creation_enabled,
138
+ 'AutoCreation.Type' => auto_creation_type,
139
+ 'AutoCreation.ConversationServiceSid' => auto_creation_conversation_service_sid,
140
+ 'AutoCreation.WebhookUrl' => auto_creation_webhook_url,
141
+ 'AutoCreation.WebhookMethod' => auto_creation_webhook_method,
142
+ 'AutoCreation.WebhookFilters' => Twilio.serialize_list(auto_creation_webhook_filters) { |e| e },
143
+ 'AutoCreation.StudioFlowSid' => auto_creation_studio_flow_sid,
144
+ 'AutoCreation.StudioRetryCount' => auto_creation_studio_retry_count,
145
+ })
146
+
147
+ payload = @version.create('POST', @uri, data: data)
148
+
149
+ AddressConfigurationInstance.new(@version, payload, )
150
+ end
151
+
152
+ ##
153
+ # Provide a user friendly representation
154
+ def to_s
155
+ '#<Twilio.Conversations.V1.AddressConfigurationList>'
156
+ end
157
+ end
158
+
159
+ class AddressConfigurationPage < Page
160
+ ##
161
+ # Initialize the AddressConfigurationPage
162
+ # @param [Version] version Version that contains the resource
163
+ # @param [Response] response Response from the API
164
+ # @param [Hash] solution Path solution for the resource
165
+ # @return [AddressConfigurationPage] AddressConfigurationPage
166
+ def initialize(version, response, solution)
167
+ super(version, response)
168
+
169
+ # Path Solution
170
+ @solution = solution
171
+ end
172
+
173
+ ##
174
+ # Build an instance of AddressConfigurationInstance
175
+ # @param [Hash] payload Payload response from the API
176
+ # @return [AddressConfigurationInstance] AddressConfigurationInstance
177
+ def get_instance(payload)
178
+ AddressConfigurationInstance.new(@version, payload, )
179
+ end
180
+
181
+ ##
182
+ # Provide a user friendly representation
183
+ def to_s
184
+ '<Twilio.Conversations.V1.AddressConfigurationPage>'
185
+ end
186
+ end
187
+
188
+ class AddressConfigurationContext < InstanceContext
189
+ ##
190
+ # Initialize the AddressConfigurationContext
191
+ # @param [Version] version Version that contains the resource
192
+ # @param [String] sid The SID of the Address Configuration resource. This value
193
+ # can be either the `sid` or the `address` of the configuration
194
+ # @return [AddressConfigurationContext] AddressConfigurationContext
195
+ def initialize(version, sid)
196
+ super(version)
197
+
198
+ # Path Solution
199
+ @solution = {sid: sid, }
200
+ @uri = "/Configuration/Addresses/#{@solution[:sid]}"
201
+ end
202
+
203
+ ##
204
+ # Fetch the AddressConfigurationInstance
205
+ # @return [AddressConfigurationInstance] Fetched AddressConfigurationInstance
206
+ def fetch
207
+ payload = @version.fetch('GET', @uri)
208
+
209
+ AddressConfigurationInstance.new(@version, payload, sid: @solution[:sid], )
210
+ end
211
+
212
+ ##
213
+ # Update the AddressConfigurationInstance
214
+ # @param [String] friendly_name The human-readable name of this configuration,
215
+ # limited to 256 characters. Optional.
216
+ # @param [Boolean] auto_creation_enabled Enable/Disable auto-creating
217
+ # conversations for messages to this address
218
+ # @param [address_configuration.AutoCreationType] auto_creation_type Type of Auto
219
+ # Creation. Value can be one of `webhook`, `studio`, `default`.
220
+ # @param [String] auto_creation_conversation_service_sid Conversation Service for
221
+ # the auto-created conversation. If not set, the conversation is created in the
222
+ # default service.
223
+ # @param [String] auto_creation_webhook_url For type `webhook`, the url for the
224
+ # webhook request.
225
+ # @param [address_configuration.Method] auto_creation_webhook_method For type
226
+ # `webhook`, the HTTP method to be used when sending a webhook request.
227
+ # @param [Array[String]] auto_creation_webhook_filters The list of events, firing
228
+ # webhook event for this Conversation.
229
+ # @param [String] auto_creation_studio_flow_sid For type `studio`, the studio flow
230
+ # SID, where the webhook should be sent to.
231
+ # @param [String] auto_creation_studio_retry_count For type `studio`, number of
232
+ # times to retry the webhook request
233
+ # @return [AddressConfigurationInstance] Updated AddressConfigurationInstance
234
+ def update(friendly_name: :unset, auto_creation_enabled: :unset, auto_creation_type: :unset, auto_creation_conversation_service_sid: :unset, auto_creation_webhook_url: :unset, auto_creation_webhook_method: :unset, auto_creation_webhook_filters: :unset, auto_creation_studio_flow_sid: :unset, auto_creation_studio_retry_count: :unset)
235
+ data = Twilio::Values.of({
236
+ 'FriendlyName' => friendly_name,
237
+ 'AutoCreation.Enabled' => auto_creation_enabled,
238
+ 'AutoCreation.Type' => auto_creation_type,
239
+ 'AutoCreation.ConversationServiceSid' => auto_creation_conversation_service_sid,
240
+ 'AutoCreation.WebhookUrl' => auto_creation_webhook_url,
241
+ 'AutoCreation.WebhookMethod' => auto_creation_webhook_method,
242
+ 'AutoCreation.WebhookFilters' => Twilio.serialize_list(auto_creation_webhook_filters) { |e| e },
243
+ 'AutoCreation.StudioFlowSid' => auto_creation_studio_flow_sid,
244
+ 'AutoCreation.StudioRetryCount' => auto_creation_studio_retry_count,
245
+ })
246
+
247
+ payload = @version.update('POST', @uri, data: data)
248
+
249
+ AddressConfigurationInstance.new(@version, payload, sid: @solution[:sid], )
250
+ end
251
+
252
+ ##
253
+ # Delete the AddressConfigurationInstance
254
+ # @return [Boolean] true if delete succeeds, false otherwise
255
+ def delete
256
+ @version.delete('DELETE', @uri)
257
+ end
258
+
259
+ ##
260
+ # Provide a user friendly representation
261
+ def to_s
262
+ context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
263
+ "#<Twilio.Conversations.V1.AddressConfigurationContext #{context}>"
264
+ end
265
+
266
+ ##
267
+ # Provide a detailed, user friendly representation
268
+ def inspect
269
+ context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
270
+ "#<Twilio.Conversations.V1.AddressConfigurationContext #{context}>"
271
+ end
272
+ end
273
+
274
+ class AddressConfigurationInstance < InstanceResource
275
+ ##
276
+ # Initialize the AddressConfigurationInstance
277
+ # @param [Version] version Version that contains the resource
278
+ # @param [Hash] payload payload that contains response from Twilio
279
+ # @param [String] sid The SID of the Address Configuration resource. This value
280
+ # can be either the `sid` or the `address` of the configuration
281
+ # @return [AddressConfigurationInstance] AddressConfigurationInstance
282
+ def initialize(version, payload, sid: nil)
283
+ super(version)
284
+
285
+ # Marshaled Properties
286
+ @properties = {
287
+ 'sid' => payload['sid'],
288
+ 'account_sid' => payload['account_sid'],
289
+ 'type' => payload['type'],
290
+ 'address' => payload['address'],
291
+ 'friendly_name' => payload['friendly_name'],
292
+ 'auto_creation' => payload['auto_creation'],
293
+ 'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
294
+ 'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
295
+ 'url' => payload['url'],
296
+ }
297
+
298
+ # Context
299
+ @instance_context = nil
300
+ @params = {'sid' => sid || @properties['sid'], }
301
+ end
302
+
303
+ ##
304
+ # Generate an instance context for the instance, the context is capable of
305
+ # performing various actions. All instance actions are proxied to the context
306
+ # @return [AddressConfigurationContext] AddressConfigurationContext for this AddressConfigurationInstance
307
+ def context
308
+ unless @instance_context
309
+ @instance_context = AddressConfigurationContext.new(@version, @params['sid'], )
310
+ end
311
+ @instance_context
312
+ end
313
+
314
+ ##
315
+ # @return [String] A 34 character string that uniquely identifies this resource.
316
+ def sid
317
+ @properties['sid']
318
+ end
319
+
320
+ ##
321
+ # @return [String] The unique ID of the Account the address belongs to.
322
+ def account_sid
323
+ @properties['account_sid']
324
+ end
325
+
326
+ ##
327
+ # @return [String] Type of Address, value can be `whatsapp` or `sms`.
328
+ def type
329
+ @properties['type']
330
+ end
331
+
332
+ ##
333
+ # @return [String] The unique address to be configured.
334
+ def address
335
+ @properties['address']
336
+ end
337
+
338
+ ##
339
+ # @return [String] The human-readable name of this configuration.
340
+ def friendly_name
341
+ @properties['friendly_name']
342
+ end
343
+
344
+ ##
345
+ # @return [Hash] Auto Creation configuration for the address.
346
+ def auto_creation
347
+ @properties['auto_creation']
348
+ end
349
+
350
+ ##
351
+ # @return [Time] The date that this resource was created.
352
+ def date_created
353
+ @properties['date_created']
354
+ end
355
+
356
+ ##
357
+ # @return [Time] The date that this resource was last updated.
358
+ def date_updated
359
+ @properties['date_updated']
360
+ end
361
+
362
+ ##
363
+ # @return [String] An absolute URL for this address configuration.
364
+ def url
365
+ @properties['url']
366
+ end
367
+
368
+ ##
369
+ # Fetch the AddressConfigurationInstance
370
+ # @return [AddressConfigurationInstance] Fetched AddressConfigurationInstance
371
+ def fetch
372
+ context.fetch
373
+ end
374
+
375
+ ##
376
+ # Update the AddressConfigurationInstance
377
+ # @param [String] friendly_name The human-readable name of this configuration,
378
+ # limited to 256 characters. Optional.
379
+ # @param [Boolean] auto_creation_enabled Enable/Disable auto-creating
380
+ # conversations for messages to this address
381
+ # @param [address_configuration.AutoCreationType] auto_creation_type Type of Auto
382
+ # Creation. Value can be one of `webhook`, `studio`, `default`.
383
+ # @param [String] auto_creation_conversation_service_sid Conversation Service for
384
+ # the auto-created conversation. If not set, the conversation is created in the
385
+ # default service.
386
+ # @param [String] auto_creation_webhook_url For type `webhook`, the url for the
387
+ # webhook request.
388
+ # @param [address_configuration.Method] auto_creation_webhook_method For type
389
+ # `webhook`, the HTTP method to be used when sending a webhook request.
390
+ # @param [Array[String]] auto_creation_webhook_filters The list of events, firing
391
+ # webhook event for this Conversation.
392
+ # @param [String] auto_creation_studio_flow_sid For type `studio`, the studio flow
393
+ # SID, where the webhook should be sent to.
394
+ # @param [String] auto_creation_studio_retry_count For type `studio`, number of
395
+ # times to retry the webhook request
396
+ # @return [AddressConfigurationInstance] Updated AddressConfigurationInstance
397
+ def update(friendly_name: :unset, auto_creation_enabled: :unset, auto_creation_type: :unset, auto_creation_conversation_service_sid: :unset, auto_creation_webhook_url: :unset, auto_creation_webhook_method: :unset, auto_creation_webhook_filters: :unset, auto_creation_studio_flow_sid: :unset, auto_creation_studio_retry_count: :unset)
398
+ context.update(
399
+ friendly_name: friendly_name,
400
+ auto_creation_enabled: auto_creation_enabled,
401
+ auto_creation_type: auto_creation_type,
402
+ auto_creation_conversation_service_sid: auto_creation_conversation_service_sid,
403
+ auto_creation_webhook_url: auto_creation_webhook_url,
404
+ auto_creation_webhook_method: auto_creation_webhook_method,
405
+ auto_creation_webhook_filters: auto_creation_webhook_filters,
406
+ auto_creation_studio_flow_sid: auto_creation_studio_flow_sid,
407
+ auto_creation_studio_retry_count: auto_creation_studio_retry_count,
408
+ )
409
+ end
410
+
411
+ ##
412
+ # Delete the AddressConfigurationInstance
413
+ # @return [Boolean] true if delete succeeds, false otherwise
414
+ def delete
415
+ context.delete
416
+ end
417
+
418
+ ##
419
+ # Provide a user friendly representation
420
+ def to_s
421
+ values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
422
+ "<Twilio.Conversations.V1.AddressConfigurationInstance #{values}>"
423
+ end
424
+
425
+ ##
426
+ # Provide a detailed, user friendly representation
427
+ def inspect
428
+ values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
429
+ "<Twilio.Conversations.V1.AddressConfigurationInstance #{values}>"
430
+ end
431
+ end
432
+ end
433
+ end
434
+ end
435
+ end
@@ -16,6 +16,7 @@ module Twilio
16
16
  super
17
17
  @version = 'v1'
18
18
  @configuration = nil
19
+ @address_configurations = nil
19
20
  @conversations = nil
20
21
  @credentials = nil
21
22
  @participant_conversations = nil
@@ -30,6 +31,22 @@ module Twilio
30
31
  @configuration ||= ConfigurationContext.new self
31
32
  end
32
33
 
34
+ ##
35
+ # @param [String] sid The SID of the Address Configuration resource. This value
36
+ # can be either the `sid` or the `address` of the configuration
37
+ # @return [Twilio::REST::Conversations::V1::AddressConfigurationContext] if sid was passed.
38
+ # @return [Twilio::REST::Conversations::V1::AddressConfigurationList]
39
+ def address_configurations(sid=:unset)
40
+ if sid.nil?
41
+ raise ArgumentError, 'sid cannot be nil'
42
+ end
43
+ if sid == :unset
44
+ @address_configurations ||= AddressConfigurationList.new self
45
+ else
46
+ AddressConfigurationContext.new(self, sid)
47
+ end
48
+ end
49
+
33
50
  ##
34
51
  # @param [String] sid A 34 character string that uniquely identifies this
35
52
  # resource. Can also be the `unique_name` of the Conversation.
@@ -34,6 +34,15 @@ module Twilio
34
34
  self.v1.configuration()
35
35
  end
36
36
 
37
+ ##
38
+ # @param [String] sid A 34 character string that uniquely identifies this
39
+ # resource.
40
+ # @return [Twilio::REST::Conversations::V1::AddressConfigurationInstance] if sid was passed.
41
+ # @return [Twilio::REST::Conversations::V1::AddressConfigurationList]
42
+ def address_configurations(sid=:unset)
43
+ self.v1.address_configurations(sid)
44
+ end
45
+
37
46
  ##
38
47
  # @param [String] sid A 34 character string that uniquely identifies this
39
48
  # resource.
@@ -152,57 +152,6 @@ module Twilio
152
152
  FaxPage.new(@version, response, @solution)
153
153
  end
154
154
 
155
- ##
156
- # Create the FaxInstance
157
- # @param [String] to The phone number to receive the fax in
158
- # {E.164}[https://www.twilio.com/docs/glossary/what-e164] format or the
159
- # recipient's SIP URI.
160
- # @param [String] media_url The URL of the PDF that contains the fax. See our
161
- # {security}[https://www.twilio.com/docs/usage/security] page for information on
162
- # how to ensure the request for your media comes from Twilio.
163
- # @param [fax.Quality] quality The {Fax Quality
164
- # value}[https://www.twilio.com/docs/fax/api/fax-resource#fax-quality-values] that
165
- # describes the fax quality. Can be: `standard`, `fine`, or `superfine` and
166
- # defaults to `fine`.
167
- # @param [String] status_callback The URL we should call using the `POST` method
168
- # to send {status
169
- # information}[https://www.twilio.com/docs/fax/api/fax-resource#fax-status-callback]
170
- # to your application when the status of the fax changes.
171
- # @param [String] from The number the fax was sent from. Can be the phone number
172
- # in {E.164}[https://www.twilio.com/docs/glossary/what-e164] format or the SIP
173
- # `from` value. The caller ID displayed to the recipient uses this value. If this
174
- # is a phone number, it must be a Twilio number or a verified outgoing caller id
175
- # from your account. If `to` is a SIP address, this can be any alphanumeric string
176
- # (and also the characters `+`, `_`, `.`, and `-`), which will be used in the
177
- # `from` header of the SIP request.
178
- # @param [String] sip_auth_username The username to use with the
179
- # `sip_auth_password` to authenticate faxes sent to a SIP address.
180
- # @param [String] sip_auth_password The password to use with `sip_auth_username`
181
- # to authenticate faxes sent to a SIP address.
182
- # @param [Boolean] store_media Whether to store a copy of the sent media on our
183
- # servers for later retrieval. Can be: `true` or `false` and the default is
184
- # `true`.
185
- # @param [String] ttl How long in minutes from when the fax is initiated that we
186
- # should try to send the fax.
187
- # @return [FaxInstance] Created FaxInstance
188
- 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, ttl: :unset)
189
- data = Twilio::Values.of({
190
- 'To' => to,
191
- 'MediaUrl' => media_url,
192
- 'Quality' => quality,
193
- 'StatusCallback' => status_callback,
194
- 'From' => from,
195
- 'SipAuthUsername' => sip_auth_username,
196
- 'SipAuthPassword' => sip_auth_password,
197
- 'StoreMedia' => store_media,
198
- 'Ttl' => ttl,
199
- })
200
-
201
- payload = @version.create('POST', @uri, data: data)
202
-
203
- FaxInstance.new(@version, payload, )
204
- end
205
-
206
155
  ##
207
156
  # Provide a user friendly representation
208
157
  def to_s
@@ -270,21 +219,6 @@ module Twilio
270
219
  FaxInstance.new(@version, payload, sid: @solution[:sid], )
271
220
  end
272
221
 
273
- ##
274
- # Update the FaxInstance
275
- # @param [fax.UpdateStatus] status The new
276
- # {status}[https://www.twilio.com/docs/fax/api/fax-resource#fax-status-values] of
277
- # the resource. Can be only `canceled`. This may fail if transmission has already
278
- # started.
279
- # @return [FaxInstance] Updated FaxInstance
280
- def update(status: :unset)
281
- data = Twilio::Values.of({'Status' => status, })
282
-
283
- payload = @version.update('POST', @uri, data: data)
284
-
285
- FaxInstance.new(@version, payload, sid: @solution[:sid], )
286
- end
287
-
288
222
  ##
289
223
  # Delete the FaxInstance
290
224
  # @return [Boolean] true if delete succeeds, false otherwise
@@ -491,17 +425,6 @@ module Twilio
491
425
  context.fetch
492
426
  end
493
427
 
494
- ##
495
- # Update the FaxInstance
496
- # @param [fax.UpdateStatus] status The new
497
- # {status}[https://www.twilio.com/docs/fax/api/fax-resource#fax-status-values] of
498
- # the resource. Can be only `canceled`. This may fail if transmission has already
499
- # started.
500
- # @return [FaxInstance] Updated FaxInstance
501
- def update(status: :unset)
502
- context.update(status: status, )
503
- end
504
-
505
428
  ##
506
429
  # Delete the FaxInstance
507
430
  # @return [Boolean] true if delete succeeds, false otherwise