Skip to content

Latest commit

 

History

History
662 lines (414 loc) · 19 KB

SettingsApi.md

File metadata and controls

662 lines (414 loc) · 19 KB

SettingsApi

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

Method HTTP request Description
createPaymentAccount POST /c/{company_id}/settings/payment_accounts Create Payment Account
createPaymentMethod POST /c/{company_id}/settings/payment_methods Create Payment Method
createVatType POST /c/{company_id}/settings/vat_types Create Vat Type
deletePaymentAccount DELETE /c/{company_id}/settings/payment_accounts/{payment_account_id} Delete Payment Account
deletePaymentMethod DELETE /c/{company_id}/settings/payment_methods/{payment_method_id} Delete Payment Method
deleteVatType DELETE /c/{company_id}/settings/vat_types/{vat_type_id} Delete Vat Type
getPaymentAccount GET /c/{company_id}/settings/payment_accounts/{payment_account_id} Get Payment Account
getPaymentMethod GET /c/{company_id}/settings/payment_methods/{payment_method_id} Get Payment Method
getVatType GET /c/{company_id}/settings/vat_types/{vat_type_id} Get Vat Type
modifyPaymentAccount PUT /c/{company_id}/settings/payment_accounts/{payment_account_id} Modify Payment Account
modifyPaymentMethod PUT /c/{company_id}/settings/payment_methods/{payment_method_id} Modify Payment Method
modifyVatType PUT /c/{company_id}/settings/vat_types/{vat_type_id} Modify Vat Type

createPaymentAccount

CreatePaymentAccountResponse createPaymentAccount(companyId, opts)

Create Payment Account

Creates a new payment account.

Example

import { Configuration, SettingsApi , CreatePaymentAccountRequest } from '@fattureincloud/fattureincloud-ts-sdk';

// Configure OAuth2 access token for authorization: 
const apiConfig = new Configuration({
  accessToken: "YOUR ACCESS TOKEN"
});

let apiInstance = new SettingsApi(apiConfig);
let companyId = 12345; // Number | The ID of the company.

let createPaymentAccountRequest: CreatePaymentAccountRequest = {"data":{"id":12345,"name":"Indesa","type":"bank","iban":"IT17Q0051343200000003497636","sia":"T1234","virtual":false}} // CreatePaymentAccountRequest | 

apiInstance.createPaymentAccount(companyId, createPaymentAccountRequest).then((data) => {
  console.log('API called successfully. Returned data: ' + data);
}, (error) => {
  console.error(error);
});

Parameters

Name Type Description Notes
companyId Number The ID of the company.
createPaymentAccountRequest CreatePaymentAccountRequest [optional]

Return type

CreatePaymentAccountResponse

Authorization

OAuth2AuthenticationCodeFlow

HTTP request headers

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

createPaymentMethod

CreatePaymentMethodResponse createPaymentMethod(companyId, opts)

Create Payment Method

Creates a new payment method.

Example

import { Configuration, SettingsApi , CreatePaymentMethodRequest } from '@fattureincloud/fattureincloud-ts-sdk';

// Configure OAuth2 access token for authorization: 
const apiConfig = new Configuration({
  accessToken: "YOUR ACCESS TOKEN"
});

let apiInstance = new SettingsApi(apiConfig);
let companyId = 12345; // Number | The ID of the company.

let createPaymentMethodRequest: CreatePaymentMethodRequest = {"data":{"id":386683,"name":"Bonifico bancario","is_default":true,"type":"standard","details":[{"title":"Banca","description":"Sao Paulo"}],"default_payment_account":{"id":12345,"name":"conto banca SP"}}} // CreatePaymentMethodRequest | 

apiInstance.createPaymentMethod(companyId, createPaymentMethodRequest).then((data) => {
  console.log('API called successfully. Returned data: ' + data);
}, (error) => {
  console.error(error);
});

Parameters

Name Type Description Notes
companyId Number The ID of the company.
createPaymentMethodRequest CreatePaymentMethodRequest [optional]

Return type

CreatePaymentMethodResponse

Authorization

OAuth2AuthenticationCodeFlow

