lib/phaxio/resources/fax.rb in phaxio-2.1.0.pre vs lib/phaxio/resources/fax.rb in phaxio-2.1.0

- old
+ new

@@ -82,11 +82,11 @@ # @return [Integer] # The ID of the fax being referenced. attr_accessor :id # Gets the referenced fax. - # @return [Phaxio::Resource::Fax] + # @return [Phaxio::Resources::Fax] # The referenced Fax. def get Fax.get self end alias :retrieve :get @@ -118,11 +118,11 @@ # - *tag* [Hash<String: String>] - A tag name and value that you want # to use to filter results. # @return [Phaxio::Resource::Collection<Phaxio::Resources::Fax>] # The collection of faxes matching your request. # @raise [Phaxio::Error::PhaxioError] - # @see https://www.phaxio.com/docs/api/v2/faxes/list_faxes + # @see https://www.phaxio.com/docs/api/v2.1/faxes/list_faxes def list params = {} response = Client.request :get, faxes_endpoint, params response_collection response end @@ -157,12 +157,12 @@ # the following parameter: +tag: {order_id: 1234}+. You may specify # up to 10 tags. # @return [Phaxio::Resources::Fax] # The created fax. # @raise [Phaxio::Error::PhaxioError] - # @see https://www.phaxio.com/docs/api/v2/faxes/create_and_send_fax - # @see https://www.phaxio.com/docs/api/v2/faxes/batching + # @see https://www.phaxio.com/docs/api/v2.1/faxes/create_and_send_fax + # @see https://www.phaxio.com/docs/api/v2.1/faxes/batching def create params = {} response = Client.request :post, faxes_endpoint, params response_reference response end alias :send :create @@ -172,11 +172,11 @@ # The ID of the fax to retrieve information about. # @param params [Hash] # A hash of parameters to send to Phaxio. This action takes no unique parameters. # @return [Phaxio::Resource::Fax] The requested fax. # @raise [Phaxio::Error::PhaxioError] - # @see https://www.phaxio.com/docs/api/v2/faxes/get_fax + # @see https://www.phaxio.com/docs/api/v2.1/faxes/get_fax def get id, params = {} response = Client.request :get, fax_endpoint(id.to_i), params response_record response end alias :retrieve :get @@ -189,11 +189,11 @@ # A hash of parameters to send to Phaxio. This action takes no unique # parameters. # @return [Phaxio::Resources::Fax::Reference] # A reference to the canceled fax. # @raise [Phaxio::Error::PhaxioError] - # @see https://www.phaxio.com/docs/api/v2/faxes/cancel + # @see https://www.phaxio.com/docs/api/v2.1/faxes/cancel def cancel id, params = {} response = Client.request :post, cancel_fax_endpoint(id), params response_reference response end @@ -205,11 +205,11 @@ # - *callback_url* [String] - This parameter may be used to set a # different callback URL for the new fax. # @return [Phaxio::Resources::Fax::Reference] # A reference to the resent fax. # @raise [Phaxio::Error::PhaxioError] - # @see https://www.phaxio.com/docs/api/v2/faxes/resend + # @see https://www.phaxio.com/docs/api/v2.1/faxes/resend def resend id, params = {} response = Client.request :post, resend_fax_endpoint(id), params response_reference response end @@ -219,11 +219,11 @@ # @param params [Hash] # A hash of parameters to send to Phaxio. This action takes no unique # parameters. # @return [true] # @raise [Phaxio::Error::PhaxioError] - # @see https://www.phaxio.com/docs/api/v2/faxes/delete_fax + # @see https://www.phaxio.com/docs/api/v2.1/faxes/delete_fax def delete id, params = {} Client.request :delete, fax_endpoint(id), params true end @@ -233,11 +233,11 @@ # @param params [Hash] # A hash of parameters to send to Phaxio. This action takes no unique # parameters. # @return [true] # @raise [Phaxio::Error::PhaxioError] - # @see https://www.phaxio.com/docs/api/v2/faxes/delete_fax_file + # @see https://www.phaxio.com/docs/api/v2.1/faxes/delete_fax_file def delete_file id, params = {} Client.request :delete, fax_file_endpoint(id), params true end @@ -250,11 +250,11 @@ # (large), a thumbnail of the requested size will be returned. # If unset, returns a PDF of the fax image. # @return [File] # The requested fax file. # @raise [Phaxio::Error::PhaxioError] - # @see https://www.phaxio.com/docs/api/v2/faxes/get_fax_file + # @see https://www.phaxio.com/docs/api/v2.1/faxes/get_fax_file def file id, params = {} Client.request :get, fax_file_endpoint(id), params end # Test receiving a fax. May only be used with test API credentials. @@ -267,10 +267,10 @@ # receiving the fax. Specifically, a Phaxio phone number in your # account that is "receiving" the fax, or the public Phaxio phone # number. Default is the public Phaxio phone number. # @return [true] # @raise [Phaxio::Error::PhaxioError] - # @see https://www.phaxio.com/docs/api/v2/faxes/test_receive + # @see https://www.phaxio.com/docs/api/v2.1/faxes/test_receive def test_receive params = {} Client.request :post, faxes_endpoint, test_receive_params(params) true end