Skip to content

Latest commit

 

History

History
503 lines (386 loc) · 13 KB

File metadata and controls

503 lines (386 loc) · 13 KB

Dropbox.Sign.Api.FaxApi

All URIs are relative to https://api.hellosign.com/v3

Method HTTP request Description
FaxDelete DELETE /fax/{fax_id} Delete Fax
FaxFiles GET /fax/files/{fax_id} Download Fax Files
FaxGet GET /fax/{fax_id} Get Fax
FaxList GET /fax/list Lists Faxes
FaxSend POST /fax/send Send Fax

FaxDelete

void FaxDelete (string faxId)

Delete Fax

Deletes the specified Fax from the system

Example

using System;
using System.Collections.Generic;
using System.IO;
using System.Text.Json;

using Dropbox.Sign.Api;
using Dropbox.Sign.Client;
using Dropbox.Sign.Model;

namespace Dropbox.SignSandbox;

public class FaxDeleteExample
{
    public static void Run()
    {
        var config = new Configuration();
        config.Username = "YOUR_API_KEY";

        try
        {
            new FaxApi(config).FaxDelete(
                faxId: "fa5c8a0b0f492d768749333ad6fcc214c111e967"
            );
        }
        catch (ApiException e)
        {
            Console.WriteLine("Exception when calling FaxApi#FaxDelete: " + e.Message);
            Console.WriteLine("Status Code: " + e.ErrorCode);
            Console.WriteLine(e.StackTrace);
        }
    }
}

Using the FaxDeleteWithHttpInfo variant

This returns an ApiResponse object which contains the response data, status code and headers.

try
{
    // Delete Fax
    apiInstance.FaxDeleteWithHttpInfo(faxId);
}
catch (ApiException e)
{
    Debug.Print("Exception when calling FaxApi.FaxDeleteWithHttpInfo: " + e.Message);
    Debug.Print("Status Code: " + e.ErrorCode);
    Debug.Print(e.StackTrace);
}

Parameters

Name Type Description Notes
faxId string Fax ID

Return type

void (empty response body)

Authorization

api_key

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
204 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

FaxFiles

System.IO.Stream FaxFiles (string faxId)

Download Fax Files

Downloads files associated with a Fax

Example

using System;
using System.Collections.Generic;
using System.IO;
using System.Text.Json;

using Dropbox.Sign.Api;
using Dropbox.Sign.Client;
using Dropbox.Sign.Model;

namespace Dropbox.SignSandbox;

public class FaxFilesExample
{
    public static void Run()
    {
        var config = new Configuration();
        config.Username = "YOUR_API_KEY";

        try
        {
            var response = new FaxApi(config).FaxFiles(
                faxId: "fa5c8a0b0f492d768749333ad6fcc214c111e967"
            );
            var fileStream = File.Create("./file_response");
            response.Seek(0, SeekOrigin.Begin);
            response.CopyTo(fileStream);
            fileStream.Close();
        }
        catch (ApiException e)
        {
            Console.WriteLine("Exception when calling FaxApi#FaxFiles: " + e.Message);
            Console.WriteLine("Status Code: " + e.ErrorCode);
            Console.WriteLine(e.StackTrace);
        }
    }
}

Using the FaxFilesWithHttpInfo variant

This returns an ApiResponse object which contains the response data, status code and headers.

try
{
    // Download Fax Files
    ApiResponse<System.IO.Stream> response = apiInstance.FaxFilesWithHttpInfo(faxId);
    Debug.Write("Status Code: " + response.StatusCode);
    Debug.Write("Response Headers: " + response.Headers);
    Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
    Debug.Print("Exception when calling FaxApi.FaxFilesWithHttpInfo: " + e.Message);
    Debug.Print("Status Code: " + e.ErrorCode);
    Debug.Print(e.StackTrace);
}

Parameters

Name Type Description Notes
faxId string Fax ID

Return type

System.IO.Stream

Authorization

api_key

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/pdf, application/json

HTTP response details

Status code Description Response headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

FaxGet

FaxGetResponse FaxGet (string faxId)

Get Fax

Returns information about a Fax

Example

using System;
using System.Collections.Generic;
using System.IO;
using System.Text.Json;

using Dropbox.Sign.Api;
using Dropbox.Sign.Client;
using Dropbox.Sign.Model;

namespace Dropbox.SignSandbox;

public class FaxGetExample
{
    public static void Run()
    {
        var config = new Configuration();
        config.Username = "YOUR_API_KEY";

        try
        {
            var response = new FaxApi(config).FaxGet(
                faxId: "fa5c8a0b0f492d768749333ad6fcc214c111e967"
            );

            Console.WriteLine(response);
        }
        catch (ApiException e)
        {
            Console.WriteLine("Exception when calling FaxApi#FaxGet: " + e.Message);
            Console.WriteLine("Status Code: " + e.ErrorCode);
            Console.WriteLine(e.StackTrace);
        }
    }
}