HTTP request headers

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

createVatType

CreateVatTypeResponse createVatType(companyId, opts)

Create Vat Type

Creates a vat type.

Example

import { Configuration, SettingsApi , CreateVatTypeRequest } from '@fattureincloud/fattureincloud-ts-sdk';

// Configure OAuth2 access token for authorization: 
const apiConfig = new Configuration({
  accessToken: "YOUR ACCESS TOKEN"
});

let apiInstance = new SettingsApi(apiConfig);
let companyId = 12345; // Number | The ID of the company.

let createVatTypeRequest: CreateVatTypeRequest = {"data":{"id":0,"value":22,"description":"Non imponibile art. 123","notes":"IVA non imponibile ai sensi dell'articolo 123, comma 2","e_invoice":true,"ei_type":2,"ei_description":"string","editable":true,"is_disabled":true}} // CreateVatTypeRequest | 

apiInstance.createVatType(companyId, createVatTypeRequest).then((data) => {
  console.log('API called successfully. Returned data: ' + data);
}, (error) => {
  console.error(error);
});

Parameters

Name Type Description Notes
companyId Number The ID of the company.
createVatTypeRequest CreateVatTypeRequest [optional]

Return type

CreateVatTypeResponse

Authorization

OAuth2AuthenticationCodeFlow

HTTP request headers

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

deletePaymentAccount

deletePaymentAccount(companyId, paymentAccountId)

Delete Payment Account

Deletes the specified payment account.

Example

import { Configuration, SettingsApi  } from '@fattureincloud/fattureincloud-ts-sdk';

// Configure OAuth2 access token for authorization: 
const apiConfig = new Configuration({
  accessToken: "YOUR ACCESS TOKEN"
});

let apiInstance = new SettingsApi(apiConfig);
let companyId = 12345; // Number | The ID of the company.
let paymentAccountId = 56; // Number | The Referred Payment Account Id.
apiInstance.deletePaymentAccount(companyId, paymentAccountId).then(() => {
  console.log('API called successfully.');
}, (error) => {
  console.error(error);
});

Parameters

Name Type Description Notes
companyId Number The ID of the company.
paymentAccountId Number The Referred Payment Account Id.

Return type

null (empty response body)

Authorization

OAuth2AuthenticationCodeFlow

HTTP request headers

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

deletePaymentMethod

deletePaymentMethod(companyId, paymentMethodId)

Delete Payment Method

Deletes the specified payment method.

Example

import { Configuration, SettingsApi  } from '@fattureincloud/fattureincloud-ts-sdk';

// Configure OAuth2 access token for authorization: 
const apiConfig = new Configuration({
  accessToken: "YOUR ACCESS TOKEN"
});

let apiInstance = new SettingsApi(apiConfig);
let companyId = 12345; // Number | The ID of the company.
let paymentMethodId = 56; // Number | The Referred Payment Method Id.
apiInstance.deletePaymentMethod(companyId, paymentMethodId).then(() => {
  console.log('API called successfully.');
}, (error) => {
  console.error(error);
});

Parameters

Name Type Description Notes
companyId Number The ID of the company.
paymentMethodId Number The Referred Payment Method Id.

Return type

null (empty response body)

Authorization

OAuth2AuthenticationCodeFlow

HTTP request headers

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

deleteVatType

deleteVatType(companyId, vatTypeId)

Delete Vat Type

Deletes the specified vat type.

Example

import { Configuration, SettingsApi  } from '@fattureincloud/fattureincloud-ts-sdk';

// Configure OAuth2 access token for authorization: 
const apiConfig = new Configuration({
  accessToken: "YOUR ACCESS TOKEN"
});

let apiInstance = new SettingsApi(apiConfig);
let companyId = 12345; // Number | The ID of the company.
let vatTypeId = 56; // Number | The Referred Vat Type Id.
apiInstance.deleteVatType(companyId, vatTypeId).then(() => {
  console.log('API called successfully.');
}, (error) => {
  console.error(error);
});

Parameters

Name Type Description Notes
companyId Number The ID of the company.
vatTypeId Number The Referred Vat Type Id.

