Skip to content

Latest commit

 

History

History
386 lines (292 loc) · 13.6 KB

File metadata and controls

386 lines (292 loc) · 13.6 KB

CashbookApi

All URIs are relative to https://api-v2.fattureincloud.it

Method HTTP request Description
createCashbookEntry POST /c/{company_id}/cashbook Create Cashbook Entry
deleteCashbookEntry DELETE /c/{company_id}/cashbook/{document_id} Delete Cashbook Entry
getCashbookEntry GET /c/{company_id}/cashbook/{document_id} Get Cashbook Entry
listCashbookEntries GET /c/{company_id}/cashbook List Cashbook Entries
modifyCashbookEntry PUT /c/{company_id}/cashbook/{document_id} Modify Cashbook Entry

createCashbookEntry

CreateCashbookEntryResponse createCashbookEntry(companyId, createCashbookEntryRequest)

Create Cashbook Entry

Creates a new cashbook entry.

Example

// Import classes:
import it.fattureincloud.sdk.ApiClient;
import it.fattureincloud.sdk.ApiException;
import it.fattureincloud.sdk.Configuration;
import it.fattureincloud.sdk.auth.*;
import it.fattureincloud.sdk.models.*;
import it.fattureincloud.sdk.api.CashbookApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("https://api-v2.fattureincloud.it");
    
    // Configure OAuth2 access token for authorization: OAuth2AuthenticationCodeFlow
    OAuth OAuth2AuthenticationCodeFlow = (OAuth) defaultClient.getAuthentication("OAuth2AuthenticationCodeFlow");
    OAuth2AuthenticationCodeFlow.setAccessToken("YOUR ACCESS TOKEN");

    CashbookApi apiInstance = new CashbookApi(defaultClient);
    Integer companyId = 12345; // Integer | The ID of the company.
    CreateCashbookEntryRequest createCashbookEntryRequest = new CreateCashbookEntryRequest(); // CreateCashbookEntryRequest | Cashbook entry. 
    try {
      CreateCashbookEntryResponse result = apiInstance.createCashbookEntry(companyId, createCashbookEntryRequest);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling CashbookApi#createCashbookEntry");
      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
companyId Integer The ID of the company.
createCashbookEntryRequest CreateCashbookEntryRequest Cashbook entry. [optional]

Return type

CreateCashbookEntryResponse

Authorization

OAuth2AuthenticationCodeFlow

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 The created Cashbook Entry. -
401 Unauthorized -
404 Not Found -

deleteCashbookEntry

deleteCashbookEntry(companyId, documentId)

Delete Cashbook Entry

Deletes the specified cashbook entry.

Example

// Import classes:
import it.fattureincloud.sdk.ApiClient;
import it.fattureincloud.sdk.ApiException;
import it.fattureincloud.sdk.Configuration;
import it.fattureincloud.sdk.auth.*;
import it.fattureincloud.sdk.models.*;
import it.fattureincloud.sdk.api.CashbookApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("https://api-v2.fattureincloud.it");
    
    // Configure OAuth2 access token for authorization: OAuth2AuthenticationCodeFlow
    OAuth OAuth2AuthenticationCodeFlow = (OAuth) defaultClient.getAuthentication("OAuth2AuthenticationCodeFlow");
    OAuth2AuthenticationCodeFlow.setAccessToken("YOUR ACCESS TOKEN");

    CashbookApi apiInstance = new CashbookApi(defaultClient);
    Integer companyId = 12345; // Integer | The ID of the company.
    String documentId = "documentId_example"; // String | The ID of the document.
    try {
      apiInstance.deleteCashbookEntry(companyId, documentId);
    } catch (ApiException e) {
      System.err.println("Exception when calling CashbookApi#deleteCashbookEntry");
      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
companyId Integer The ID of the company.
documentId String The ID of the document.

Return type

null (empty response body)

Authorization

OAuth2AuthenticationCodeFlow

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

HTTP response details

Status code Description Response headers
200 Document removed. -
401 Unauthorized -
404 Not Found -

getCashbookEntry

GetCashbookEntryResponse getCashbookEntry(companyId, documentId, fields, fieldset)

Get Cashbook Entry

Gets the specified cashbook entry.

Example

// Import classes:
import it.fattureincloud.sdk.ApiClient;
import it.fattureincloud.sdk.ApiException;
import it.fattureincloud.sdk.Configuration;
import it.fattureincloud.sdk.auth.*;
import it.fattureincloud.sdk.models.*;
import it.fattureincloud.sdk.api.CashbookApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("https://api-v2.fattureincloud.it");
    
    // Configure OAuth2 access token for authorization: OAuth2AuthenticationCodeFlow
    OAuth OAuth2AuthenticationCodeFlow = (OAuth) defaultClient.getAuthentication("OAuth2AuthenticationCodeFlow");
    OAuth2AuthenticationCodeFlow.setAccessToken("YOUR ACCESS TOKEN");

    CashbookApi apiInstance = new CashbookApi(defaultClient);
    Integer companyId = 12345; // Integer | The ID of the company.
    String documentId = "documentId_example"; // String | The ID of the document.
    String fields = "fields_example"; // String | List of comma-separated fields.
    String fieldset = "basic"; // String | Name of the fieldset.
    try {
      GetCashbookEntryResponse result = apiInstance.getCashbookEntry(companyId, documentId, fields, fieldset);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling CashbookApi#getCashbookEntry");
      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
companyId Integer The ID of the company.
documentId String The ID of the document.
fields String List of comma-separated fields. [optional]
fieldset String Name of the fieldset. [optional] [enum: basic, detailed]

Return type

GetCashbookEntryResponse

Authorization

OAuth2AuthenticationCodeFlow

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Cashbook Entry. -
401 Unauthorized -
404 Not Found -

listCashbookEntries

ListCashbookEntriesResponse listCashbookEntries(companyId, dateFrom, dateTo, year, type, paymentAccountId)

List Cashbook Entries

Lists the cashbook entries.

Example

// Import classes:
import it.fattureincloud.sdk.ApiClient;
import it.fattureincloud.sdk.ApiException;
import it.fattureincloud.sdk.Configuration;
import it.fattureincloud.sdk.auth.*;
import it.fattureincloud.sdk.models.*;
import it.fattureincloud.sdk.api.CashbookApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("https://api-v2.fattureincloud.it");
    
    // Configure OAuth2 access token for authorization: OAuth2AuthenticationCodeFlow
    OAuth OAuth2AuthenticationCodeFlow = (OAuth) defaultClient.getAuthentication("OAuth2AuthenticationCodeFlow");
    OAuth2AuthenticationCodeFlow.setAccessToken("YOUR ACCESS TOKEN");

    CashbookApi apiInstance = new CashbookApi(defaultClient);
    Integer companyId = 12345; // Integer | The ID of the company.
    String dateFrom = "dateFrom_example"; // String | Start date.
    String dateTo = "dateTo_example"; // String | End date.
    Integer year = 56; // Integer | Filter cashbook by year.
    String type = "all"; // String | Filter cashbook by type.
    Integer paymentAccountId = 56; // Integer | Filter by payment account.
    try {
      ListCashbookEntriesResponse result = apiInstance.listCashbookEntries(companyId, dateFrom, dateTo, year, type, paymentAccountId);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling CashbookApi#listCashbookEntries");
      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
companyId Integer The ID of the company.
dateFrom String Start date.
dateTo String End date.
year Integer Filter cashbook by year. [optional]
type String Filter cashbook by type. [optional] [enum: all, in, out]
paymentAccountId Integer Filter by payment account. [optional]

Return type

ListCashbookEntriesResponse

Authorization

OAuth2AuthenticationCodeFlow

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Results list. -
401 Unauthorized -
404 Not Found -

modifyCashbookEntry

ModifyCashbookEntryResponse modifyCashbookEntry(companyId, documentId, modifyCashbookEntryRequest)

Modify Cashbook Entry

Modifies the specified cashbook entry.

Example

// Import classes:
import it.fattureincloud.sdk.ApiClient;
import it.fattureincloud.sdk.ApiException;
import it.fattureincloud.sdk.Configuration;
import it.fattureincloud.sdk.auth.*;
import it.fattureincloud.sdk.models.*;
import it.fattureincloud.sdk.api.CashbookApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("https://api-v2.fattureincloud.it");
    
    // Configure OAuth2 access token for authorization: OAuth2AuthenticationCodeFlow
    OAuth OAuth2AuthenticationCodeFlow = (OAuth) defaultClient.getAuthentication("OAuth2AuthenticationCodeFlow");
    OAuth2AuthenticationCodeFlow.setAccessToken("YOUR ACCESS TOKEN");

    CashbookApi apiInstance = new CashbookApi(defaultClient);
    Integer companyId = 12345; // Integer | The ID of the company.
    String documentId = "documentId_example"; // String | The ID of the document.
    ModifyCashbookEntryRequest modifyCashbookEntryRequest = new ModifyCashbookEntryRequest(); // ModifyCashbookEntryRequest | Cashbook Entry
    try {
      ModifyCashbookEntryResponse result = apiInstance.modifyCashbookEntry(companyId, documentId, modifyCashbookEntryRequest);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling CashbookApi#modifyCashbookEntry");
      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
companyId Integer The ID of the company.
documentId String The ID of the document.
modifyCashbookEntryRequest ModifyCashbookEntryRequest Cashbook Entry [optional]

Return type

ModifyCashbookEntryResponse

Authorization

OAuth2AuthenticationCodeFlow

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 The modified Cashbook Entry -
401 Unauthorized -
404 Not Found -