Using the FaxGetWithHttpInfo variant

This returns an ApiResponse object which contains the response data, status code and headers.

try
{
    // Get Fax
    ApiResponse<FaxGetResponse> response = apiInstance.FaxGetWithHttpInfo(faxId);
    Debug.Write("Status Code: " + response.StatusCode);
    Debug.Write("Response Headers: " + response.Headers);
    Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
    Debug.Print("Exception when calling FaxApi.FaxGetWithHttpInfo: " + e.Message);
    Debug.Print("Status Code: " + e.ErrorCode);
    Debug.Print(e.StackTrace);
}

Parameters

Name Type Description Notes
faxId string Fax ID

Return type

FaxGetResponse

Authorization

api_key

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

FaxList

FaxListResponse FaxList (int? page = null, int? pageSize = null)

Lists Faxes

Returns properties of multiple Faxes

Example

using System;
using System.Collections.Generic;
using System.IO;
using System.Text.Json;

using Dropbox.Sign.Api;
using Dropbox.Sign.Client;
using Dropbox.Sign.Model;

namespace Dropbox.SignSandbox;

public class FaxListExample
{
    public static void Run()
    {
        var config = new Configuration();
        config.Username = "YOUR_API_KEY";

        try
        {
            var response = new FaxApi(config).FaxList(
                page: 1,
                pageSize: 20
            );

            Console.WriteLine(response);
        }
        catch (ApiException e)
        {
            Console.WriteLine("Exception when calling FaxApi#FaxList: " + e.Message);
            Console.WriteLine("Status Code: " + e.ErrorCode);
            Console.WriteLine(e.StackTrace);
        }
    }
}

Using the FaxListWithHttpInfo variant

This returns an ApiResponse object which contains the response data, status code and headers.

try
{
    // Lists Faxes
    ApiResponse<FaxListResponse> response = apiInstance.FaxListWithHttpInfo(page, pageSize);
    Debug.Write("Status Code: " + response.StatusCode);
    Debug.Write("Response Headers: " + response.Headers);
    Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
    Debug.Print("Exception when calling FaxApi.FaxListWithHttpInfo: " + e.Message);
    Debug.Print("Status Code: " + e.ErrorCode);
    Debug.Print(e.StackTrace);
}

Parameters

Name Type Description Notes
page int? Which page number of the Fax List to return. Defaults to 1. [optional] [default to 1]
pageSize int? Number of objects to be returned per page. Must be between 1 and 100. Default is 20. [optional] [default to 20]

Return type

FaxListResponse

Authorization

api_key

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

FaxSend

FaxGetResponse FaxSend (FaxSendRequest faxSendRequest)

Send Fax

Creates and sends a new Fax with the submitted file(s)

Example

using System;
using System.Collections.Generic;
using System.IO;
using System.Text.Json;

using Dropbox.Sign.Api;
using Dropbox.Sign.Client;
using Dropbox.Sign.Model;

namespace Dropbox.SignSandbox;

public class FaxSendExample
{
    public static void Run()
    {
        var config = new Configuration();
        config.Username = "YOUR_API_KEY";

        var faxSendRequest = new FaxSendRequest(
            recipient: "16690000001",
            sender: "16690000000",
            testMode: true,
            coverPageTo: "Jill Fax",
            coverPageFrom: "Faxer Faxerson",
            coverPageMessage: "I'm sending you a fax!",
            title: "This is what the fax is about!",
            files: new List<Stream>
            {
                new FileStream(
                    path: "./example_fax.pdf",
                    mode: FileMode.Open
                ),
            }
        );

        try
        {
            var response = new FaxApi(config).FaxSend(
                faxSendRequest: faxSendRequest
            );

            Console.WriteLine(response);
        }
        catch (ApiException e)
        {
            Console.WriteLine("Exception when calling FaxApi#FaxSend: " + e.Message);
            Console.WriteLine("Status Code: " + e.ErrorCode);
            Console.WriteLine(e.StackTrace);
        }
    }
}

Using the FaxSendWithHttpInfo variant

This returns an ApiResponse object which contains the response data, status code and headers.

try
{
    // Send Fax
    ApiResponse<FaxGetResponse> response = apiInstance.FaxSendWithHttpInfo(faxSendRequest);
    Debug.Write("Status Code: " + response.StatusCode);
    Debug.Write("Response Headers: " + response.Headers);
    Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
    Debug.Print("Exception when calling FaxApi.FaxSendWithHttpInfo: " + e.Message);
    Debug.Print("Status Code: " + e.ErrorCode);
    Debug.Print(e.StackTrace);
}

Parameters

Name Type Description Notes
faxSendRequest FaxSendRequest

Return type

FaxGetResponse

Authorization

api_key

HTTP request headers

  • Content-Type: application/json, multipart/form-data
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -

[Back to top] [Back to API list] [Back to Model list] [Back to README]