Return type

null (empty response body)

Authorization

OAuth2AuthenticationCodeFlow

HTTP request headers

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

getPaymentAccount

GetPaymentAccountResponse getPaymentAccount(companyId, paymentAccountId, opts)

Get Payment Account

Gets the specified payment account.

Example

import { Configuration, SettingsApi  } from '@fattureincloud/fattureincloud-ts-sdk';

// Configure OAuth2 access token for authorization: 
const apiConfig = new Configuration({
  accessToken: "YOUR ACCESS TOKEN"
});

let apiInstance = new SettingsApi(apiConfig);
let companyId = 12345; // Number | The ID of the company.
let paymentAccountId = 56; // Number | The Referred Payment Account Id.

let fields = "fields_example", // String | List of comma-separated fields.
let fieldset = "fieldset_example" // String | Name of the fieldset.

apiInstance.getPaymentAccount(companyId, paymentAccountId, fieldset).then((data) => {
  console.log('API called successfully. Returned data: ' + data);
}, (error) => {
  console.error(error);
});

Parameters

Name Type Description Notes
companyId Number The ID of the company.
paymentAccountId Number The Referred Payment Account Id.
fields String List of comma-separated fields. [optional]
fieldset String Name of the fieldset. [optional]

Return type

GetPaymentAccountResponse

Authorization

OAuth2AuthenticationCodeFlow

HTTP request headers

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

getPaymentMethod

GetPaymentMethodResponse getPaymentMethod(companyId, paymentMethodId, opts)

Get Payment Method

Gets the specified payment method.

Example

import { Configuration, SettingsApi  } from '@fattureincloud/fattureincloud-ts-sdk';

// Configure OAuth2 access token for authorization: 
const apiConfig = new Configuration({
  accessToken: "YOUR ACCESS TOKEN"
});

let apiInstance = new SettingsApi(apiConfig);
let companyId = 12345; // Number | The ID of the company.
let paymentMethodId = 56; // Number | The Referred Payment Method Id.

let fields = "fields_example", // String | List of comma-separated fields.
let fieldset = "fieldset_example" // String | Name of the fieldset.

apiInstance.getPaymentMethod(companyId, paymentMethodId, fieldset).then((data) => {
  console.log('API called successfully. Returned data: ' + data);
}, (error) => {
  console.error(error);
});

Parameters

Name Type Description Notes
companyId Number The ID of the company.
paymentMethodId Number The Referred Payment Method Id.
fields String List of comma-separated fields. [optional]
fieldset String Name of the fieldset. [optional]

Return type

GetPaymentMethodResponse

Authorization

OAuth2AuthenticationCodeFlow

HTTP request headers

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

getVatType

GetVatTypeResponse getVatType(companyId, vatTypeId)

Get Vat Type

Gets the specified vat type.

Example

import { Configuration, SettingsApi  } from '@fattureincloud/fattureincloud-ts-sdk';

// Configure OAuth2 access token for authorization: 
const apiConfig = new Configuration({
  accessToken: "YOUR ACCESS TOKEN"
});

let apiInstance = new SettingsApi(apiConfig);
let companyId = 12345; // Number | The ID of the company.
let vatTypeId = 56; // Number | The Referred Vat Type Id.
apiInstance.getVatType(companyId, vatTypeId).then((data) => {
  console.log('API called successfully. Returned data: ' + data);
}, (error) => {
  console.error(error);
});

Parameters

Name Type Description Notes
companyId Number The ID of the company.
vatTypeId Number The Referred Vat Type Id.

Return type

GetVatTypeResponse

Authorization

OAuth2AuthenticationCodeFlow

HTTP request headers

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

modifyPaymentAccount

ModifyPaymentAccountResponse modifyPaymentAccount(companyId, paymentAccountId, opts)

Modify Payment Account

Modifies the specified payment account.

Example

import { Configuration, SettingsApi , ModifyPaymentAccountRequest } from '@fattureincloud/fattureincloud-ts-sdk';

// Configure OAuth2 access token for authorization: 
const apiConfig = new Configuration({
  accessToken: "YOUR ACCESS TOKEN"
});

