Skip to content

Latest commit

 

History

History
312 lines (228 loc) · 11.6 KB

PhoneNumberOrderDocumentsApi.md

File metadata and controls

312 lines (228 loc) · 11.6 KB

PhoneNumberOrderDocumentsApi

All URIs are relative to https://api.telnyx.com/v2

Method HTTP request Description
createNumberOrderDocument POST /number_order_documents Create a number order document
listNumberOrderDocuments GET /number_order_documents List number order documents
retrieveNumberOrderDocument GET /number_order_documents/{number_order_document_id} Retrieve a number order document
updateNumberOrderDocument PATCH /number_order_documents/{number_order_document_id} Update a number order document

createNumberOrderDocument

NumberOrderDocumentResponse createNumberOrderDocument(createNumberOrderDocumentRequest)

Create a number order document

Upload a phone number order document.

Example

// Import classes:
import com.telnyx.sdk.ApiClient;
import com.telnyx.sdk.ApiException;
import com.telnyx.sdk.Configuration;
import com.telnyx.sdk.auth.*;
import com.telnyx.sdk.model.*;
import com.telnyx.sdk.api.PhoneNumberOrderDocumentsApi;

public class Example {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        defaultClient.setBasePath("https://api.telnyx.com/v2");
        
        // Configure HTTP bearer authorization: bearerAuth
        HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
        bearerAuth.setBearerToken("BEARER TOKEN");

        PhoneNumberOrderDocumentsApi apiInstance = new PhoneNumberOrderDocumentsApi(defaultClient);
        CreateNumberOrderDocumentRequest createNumberOrderDocumentRequest = new CreateNumberOrderDocumentRequest(); // CreateNumberOrderDocumentRequest | 
        try {
            NumberOrderDocumentResponse result = apiInstance.createNumberOrderDocument(createNumberOrderDocumentRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PhoneNumberOrderDocumentsApi#createNumberOrderDocument");
            System.err.println("Status code: " + e.getCode());
            System.err.println("Reason: " + e.getResponseBody());
            System.err.println("Response headers: " + e.getResponseHeaders());
            e.printStackTrace();
        }
    }
}

Parameters

Name Type Description Notes
createNumberOrderDocumentRequest CreateNumberOrderDocumentRequest

Return type

NumberOrderDocumentResponse

Authorization

bearerAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Successful response with details about a number order document. -
0 Unexpected error -

listNumberOrderDocuments

ListNumberOrderDocumentsResponse listNumberOrderDocuments().filterRequirementId(filterRequirementId).filterCreatedAtGt(filterCreatedAtGt).filterCreatedAtLt(filterCreatedAtLt).pageNumber(pageNumber).pageSize(pageSize).execute();

List number order documents

Gets a paginated list of number order documents.

Example

// Import classes:
import com.telnyx.sdk.ApiClient;
import com.telnyx.sdk.ApiException;
import com.telnyx.sdk.Configuration;
import com.telnyx.sdk.auth.*;
import com.telnyx.sdk.model.*;
import com.telnyx.sdk.api.PhoneNumberOrderDocumentsApi;

public class Example {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        defaultClient.setBasePath("https://api.telnyx.com/v2");
        
        // Configure HTTP bearer authorization: bearerAuth
        HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
        bearerAuth.setBearerToken("BEARER TOKEN");

        PhoneNumberOrderDocumentsApi apiInstance = new PhoneNumberOrderDocumentsApi(defaultClient);
        String filterRequirementId = "filterRequirementId_example"; // String | Filter number order documents by `requirement_id`.
        String filterCreatedAtGt = "filterCreatedAtGt_example"; // String | Filter number order documents after this datetime.
        String filterCreatedAtLt = "filterCreatedAtLt_example"; // String | Filter number order documents from before this datetime.
        Integer pageNumber = 1; // Integer | The page number to load
        Integer pageSize = 20; // Integer | The size of the page
        try {
            ListNumberOrderDocumentsResponse result = api.listNumberOrderDocuments()
                .filterRequirementId(filterRequirementId)
                .filterCreatedAtGt(filterCreatedAtGt)
                .filterCreatedAtLt(filterCreatedAtLt)
                .pageNumber(pageNumber)
                .pageSize(pageSize)
                .execute();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PhoneNumberOrderDocumentsApi#listNumberOrderDocuments");
            System.err.println("Status code: " + e.getCode());
            System.err.println("Reason: " + e.getResponseBody());
            System.err.println("Response headers: " + e.getResponseHeaders());
            e.printStackTrace();
        }
    }
}

