lib/twilio-ruby/rest/fax/v1/fax.rb in twilio-ruby-5.0.0.rc22 vs lib/twilio-ruby/rest/fax/v1/fax.rb in twilio-ruby-5.0.0.rc23

- old
+ new

@@ -23,14 +23,18 @@ ## # Lists FaxInstance records from the API as a list. # Unlike stream(), this operation is eager and will load `limit` records into # memory before returning. - # @param [String] from The from - # @param [String] to The to - # @param [Time] date_created_on_or_before The date_created_on_or_before - # @param [Time] date_created_after The date_created_after + # @param [String] from Filters the returned list to only include faxes sent from + # the supplied number, given in E.164 format. + # @param [String] to Filters the returned list to only include faxes sent to the + # supplied number, given in E.164 format. + # @param [Time] date_created_on_or_before Filters the returned list to only + # include faxes created on or before the supplied date, given in ISO 8601 format. + # @param [Time] date_created_after Filters the returned list to only include faxes + # created after the supplied date, given in ISO 8601 format. # @param [Integer] limit Upper limit for the number of records to return. stream() # guarantees to never return more than limit. Default is no limit # @param [Integer] page_size Number of records to fetch per request, when not set will use # the default value of 50 records. If no page_size is defined # but a limit is defined, stream() will attempt to read the @@ -49,14 +53,18 @@ ## # Streams FaxInstance records from the API as an Enumerable. # This operation lazily loads records as efficiently as possible until the limit # is reached. - # @param [String] from The from - # @param [String] to The to - # @param [Time] date_created_on_or_before The date_created_on_or_before - # @param [Time] date_created_after The date_created_after + # @param [String] from Filters the returned list to only include faxes sent from + # the supplied number, given in E.164 format. + # @param [String] to Filters the returned list to only include faxes sent to the + # supplied number, given in E.164 format. + # @param [Time] date_created_on_or_before Filters the returned list to only + # include faxes created on or before the supplied date, given in ISO 8601 format. + # @param [Time] date_created_after Filters the returned list to only include faxes + # created after the supplied date, given in ISO 8601 format. # @param [Integer] limit Upper limit for the number of records to return. stream() # guarantees to never return more than limit. Default is no limit # @param [Integer] page_size Number of records to fetch per request, when not set will use # the default value of 50 records. If no page_size is defined # but a limit is defined, stream() will attempt to read the @@ -78,14 +86,18 @@ ## # When passed a block, yields FaxInstance records from the API. # This operation lazily loads records as efficiently as possible until the limit # is reached. - # @param [String] from The from - # @param [String] to The to - # @param [Time] date_created_on_or_before The date_created_on_or_before - # @param [Time] date_created_after The date_created_after + # @param [String] from Filters the returned list to only include faxes sent from + # the supplied number, given in E.164 format. + # @param [String] to Filters the returned list to only include faxes sent to the + # supplied number, given in E.164 format. + # @param [Time] date_created_on_or_before Filters the returned list to only + # include faxes created on or before the supplied date, given in ISO 8601 format. + # @param [Time] date_created_after Filters the returned list to only include faxes + # created after the supplied date, given in ISO 8601 format. # @param [Integer] limit Upper limit for the number of records to return. stream() # guarantees to never return more than limit. Default is no limit # @param [Integer] page_size Number of records to fetch per request, when not set will use # the default value of 50 records. If no page_size is defined # but a limit is defined, stream() will attempt to read the @@ -103,14 +115,18 @@ end ## # Retrieve a single page of FaxInstance records from the API. # Request is executed immediately. - # @param [String] from The from - # @param [String] to The to - # @param [Time] date_created_on_or_before The date_created_on_or_before - # @param [Time] date_created_after The date_created_after + # @param [String] from Filters the returned list to only include faxes sent from + # the supplied number, given in E.164 format. + # @param [String] to Filters the returned list to only include faxes sent to the + # supplied number, given in E.164 format. + # @param [Time] date_created_on_or_before Filters the returned list to only + # include faxes created on or before the supplied date, given in ISO 8601 format. + # @param [Time] date_created_after Filters the returned list to only include faxes + # created after the supplied date, given in ISO 8601 format. # @param [String] page_token PageToken provided by the API # @param [Integer] page_number Page Number, this value is simply for client state # @param [Integer] page_size Number of records to return, defaults to 50 # @return [Page] Page of FaxInstance def page(from: :unset, to: :unset, date_created_on_or_before: :unset, date_created_after: :unset, page_token: :unset, page_number: :unset, page_size: :unset) @@ -145,27 +161,40 @@ end ## # Retrieve a single page of FaxInstance records from the API. # Request is executed immediately. - # @param [String] to The to - # @param [String] media_url The media_url - # @param [fax.Quality] quality The quality - # @param [String] status_callback The status_callback - # @param [String] from The from - # @param [String] sip_auth_username The sip_auth_username - # @param [String] sip_auth_password The sip_auth_password + # @param [String] to The phone number or SIP address to send the fax to, + # E.164-formatted. + # @param [String] media_url The URL that Twilio will request to obtain the fax + # media to send, which must be a PDF file. + # @param [fax.Quality] quality The quality setting to use for this fax. One of + # `standard`, `fine` or `superfine`. + # @param [String] status_callback The URL that Twilio will request when the status + # of the fax changes. + # @param [String] from The phone number to use as the caller id, E.164-formatted. + # If using a phone number, it must be a Twilio number or a verified outgoing + # caller id for your account. If sending to a SIP address, this can be any + # alphanumeric string (plus the characters `+`, `_`, `.`, and `-`) to use in the + # From header of the SIP request. + # @param [String] sip_auth_username The username to use for authentication when + # sending to a SIP address. + # @param [String] sip_auth_password The password to use for authentication when + # sending to a SIP address. + # @param [Boolean] store_media Whether or not to store a copy of the sent media on + # Twilio's servers for later retrieval (defaults to `true`) # @return [FaxInstance] Newly created FaxInstance - def create(to: nil, media_url: nil, quality: :unset, status_callback: :unset, from: :unset, sip_auth_username: :unset, sip_auth_password: :unset) + 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) data = Twilio::Values.of({ 'To' => to, 'MediaUrl' => media_url, 'Quality' => quality, 'StatusCallback' => status_callback, 'From' => from, 'SipAuthUsername' => sip_auth_username, 'SipAuthPassword' => sip_auth_password, + 'StoreMedia' => store_media, }) payload = @version.create( 'POST', @uri, @@ -219,11 +248,11 @@ class FaxContext < InstanceContext ## # Initialize the FaxContext # @param [Version] version Version that contains the resource - # @param [String] sid The sid + # @param [String] sid A 34 character string that uniquely identifies this fax. # @return [FaxContext] FaxContext def initialize(version, sid) super(version) # Path Solution @@ -255,11 +284,13 @@ ) end ## # Update the FaxInstance - # @param [fax.UpdateStatus] status The status + # @param [fax.UpdateStatus] status The updated status of this fax. The only valid + # option is `canceled`. This may fail if the status has already started + # transmission. # @return [FaxInstance] Updated FaxInstance def update(status: :unset) data = Twilio::Values.of({ 'Status' => status, }) @@ -317,11 +348,11 @@ class FaxInstance < InstanceResource ## # Initialize the FaxInstance # @param [Version] version Version that contains the resource # @param [Hash] payload payload that contains response from Twilio - # @param [String] sid The sid + # @param [String] sid A 34 character string that uniquely identifies this fax. # @return [FaxInstance] FaxInstance def initialize(version, payload, sid: nil) super(version) # Marshaled Properties @@ -447,10 +478,12 @@ context.fetch end ## # Update the FaxInstance - # @param [fax.UpdateStatus] status The status + # @param [fax.UpdateStatus] status The updated status of this fax. The only valid + # option is `canceled`. This may fail if the status has already started + # transmission. # @return [FaxInstance] Updated FaxInstance def update(status: :unset) context.update( status: status, ) \ No newline at end of file