let apiInstance = new SettingsApi(apiConfig);
let companyId = 12345; // Number | The ID of the company.
let paymentAccountId = 56; // Number | The Referred Payment Account Id.

let modifyPaymentAccountRequest: ModifyPaymentAccountRequest = {"data":{"id":0,"name":"Conto Banca Intesa","type":"standard","iban":"string","sia":"string","cuc":"string","virtual":true}} // ModifyPaymentAccountRequest | 

apiInstance.modifyPaymentAccount(companyId, paymentAccountId, modifyPaymentAccountRequest).then((data) => {
  console.log('API called successfully. Returned data: ' + data);
}, (error) => {
  console.error(error);
});

Parameters

Name Type Description Notes
companyId Number The ID of the company.
paymentAccountId Number The Referred Payment Account Id.
modifyPaymentAccountRequest ModifyPaymentAccountRequest [optional]

Return type

ModifyPaymentAccountResponse

Authorization

OAuth2AuthenticationCodeFlow

HTTP request headers

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

modifyPaymentMethod

ModifyPaymentMethodResponse modifyPaymentMethod(companyId, paymentMethodId, opts)

Modify Payment Method

Modifies the specified payment method.

Example

import { Configuration, SettingsApi , ModifyPaymentMethodRequest } from '@fattureincloud/fattureincloud-ts-sdk';

// Configure OAuth2 access token for authorization: 
const apiConfig = new Configuration({
  accessToken: "YOUR ACCESS TOKEN"
});

let apiInstance = new SettingsApi(apiConfig);
let companyId = 12345; // Number | The ID of the company.
let paymentMethodId = 56; // Number | The Referred Payment Method Id.

let modifyPaymentMethodRequest: ModifyPaymentMethodRequest = {"data":{"id":386683,"name":"Bonifico bancario","is_default":true,"type":"standard","details":[{"title":"Banca","description":"Sao Paulo"}],"default_payment_account":{"id":12345,"name":"conto banca SP"}}} // ModifyPaymentMethodRequest | 

apiInstance.modifyPaymentMethod(companyId, paymentMethodId, modifyPaymentMethodRequest).then((data) => {
  console.log('API called successfully. Returned data: ' + data);
}, (error) => {
  console.error(error);
});

Parameters

Name Type Description Notes
companyId Number The ID of the company.
paymentMethodId Number The Referred Payment Method Id.
modifyPaymentMethodRequest ModifyPaymentMethodRequest [optional]

Return type

ModifyPaymentMethodResponse

Authorization

OAuth2AuthenticationCodeFlow

HTTP request headers

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

modifyVatType

ModifyVatTypeResponse modifyVatType(companyId, vatTypeId, opts)

Modify Vat Type

Modifies the specified vat type.

Example

import { Configuration, SettingsApi , ModifyVatTypeRequest } from '@fattureincloud/fattureincloud-ts-sdk';

// Configure OAuth2 access token for authorization: 
const apiConfig = new Configuration({
  accessToken: "YOUR ACCESS TOKEN"
});

let apiInstance = new SettingsApi(apiConfig);
let companyId = 12345; // Number | The ID of the company.
let vatTypeId = 56; // Number | The Referred Vat Type Id.

let modifyVatTypeRequest: ModifyVatTypeRequest = {"data":{"id":0,"value":22,"description":"Non imponibile art. 123","notes":"IVA non imponibile ai sensi dell'articolo 123, comma 2","e_invoice":true,"ei_type":2,"ei_description":"string","editable":true,"is_disabled":true}} // ModifyVatTypeRequest | 

apiInstance.modifyVatType(companyId, vatTypeId, modifyVatTypeRequest).then((data) => {
  console.log('API called successfully. Returned data: ' + data);
}, (error) => {
  console.error(error);
});

Parameters

Name Type Description Notes
companyId Number The ID of the company.
vatTypeId Number The Referred Vat Type Id.
modifyVatTypeRequest ModifyVatTypeRequest [optional]

Return type

ModifyVatTypeResponse

Authorization

OAuth2AuthenticationCodeFlow

HTTP request headers

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