Parameters

Name Type Description Notes
filterRequirementId String Filter number order documents by `requirement_id`. [optional]
filterCreatedAtGt String Filter number order documents after this datetime. [optional]
filterCreatedAtLt String Filter number order documents from before this datetime. [optional]
pageNumber Integer The page number to load [optional] [default to 1]
pageSize Integer The size of the page [optional] [default to 20]

Return type

ListNumberOrderDocumentsResponse

Authorization

bearerAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Successful response with a list of number order documents. -
0 Unexpected error -

retrieveNumberOrderDocument

NumberOrderDocumentResponse retrieveNumberOrderDocument(numberOrderDocumentId)

Retrieve a number order document

Gets a single number order document.

Example

// Import classes:
import com.telnyx.sdk.ApiClient;
import com.telnyx.sdk.ApiException;
import com.telnyx.sdk.Configuration;
import com.telnyx.sdk.auth.*;
import com.telnyx.sdk.model.*;
import com.telnyx.sdk.api.PhoneNumberOrderDocumentsApi;

public class Example {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        defaultClient.setBasePath("https://api.telnyx.com/v2");
        
        // Configure HTTP bearer authorization: bearerAuth
        HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
        bearerAuth.setBearerToken("BEARER TOKEN");

        PhoneNumberOrderDocumentsApi apiInstance = new PhoneNumberOrderDocumentsApi(defaultClient);
        String numberOrderDocumentId = "numberOrderDocumentId_example"; // String | The number order document ID.
        try {
            NumberOrderDocumentResponse result = apiInstance.retrieveNumberOrderDocument(numberOrderDocumentId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PhoneNumberOrderDocumentsApi#retrieveNumberOrderDocument");
            System.err.println("Status code: " + e.getCode());
            System.err.println("Reason: " + e.getResponseBody());
            System.err.println("Response headers: " + e.getResponseHeaders());
            e.printStackTrace();
        }
    }
}

Parameters

Name Type Description Notes
numberOrderDocumentId String The number order document ID.

Return type

NumberOrderDocumentResponse

Authorization

bearerAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Successful response with details about a number order document. -
0 Unexpected error -

updateNumberOrderDocument

NumberOrderDocumentResponse updateNumberOrderDocument(numberOrderDocumentId, updateNumberOrderDocumentRequest)

Update a number order document

Updates a number order document.

Example

// Import classes:
import com.telnyx.sdk.ApiClient;
import com.telnyx.sdk.ApiException;
import com.telnyx.sdk.Configuration;
import com.telnyx.sdk.auth.*;
import com.telnyx.sdk.model.*;
import com.telnyx.sdk.api.PhoneNumberOrderDocumentsApi;

public class Example {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        defaultClient.setBasePath("https://api.telnyx.com/v2");
        
        // Configure HTTP bearer authorization: bearerAuth
        HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
        bearerAuth.setBearerToken("BEARER TOKEN");

        PhoneNumberOrderDocumentsApi apiInstance = new PhoneNumberOrderDocumentsApi(defaultClient);
        String numberOrderDocumentId = "numberOrderDocumentId_example"; // String | The number order document ID.
        UpdateNumberOrderDocumentRequest updateNumberOrderDocumentRequest = new UpdateNumberOrderDocumentRequest(); // UpdateNumberOrderDocumentRequest | 
        try {
            NumberOrderDocumentResponse result = apiInstance.updateNumberOrderDocument(numberOrderDocumentId, updateNumberOrderDocumentRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PhoneNumberOrderDocumentsApi#updateNumberOrderDocument");
            System.err.println("Status code: " + e.getCode());
            System.err.println("Reason: " + e.getResponseBody());
            System.err.println("Response headers: " + e.getResponseHeaders());
            e.printStackTrace();
        }
    }
}

Parameters

Name Type Description Notes
numberOrderDocumentId String The number order document ID.
updateNumberOrderDocumentRequest UpdateNumberOrderDocumentRequest

Return type

NumberOrderDocumentResponse

Authorization

bearerAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Successful response with details about a number order document. -
0 Unexpected error -