From 35334e0eb4a55506fac65d7fac917adce3f326fd Mon Sep 17 00:00:00 2001 From: Simon Lukas <60503970+Plaenkler@users.noreply.github.com> Date: Mon, 30 Dec 2024 11:23:31 +0100 Subject: [PATCH 01/13] [UPD] Basic structure --- README.md | 27 +++++++++++++++++++++++++-- client/client.go | 1 + examples/authenticate/authenticate.go | 5 +++++ go.mod | 3 +++ 4 files changed, 34 insertions(+), 2 deletions(-) create mode 100644 client/client.go create mode 100644 examples/authenticate/authenticate.go create mode 100644 go.mod diff --git a/README.md b/README.md index 51c7db2..e98260f 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,25 @@ -# sevdesk -sevDesk API SDK +# 📖 sevDesk + +[![License](https://img.shields.io/badge/License-BSD_3--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause) +[![Linters](https://github.com/Plaenkler/sevDesk/actions/workflows/linters.yml/badge.svg)](https://github.com/Plaenkler/sevDesk/actions/workflows/linters.yml) +[![Go Reference](https://pkg.go.dev/badge/github.com/Plaenkler/sevDesk.svg)](https://pkg.go.dev/github.com/Plaenkler/sevDesk) +[![Support me](https://img.shields.io/badge/Support%20me%20%E2%98%95-orange.svg)](https://www.buymeacoffee.com/Plaenkler) + +Plaenkler/sevDesk enables HTTP requests to be made to the [sevDesk API](https://api.sevdesk.de/). The library abstracts the constructs and allows developers to interact with the sevDesk API through a convenient and intuitive interface. + + + + + + +
exampleexample
+ +## 🎯 Project goals + +- [ ] Client with automatic token renewal + +## ✅ Examples + +A separate example has been implemented for each interface of the API. All examples use the client for authentication except the authentication example itself if there is a desire to implement a separate client. + +- [Authentication](https://github.com/Plaenkler/sevDesk/tree/main/examples/authenticate) diff --git a/client/client.go b/client/client.go new file mode 100644 index 0000000..da13c8e --- /dev/null +++ b/client/client.go @@ -0,0 +1 @@ +package client diff --git a/examples/authenticate/authenticate.go b/examples/authenticate/authenticate.go new file mode 100644 index 0000000..4a9902a --- /dev/null +++ b/examples/authenticate/authenticate.go @@ -0,0 +1,5 @@ +package main + +func main() { + // +} diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..e3b2976 --- /dev/null +++ b/go.mod @@ -0,0 +1,3 @@ +module github.com/plaenkler/sevdesk + +go 1.22.10 From 9bdd68c3bde55b89ae680599634ac333c99cd174 Mon Sep 17 00:00:00 2001 From: Simon Lukas <60503970+Plaenkler@users.noreply.github.com> Date: Mon, 30 Dec 2024 12:09:22 +0100 Subject: [PATCH 02/13] [FIX] Go version linters --- .github/workflows/linters.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/linters.yml b/.github/workflows/linters.yml index 8d5b26f..869be13 100644 --- a/.github/workflows/linters.yml +++ b/.github/workflows/linters.yml @@ -38,7 +38,7 @@ jobs: - name: Setup Go uses: actions/setup-go@v5 with: - go-version: 1.22 + go-version: 1.22.10 - name: Checkout Code uses: actions/checkout@v4 with: From 78b4a86d462d717db92b761462f92c7670a91fde Mon Sep 17 00:00:00 2001 From: Simon Lukas <60503970+Plaenkler@users.noreply.github.com> Date: Mon, 30 Dec 2024 12:09:35 +0100 Subject: [PATCH 03/13] [REM] Old structure --- client/client.go | 1 - examples/authenticate/authenticate.go | 5 ----- 2 files changed, 6 deletions(-) delete mode 100644 client/client.go delete mode 100644 examples/authenticate/authenticate.go diff --git a/client/client.go b/client/client.go deleted file mode 100644 index da13c8e..0000000 --- a/client/client.go +++ /dev/null @@ -1 +0,0 @@ -package client diff --git a/examples/authenticate/authenticate.go b/examples/authenticate/authenticate.go deleted file mode 100644 index 4a9902a..0000000 --- a/examples/authenticate/authenticate.go +++ /dev/null @@ -1,5 +0,0 @@ -package main - -func main() { - // -} From 9529064243f008c983661f7d28b7df8122583152 Mon Sep 17 00:00:00 2001 From: Simon Lukas <60503970+Plaenkler@users.noreply.github.com> Date: Mon, 30 Dec 2024 12:10:01 +0100 Subject: [PATCH 04/13] [ADD] Autogen script --- generate.sh | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 generate.sh diff --git a/generate.sh b/generate.sh new file mode 100644 index 0000000..3231a0a --- /dev/null +++ b/generate.sh @@ -0,0 +1,53 @@ +#!/bin/bash + +OPENAPI_URL="https://api.sevdesk.de/openapi.yaml" +OPENAPI_FILE="openapi.yaml" + +# Target directories +TYPES_DIR="./types" +CLIENT_DIR="./client" +SERVER_DIR="./server" + +# Colors for output +GREEN='\033[0;32m' +NC='\033[0m' +RED='\033[0;31m' + +abort() { + echo -e "${RED}Error: $1${NC}" + exit 1 +} + +# Check if the OpenAPI file exists +if [ -f "$OPENAPI_FILE" ]; then + echo -e "${GREEN}$OPENAPI_FILE already exists. Skipping download.${NC}" +else + # Download the OpenAPI definition + echo "Downloading OpenAPI definition from $OPENAPI_URL ..." + curl -o "$OPENAPI_FILE" "$OPENAPI_URL" || abort "Failed to download OpenAPI definition." + echo -e "${GREEN}OpenAPI definition successfully downloaded to $OPENAPI_FILE${NC}" +fi + +# Create target directories if they don't exist +echo "Creating target directories ..." +mkdir -p "$TYPES_DIR" "$CLIENT_DIR" "$SERVER_DIR" || abort "Failed to create target directories." + +# Generate Go files for types +echo "Generating Go files for types ..." +oapi-codegen -generate types -o "$TYPES_DIR/types.go" -package types "$OPENAPI_FILE" || abort "Error generating types files." + +echo -e "${GREEN}Types files successfully generated in $TYPES_DIR/types.go${NC}" + +# Generate Go files for client +echo "Generating Go files for client ..." +oapi-codegen -generate client -o "$CLIENT_DIR/client.go" -package client "$OPENAPI_FILE" || abort "Error generating client files." + +echo -e "${GREEN}Client files successfully generated in $CLIENT_DIR/client.go${NC}" + +# Generate Go files for server +echo "Generating Go files for server ..." +oapi-codegen -generate server -o "$SERVER_DIR/server.go" -package server "$OPENAPI_FILE" || abort "Error generating server files." + +echo -e "${GREEN}Server files successfully generated in $SERVER_DIR/server.go${NC}" + +echo -e "${GREEN}All steps completed successfully.${NC}" From 23078ee7b13ed7aea8fcea08d5cd286da762ff36 Mon Sep 17 00:00:00 2001 From: Simon Lukas <60503970+Plaenkler@users.noreply.github.com> Date: Mon, 30 Dec 2024 12:10:22 +0100 Subject: [PATCH 05/13] [ADD] sevDesk openapi.yaml --- openapi.yaml | 16764 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 16764 insertions(+) create mode 100644 openapi.yaml diff --git a/openapi.yaml b/openapi.yaml new file mode 100644 index 0000000..d40e15f --- /dev/null +++ b/openapi.yaml @@ -0,0 +1,16764 @@ +openapi: 3.0.0 +info: + title: sevdesk API + description: "Contact: To contact our support click here

\r\n# General information\r\nWelcome to our API!
\r\nsevdesk offers you the possibility of retrieving data using an interface, namely the sevdesk API, and making changes without having to use the web UI. The sevdesk interface is a REST-Full API. All sevdesk data and functions that are used in the web UI can also be controlled through the API.\r\n\n# Cross-Origin Resource Sharing\r\nThis API features Cross-Origin Resource Sharing (CORS).
\r\nIt enables cross-domain communication from the browser.
\r\nAll responses have a wildcard same-origin which makes them completely public and accessible to everyone, including any code on any site.\r\n\r\n# Embedding resources\r\nWhen retrieving resources by using this API, you might encounter nested resources in the resources you requested.
\r\nFor example, an invoice always contains a contact, of which you can see the ID and the object name.
\r\nThis API gives you the possibility to embed these resources completely into the resources you originally requested.
\r\nTaking our invoice example, this would mean, that you would not only see the ID and object name of a contact, but rather the complete contact resource.\r\n\r\nTo embed resources, all you need to do is to add the query parameter 'embed' to your GET request.
\r\nAs values, you can provide the name of the nested resource.
\r\nMultiple nested resources are also possible by providing multiple names, separated by a comma.\r\n \n# Authentication and Authorization\n The sevdesk API uses a token authentication to authorize calls. For this purpose every sevdesk administrator has one API token, which is a hexadecimal string containing 32 characters. The following clip shows where you can find the API token if this is your first time with our API.


The token will be needed in every request that you want to send and needs to be provided as a value of an Authorization Header.
In this case, we used some random API token. The example shows the token in the Authorization Header. The api tokens have an infinite lifetime and, in other words, exist as long as the sevdesk user exists.
For this reason, the user should NEVER be deleted.
If really necessary, it is advisable to save the api token as we will NOT be able to retrieve it afterwards!
It is also possible to generate a new API token, for example, if you want to prevent the usage of your sevdesk account by other people who got your current API token.
To achieve this, you just need to click on the \"generate new\" symbol to the right of your token and confirm it with your password. \n# API News\n To never miss API news and updates again, subscribe to our free API newsletter and get all relevant information to keep your sevdesk software running smoothly. To subscribe, simply click here and confirm the email address to which we may send all updates relevant to you. \n# API Requests\n In our case, REST API requests need to be build by combining the following components.
Component Description
HTTP-Methods
  • GET (retrieve a resource)
  • POST (create a resource)
  • PUT (update a resource)
  • DELETE (delete a resource)
URL of the API https://my.sevdesk.de/api/v1
URI of the resource The resource to query.
For example contacts in sevdesk:

/Contact

Which will result in the following complete URL:

https://my.sevdesk.de/api/v1/Contact
Query parameters Are attached by using the connectives ? and & in the URL.
Request headers Typical request headers are for example:

  • Content-type
  • Authorization
  • Accept-Encoding
  • User-Agent
  • X-Version: Used for resource versioning see information below
  • ...
Response headers Typical response headers are for example:

  • Deprecation: If a resource is deprecated we return true or a timestamp since when
  • ...
Request body Mostly required in POST and PUT requests.
Often the request body contains json, in our case, it also accepts url-encoded data.

Note: please pass a meaningful entry at the header \"User-Agent\". If the \"User-Agent\" is set meaningfully, we can offer better support in case of queries from customers.
An example how such a \"User-Agent\" can look like: \"Integration-name by abc\".

This is a sample request for retrieving existing contacts in sevdesk using curl:

Get Request

As you can see, the request contains all the components mentioned above.
It's HTTP method is GET, it has a correct endpoint (https://my.sevdesk.de/api/v1/Contact), query parameters and additional header information!

Query Parameters

As you might have seen in the sample request above, there are several query parameters located in the url.
Those are mostly optional but prove to be very useful for a lot of requests as they can limit, extend, sort or filter the data you will get as a response.

These are the most used query parameter for the sevdesk API.
Parameter Description
embed Will extend some of the returned data.
A brief example can be found below.
countAll \"countAll=true\" returns the number of items
This is an example for the usage of the embed parameter.
The following first request will return all company contact entries in sevdesk up to a limit of 100 without any additional information and no offset.



Now have a look at the category attribute located in the response.
Naturally, it just contains the id and the object name of the object but no further information.
We will now use the parameter embed with the value \"category\".



As you can see, the category object is now extended and shows all the attributes and their corresponding values.

There are lot of other query parameters that can be used to filter the returned data for objects that match a certain pattern, however, those will not be mentioned here and instead can be found at the detail documentation of the most used API endpoints like contact, invoice or voucher.

\nPagination
Parameter Description
limit Limits the number of entries that are returned.
Most useful in GET requests which will most likely deliver big sets of data like country or currency lists.
In this case, you can bypass the default limitation on returned entries by providing a high number.
offset Specifies a certain offset for the data that will be returned.
As an example, you can specify \"offset=2\" if you want all entries except for the first two.
Example: Request Headers

The HTTP request (response) headers allow the client as well as the server to pass additional information with the request.
They transfer the parameters and arguments which are important for transmitting data over HTTP.
Three headers which are useful / necessary when using the sevdesk API are \"Authorization, \"Accept\" and \"Content-type\".
Underneath is a brief description of why and how they should be used.

Authorization

Should be used to provide your API token in the header. Accept

Specifies the format of the response.
Required for operations with a response body. In our case, format could be replaced with json or xml

Content-type

Specifies which format is used in the request.
Is required for operations with a request body. In our case,formatcould be replaced with json or x-www-form-urlencoded

API Responses

HTTP status codes
When calling the sevdesk API it is very likely that you will get a HTTP status code in the response.
Some API calls will also return JSON response bodies which will contain information about the resource.
Each status code which is returned will either be a success code or an error code.

Success codes
Status code Description
200 OK The request was successful
201 Created Most likely to be found in the response of a POST request.
This code indicates that the desired resource was successfully created.

Error codes
Status code Description
400 Bad request The request you sent is most likely syntactically incorrect.
You should check if the parameters in the request body or the url are correct.
401 Unauthorized The authentication failed.
Most likely caused by a missing or wrong API token.
403 Forbidden You do not have the permission the access the resource which is requested.
404 Not found The resource you specified does not exist.
500 Internal server error An internal server error has occurred.
Normally this means that something went wrong on our side.
However, sometimes this error will appear if we missed to catch an error which is normally a 400 status code!


Resource Versioning

We use resource versioning to handle breaking changes for our endpoints, these are rarely used and will be communicated before we remove older versions.
To call a different version we use a specific header X-Version that should be filled with the desired version.
X-Version Description
default Should always reference the oldest version.
If a specific resource is updated with a new version,
then the default version stays the same until the old version is deleted
1.0 ... 1.9 Our incrementally version for each resource independent
Important: A resource can be available via default but not 1.0
\n# Your First Request\n After reading the introduction to our API, you should now be able to make your first call.
For testing our API, we would always recommend to create a trial account for sevdesk to prevent unwanted changes to your main account.
A trial account will be in the highest tariff (materials management), so every sevdesk function can be tested! \n\nTo start testing we would recommend one of the following tools: This example will illustrate your first request, which is creating a new Contact in sevdesk.
  1. Download Postman for your desired system and start the application
  2. Enter https://my.sevdesk.de/api/v1/Contact as the url
  3. Create an authorization header and insert your API token as the value
  4. For this test, select POST as the HTTP method
  5. Go to Headers and enter the key-value pair Content-type + application/x-www-form-urlencoded
    As an alternative, you can just go to Body and select x-www-form-urlencoded
  6. Now go to Body (if you are not there yet) and enter the key-value pairs as shown in the following picture



  7. Click on Send. Your response should now look like this:

As you can see, a successful response in this case returns a JSON-formatted response body containing the contact you just created.
For keeping it simple, this was only a minimal example of creating a contact.
There are however numerous combinations of parameters that you can provide which add information to your contact. \n# sevdesk-Update 2.0\n Started in 2024 we introduced a new era of bookkeeping in sevdesk. You can check if you already received the update by clicking on your profile in the top right in the sevdesk WebApp or by using the [Tools/bookkeepingSystemVersion endpoint](#tag/Basics/operation/bookkeepingSystemVersion).
The old version will be available for some customers until the end of 2024. In this short list we have outlined the changed endpoints with links to jump to the descriptions. If you received the [api newsletter](https://landing.sevdesk.de/api-newsletter) you already know what changed. Otherwise you can check the api changes [here](https://tech.sevdesk.com/api_news/posts/2024_04_04-system-update-breaking-changes/). \n## Check your bookkeeping system version\n With this endpoint you can check which version you / your client uses. On that basis you must use the old or new versions of the endpoints. [Tools/bookkeepingSystemVersion Endpoint](#tag/Basics/operation/bookkeepingSystemVersion) \n## Tax Rules\n (affects the properties taxType and taxSet)
With sevdesk-Update 2.0 we changed the available tax rules. Due to a high likeliness of non-compliant accounting, we won't support the following tax type with the sevdesk-Update 2.0 anymore:\n `taxType = custom (this includes 'taxSet': ... )`\n If you only use taxType = default, taxType = eu and / or taxType = ss, these tax types will automatically be mapped to the new tax rules for a transition period, but you have to make sure the taxRate used in positions is within the allowed ones (you may use the [ReceiptGuidance endpoint](#tag/Voucher/operation/forAllAccounts) for that), otherwise the API will return a validation error (HTTP status code 422). For [orders](#tag/Order), [invoices](#tag/Invoice), [vouchers](#tag/Voucher) and [credit notes](#tag/CreditNote) that were created within sevdesk-Update 2.0 the response will change in all endpoints in which these objects are returned.
So orders, invoices, vouchers and credit notes created within sevdesk system version 1.0 still have a taxType in the response. When they are created in sevdesk-Update 2.0 they will have a taxRule instead.
You can continue to use taxType at first, but we recommend switching to taxRule as there are new options available that were not previously supported.
For orders, invoices, vouchers and credit notes that were created within sevdesk-Update 2.0 the response will change in all endpoints in which these objects are returned. This documentation holds the most current version of the endpoints.
Here are lists of the currently available tax rules, sorted by their use case, structured into revenue/expense and 'Regelbesteuerer'/'Kleinunternehmer'. \n#### VAT rules for 'Regelbesteuerung' in sevdesk-Update 2.0 (Revenue)\n
VAT Rule New Property Allowed taxRate in positions Old property (deprecated)
Umsatzsteuerpflichtige Umsätze 'taxRule': 1
  • 0.0
  • 7.0
  • 19.0
'taxType': 'default'
Ausfuhren 'taxRule': 2
  • 0.0
-
Innergemeinschaftliche Lieferungen 'taxRule': 3
  • 0.0
  • 7.0
  • 19.0
'taxType': 'eu'
Steuerfreie Umsätze §4 UStG 'taxRule': 4
  • 0.0
-
Reverse Charge gem. §13b UStG 'taxRule': 5
  • 0.0
-
Nicht im Inland steuerbare Leistung
Not available for:
  • advance invoice (invoiceType': 'AR')
  • partial invoice ('invoiceType': 'TR')
  • final invoice ('invoiceType': 'ER')
'taxRule': 17
  • 0.0
'taxType': 'noteu'
\n \n#### VAT rules for 'Regelbesteuerung' in sevdesk-Update 2.0 (Expense)\n
VAT Rule New Property Allowed taxRate in positions Old property (deprecated)
Innergemeinschaftliche Erwerbe 'taxRule': 8
  • 0.0
  • 7.0
  • 19.0
-
Vorsteuerabziehbare Aufwendungen 'taxRule': 9
  • 0.0
  • 7.0
  • 19.0
'taxType': 'default'
Nicht vorsteuerabziehbare Aufwendungen 'taxRule': 10
  • 0.0
-
Reverse Charge gem. §13b Abs. 2 UStG mit Vorsteuerabzug 0% (19%) 'taxRule': 12
  • 0.0
-
Reverse Charge gem. §13b UStG ohne Vorsteuerabzug 0% (19%) 'taxRule': 13
  • 0.0
-
Reverse Charge gem. §13b Abs. 1 EU Umsätze 0% (19%) 'taxRule': 14
  • 0.0
-
\n \n#### VAT rules for small business owner ('Kleinunternehmer') in sevdesk-Update 2.0 (Revenue)\n
VAT Rule New Property Allowed taxRate in positions Old property (deprecated)
Steuer nicht erhoben nach §19UStG 'taxRule': 11
  • 0.0
'taxType': 'ss'
\n \n#### VAT rules for small business owner ('Kleinunternehmer') in sevdesk-Update 2.0 (Expense)\n
VAT Rule New Property Allowed taxRate in positions Old property (deprecated)
Nicht vorsteuerabziehbare Aufwendungen 'taxRule': 10
  • 0.0
'taxType': 'ss'
Reverse Charge gem. §13b UStG ohne Vorsteuerabzug 0% (19%) 'taxRule': 13
  • 0.0
-
\n \n## Booking Accounts\n (affects the property accountingType)
With sevdesk-Update 2.0 we changed the available booking accounts and their combinatorics. If you use accountingTypes with SKR numbers that are still available in our receipt guidance, you do not have to change anything in your requests. These booking accounts will automatically be mapped to the new representation (Account Datev). But you have to make sure the taxRate used in positions and taxRule used in the voucher is within the allowed ones (check the [ReceiptGuidance](#tag/Voucher/operation/forAllAccounts)) of the provided booking account, otherwise the API will return a validation error (HTTP status code 422). For orders, invoices, vouchers and credit notes in that were created within sevdesk-Update 2.0 the response will change in all endpoints were these objects are returned. \n## Receipt Guidance\n To help you decide which account can be used in conjunction with which tax rules, tax rates and documents, we created several guidance endpoints just there for you to get helpful information. You can find the descriptions in the changes section for Vouchers below or jump directly to the endpoint description by using this link: [Receipt Guidance](#tag/Voucher/operation/forAllAccounts).
Receipt Guidance is planned to give you guidance in which account you can pick (depending on your filter criteria and the client settings (e.g. 'Kleinunternehmer')) and which tax rate and [tax rules](#section/sevdesk-Update-2.0/Tax-Rules) are comptaible with them. \n## Vouchers\n \n### Saving a new voucher ([Voucher/Factory/saveVoucher](#tag/Voucher/operation/voucherFactorySaveVoucher))\n Following use cases do not work anymore or have changed:
  1. Custom vat regulations (taxType = custom and provided taxSet)
  2. Only specific tax rates and booking accounts are available. Check [ReceiptGuidance](#tag/Voucher/operation/forAllAccounts)
  3. Custom accounting types do not work anymore
  4. Using an asset booking account without creating an asset is no longer possible
  5. A voucher can not be directly set to paid anymore, therefore only status DRAFT (50) or UNPAID / DUE (100) are possible when creating a new voucher. Use the [/api/v1/Voucher/{voucherId}/bookAmount endpoint](#tag/Voucher/operation/bookVoucher) to set a voucher to paid
  6. Setting or changing the property enshrined. Use our new endpoint [/api/v1/Voucher/{voucherId}/enshrine](#tag/Voucher/operation/voucherEnshrine) to enshrine a voucher
\n### Get or update an existing voucher ([Voucher/{voucherId}](#tag/Voucher/operation/updateVoucher))\n Following use cases do not work anymore or have changed:
  1. Custom vat regulations (taxType = custom and provided taxSet)
  2. See [ReceiptGuidance](#tag/Voucher/operation/forAllAccounts) to check which tax rates are available in conjunction with which tax rules
\n### Book a voucher ([Voucher/{voucherId}](#tag/Voucher/operation/bookVoucher))\n Following use cases do not work anymore or have changed:
  1. Voucher with negative voucher positions can not use 'cash discount' as a payment difference anymore
  2. A Voucher can only be booked when it was registered beforehand (see above)
  3. Based on the combination of voucher positions some payment difference reasons are not possible anymore
  4. The currency fluctuation (CF) type is no longer supported as a payment difference reason
\n## Banking\n Following use cases do not work anymore or have changed:
  1. Setting or changing the property enshrined will now only be available by using the [appropriate enshrine endpoint](#tag/CheckAccountTransaction/operation/checkAccountTransactionEnshrine)
\n## Invoicing\n The changes to the vat rules also apply here. Check the documentation of voucher above as the changes are the same. \n### General stricter validation in PUT and POST endpoints\n We added stricter validation to ensure only correct invoices are created which than can be further processed in sevdesk. Following use cases do not work anymore or have changed:
  1. Creating an invoice with taxType custom does not work anymore
  2. Processing an invoice beyond status DRAFT (100) without a contact does not work anymore
  3. Advanced invoices (invoiceType: 'AR') and partial invoices (invoiceType: 'TR') can only be created with the tax rule 'Umsatzsteuerpflichtige Umsätze (taxRule: 1)'(for Regelbesteuerer) or 'Steuer nicht erhoben nach §19 UStG (taxRule: 11)'(for Kleinunternehmer)
  4. Creating a dunning (invoiceType: 'MA') with the value of property reminderCharge greater than 0 does not work anymore
  5. Creating an advanced invoice (invoiceType: 'AR'), a partial invoice (invoiceType: 'TR') or a final invoice (invoiceType: 'ER') with a currency deviating from the clients defaultCurrency is not possible anymore
  6. Changing the status manually does not work anymore (see 'Removed endpoint /Invoice/{invoiceId}/changeStatus' below)
  7. Enshrining now has to be done by using the [enshrine endpoint](#tag/Invoice/operation/invoiceEnshrine) (see below)
\n### Saving an invoice ([Invoice/Factory/saveInvoice](#tag/Invoice/operation/createInvoiceByFactory))\n Following use cases do not work anymore or have changed:
  1. Invoices can only be created with the status DRAFT (100) and can not be changed manually. Use the matching endpoints (e.g. [sendViaEmail](#tag/Invoice/operation/sendInvoiceViaEMail)) to automatically change the status accordingly
  2. Setting or changing the property enshrined is now only possible by using the [enshrine endpoint](#tag/CheckAccountTransaction/operation/checkAccountTransactionEnshrine)
\n### Using an order to create an invoice ([Invoice/Factory/createInvoiceFromOrder](#tag/Invoice/operation/createInvoiceFromOrder))\n Following use cases do not work anymore or have changed:
  1. Creating a final invoice (partialType: 'ER') is not possible if an advanced invoice (partialType: 'AR') or partial invoice (partialType: 'TR') exists. This functionality will be added in a later update
\n### Removed endpoint /Invoice/{invoiceId}/changeStatus\n This endpoint will be completely removed (including sevdesk system version 1.0!). Using these endpoints will automatically change the status accordingly: \n### New endpoint [Invoice/{invoiceId}/resetToDraft](#tag/Invoice/operation/invoiceResetToDraft)\n This new endpoint can be used to reset the status of an invoice to DRAFT (100). \n### New endpoint [Invoice/{invoiceId}/resetToOpen](#tag/Invoice/operation/invoiceResetToOpen)\n This new endpoint can be used to reset the status of an invoice to OPEN (200). \n### New endpoint [Invoice/{invoiceId}/enshrine]((#tag/Invoice/operation/invoiceEnshrine))\n The enshrine endpoint is now used to set the property enshrined. This operation CAN NOT be undone due to legal reasons! \n## Credit Notes\n The changes to the vat rules also apply here. Check the documentation of voucher above as the changes are the same. \n### General stricter validation in PUT and POST endpoints\n We added stricter validation to ensure only correct credit notes are created which than can be further processed in sevdesk. Due to the move from taxTypes/taxSets to taxRules you need to check the compatibility of the taxRules in combination with the tax rates. Following use cases do not work anymore or have changed:
  1. Creating a credit note without a date of delivery (deliveryDateUntil) for an invoice that has a date of delivery (deliveryDateUntil) is no longer possible
  2. Creating a credit note with a date of delivery (deliveryDateUntil) for an invoice that has no date of delivery (deliveryDateUntil) is no longer possible
  3. Creating a credit note with a date of delivery (deliveryDateUntil) that is before the date of delivery (deliveryDateUntil) of the invoice is no longer possible
  4. Creating a credit note for an advanced invoice (invoiceType: 'AR') or partial invoice (invoiceType: 'TR') is no longer possible
  5. Creating a credit note for a voucher is no longer possible
  6. Creating a credit note with a bookingCategory other than UNDERACHIEVEMENT is no longer possible
  7. Currency fluctuation (CF) is no longer supported as a payment difference
\n### Saving a credit note ([CreditNote/Factory/saveCreditNote](#tag/CreditNote/operation/createcreditNote))\n Following use cases do not work anymore or have changed:
  1. Credit notes can only be created with the status DRAFT (100) and can not be changed manually. Use the matching endpoints (e.g. [sendViaEmail](#tag/CreditNote/operation/sendCreditNoteViaEMail)) to automatically change the status accordingly
  2. Enshrining now has to be done by using the enshrine endpoint (see below)
\n### Removed endpoint /CreditNote/Factory/createFromVoucher\n The endpoint will be removed. It is not possible anymore to create credit notes for vouchers within sevdesk-Update 2.0. The endpoint continues to stay available for existing sevdesk system version 1.0 clients. \n### Removed endpoint /CreditNote/{creditNoteId}/changeStatus\n This endpoint will be completely removed (including sevdesk system version 1.0!). Using these endpoints will automatically change the status accordingly: \n### New endpoint CreditNote/{creditNoteId}/resetToDraft\n This new endpoint can be used to reset the status of a credit note to DRAFT (100). You can find the documentation [here](#tag/CreditNote/operation/creditNoteResetToDraft). \n### New endpoint CreditNote/{creditNoteId}/resetToOpen\n This new endpoint can be used to reset the status of a credit note to OPEN (200). You can find the documentation [here](#tag/CreditNote/operation/creditNoteResetToOpen). \n### New endpoint CreditNote/{creditNoteId}/enshrine\n [The enshrine endpoint](#tag/CreditNote/operation/creditNoteEnshrine) is now used to set the property enshrined. This operation CAN NOT be undone due to legal reasons!\n## Parts\n \n### General stricter validation in PUT and POST endpoints\n Following use cases do not work anymore or have changed:
  1. Creating products with a tax rate other than 0.0, 7.0 and 19.0 is no longer possible
" + version: 2.0.0 + x-logo: + url: https://my.sevdesk.de/images/logo.svg +servers: + - url: https://my.sevdesk.de/api/v1 + description: Our main application instance which most of our customers work with + - url: http://sevdesk.local/api/v1 + description: sevdesk internal local instance +tags: + - name: Basics + description: >- + This is a collection of basic sevdesk functions that don't really belong + into any other category. + x-displayName: Basics + - name: CheckAccount + description: >- + A check account is a payment account on which payments to or from the + customer are stored.
There are three general types of check accounts: + Offline + accounts are accounts on which transactions can be created and booked over + the API or over CSV and MT940 imports.
The only exception is the + standard account, on which transactions can not be created over the + API.
Please also note, that accounts with CSV and MT940 imports will + have online given as the value for their type attribute.
Nevertheless, + they count as offline accounts.
Online accounts are directly connected + to a bank application and can not be manipulated over the API.
+ Register accounts represent the cash register for sevdesk account holders + needing one and they behave the same way as offline + accounts.

Regarding the check accounts, you will most certainly + only need to request existing check accounts for using their ID in further + requests.
Therefore, you only need to send normal GET requests to the + CheckAccount endpoint.
+ x-displayName: CheckAccount + - name: CheckAccountTransaction + description: >- + A check account transaction is a payment on a check account from or to the + customer.
They are essential for booking invoices, vouchers (receipts) + and credit notes with them to mark them as paid.
For a correct + bookkeeping, there is always one or multiple transactions linked to an + invoice, a voucher or a credit note, until the relevant object is + completely payed. + x-displayName: CheckAccountTransaction + - name: AccountingContact + description: >- + A accounting contact object belongs to one specific contact object and + holds the accounting information for this contact, which is mainly the + vendor / receivable accounts number.
This information is very + important to guarantee valid bookkeeping reports.
As this endpoint is + also pretty easy to understand, we won't cover it here, but we really + recommend you having a look at the POST to create accounting contacts and + at the request which checks if a number is still available. + x-displayName: AccountingContact + - name: CommunicationWay + description: >- + A communication way is a medium with which a contact can be reached out + to.
This can be: They can not be a part of the + contact attributes for the same reason as addresses.
Each + communication way also is of one of the following types, called + communication way keys, which are also their own resource: + x-displayName: CommunicationWay + - name: ContactAddress + description: >- + As one contact can have multiple addresses, they can not be part of the + contact attributes.
Instead, they have their own endpoint which makes + it possible to create as many addresses for one contact as needed.
For + creating contact addresses have a look at our Swagger specification. + Everything should be pretty straight forward. + x-displayName: ContactAddress + - name: Contact + description: |- + + # Purpose of contacts in sevdesk + Every time one of our sevdesk customers sells / buys an item or provides a service there is a end customer involved to which it is sold / from which it is bought or to which the service is provided.
These end-customers need to be tracked in sevdesk as our customers will need to link them to the invoices, orders, receipts and all other documents relevant for their bookkeeping which involve the end customer. + # Types of contacts + As our customers can either deal with individual persons or with whole organisations, we need to differentiate between these two types.
Therefore, every contact in sevdesk is either a person or a organisation.
At the moment, both share the same set of attributes but designating values to some might not make sense for both types.
In the next section, we will distinguish between the two and this will become obvious.
Furthermore, naturally, individuals can be part of organisations but organisations can not be part of individuals. Also more in the next section.

How do I know to which type a contact belongs?

It is very important to note, that we currently don't have any attribute which shows to which type a contact belongs.
Instead, we separate them by the attributes name, surename and familyname.
If you designate values to the attribute surename OR familyname the contact will be regarded as a individual person.
If you designate a value to name it will be regarded as an organisation.

Contact Categories

Additionally to the two main types of contacts, every contact belongs to one of the following categories: + # Attributes of a contact + Here is a table of all attributes of a contact.
Necessary attributes, which must not be left out, are marked red.
Attributes which are strongly recommended for valid bookkeeping are marked orange.
Attribute Contact Type Description Attribute Type
name Organisations The name of an organisation String
surename Individuals The first name of an individual (yes, we know...) String
familyname Individuals The last name of an individual String
name2 Individuals The middle name (or name-suffix) of an individual String
category Organisations, Individuals The category of the contact
Nested object (Category)
defaultCashbackTime Organisations, Individuals Time frame in which a cashback is granted to the customer if he pays an invoice Integer
defaultCashbackPercent Organisations, Individuals Percentage of which the price of an invoice is reduced if paid in above time frame Double
taxNumber Organisations, Individuals Tax number of the contact. String
excemptVat Organisations, Individuals Defines if the contact is free of vat Boolean
defaultTimeToPay Organisations, Individuals The default time this end customer has to pay invoices Integer
bankNumber Organisations, Individuals The bank number of the contact Integer
birthday Individuals The birthday Unix-Timestamp
vatNumber Organisations, Individuals The vat number String
defaultDiscountAmount Organisations, Individuals A default discount amount this contact gets Double
defaultDiscountPercentage Organisations, Individuals Define if the value in defaultDiscountAmount is regarded as a percentage. Boolean
gender Individuals Gender (m,w, or your own definition) String
academicTitle Individuals Academic title of the contact String
description Organisations, Individuals A description for the contact String (can contain some html)
titel Individuals Position an individual holds in an organisation String
parent Individuals The organisation to which this individual belongs Nested object (Contact)
customerNumber Organisations, Individuals The customer number of the contact. String
bankAccount Organisations, Individuals The bank account number String
+ # The customer number + The customer number is not an attribute that must be supplied when creating a contact, however for most, if not all of our customers, a correct enumeration is the key to structured bookkeeping, which is why duplicate entries must be avoided.
For this reason, most of the time a manual assignment of numbers is not the best idea and we are happy to provide you two contact endpoints which will help out.

The first GET request you can send will check if a customer number is still available.
All you need to provide in the query string is the customer number which should be checked. The second GET request you can send will check what the next customer number should be, so that a correct enumeration is kept.
This time, you only need to send the request to the endpoint. + # How to filter for certain contacts + Often you don't want to retrieve all contacts in a sevdesk account or one specific contact of which you know the ID, but rather a list of contacts or a single contact with certain properties.
For this purpose we provide a bunch of filters that you can attach to your GET query string for nearly all endpoints.
Here are all filters applicable to a contact query.
Filter Description
depth=1 Retrieve organisations AND persons.
This attribute is not active as default, so if you don't specify it as true, you will only get organisations.
category[id]={id}&category[objectName]=Category Only retrieve all contacts with id as a category
city={cityName} Only retrieve all contacts with cityName as a city
tags[x][id]={id}&tags[x][objectName]=Tag Only retrieve all contacts with id as a tag.
You can specify multiple tags by adding more array entries.
customerNumber={number} Only retrieve all contacts with number as a customer number
parent[id]={id}&parent[objectName]=Contact Only retrieve all contacts with id as a parent organisation
name={name} Only retrieve all contacts with name as a name, surename or familyname
zip={zipCode} Only retrieve all contacts with zipCode as a zip
country[id]={id}&country[objectName]=StaticCountry Only retrieve all contacts with id as a country
createBefore={timestamp} Only retrieve all contacts created before timestamp
createAfter={timestamp} Only retrieve all contacts created after timestamp
updateBefore={timestamp} Only retrieve all contacts updated last before timestamp
updateAfter={timestamp} Only retrieve all contacts updated last after timestamp
orderByCustomerNumber={ASC/DESC} Order all contacts after customer number in ASC/DESC order
+ x-displayName: Contact + - name: ContactField + description: >- + The contact fields are placeholders that can be titled and filled per + contact. The contact fields can then be used in invoices, credit notes and + emails. + x-displayName: ContactField + - name: CreditNote + description: |- + + # Purpose of credit notes in sevdesk + A credit notes is essentially a special type of invoice which is not written by the service provider but rather by the beneficiary.
In common use, the term credit note is used when someone receives a payment for which he did not write an invoice.
In sevdesk you need to choose a booking category for the credit note you want to create.
This booking category describes why you need to create a credit note and can't be disregarded.
+ # Credit note booking categories + As mentioned above, every credit note needs to have a booking category.
The following categories are available at the moment.

Booking Category Description Abbreviation
Provision Not supported in sevdesk-Update 2.0.
The credit note is a provision.
PROVISION
Assigned royalty Not supported in sevdesk-Update 2.0.
The credit note is a assigned royalty.
ROYALTY_ASSIGNED
Unassigned royalty Not supported in sevdesk-Update 2.0.
The credit note is a unassigned royalty.
ROYALTY_UNASSIGNED
Underachievement of invoice The Credit Note is a underachievement of an invoice or voucher.
If this is the case, you need to provide the ID of this invoice or voucher in the attribute refSrcInvoice or refSrcVoucher!
UNDERACHIEVEMENT
To be booked on special account Not supported in sevdesk-Update 2.0.
The Credit Note should be booked on a special account.
If this is the case, you need to provide the ID of this account in the attribute accountingType!
ACCOUNTING_TYPE
+ + # Status of credit notes +
Credit note status Meaning Status code
Draft The credit note is still a draft.
It has not been sent to the end-customer and can still be changed.
100
Open / Delivered The credit note has been sent to the end-customer.
200
Partially paid The credit note has been partially paid.
1000
Paid The credit note has been paid.
1000
It is again important to keep in mind the status codes for all status of credit notes or at least the one you will need. + + # Attributes of a credit note + Here is the table of all attributes of credit notes.
Necessary attributes, which must not be left out, are marked red.
Attributes which are strongly recommended for valid bookkeeping are marked orange.
There is also a distinction between credit note types.
Attribute Credit Note Type Description Attribute Type
taxType Any Use this in sevdesk-Update 1.0 (instead of taxRule).
Defines the vat-regulation.
Can be:
  • default
  • eu
  • noteu
  • custom
  • ss
String
taxSet Any Use this in sevdesk-Update 1.0 (instead of taxRule).
Use for custom defined vat-regulations.
Requires "taxType": "custom"
Integer
taxRule Any Use this in sevdesk-Update 2.0 (replaces taxType / taxSet).
Defines the vat-regulation.

For "Regelbesteuerung" it can be one of:
  • 1 - Umsatzsteuerpflichtige Umsätze - tax rates: 0.0, 7.0, 19.0 - replaces "taxType": "default"
  • 2 - Ausfuhren - allowedTaxRates: 0.0
  • 3 - Innergemeinschaftliche Lieferungen - tax rates: 0.0, 7.0, 19.0 - replaces "taxType": "eu"
  • 4 - Steuerfreie Umsätze §4 UStG - tax rates: 0.0
  • 5 - Reverse Charge gem. §13b UStG - tax rates: 0.0
  • 17 - Nicht im Inland steuerbare Leistung - tax rates: 0.0 - replaces "taxType": "noteu"
For small business owner ("Kleinunternehmer") it can be:
  • 11 - Steuer nicht erhoben nach §19UStG - tax rates: 0.0 - replaces "taxType": "ss"
Example for Umsatzsteuerpflichtige Umsätze: "taxRule": {"id": "1", "objectName": "TaxRule"}
Nested object (TaxRule)
accountingType Any The account on which this credit note should be booked.
This attribute has to be used in case the booking category ACCOUNTING_TYPE is used.
Integer
refSrcInvoice Any The invoice from which the underachievement originates.
This attribute has to be used if "bookingCategory": "UNDERACHIEVEMENT" is used.

We recommend to use /CreditNote/Factory/createFromInvoice to create a credit note for an invoices.
Integer
refSrcVoucher Any Not supported in sevdesk-Update 2.0.
The voucher from which the underachievement originates.
This attribute has to be used in case the booking category UNDERACHIEVEMENT is used.

We recommend to use /CreditNote/Factory/createFromVoucher to create a credit note for an invoices.
Integer
currency Any Currency of the credit note.
Needs to be currency code according to ISO-4217.
String
taxText Any Text describing the vat regulation you chose.
A common text of our German customers would be:
Umsatzsteuer ausweisen or zzgl. Umsatzsteuer 19%
String
taxRate Any This is not used anymore. Use the taxRate of the individual positions instead. Integer
contactPerson Any The sevdesk user which acts as a contact person for this credit note.
Nested object (SevUser)
smallSettlement Any If the sevdesk account is falling under the small entrepreneur scheme the credit notes must't contain any vat.
If this is the case, this attribute should be true, otherwise false.
Boolean
creditNoteDate Any The credit note date. Date / Timestamp
status Any The credit note status. Integer
showNet Any This attribute determines, if the price you give the credit note positions will be regarded as gross or net.
If true, the price attribute will hold the net value, otherwise the gross value, as described in the section above.
Boolean
enshrined Any Enshrined credit notes cannot be changed.
Can only be set via /CreditNote/{creditNoteId}/enshrine. This operation cannot be undone.
Date / Timestamp
customerInternalNote Any You can use this attribute to provide a note for the credit note.
It can be used for reference numbers, order numbers or other important information.
String
address Any Holds the complete address to which the credit note is directed.
You can use line brakes to separate the different address parts.
String
deliveryDate Any The delivery date of the credit note.
This can also be a date range if you provide another timestamp for deliveryDateUntil.
Timestamp
deliveryDateUntil Any You can provide a value here if you want the delivery date to be a date range and you have already given a timestamp to deliveryDate. Timestamp
sendType Any Is set when using [CreditNote/{creditNoteId}/sendBy](#tag/CreditNote/operation/creditNoteSendBy) / [CreditNote/{creditNoteId}/sendViaEmail](#tag/CreditNote/operation/sendCreditNoteViaEMail).
Valid types are: VPR (printed), VPDF (downloaded), VM (mailed), VP (postal).
String
creditNoteNumber Any The credit note number. String
contact Any The end-customer to which the credit note is directed.
Nested object (Contact)
header Any The credit note header.
Usually consists of the credit note number and a prefix.
String
headText Any A head text for the credit note.
Can contain certain html tags.
String
footText Any A foot text for the credit note.
Can contain certain html tags.
String
payDate Any The date the credit note has been paid. Timestamp
costCentre Any A cost centre for the credit note. Nested object (CostCentre)
sendDate Any The date the credit note has been sent to the end-customer. Timestamp
bookingCategory Any The booking category of the credit note.
Must be UNDERACHIEVEMENT in sevdesk-Update 2.0.
String
+ # The credit note number + At this point we wan't to pay special attention to the credit note number again.
The credit note number is not an attribute that must be supplied when creating a credit note, however for most, if not all of our customers, a correct enumeration is the key to structured bookkeeping, which is why duplicate entries must be avoided.
For this reason, most of the time a manual assignment of numbers is not the best idea and we are happy to provide you a endpoints which will help out finding the next credit note number.

This GET request will check what the next credit note number should be, so that a correct enumeration is kept.
The concrete endpoint can be used for a multitude of enumerations, but we will just concentrate on checking the next credit note number.
+ # How to filter for certain credit notes + Often you don't want to retrieve all credit notes in a sevdesk account or one specific credit note of which you know the ID, but rather a list of credit notes or a single credit note with certain properties.
For this purpose we provide a bunch of filters that you can attach to your GET query string for nearly all endpoints.
Here are all filters applicable to a credit note query.
Filter Description
creditNoteNumber={number} Only retrieve all credit notes with number as a credit note number
onlyEnshrined=true Only retrieve all credit notes which are enshrined
tags[x][id]={id}&tags[x][objectName]=Tag Only retrieve all credit notes with id as a tag.
You can specify multiple tags by adding more array entries.
status={status} Only retrieve credit notes of a given status
delinquent=true Only retrieve delinquent (due) credit notes
notdelinquent=true Only retrieve credit notes which are not delinquent (due)
customerIntenalNote={note} Only retrieve all credit notes with note as a customer internal note
origin[id]={id}&origin[objectName]=ModelName Only retrieve all credit notes with id as an origin
costCentre[id]={id}&costCentre[objectName]=CostCentre Only retrieve all credit notes with id as a cost centre.
contact[id]={id}&contact[objectName]=Contact Only retrieve all credit notes with id as a contact
startDate={timestamp} Only retrieve all credit notes where credit note date is bigger than timestamp
endDate={timestamp} Only retrieve all credit notes where credit note date is smaller than timestamp
If startDate and endDate are both supplied, you will get all credit notes in the defined range
day={timestamp} Only retrieve all credit notes where credit note date falls on the day of timestamp
header={header} Only retrieve all credit notes with header as a header
headerSearch={header} Only retrieve all credit notes of which the header is like header
paymentMethod[id]={id}&paymentMethod[objectName]=PaymentMethod Only retrieve all credit notes with id as a payment method
headerOrNumber={headerOrNumber} Only retrieve all credit notes of which the header or credit note number is like headerOrNumber
headerStartsWith={headerStart} Only retrieve all credit notes of which the header starts with headerStart
globalSearch={searchTerm} Search for credit notes related to searchTerm
orderByCreditNoteNumber={ASC/DESC} Order all credit notes after credit note number in ASC/DESC order
partiallyPaid=true Retrieve all credit notes which are partially paid
orderByDueDate=true Retrieve all credit notes ordered by their due date
orderByDueTime=true Retrieve all credit notes ordered by their due time
orderByDebit=true Retrieve all credit notes ordered by their debit
creditNoteNumberGreater={number} Only retrieve all credit notes of which the credit note number is bigger than number
creditNoteNumberNumberSmaller={number} Only retrieve all credit notes of which the credit note number is smaller than number
startAmount={amount} Only retrieve all credit notes of which the (net/gross) sum is larger or equal amount
endAmount={amount} Only retrieve all credit notes of which the (net/gross) sum is smaller or equal amount
+ x-displayName: CreditNote + - name: CreditNotePos + description: >- + Just like normal invoices, credit notes naturally contain one or more + credit note positions sometimes also called items, lines or line + items.
These positions can but mustn't contain parts from the sevdesk + inventory.
In sevdesk the credit note object itself just provides the + skeleton to which positions can be added.
Without the positions, the + credit note would have a sum of zero and therefore no real meaning.
+ For this reason it is necessary that we have a closer look at credit note + positions in this section. + + # What makes up a credit note position? + A credit note position basically consist of: The total gross sum of the credit note position is then calculated by the price being multiplied with the quantity and the tax rate, which is previously converted to a point number.
So for a price of 100, a quantity of two and a tax rate of 19 this would be:
100 * 2 * 1,19 = 238

There is also the option of regarding the price as the gross price.
This is regulated by an attribute of credit note which is called showNet. More about it in the attribute list.
In this case, the total sum will be the price you provided and the net price will be calculated by our system.
Some of our customers prefer this method, however make sure that you don't get prices mixed up. + # Credit note position attributes + Here is the table of all attributes of credit note positions
Necessary attributes, which must not be left out, are marked red.
Attributes which are strongly recommended for valid bookkeeping are marked orange.
Attribute Description Attribute Type
taxRate The tax rate of the position. Double
unity The unity in which one item is measured. Nested object (Unity)
quantity The quantity of items. Double
creditNote The creditNote to which the position belongs. Nested object (CreditNote)
text A text describing the position. String
positionNumber The number of the position if there are multiple positions in a credit note.
Needs to start with zero and is incremented for every new position.
If you want to order them differently, you can change their position numbers to your needs.
Integer
name The name of the item in the position. String
price The price for one unit of the item in the position. Double
part You can define a part from your sevdesk inventory here.
Please be aware, you will still need to provide the name, price and everything else as this will not automatically be generated.
Nested object (Part)
+ # How to create/update an credit note position + You can create a credit note position when creating a credit note, for more information visit the credit note endpoint.
If you want to update an credit note position for an existing credit note, then you must use the same endpoint as when creating an credit note, then passing in the ID along with the objectName of the credit note and mapAll.
In order to update an credit note position in an existing credit note, the ID and the objectName of the credit note must be transferred and in the credit note position the ID of the credit note position to be updated
+ x-displayName: CreditNotePos + - name: Export + description: A set of operations to export data. + x-displayName: Export + - name: Part + description: Manage parts in an inventory and use them in e.g. invoices. + x-displayName: Part + - name: Invoice + description: |- + + # Purpose of invoices in sevdesk + Every time one of our sevdesk customers sells an item or provides a service an invoice needs to be created.
These invoice can then be paid by the end-customers so that the selling process is completed.
The invoices are directly connected to the transactions of the customer, so every time an invoice is created and marked as paid, there must be a transaction on some bank account.
The invoice must then be linked to this transaction, otherwise false reports for tax offices and other institutions can be the case. + # Attributes of an invoice + Here is the table of all attributes of invoices.
Necessary attributes, which must not be left out, are marked red.
Attributes which are strongly recommended for valid bookkeeping are marked orange.
There is also a distinction between invoice types, as not all attributes are useful for all types.
Attribute Invoice Type Description Attribute Type
taxType Any Use this in sevdesk-Update 1.0 (instead of taxRule).
Defines the vat-regulation.
Can be:
  • default
  • eu
  • noteu
  • custom
  • ss
String
taxSet Any Use this in sevdesk-Update 1.0 (instead of taxRule).
Use for custom defined vat-regulations.
Requires "taxType": "custom"
Integer
taxRule Any Use this in sevdesk-Update 2.0 (replaces taxType / taxSet).
Defines the vat-regulation.

For "Regelbesteuerung" it can be one of:
  • 1 - Umsatzsteuerpflichtige Umsätze - tax rates: 0.0, 7.0, 19.0 - replaces "taxType": "default"
  • 2 - Ausfuhren - allowedTaxRates: 0.0
  • 3 - Innergemeinschaftliche Lieferungen - tax rates: 0.0, 7.0, 19.0 - replaces "taxType": "eu"
  • 4 - Steuerfreie Umsätze §4 UStG - tax rates: 0.0
  • 5 - Reverse Charge gem. §13b UStG - tax rates: 0.0
  • 17 - Nicht im Inland steuerbare Leistung - tax rates: 0.0 - replaces "taxType": "noteu"
    "Nicht im Inland steuerbare Leistung" is not available for:
    • advance invoice ("invoiceType": "AR")
    • partial invoice ("invoiceType": "TR")
    • final invoice ("invoiceType": "ER")
For small business owner ("Kleinunternehmer") it can be:
  • 11 - Steuer nicht erhoben nach §19UStG - tax rates: 0.0 - replaces "taxType": "ss"
Example for Umsatzsteuerpflichtige Umsätze: "taxRule": {"id": "1", "objectName": "TaxRule"}
Nested object (TaxRule)
currency Any Currency of the invoice.
Needs to be currency code according to ISO-4217.
String
taxText Any Text describing the vat regulation you chose.
A common text of our German customers would be:
Umsatzsteuer ausweisen or zzgl. Umsatzsteuer 19%
String
taxRate Any This is not used anymore. Use the taxRate of the individual positions instead. Integer
contactPerson Any The sevdesk user which acts as a contact person for this invoice.
Nested object (SevUser)
smallSettlement Any If the sevdesk account is falling under the small entrepreneur scheme the invoices must't contain any vat.
If this is the case, this attribute should be true, otherwise false.
Boolean
invoiceDate Any The invoice date. + + **Requirements:** + * For final invoices ("invoiceType" = "ER"), the invoiceDate must be later than or equal to the invoiceDate of related advance ("invoiceType" = "AR") / partial ("invoiceType" = "TR") invoices. Date / Timestamp
status Any The invoice status. Integer
showNet Any This attribute determines, if the price you give the invoice positions will be regarded as gross or net.
If true, the price attribute will hold the net value, otherwise the gross value, as described in the section above.
Boolean
discount Any If the end-customer gets a discount if he pays the invoice in a given time, you can specify the percentage of the discount here.
Should this be the case, you will need to provide a value for the attribute discountTime too, otherwise there is no time given and the end-customer won't get a discount.
If you don't want this, just leave this attribute at zero.
Integer
discountTime Any If a value other than zero is used for the discount attribute you need to specify the amount of days for which the discount is granted. Integer
enshrined Any Enshrined invoices cannot be changed.
Can only be set via /Invoice/{invoiceId}/enshrine. This operation cannot be undone.
Date / Timestamp
customerInternalNote Any You can use this attribute to provide a note for the invoice.
It can be used for reference numbers, order numbers or other important information.
String
address Any Holds the complete address to which the invoice is directed.
You can use line brakes to separate the different address parts.
String
deliveryDate Any The delivery date of the invoice.
This can also be a date range if you provide another timestamp for deliveryDateUntil.
Timestamp
deliveryDateUntil Any You can provide a value here if you want the delivery date to be a date range and you have already given a timestamp to deliveryDate. Timestamp
sendType Any Is set when using [Invoice/{invoiceId}/sendBy](#tag/Invoice/operation/invoiceSendBy) / [Invoice/{invoiceId}/sendViaEmail](#tag/Invoice/operation/sendInvoiceViaEMail).
Valid types are: VPR (printed), VPDF (downloaded), VM (mailed), VP (postal).
String
origin Any You can specify the object from which an invoice originated, like an order.
Just provide the ID of this object.
Integer
invoiceNumber Any The invoice number. String
contact Any The end-customer to which the invoice is directed.
Please note, you need to provide a contact if the invoice has any other status than 100.
Nested object (Contact)
header Any The invoice header.
Usually consists of the invoice number and a prefix.
String
headText Any A head text for the invoice.
Can contain certain html tags.
String
footText Any A foot text for the invoice.
Can contain certain html tags.
String
timeToPay Any The time the end-customer has to pay the invoice in days. Integer
payDate Any The date the end-customer has paid the invoice. Timestamp
paymentMethod Any The payment method for the invoice.
Needs the ID of a specified payment method.
Integer
costCentre Any A cost centre for the invoice. Nested object (CostCentre)
sendDate Any The date the invoice was sent to the end-customer. Timestamp
invoiceType
  • RE - invoice
  • WKR - recurring invoice
  • SR - cancellation invoice
  • MA - invoice remider
  • TR - partial invoice
  • ER - final invoice
The invoice type. String
dunningLevel Reminders The dunning level.
Starts with 1 (Payment reminder) and should be incremented by one every time another reminder is sent.
Integer
reminderDeadline Reminders The deadline for the next reminder. Timestamp
reminderDebit Reminders The reminder debit. Double
reminderTotal Reminders The total reminder amount. Double
reminderCharge Reminders The additional reminder charge. Double
accountIntervall Recurring Invoices The interval in which recurring invoices are due. ISO-8601 Duration
accountNextInvoice Recurring Invoices The date when the next invoice is due. Timestamp
propertyIsEInvoice e-invoice

If true, the invoice will be created as e-invoice.

To create a valid e-invoice some extra data are required

sevClient
  • addressStreet
  • addressZip
  • addressCity
  • bankIban
  • bankBic
  • contactEmail
  • contactPhone
  • taxNumber
  • vatNumber

contact
  • buyerReference
  • email

invoice
  • paymentMethod
  • addressStreet
  • addressZip
  • addressCity
  • addressCountry
  • contact

+
boolean
+ # The invoice number + At this point we wan't to pay special attention to the invoice number again.
The invoice number is not an attribute that must be supplied when creating an invoice, however for most, if not all of our customers, a correct enumeration is the key to structured bookkeeping, which is why duplicate entries must be avoided.
For this reason, most of the time a manual assignment of numbers is not the best idea and we are happy to provide you a endpoints which will help out finding the next invoice number.

This GET request will check what the next invoice number should be, so that a correct enumeration is kept.
The concrete endpoint can be used for a multitude of enumerations, but we will just concentrate on checking the next invoice number.
You can change the type query string parameter to your needs, depending on the invoice type for which you want the next number. + # Types and status of invoices + Invoice types
Invoices are most certainly the most complex objects that can be handled over the API. There are multiple types of invoices and these invoices can have multiple status again. Let's have a look at the different types of invoices first.
Invoice Type Description Abbreviation
Normal invoice A normal invoice which documents a simple selling process. RE
Recurring invoice An invoice which generates normal invoices with the same values regularly in fixed time frames (every month, year, ...). WKR
Cancellation invoice An invoice which cancels another already created normal invoice. SR
Reminder invoice An invoice which gets created if the end-customer failed to pay a normal invoice in a given time frame.
Often includes some kind of reminder fee.
MA
Part invoice Part of a complete invoice. All part invoices together result in the complete invoice.
Often used if the end-customer can partly pay for items or services.
TR
Final invoice The final invoice of all part invoices which completes the invoice.
After the final invoice is paid by the end-customer, the selling process is complete.
ER

For now we will only cover the normal invoices, as this is complex enough.
However, it is important to keep in mind the abbreviations for all types of invoices or at least the one you will need.
This is, because you will need to provide the invoice type when creating an invoice.

Invoice status
Now that we have covered all invoice types, let's move to the different status they can have.
Invoice status Meaning Status code
Deactivated recurring invoice The invoice is a deactivated recurring invoice.
This status code is only relevant for recurring invoices.
50
Draft The invoice is still a draft.
It has not been sent to the end-customer and can still be changed.
100
Open / Due The invoice has been sent to the end-customer.
It is either shown as open if the pay date is not exceeded or due if it is.
200
Partially paid The invoice has been partially paid.
This means, that it is linked to a transaction on some payment account in sevdesk. This status was introduced with Release 4.181 (June 13, 2024). Invoices that were partially paid before that release will have the status "Open" ("status": "200"). In that case use [Invoice/{invoiceId}/getIsPartiallyPaid](#tag/Invoice/operation/getIsInvoicePartiallyPaid) instead of checking the status directly.
750
Paid The invoice has been paid.
This means, that it is linked to a transaction on some payment account in sevdesk.
1000

It is again important to keep in mind the status codes for all status of invoices or at least the one you will need.
This is, because you will need to provide the status code when creating an invoice.
+ + # How e-invoice works + The e-invoice is a new feature in sevdesk, which allows you to send invoices to your customers in a digital way. To turn an invoice into an e-invoice, you have to set propertyIsEInvoice to true When propertyIsEInvoice is set an XML is embedded inside the PDF. Embedding the XML into the PDF is called ZUGFeRD. If you just need the XML (XRechnung) you can get it by calling [Invoice/{invoiceId}/getXml](#tag/Invoice/operation/invoiceGetXml). Both XML files are identical. + + # How to book an invoice + Booking the invoice with a transaction is probably the most important part in the bookkeeping process.
There are several ways on correctly booking an invoice, all by using the same endpoint.
This endpoint is called /Invoice/{id}/bookAmount.

The first way of correctly booking an invoice is to book it on the standard check account which is provided by sevdesk.
This is perhaps the easiest way, as no transaction needs to be manually created or searched.
The fitting transaction will automatically be created on the standard account and the invoice will be booked with it.
This works the same way with the register check account.



In the second variant, it is necessary that a transaction already exists, because it is not automatically generated in a manual account or online/finapi account.
For this, you must either create the transactions or, in the case of an online/finapi account, import the transactions. When booking the invoices it is important that an id and an objectName are passed along, otherwise a logic error will occur.


+ # How to filter for certain invoices + Often you don't want to retrieve all invoices in a sevdesk account or one specific invoice of which you know the ID, but rather a list of invoices or a single invoice with certain properties.
For this purpose we provide a bunch of filters that you can attach to your GET query string for nearly all endpoints.
Here are all filters applicable to an invoice query.
Filter Description
partiallyPaid=true Retrieve all invoices which are partially paid
orderByDebit=true Retrieve all invoices ordered by their debit
orderByDueTime=true Retrieve all invoices ordered by their due time
showAll=true Retrieve all invoices of all types
invoiceNumber={number} Only retrieve all invoices with number as a invoice number
delinquent=true Only retrieve delinquent (due) invoices
notdelinquent=true Only retrieve invoices which are not delinquent (due)
tags[x][id]={id}&tags[x][objectName]=Tag Only retrieve all invoices with id as a tag.
You can specify multiple tags by adding more array entries.
costCentre[id]={id}&costCentre[objectName]=CostCentre Only retrieve all invoices with id as a cost centre.
status={status} Only retrieve invoices of a given status
createBefore={timestamp} Only retrieve all invoices created before timestamp
createAfter={timestamp} Only retrieve all invoices created after timestamp
updateBefore={timestamp} Only retrieve all invoices updated last before timestamp
updateAfter={timestamp} Only retrieve all invoices updated last after timestamp
contact[id]={id}&contact[objectName]=Contact Only retrieve all invoices with id as a contact
orderByDueDate=true Retrieve all invoices ordered by their due date
customerIntenalNote={note} Only retrieve all invoices with note as a customer internal note
day={timestamp} Only retrieve all invoices where invoice date falls on the day of timestamp
startDate={timestamp} Only retrieve all invoices where invoice date is bigger than timestamp
endDate={timestamp} Only retrieve all invoices where invoice date is smaller than timestamp
If startDate and endDate are both supplied, you will get all invoices in the defined range
header={header} Only retrieve all invoices with header as a header
onlyDunned=true Retrieve all invoices which are dunned
showWkr=all Retrieve all recurring invoices
showMa=all Retrieve all invoices which are payment reminders
origin[id]={id}&origin[objectName]=ModelName Only retrieve all invoices with id as an origin
invoiceType={type} Only retrieve all invoices with type as an invoice type
paymentMethod[id]={id}&paymentMethod[objectName]=PaymentMethod Only retrieve all invoices with id as a payment method
headerSearch={header} Only retrieve all invoices of which the header is like header
headerStartsWith={headerStart} Only retrieve all invoices of which the header starts with headerStart
headerOrNumber={headerOrNumber} Only retrieve all invoices of which the header or invoice number is like headerOrNumber
globalSearch={searchTerm} Search for invoices related to searchTerm
orderByInvoiceNumber={ASC/DESC} Order all invoices after invoice number in ASC/DESC order
invoiceNumberGreater={number} Only retrieve all invoices of which the invoice number is bigger than number
invoiceNumberSmaller={number} Only retrieve all invoices of which the invoice number is smaller than number
sendType={type} Only retrieve all invoices with type as a send type
fulltextSearch={text} Search for invoices, positions or contact with text as a text
+ x-displayName: Invoice + - name: InvoicePos + description: |- + + # Invoice positions + Every invoice naturally contains one or more invoice positions sometimes also called invoice items, invoice lines or line items.
These positions can but mustn't contain parts from the sevdesk inventory.
In sevdesk the invoice object itself just provides the skeleton to which positions can be added.
Without the positions, the invoice would have a sum of zero and therefore no real meaning.
For this reason it is necessary that we have a closer look at invoice positions in this section.

What makes up a invoice position?

A invoice position basically consist of: The total gross sum of the invoice position is then calculated by the price being multiplied with the quantity and the tax rate, which is previously converted to a point number.
So for a price of 100, a quantity of two and a tax rate of 19 this would be:
100 * 2 * 1,19 = 238

There is also the option of regarding the price as the gross price.
This is regulated by an attribute of invoice which is called showNet. More about it in the attribute list.
In this case, the total sum will be the price you provided and the net price will be calculated by our system.
Some of our customers prefer this method, however make sure that you don't get prices mixed up. + # Invoice position attributes + Here is the table of all attributes of invoice positions.
Necessary attributes, which must not be left out, are marked red.
Attributes which are strongly recommended for valid bookkeeping are marked orange.
There is also a distinction between invoice types, as not all attributes are useful for all types.
Attribute Description Attribute Type
taxRate The tax rate of the position. Double
unity The unity in which one item is measured. Nested object (Unity)
quantity The quantity of items. Double
invoice The invoice to which the position belongs. Nested object (Invoice)
discount A discount amount for the specific position. Double
text A text describing the position. String
positionNumber The number of the position if there are multiple positions in an invoice.
Needs to start with zero and is incremented for every new position.
If you want to order them differently, you can change their position numbers to your needs.
Integer
name The name of the item in the position. String
price The price for one unit of the item in the position. Double
part You can define a part from your sevdesk inventory here.
Please be aware, you will still need to provide the name, price and everything else as this will not automatically be generated.
Nested object (Part)
+ # How to create/update an invoice position + You can create an invoice position when creating an invoice, for more information visit the Invoice endpoint.
If you want to update an invoice position for an existing invoice, then you must use the same endpoint as when creating an invoice, then passing in the ID along with the objectName of the invoice and mapAll.
In order to update an invoice position in an existing invoice, the ID and the objectName of the invoice must be transferred and in the invoice position the ID of the invoice position to be updated
+ x-displayName: InvoicePos + - name: Layout + description: |- + + # Purpose of Layout in sevdesk + Each invoice, order and credit note has a generated document.
In this chapter we will show you how the layout queries and use them to change the look of your document
Please keep in mind that every invoice, order and credit note must be rendered beforehand so that a document is also available. + # Attributes of a Layout + In the layouts there are only two different attributes, key and value. For key you can pass one of the following values: The value depends on which key you have chosen. In the following the standard values ​​of the respective keys.

language
German de_DE
German(Autria) de_AT
German(Swiss) de_CH
English en_US
Spanish es_ES
French fr_FR
Italian id_IT
Greek el_GR

payPal
Show PayPal icon A
Show link B
Disable Paypal C
PayPal as Strig D
+ x-displayName: Layout + - name: Order + description: |- + + # Purpose of orders in sevdesk + Orders serve a multitude of purposes in sevdesk.
Although strictly speaking an order has just one single purpose, we regard three types of objects as orders.
The estimate / proposal which gets sent to an end-customer by the customer.
The order confirmation from an accepted estimate.
The delivery note which is sent if goods have been sent by the customer.
If you need to handle any of these objects, this detail documentation is the right place!
Orders are really similar to invoices in regards to their attributes and representation.
This is due to their close relation to invoices, as invoices can be created from orders. + # Types and status of orders + Orders are one of the more complex objects that can be handled over the API.
As already mentioned, there are different types of orders and these orders can have multiple status again.
Let's have a look at the different types of orders first.
Order Type Description Abbreviation
Estimate / Proposal A normal order which documents a simple estimation / proposal for an end-customer. AN
Order confirmation A confirmation for an estimate / proposal. AB
Delivery note A confirmation that goods from an estimate / proposal have been sent. LI
Fortunately all types of order share the same set of attributes so it is only important to keep in mind the abbreviations for all types of orders or at least the one you will need.
This is, because you will need to provide the order type when creating an order.

Order status
Now that we have covered all order types, let's move to the different status they can have.

Order status Meaning Status code
Draft The order is still a draft.
It has not been sent to the end-customer and can still be changed.
100
Delivered The order has been sent to the end-customer.
200
Rejected / Cancelled The order has been rejected by the end-customer.
300
Accepted The order has been accepted by the end-customer.
500
Partially Calculated An invoice for parts of the order (but not the full order) has been created.
750
Calculated The order has been calculated.
One or more invoices have been created covering the whole order.
1000
It is important to keep in mind the status codes for all status of orders or at least the one you will need.
This is, because you will need to provide the status code when creating an order. + # Attributes of an order + Here is the table of all attributes of orders.
Necessary attributes, which must not be left out, are marked red.
Attributes which are strongly recommended for valid bookkeeping are marked orange.
Attribute Description Attribute Type
taxType Use this in sevdesk-Update 1.0 (instead of taxRule).
Defines the vat-regulation.
Can be:
  • default
  • eu
  • noteu
  • custom
  • ss
String
taxSet Use this in sevdesk-Update 1.0 (instead of taxRule).
Use for custom defined vat-regulations.
Requires "taxType": "custom"
Integer
taxRule Use this in sevdesk-Update 2.0 (replaces taxType / taxSet).
Defines the vat-regulation.

For "Regelbesteuerung" it can be one of:
  • 1 - Umsatzsteuerpflichtige Umsätze - tax rates: 0.0, 7.0, 19.0 - replaces "taxType": "default"
  • 2 - Ausfuhren - allowedTaxRates: 0.0
  • 3 - Innergemeinschaftliche Lieferungen - tax rates: 0.0, 7.0, 19.0 - replaces "taxType": "eu"
  • 4 - Steuerfreie Umsätze §4 UStG - tax rates: 0.0
  • 5 - Reverse Charge gem. §13b UStG - tax rates: 0.0
  • 17 - Nicht im Inland steuerbare Leistung - tax rates: 0.0 - replaces "taxType": "noteu"
    If "Nicht im Inland steuerbare Leistung" is used, no advance or partial invoice can be created from this order.
    See the example request ([Invoice/Factory/createInvoiceFromOrder](#tag/Invoice/operation/createInvoiceFromOrder)) to create a normal invoice "invoiceType": "RE" from such an order.
For small business owner ("Kleinunternehmer") it can be:
  • 11 - Steuer nicht erhoben nach §19UStG - tax rates: 0.0 - replaces "taxType": "ss"
Example for Umsatzsteuerpflichtige Umsätze: "taxRule": {"id": "1", "objectName": "TaxRule"}
Nested object (TaxRule)
currency Currency of the order.
Needs to be currency code according to ISO-4217.
String
version Version of the order.
Can be used if you have multiple drafts for the same order.
Should start with 0.
Integer
taxText Text describing the vat regulation you chose.
A common text of our German customers would be:
Umsatzsteuer ausweisen or zzgl. Umsatzsteuer 19%
String
taxRate This is not used anymore. Use the taxRate of the individual positions instead. Integer
contactPerson The sevdesk user which acts as a contact person for this order.
Nested object (SevUser)
smallSettlement If the sevdesk account is falling under the small entrepreneur scheme the order must't contain any vat.
If this is the case, this attribute should be true, otherwise false.
Boolean
orderDate The order date. Date / Timestamp
status The order status. Integer
showNet This attribute determines, if the price you give the order positions will be regarded as gross or net.
If true, the price attribute will hold the net value, otherwise the gross value.
Boolean
customerInternalNote You can use this attribute to provide a note for the order.
It can be used for reference numbers, order numbers or other important information.
String
address Holds the complete address to which the order is directed.
You can use line brakes to separate the different address parts.
String
sendType If you don't plan to send the order over another endpoint like /Order/sendViaEmail or Order/sendBy but instead give it the status "200" directly, you need to specify a send type here.
Valid types are: VPR (printed), VPDF (downloaded), VM (mailed), VP (postal).
String
origin You can specify the object from which an order originated.
Just provide the ID of this object.
Integer
typeOrigin Specifies the object name of the object from which an order originated.
Most likely Order or Invoice.
String
orderNumber The order number. String
contact The end-customer to which the order is directed.
Nested object (Contact)
header The order header.
Usually consists of the order number and a prefix.
String
headText A head text for the order.
Can contain certain html tags.
String
footText A foot text for the order.
Can contain certain html tags.
String
paymentTerms The payment terms for the order.
Integer
deliveryTerms The delivery terms for the order.
Integer
sendDate The date the order was sent to the end-customer. Timestamp
orderType The order type. String
+ # How to filter for certain orders + Often you don't want to retrieve all orders in a sevdesk account or one specific order of which you know the ID, but rather a list of orders or a single order with certain properties.
For this purpose we provide a bunch of filters that you can attach to your GET query string for nearly all endpoints.
Here are all filters applicable to an order query.
Filter Description
orderNumber={number} Only retrieve all orders with number as a order number
tags[x][id]={id}&tags[x][objectName]=Tag Only retrieve all orders with id as a tag.
You can specify multiple tags by adding more array entries.
status={status} Only retrieve orders of a given status
createBefore={timestamp} Only retrieve all orders created before timestamp
createAfter={timestamp} Only retrieve all orders created after timestamp
updateBefore={timestamp} Only retrieve all orders updated last before timestamp
updateAfter={timestamp} Only retrieve all orders updated last after timestamp
contact[id]={id}&contact[objectName]=Contact Only retrieve all orders with id as a contact
startDate={timestamp} Only retrieve all orders where order date is bigger than timestamp
endDate={timestamp} Only retrieve all orders where order date is smaller than timestamp
If startDate and endDate are both supplied, you will get all orders in the defined range
orderType={type} Only retrieve all orders with type as an order type
headerSearch={header} Only retrieve all orders of which the header is like header
globalSearch={searchTerm} Search for orders related to searchTerm
orderByOrderNumber={ASC/DESC} Order all orders after order number in ASC/DESC order
orderNumberGreater={number} Only retrieve all orders of which the order number is bigger than number
orderNumberNumberSmaller={number} Only retrieve all orders of which the order number is smaller than number
startAmount={amount} Only retrieve all orders of which the (net/gross) sum is larger or equal amount
endAmount={amount} Only retrieve all orders of which the (net/gross) sum is smaller or equal amount
+ x-displayName: Order + - name: OrderPos + description: |- + + # Order position attributes + Here is the tables of all attributes of order positions.
Necessary attributes, which must not be left out, are marked red.
Attributes which are strongly recommended for valid bookkeeping are marked orange.
Attribute Description Attribute Type
taxRate The tax rate of the position. Double
unity The unity in which one item is measured. Nested object (Unity)
quantity The quantity of items. Double
order The order to which the position belongs. Nested object (Order)
discount A discount amount for the specific position. Double
text A text describing the position. String
positionNumber The number of the position if there are multiple positions in an order.
Needs to start with zero and is incremented for every new position.
If you want to order them differently, you can change their position numbers to your needs.
Integer
name The name of the item in the position. String
price The price for one unit of the item in the position. Double
part You can define a part from your sevdesk inventory here.
Please be aware, you will still need to provide the name, price and everything else as this will not automatically be generated.
Nested object (Part)
+ x-displayName: OrderPos + - name: Voucher + description: >- + Vouchers (receipts) is a generic term for various documents that serve as + proof of business transactions for the bookkeeping.
Incoming and + outgoing invoices, coupons and receipts are among the most common types of + documents.
Every time one of our sevdesk customers makes a monetary + input or output, the transaction needs to be documented with a + receipt.
In sevdesk our customers can create a digital version of this + receipt, the voucher, to which the actual offline receipt can be + attached.
These vouchers can then be paid by the end-customers or by + the customer, depending if it is an input or output, so that the + transaction process is completely documented.
The vouchers are + directly connected to the transactions of the customer, so every time a + voucher is created and marked as paid, there must be a transaction on some + bank account.
The voucher must then be linked to this transaction, + otherwise false reports for tax offices and other institutions can be the + case.
+ + # Attributes of a voucher + Here is the table of useful attributes of voucher.
Necessary attributes, which must not be left out, are marked red.
Attributes which are strongly recommended for valid bookkeeping are marked orange. These can be skipped when creating a draft voucher.
There is also a distinction between voucher types, as not all attributes are useful for all types.
Attribute Voucher Type Description Attribute Type
taxType Any Use this in sevdesk-Update 1.0 (instead of taxRule).
Defines the vat-regulation for the voucher
Can be:
  • default
  • eu
  • noteu
  • custom
  • ss
String
taxSet Any Use this in sevdesk-Update 1.0 (instead of taxRule).
If you supplied "taxType": "custom" you can specify which tax set should be used.
Nested object (TaxSet)
taxRule Any Use this in sevdesk-Update 2.0 (instead of taxType / taxSet).
Defines the vat-regulation for the voucher

For "Regelbesteuerung" it can be one of:
  • 1 - Umsatzsteuerpflichtige Umsätze (tax rates: 0.0, 7.0, 19.0) - replaces "taxType": "default"
  • 2 - Ausfuhren (tax rates: 0.0)
  • 3 - Innergemeinschaftliche Lieferungen (tax rates: 0.0, 7.0, 19.0) - replaces "taxType": "eu"
  • 4 - Steuerfreie Umsätze §4 UStG (tax rates: 0.0)
  • 5 - Reverse Charge gem. §13b UStG (tax rates: 0.0)
  • 17 - Nicht im Inland steuerbare Leistung - tax rates: 0.0 - replaces "taxType": "noteu"
For small business owner ("Kleinunternehmer") it can be:
  • 1 - Steuer nicht erhoben nach §19UStG (tax rates: 0.0) - replaces "taxType": "ss"
Example for Umsatzsteuerpflichtige Umsätze: "taxRule": {"id": "1", "objectName": "TaxRule"}

Depending on the use case (revenue or expense), you can find the right TaxRule via one of the Account Guidance endpoints:
Nested object (TaxRule)
voucherType Any The type of the voucher. Most likely VOU but RV is also valid. String
voucherDate Any The voucher date. Date / Timestamp
deliveryDate Any The delivery date of the voucher.
This can also be a date range if you provide another value for deliveryDateUntil.
Date / Timestamp
deliveryDateUntil Any You can provide a value here if you want the delivery date to be a date range and you have already given a value to deliveryDate. Date / Timestamp
status Any The voucher status. Notable values are 50 (draft) and 100 (finished), see below for the full list. Integer
creditDebit Any Defines if the voucher is a credit (expense) or debit (revenue) document.
If you supply C as the value, the voucher is a credit. You bought something.
If you supply D as the value, the voucher is a debit. You sold something.
String
enshrined Any Enshrined vouchers cannot be changed.
Can only be set via /Voucher/{voucherId}/enshrine. This operation cannot be undone.
Date / Timestamp
paymentDeadline Any The payment deadline of the voucher.
If this date is exceeded, the voucher will be shown as due.
Date / Timestamp
supplier Any The supplier or customer to which the voucher is directed.
Note that you must provide either the supplier object or a supplierName.
Nested object (Contact)
supplierName Any The name of the supplier or customer used for the voucher.
String
description Any The voucher number or voucher description. String
document Any The document of the voucher.
Nested object (Document)
payDate Any The date the voucher was paid. Date / Timestamp
costCentre Any A cost centre for the voucher. Nested object (CostCentre)
currency Any The currency, defaults to the system currency when not set.
Example value: EUR
String
recurringInterval Recurring Vouchers The interval in which vouchers are to be created.
Possible values are:
  • P0Y0M1W (weekly)
  • P0Y0M2W (every second week)
  • P0Y1M (monthly)
  • P0Y2M (every second month)
  • P0Y3M (quarterly)
  • P0Y6M (semiannual)
  • P1Y (yearly)
  • P2Y (every 2 years)
  • P3Y (every 3 years)
  • P4Y (every 4 years)
  • P5Y (every 5 years)
String
recurringIntervall
deprecated
Recurring Vouchers Values will be mapped to recurringInterval, deprecated because it would not allow values < 1 month. Integer
recurringStartDate Recurring Vouchers The date when the recurring vouchers start. Date / Timestamp
recurringNextVoucher Recurring Vouchers The date when the next voucher is due. When creating RV documents you will usually set this to the same date as recurringStartDate. Date / Timestamp
recurringLastVoucher Recurring Vouchers The date the last previous voucher was generated. Date / Timestamp
recurringEndDate Recurring Vouchers The date the generation of recurring vouchers ends. Date / Timestamp
+ # Types and status of vouchers + Vouchers are one of the more complex objects that can be handled over the API.
There are two types of vouchers and these vouchers can have multiple status again.
Let's have a look at the different types of vouchers first.
Voucher Type Description Abbreviation
Normal voucher A normal voucher which documents a simple selling process. VOU
Recurring voucher A voucher which generates normal vouchers with the same values regularly in fixed time frames (every month, year, ...). RV
For now we will only cover the normal vouchers, as this is complex enough.

Voucher status
Now that we have covered all voucher types, let's move to the different status they can have.
Voucher status Meaning Status code
Draft The voucher is still a draft.
It has not been marked as completed and can still be changed.
50
Unpaid / Due The voucher has been completed but not paid.
It is either shown as unpaid if the pay date is not exceeded or due if it is.
100
Transferred The voucher has been used to create a payment in sevdesk and is waiting for the import of the bank transaction to set it to paid. 150
Partially paid The voucher has been partially paid. There are linked transactions or payments. 750
Paid The voucher has been paid by the end-customer or the sevdesk customer.
This means, that it is linked to a transaction on some payment account in sevdesk.
1000
+ # How e-invoice works + + The general creation process does not change for e-invoice documents. Our existing endpoints will accept files in XML format as well as a PDF with embedded XML (i.e. in the ZUGFeRD format). As before, the internal filename is returned and the filename parameter can be used to create a voucher via the saveVoucher request.
Note that you are still responsible for providing the voucher data as before. The file provided will be treated in the same way as any other file uploaded via the API. In particular, this means that it will not be validated on our end for compliance with the EN16931 standard.
+ # Account Datev + + *Use this in sevdesk-Update 2.0 (instead of Accounting type)* + + An account Datev is the booking account used in voucher positions.
To choose the right account datev please use our account guidance

Here are two examples how accounting types can be chosen by our customers in the web interface:





+ + # Accounting type + + *Use this in sevdesk-Update 1.0* + + An accounting type is the booking account used in voucher positions.
It is essential that you always provide one, as it is relevant for multiple business reports.
In general, accounting types are differentiated into income and output accounting types.
Income types should only be used for debit vouchers and output types only for credit vouchers!
Here are two examples how accounting types can be chosen by our customers in the web interface:





Regarding the accounting types, you will most certainly only need to request existing accounting types for using their ID in further requests.
Therefore, you only need to send normal GET requests to the AccountingType endpoint.
+ # How to filter for certain vouchers +
Filter Description
accountingType[id]={id}&accountingType[objectName]=AccountingType Only retrieve all vouchers which contain at least one position using id as an accounting type.
withoutCatering=true Retrieve all vouchers except catering vouchers.
year={year} Only retrieve all vouchers with a voucher date in year.
month={month} Only retrieve all vouchers with a voucher date in month.
Can be combined with a year.
descriptionLike={description} Only retrieve all vouchers with a description containing description.
creditDebit={C/D} Supply C to only retrieve credit vouchers and D to only retrieve debit vouchers.
supplierName={name} Only retrieve all vouchers with a supplier having a name like name.
commentLike={comment} Only retrieve all vouchers having a position with a comment like comment.
searchCommentOrDescription={text} Only retrieve all vouchers having a position with comment like text or a description like text.
contact[id]={id}&contact[objectName]=Contact Only retrieve all vouchers with id as a contact
createBefore={timestamp} Only retrieve all vouchers created before timestamp
createAfter={timestamp} Only retrieve all vouchers created after timestamp
updateBefore={timestamp} Only retrieve all vouchers updated last before timestamp
updateAfter={timestamp} Only retrieve all vouchers updated last after timestamp
startDate={timestamp} Only retrieve all vouchers where voucher date is bigger than timestamp
endDate={timestamp} Only retrieve all vouchers where voucher date is smaller than timestamp
If startDate and endDate are both supplied, you will get all vouchers in the defined range.
object[id]={id}&object[objectName]={objectName} Only retrieve all vouchers with a linked object with ID id and objectName as object name.
startPayDate={timestamp} Only retrieve all vouchers where pay date is bigger than timestamp
endPayDate={timestamp} Only retrieve all vouchers where pay date is smaller than timestamp
If startPayDate and endPayDate are both supplied, you will get all vouchers in the defined range.
status={status} Only retrieve vouchers of a given status
orderByDebit=true Retrieve all vouchers ordered by their debit
costCentre[id]={id}&costCentre[objectName]=CostCentre Only retrieve all vouchers with id as a cost centre.
voucherType={type} Only retrieve all vouchers with type as a voucher type
origin[id]={id}&origin[objectName]=ModelName Only retrieve all vouchers with id as an origin
globalSearch={searchTerm} Search for vouchers related to searchTerm
contactOrObject[id]={id}&contactOrObject[objectName]={objectName} Only retrieve all vouchers with a linked object or a contact with ID id and objectName as object name.
orderByVoucherNumber={ASC/DESC} Order all vouchers after voucher number in ASC/DESC order
delinquent=true Only retrieve delinquent (due) vouchers
hasDocument=true Only retrieve vouchers which have an attached document
noRv=true Only retrieve vouchers which are not of type RV
tags[x][id]={id}&tags[x][objectName]=Tag Only retrieve all vouchers with id as a tag.
You can specify multiple tags by adding more array entries.
startAmount={amount} Only retrieve all vouchers with a sum bigger than amount.
If your provided amount is negative, it will retrieve all vouchers with a sum smaller than amount.
endAmount={amount} Only retrieve all vouchers with a sum smaller than amount.
If your provided amount is negative, it will retrieve all vouchers with a sum bigger than amount.
If startAmount and endAmount are both supplied, you will get all vouchers in the defined range.
fulltextSearch={text} Search for vouchers, positions or contact with text as a text
fulltextSearchObjects={object1, object2, ...} Enables different objects to search in with the fulltextSearch.

+ x-displayName: Voucher + - name: VoucherPos + description: "Every voucher can contain one or more voucher positions.
These positions must contain an accounting type (booking account) so that the voucher can be booked accordingly.
In sevdesk the voucher object itself just provides the skeleton to which positions can be added.
Without the positions, the voucher would have a sum of zero and therefore no real meaning.
For this reason it is necessary that we have a closer look at voucher positions in this section. \n# What makes up a voucher position?\n\nA voucher position item basically consists of in sevdesk-Update 2.0:
\r\n \nA voucher position item basically consists of in sevdesk-Update 1.0:

\r\n \nThe total gross sum of the voucher position is then calculated.
The 'net' attribute determines how we calculate the total, if net is true we use the sumNet and calculate from there. If net is false we use the sumGross and calculate the other values from there.

\n\n# Voucher position attributes\n Here is the table of all attributes of voucher positions.
Necessary attributes, which must not be left out, are marked red.
Attribute Description Attribute Type
sumGross or sumNet The sum of the voucher position. You may provider both values. Double
taxRate The tax rate of the voucher position. Double
voucher The voucher to which the position belongs. Nested object (Voucher)
comment A comment describing the position. String
net Define if the sum you provided is inclusive (false) or exclusive vat (true).
All positions must be either net or gross, a mixture of the two is not possible.
Boolean
accountDatev Use this in sevdesk-Update 2.0 (replaces accountingType).
The account datev (booking account) for the voucher position.
Nested object (AccountDatev)
accountingType The accounting type (booking account) for the voucher position. Nested object (AccountingType)
" + x-displayName: VoucherPos + - name: Report + description: A set of operations to export data. + x-displayName: Report + - name: Tag + description: |- + + # Purpose of Tag in sevdesk + Tags are a tool to create groupings that can be attached to any invoice, order, voucher and credit note.
The filter function can also be used with the help of the tags. It must be mentioned here that each invoice, order, receipt and credit note can have more than one tag and the tag must therefore be passed as an array.
An example of how to use a tag in invoices: + # Tag relation + With the tag relations you can display all invoices, receipts, orders and credit notes that have a tag
The tag relation does not have to be created separately, as this is automatically created when a tag is created.

+ x-displayName: Tag +paths: + /Tools/bookkeepingSystemVersion: + get: + tags: + - Basics + summary: Retrieve bookkeeping system version + description: >- + To check if you already received the update to version 2.0 you can use + this endpoint. + operationId: bookkeepingSystemVersion + responses: + '200': + description: Successful Request + content: + application/json: + schema: + type: object + properties: + objects: + type: object + properties: + version: + type: string + enum: + - '1.0' + - '2.0' + example: + objects: + version: '2.0' + '401': + description: Authentication required + deprecated: false + security: + - api_key: [] + /CheckAccount: + get: + tags: + - CheckAccount + summary: Retrieve check accounts + description: Retrieve all check accounts + operationId: getCheckAccounts + responses: + '200': + description: Successful operation + content: + application/json: + schema: + properties: + objects: + type: array + items: + $ref: '#/components/schemas/Model_CheckAccountResponse' + type: object + '400': + description: Bad request + '401': + description: Authentication required + '500': + description: Server error + deprecated: false + security: + - api_key: [] + post: + tags: + - CheckAccount + summary: Create a new check account + description: Creates a new banking account on which transactions can be created. + operationId: createCheckAccount + requestBody: + description: "Creation data. Please be aware, that you need to provide at least all required parameter\r\n of the CheckAccount model!" + content: + application/json: + schema: + $ref: '#/components/schemas/Model_CheckAccount' + responses: + '201': + description: Created - Returns created check account + content: + application/json: + schema: + properties: + objects: + type: array + items: + $ref: '#/components/schemas/Model_CheckAccountResponse' + type: object + '400': + description: Bad request + '401': + description: Authentication required + '500': + description: Server error + deprecated: true + security: + - api_key: [] + /CheckAccount/Factory/fileImportAccount: + post: + tags: + - CheckAccount + summary: Create a new file import account + description: Creates a new banking account for file imports (CSV, MT940). + operationId: createFileImportAccount + requestBody: + description: Data to create a file import account + content: + application/json: + schema: + $ref: '#/components/schemas/createFileImportAccount' + responses: + '201': + description: Created + content: + application/json: + schema: + properties: + objects: + $ref: '#/components/schemas/createFileImportAccountResponse' + '400': + description: Bad request + '401': + description: Authentication required + '422': + description: Invalid value given + '500': + description: Server error + security: + - api_key: [] + /CheckAccount/Factory/clearingAccount: + post: + tags: + - CheckAccount + summary: Create a new clearing account + description: Creates a new clearing account. + operationId: createClearingAccount + requestBody: + description: Data to create a clearning account + content: + application/json: + schema: + $ref: '#/components/schemas/createClearingAccount' + responses: + '201': + description: Created + content: + application/json: + schema: + properties: + objects: + $ref: '#/components/schemas/createClearingAccountResponse' + '400': + description: Bad request + '401': + description: Authentication required + '422': + description: Invalid value given + '500': + description: Server error + security: + - api_key: [] + /CheckAccount/{checkAccountId}: + get: + tags: + - CheckAccount + summary: Find check account by ID + description: Retrieve an existing check account + operationId: getCheckAccountById + parameters: + - name: checkAccountId + in: path + description: ID of check account + required: true + schema: + type: integer + responses: + '200': + description: Successful operation + content: + application/json: + schema: + properties: + objects: + type: array + items: + $ref: '#/components/schemas/Model_CheckAccountResponse' + type: object + '400': + description: Bad request + '401': + description: Authentication required + '500': + description: Server error + deprecated: false + security: + - api_key: [] + put: + tags: + - CheckAccount + summary: Update an existing check account + description: Update a check account + operationId: updateCheckAccount + parameters: + - name: checkAccountId + in: path + description: ID of check account to update + required: true + schema: + type: integer + requestBody: + description: Update data + content: + application/json: + schema: + $ref: '#/components/schemas/Model_CheckAccountUpdate' + responses: + '200': + description: Successful operation - Returns changed check account resource + content: + application/json: + schema: + $ref: '#/components/schemas/Model_CheckAccountResponse' + '400': + description: Bad request + '401': + description: Authentication required + '500': + description: Server error + security: + - api_key: [] + delete: + tags: + - CheckAccount + summary: Deletes a check account + operationId: deleteCheckAccount + parameters: + - name: checkAccountId + in: path + description: Id of check account to delete + required: true + schema: + type: integer + responses: + '200': + description: Successful operation - check account deleted + content: + application/json: + schema: + properties: + objects: + type: array + items: + default: null + type: object + '400': + description: Bad request + '401': + description: Authentication required + '409': + description: Conflict + '500': + description: Server error + security: + - api_key: [] + /CheckAccount/{checkAccountId}/getBalanceAtDate: + get: + tags: + - CheckAccount + summary: Get the balance at a given date + description: >- + Get the balance, calculated as the sum of all transactions sevdesk + knows, up to and including the given date. Note that this balance does + not have to be the actual bank account balance, e.g. if sevdesk did not + import old transactions. + operationId: getBalanceAtDate + parameters: + - name: checkAccountId + in: path + description: ID of check account + required: true + schema: + type: integer + - name: date + in: query + required: true + description: Only consider transactions up to this date at 23:59:59 + schema: + type: string + format: date + responses: + '200': + description: Successful operation + content: + application/json: + schema: + type: object + properties: + objects: + type: string + format: float + example: '105.56' + '400': + description: Bad request + '401': + description: Authentication required + '500': + description: Server error + security: + - api_key: [] + /CheckAccountTransaction: + get: + tags: + - CheckAccountTransaction + summary: Retrieve transactions + description: Retrieve all transactions depending on the filters defined in the query. + operationId: getTransactions + parameters: + - name: checkAccount[id] + in: query + description: >- + Retrieve all transactions on this check account. Must be provided + with checkAccount[objectName] + required: false + explode: false + schema: + type: integer + - name: checkAccount[objectName] + in: query + description: >- + Only required if checkAccount[id] was provided. 'CheckAccount' + should be used as value. + required: false + explode: false + schema: + type: string + - name: isBooked + in: query + description: Only retrieve booked transactions + required: false + explode: false + schema: + type: boolean + - name: paymtPurpose + in: query + description: Only retrieve transactions with this payment purpose + required: false + explode: false + schema: + type: string + - name: startDate + in: query + description: Only retrieve transactions from this date on + required: false + explode: false + schema: + type: string + format: date-time + - name: endDate + in: query + description: Only retrieve transactions up to this date + required: false + explode: false + schema: + type: string + format: date-time + - name: payeePayerName + in: query + description: Only retrieve transactions with this payee / payer + required: false + explode: false + schema: + type: string + - name: onlyCredit + in: query + description: Only retrieve credit transactions + required: false + explode: false + schema: + type: boolean + - name: onlyDebit + in: query + description: Only retrieve debit transactions + required: false + explode: false + schema: + type: boolean + responses: + '200': + description: Successful operation + content: + application/json: + schema: + properties: + objects: + type: array + items: + $ref: >- + #/components/schemas/Model_CheckAccountTransactionResponse + type: object + '400': + description: Bad request + '401': + description: Authentication required + '500': + description: Server error + deprecated: false + security: + - api_key: [] + post: + tags: + - CheckAccountTransaction + summary: Create a new transaction + description: Creates a new transaction on a check account. + operationId: createTransaction + requestBody: + description: "Creation data. Please be aware, that you need to provide at least all required parameter\r\n of the CheckAccountTransaction model!" + content: + application/json: + schema: + $ref: '#/components/schemas/Model_CheckAccountTransaction' + responses: + '201': + description: Created - Returns created transaction + content: + application/json: + schema: + $ref: '#/components/schemas/Model_CheckAccountTransactionResponse' + '400': + description: Bad request + '401': + description: Authentication required + '500': + description: Server error + security: + - api_key: [] + /CheckAccountTransaction/{checkAccountTransactionId}: + get: + tags: + - CheckAccountTransaction + summary: Find check account transaction by ID + description: Retrieve an existing check account transaction + operationId: getCheckAccountTransactionById + parameters: + - name: checkAccountTransactionId + in: path + description: ID of check account transaction + required: true + schema: + type: integer + responses: + '200': + description: Successful operation + content: + application/json: + schema: + properties: + objects: + type: array + items: + $ref: >- + #/components/schemas/Model_CheckAccountTransactionResponse + type: object + '400': + description: Bad request + '401': + description: Authentication required + '500': + description: Server error + deprecated: false + security: + - api_key: [] + put: + tags: + - CheckAccountTransaction + summary: Update an existing check account transaction + description: Update a check account transaction + operationId: updateCheckAccountTransaction + parameters: + - name: checkAccountTransactionId + in: path + description: ID of check account to update transaction + required: true + schema: + type: integer + requestBody: + description: Update data + content: + application/json: + schema: + $ref: '#/components/schemas/Model_CheckAccountTransactionUpdate' + responses: + '200': + description: Successful operation - Returns changed check account resource + content: + application/json: + schema: + $ref: '#/components/schemas/Model_CheckAccountTransactionResponse' + '400': + description: Bad request + '401': + description: Authentication required + '500': + description: Server error + security: + - api_key: [] + delete: + tags: + - CheckAccountTransaction + summary: Deletes a check account transaction + operationId: deleteCheckAccountTransaction + parameters: + - name: checkAccountTransactionId + in: path + description: Id of check account transaction to delete + required: true + schema: + type: integer + responses: + '200': + description: Successful operation - check account transaction deleted + content: + application/json: + schema: + properties: + objects: + type: array + items: + default: null + type: object + '400': + description: Bad request + '401': + description: Authentication required + '409': + description: Conflict + '500': + description: Server error + security: + - api_key: [] + /CheckAccountTransaction/{checkAccountTransactionId}/enshrine: + put: + tags: + - CheckAccountTransaction + summary: Enshrine + description: > + Sets the current date and time as a value for the property + `enshrined`.
+ + This operation is only possible if the status is "Linked" (`"status": + "200"`) or higher. + + + Linked invoices, credit notes or vouchers cannot be changed when the + transaction is enshrined. + operationId: checkAccountTransactionEnshrine + parameters: + - name: checkAccountTransactionId + in: path + description: ID of the transaction to enshrine + required: true + schema: + type: integer + responses: + '200': + description: Successful operation + content: + application/json: + schema: + properties: + objects: + default: null + type: object + '400': + description: Bad request + '401': + description: Authentication required + '422': + description: Validation error + content: + application/json: + schema: + $ref: '#/components/schemas/validationError' + '500': + description: Server Error + security: + - api_key: [] + /Contact/Factory/getNextCustomerNumber: + get: + tags: + - Contact + summary: Get next free customer number + description: Retrieves the next available customer number. Avoids duplicates. + operationId: getNextCustomerNumber + responses: + '200': + description: Returns next available customer number + content: + application/json: + schema: + properties: + objects: + description: Next available customer number + type: string + type: object + '400': + description: Bad request + '401': + description: Authentication required + '500': + description: Server Error + deprecated: false + security: + - api_key: [] + /Contact/Factory/findContactsByCustomFieldValue: + get: + tags: + - Contact + summary: Find contacts by custom field value + description: Returns an array of contacts having a certain custom field value set. + operationId: findContactsByCustomFieldValue + parameters: + - name: value + in: query + description: The value to be checked. + required: true + explode: true + schema: + type: string + - name: customFieldSetting[id] + in: query + description: >- + ID of ContactCustomFieldSetting for which the value has to be + checked. + required: false + explode: true + schema: + type: string + - name: customFieldSetting[objectName] + in: query + description: >- + Object name. Only needed if you also defined the ID of a + ContactCustomFieldSetting. + required: false + explode: true + schema: + type: string + example: ContactCustomFieldSetting + - name: customFieldName + in: query + description: >- + The ContactCustomFieldSetting name, if no ContactCustomFieldSetting + is provided. + required: true + explode: true + schema: + type: string + responses: + '200': + description: Array of contacts having a certain custom field value set. + content: + application/json: + schema: + properties: + objects: + type: array + items: + $ref: '#/components/schemas/Model_ContactResponse' + type: object + '400': + description: Bad request + '401': + description: Authentication required + '500': + description: Server Error + deprecated: false + security: + - api_key: [] + /Contact/Mapper/checkCustomerNumberAvailability: + get: + tags: + - Contact + summary: Check if a customer number is available + description: Checks if a given customer number is available or already used. + operationId: contactCustomerNumberAvailabilityCheck + parameters: + - name: customerNumber + in: query + description: The customer number to be checked. + required: false + explode: true + schema: + type: string + responses: + '200': + description: Returns whether given customer number is available. + content: + application/json: + schema: + properties: + objects: + type: boolean + type: object + '400': + description: Bad request + '401': + description: Authentication required + '500': + description: Server Error + deprecated: false + security: + - api_key: [] + /Contact: + get: + tags: + - Contact + summary: Retrieve contacts + description: "There are a multitude of parameter which can be used to filter.
\r\n A few of them are attached but\r\n for a complete list please check out this list" + operationId: getContacts + parameters: + - name: depth + in: query + description: "Defines if both organizations and persons should be returned.
\r\n '0' -> only organizations, '1' -> organizations and persons" + required: false + explode: true + schema: + type: string + enum: + - '0' + - '1' + - name: customerNumber + in: query + description: Retrieve all contacts with this customer number + required: false + explode: true + schema: + type: string + responses: + '200': + description: Successful operation + content: + application/json: + schema: + properties: + objects: + type: array + items: + $ref: '#/components/schemas/Model_ContactResponse' + type: object + '400': + description: Bad request + '401': + description: Authentication required + '500': + description: Server Error + deprecated: false + security: + - api_key: [] + post: + tags: + - Contact + summary: Create a new contact + description: "Creates a new contact.
\r\n For adding addresses and communication ways, you will need to use the ContactAddress and CommunicationWay endpoints." + operationId: createContact + requestBody: + description: Creation data + content: + application/json: + schema: + $ref: '#/components/schemas/Model_Contact' + responses: + '201': + description: Created - Returns created contact + content: + application/json: + schema: + $ref: '#/components/schemas/Model_ContactResponse' + '400': + description: Bad request + '401': + description: Authentication required + '500': + description: Server Error + deprecated: false + security: + - api_key: [] + /Contact/{contactId}: + get: + tags: + - Contact + summary: Find contact by ID + description: Returns a single contact + operationId: getContactById + parameters: + - name: contactId + in: path + description: ID of contact to return + required: true + schema: + type: integer + responses: + '200': + description: Successful operation + content: + application/json: + schema: + properties: + objects: + type: array + items: + $ref: '#/components/schemas/Model_ContactResponse' + type: object + '400': + description: Bad request. Contact was not found + '401': + description: Authentication required + '500': + description: Server Error + security: + - api_key: [] + put: + tags: + - Contact + summary: Update a existing contact + description: Update a contact + operationId: updateContact + parameters: + - name: contactId + in: path + description: ID of contact to update + required: true + schema: + type: integer + requestBody: + description: Update data + content: + application/json: + schema: + $ref: '#/components/schemas/Model_ContactUpdate' + responses: + '200': + description: Successful operation - Returns changed contact resource + content: + application/json: + schema: + $ref: '#/components/schemas/Model_ContactResponse' + '400': + description: Bad request + '401': + description: Authentication required + '500': + description: Server Error + security: + - api_key: [] + delete: + tags: + - Contact + summary: Deletes a contact + operationId: deleteContact + parameters: + - name: contactId + in: path + description: Id of contact resource to delete + required: true + schema: + type: integer + responses: + '200': + description: Successful operation - contact deleted + content: + application/json: + schema: + properties: + objects: + type: array + items: + default: null + type: object + '400': + description: Bad request + '401': + description: Authentication required + '409': + description: Conflict + '500': + description: Server Error + security: + - api_key: [] + /Contact/{contactId}/getTabsItemCount: + get: + tags: + - Contact + summary: Get number of all items + description: Get number of all invoices, orders, etc. of a specified contact + operationId: getContactTabsItemCountById + parameters: + - name: contactId + in: path + description: ID of contact to return + required: true + schema: + type: integer + responses: + '200': + description: Successful operation + content: + application/json: + schema: + properties: + orders: + type: number + invoices: + type: number + creditNotes: + type: number + documents: + type: number + persons: + type: number + vouchers: + type: number + letters: + type: number + parts: + type: string + example: '0' + invoicePos: + type: number + type: object + '400': + description: Bad request. + '401': + description: Authentication required + '500': + description: Server Error + security: + - api_key: [] + /ContactAddress: + post: + tags: + - ContactAddress + summary: Create a new contact address + description: Creates a new contact address. + operationId: createContactAddress + requestBody: + description: Creation data + content: + application/json: + schema: + $ref: '#/components/schemas/Model_ContactAddress' + responses: + '201': + description: Created - Returns created contact address + content: + application/json: + schema: + $ref: '#/components/schemas/Model_ContactAddressResponse' + '400': + description: Bad request + '401': + description: Authentication required + '500': + description: Server Error + deprecated: false + security: + - api_key: [] + get: + tags: + - ContactAddress + summary: Retrieve contact addresses + description: Retrieve all contact addresses + operationId: getContactAddresses + responses: + '200': + description: Successful operation + content: + application/json: + schema: + properties: + objects: + type: array + items: + $ref: '#/components/schemas/Model_ContactAddressResponse' + type: object + '400': + description: Bad request + '401': + description: Authentication required + '500': + description: Server Error + deprecated: false + security: + - api_key: [] + /ContactAddress/{contactAddressId}: + get: + tags: + - ContactAddress + summary: Find contact address by ID + description: Returns a single contact address + operationId: contactAddressId + parameters: + - name: contactAddressId + in: path + description: ID of contact address to return + required: true + schema: + type: integer + responses: + '200': + description: Successful operation + content: + application/json: + schema: + properties: + objects: + type: array + items: + $ref: '#/components/schemas/Model_ContactAddressResponse' + type: object + '400': + description: Bad request. Contact address was not found + '401': + description: Authentication required + '500': + description: Server Error + security: + - api_key: [] + put: + tags: + - ContactAddress + summary: update a existing contact address + description: update a existing contact address. + operationId: updateContactAddress + parameters: + - name: contactAddressId + in: path + description: ID of contact address to return + required: true + schema: + type: integer + requestBody: + description: Creation data + content: + application/json: + schema: + $ref: '#/components/schemas/Model_ContactAddressUpdate' + responses: + '201': + description: Created - Returns created contact address + content: + application/json: + schema: + $ref: '#/components/schemas/Model_ContactAddressResponse' + '400': + description: Bad request + '401': + description: Authentication required + '500': + description: Server Error + deprecated: false + security: + - api_key: [] + delete: + tags: + - ContactAddress + summary: Deletes a contact address + operationId: deleteContactAddress + parameters: + - name: contactAddressId + in: path + description: Id of contact address resource to delete + required: true + schema: + type: integer + responses: + '200': + description: Successful operation - contact address deleted + content: + application/json: + schema: + properties: + objects: + type: array + items: + default: null + type: object + '400': + description: Bad request + '401': + description: Authentication required + '409': + description: Conflict + '500': + description: Server Error + security: + - api_key: [] + /CommunicationWay: + get: + tags: + - CommunicationWay + summary: Retrieve communication ways + description: >- + Returns all communication ways which have been added up until now. + Filters can be added. + operationId: getCommunicationWays + parameters: + - name: contact[id] + in: query + description: ID of contact for which you want the communication ways. + required: false + explode: true + schema: + type: string + - name: contact[objectName] + in: query + description: Object name. Only needed if you also defined the ID of a contact. + required: false + explode: true + schema: + type: string + example: Contact + - name: type + in: query + description: Type of the communication ways you want to get. + required: false + explode: true + schema: + type: string + enum: + - PHONE + - EMAIL + - WEB + - MOBILE + - name: main + in: query + description: Define if you only want the main communication way. + required: false + explode: true + schema: + type: string + enum: + - '0' + - '1' + responses: + '200': + description: Successful operation + content: + application/json: + schema: + properties: + objects: + type: array + items: + $ref: '#/components/schemas/Model_CommunicationWayResponse' + type: object + '400': + description: Bad request + '401': + description: Authentication required + '500': + description: Server Error + deprecated: false + security: + - api_key: [] + post: + tags: + - CommunicationWay + summary: Create a new contact communication way + description: Creates a new contact communication way. + operationId: createCommunicationWay + requestBody: + description: Creation data + content: + application/json: + schema: + $ref: '#/components/schemas/Model_CommunicationWay' + responses: + '201': + description: Created - Returns created contact communication way + content: + application/json: + schema: + $ref: '#/components/schemas/Model_CommunicationWayResponse' + '400': + description: Bad request + '401': + description: Authentication required + '500': + description: Server Error + deprecated: false + security: + - api_key: [] + /CommunicationWay/{communicationWayId}: + get: + tags: + - CommunicationWay + summary: Find communication way by ID + description: Returns a single communication way + operationId: getCommunicationWayById + parameters: + - name: communicationWayId + in: path + description: ID of communication way to return + required: true + schema: + type: integer + responses: + '200': + description: Successful operation + content: + application/json: + schema: + properties: + objects: + type: array + items: + $ref: '#/components/schemas/Model_CommunicationWayResponse' + type: object + '400': + description: Bad request. communication way was not found + '401': + description: Authentication required + '500': + description: Server Error + security: + - api_key: [] + delete: + tags: + - CommunicationWay + summary: Deletes a communication way + operationId: deleteCommunicationWay + parameters: + - name: communicationWayId + in: path + description: Id of communication way resource to delete + required: true + schema: + type: integer + responses: + '200': + description: Successful operation - Communication way deleted + content: + application/json: + schema: + properties: + objects: + type: array + items: + default: null + type: object + '400': + description: Bad request + '401': + description: Authentication required + '409': + description: Conflict + '500': + description: Server Error + security: + - api_key: [] + put: + tags: + - CommunicationWay + summary: Update a existing communication way + description: Update a communication way + operationId: UpdateCommunicationWay + parameters: + - name: communicationWayId + in: path + description: ID of CommunicationWay to update + required: true + schema: + type: integer + requestBody: + description: Update data + content: + application/json: + schema: + $ref: '#/components/schemas/Model_CommunicationWayUpdate' + responses: + '200': + description: Successful operation - Returns changed CommunicationWay resource + content: + application/json: + schema: + $ref: '#/components/schemas/Model_CommunicationWayResponse' + '400': + description: Bad request + '401': + description: Authentication required + '500': + description: Server Error + security: + - api_key: [] + /CommunicationWayKey: + get: + tags: + - CommunicationWay + summary: Retrieve communication way keys + description: Returns all communication way keys. + operationId: getCommunicationWayKeys + responses: + '200': + description: Successful operation + content: + application/json: + schema: + properties: + objects: + type: array + items: + properties: + id: + description: |- + The id of the communication way key + 1. ID: 1 - Privat + 2. ID: 2 - Arbeit + 3. ID: 3 - Fax + 4. ID: 4 - Mobil + 5. ID: 5 - " " + 6. ID: 6 - Autobox + 7. ID: 7 - Newsletter + 8. ID: 8 - Rechnungsadresse + type: string + example: '2' + objectName: + description: object name which is 'CommunicationWayKey'. + type: string + example: CommunicationWayKey + create: + description: Date the communication way key was created + type: string + format: date-time + upadate: + description: Date the communication way key was last updated + type: string + format: date-time + name: + description: Name of the communication way key + type: string + example: Arbeit + enum: + - Arbeit + - Autobox + - Fax + - Mobil + - Newsletter + - Privat + - Rechnungsadresse + - ' ' + translationCode: + type: string + example: COMM_WAY_KEY_WORK + '400': + description: Bad request + '401': + description: Authentication required + '500': + description: Server Error + deprecated: false + security: + - api_key: [] + /AccountingContact: + get: + tags: + - AccountingContact + summary: Retrieve accounting contact + description: >- + Returns all accounting contact which have been added up until now. + Filters can be added. + operationId: getAccountingContact + parameters: + - name: contact[id] + in: query + description: ID of contact for which you want the accounting contact. + required: false + explode: true + schema: + type: string + - name: contact[objectName] + in: query + description: Object name. Only needed if you also defined the ID of a contact. + required: false + explode: true + schema: + type: string + example: Contact + responses: + '200': + description: Successful operation + content: + application/json: + schema: + properties: + objects: + type: array + items: + $ref: '#/components/schemas/Model_AccountingContactResponse' + type: object + '400': + description: Bad request + '401': + description: Authentication required + '500': + description: Server Error + deprecated: false + security: + - api_key: [] + post: + tags: + - AccountingContact + summary: Create a new accounting contact + description: Creates a new accounting contact. + operationId: createAccountingContact + requestBody: + description: Creation data + content: + application/json: + schema: + $ref: '#/components/schemas/Model_AccountingContact' + responses: + '201': + description: Created - Returns created accounting contact + content: + application/json: + schema: + $ref: '#/components/schemas/Model_AccountingContactResponse' + '400': + description: Bad request + '401': + description: Authentication required + '500': + description: Server Error + deprecated: false + security: + - api_key: [] + /AccountingContact/{accountingContactId}: + get: + tags: + - AccountingContact + summary: Find accounting contact by ID + description: Returns a single accounting contac + operationId: getAccountingContactById + parameters: + - name: accountingContactId + in: path + description: ID of accounting contact to return + required: true + schema: + type: integer + responses: + '200': + description: Successful operation + content: + application/json: + schema: + properties: + objects: + type: array + items: + $ref: '#/components/schemas/Model_AccountingContactResponse' + type: object + '400': + description: Bad request. Accounting contact was not found + '401': + description: Authentication required + '500': + description: Server Error + security: + - api_key: [] + put: + tags: + - AccountingContact + summary: Update an existing accounting contact + description: >- + Attention, updating an existing AccountingContact can lead to **booking + errors**, especially in the **DATEV export**. + + Compatibility of sevdesk with DATEV is no longer guaranteed. + operationId: updateAccountingContact + parameters: + - name: accountingContactId + in: path + description: ID of accounting contact to update + required: true + schema: + type: integer + requestBody: + description: Update data + content: + application/json: + schema: + $ref: '#/components/schemas/Model_AccountingContactUpdate' + responses: + '200': + description: Successful operation - Returns changed accounting contact resource + content: + application/json: + schema: + $ref: '#/components/schemas/Model_AccountingContactResponse' + '400': + description: Bad request + '401': + description: Authentication required + '500': + description: Server Error + security: + - api_key: [] + delete: + tags: + - AccountingContact + summary: Deletes an accounting contact + description: >- + Attention, deleting an existing AccountingContact can lead to **booking + errors**, especially in the **DATEV export**. + + Compatibility of sevdesk with DATEV is no longer guaranteed. + operationId: deleteAccountingContact + parameters: + - name: accountingContactId + in: path + description: Id of accounting contact resource to delete + required: true + schema: + type: integer + responses: + '200': + description: Successful operation - accounting contact deleted + content: + application/json: + schema: + properties: + objects: + type: array + items: + default: null + type: object + '400': + description: Bad request + '401': + description: Authentication required + '409': + description: Conflict + '500': + description: Server Error + security: + - api_key: [] + /Textparser/fetchDictionaryEntriesByType: + get: + tags: + - ContactField + summary: Retrieve Placeholders + description: Retrieve all Placeholders + operationId: getPlaceholder + parameters: + - name: objectName + in: query + description: Model name + required: true + schema: + type: string + enum: + - Invoice + - CreditNote + - Order + - Contact + - Letter + - Email + - name: subObjectName + in: query + description: Sub model name, required if you have "Email" at objectName + required: false + schema: + type: string + enum: + - Invoice + - CreditNote + - Order + - Contact + - Letter + responses: + '200': + description: Successful operation + content: + application/json: + schema: + properties: + objects: + type: array + items: + $ref: >- + #/components/schemas/Model_Textparser_fetchDictionaryEntriesByType_response + type: object + '401': + description: Authentication required + '500': + description: Server Error + security: + - api_key: [] + /ContactCustomField: + get: + tags: + - ContactField + summary: Retrieve contact fields + description: Retrieve all contact fields + operationId: getContactFields + responses: + '200': + description: Successful operation + content: + application/json: + schema: + properties: + objects: + type: array + items: + $ref: '#/components/schemas/Model_ContactCustomFieldResponse' + '401': + description: Authentication required + '500': + description: Server Error + security: + - api_key: [] + post: + tags: + - ContactField + summary: Create contact field + description: Create contact field + operationId: createContactField + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Model_ContactCustomField' + responses: + '200': + description: Successful operation + content: + application/json: + schema: + $ref: '#/components/schemas/Model_ContactCustomFieldResponse' + '401': + description: Authentication required + '500': + description: Server Error + security: + - api_key: [] + /ContactCustomField/{contactCustomFieldId}: + get: + tags: + - ContactField + summary: Retrieve contact fields + description: Retrieve all contact fields + operationId: getContactFieldsById + parameters: + - name: contactCustomFieldId + in: path + description: id of the contact field + required: true + schema: + type: number + responses: + '200': + description: Successful operation + content: + application/json: + schema: + properties: + objects: + type: array + items: + $ref: '#/components/schemas/Model_ContactCustomFieldResponse' + '401': + description: Authentication required + '500': + description: Server Error + security: + - api_key: [] + put: + tags: + - ContactField + summary: Update a contact field + description: Update a contact field + operationId: updateContactfield + parameters: + - name: contactCustomFieldId + in: path + description: id of the contact field + required: true + schema: + type: number + requestBody: + description: Update data + content: + application/json: + schema: + $ref: '#/components/schemas/Model_ContactCustomFieldUpdate' + responses: + '200': + description: Successful operation + content: + application/json: + schema: + $ref: '#/components/schemas/Model_ContactCustomFieldResponse' + '401': + description: Authentication required + '500': + description: Server Error + security: + - api_key: [] + delete: + tags: + - ContactField + summary: delete a contact field + operationId: deleteContactCustomFieldId + parameters: + - name: contactCustomFieldId + in: path + description: Id of contact field + required: true + schema: + type: integer + responses: + '200': + description: Successful operation + content: + application/json: + schema: + properties: + objects: + type: array + items: + default: null + type: object + '400': + description: Bad request + '401': + description: Authentication required + '500': + description: Server Error + security: + - api_key: [] + /ContactCustomFieldSetting: + get: + tags: + - ContactField + summary: Retrieve contact field settings + description: Retrieve all contact field settings + operationId: getContactFieldSettings + responses: + '200': + description: Successful operation + content: + application/json: + schema: + properties: + objects: + type: array + items: + $ref: >- + #/components/schemas/Model_ContactCustomFieldSettingResponse + '401': + description: Authentication required + '500': + description: Server Error + security: + - api_key: [] + post: + tags: + - ContactField + summary: Create contact field setting + description: Create contact field setting + operationId: createContactFieldSetting + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Model_ContactCustomFieldSetting' + responses: + '200': + description: Successful operation + content: + application/json: + schema: + properties: + objects: + type: array + items: + $ref: >- + #/components/schemas/Model_ContactCustomFieldSettingResponse + '401': + description: Authentication required + '500': + description: Server Error + security: + - api_key: [] + /ContactCustomFieldSetting/{contactCustomFieldSettingId}: + get: + tags: + - ContactField + summary: Find contact field setting by ID + description: Returns a single contact field setting + operationId: getContactFieldSettingById + parameters: + - name: contactCustomFieldSettingId + in: path + description: ID of contact field to return + required: true + schema: + type: integer + responses: + '200': + description: Successful operation + content: + application/json: + schema: + properties: + objects: + type: array + items: + $ref: >- + #/components/schemas/Model_ContactCustomFieldSettingResponse + '401': + description: Authentication required + '500': + description: Server Error + security: + - api_key: [] + put: + tags: + - ContactField + summary: Update contact field setting + description: Update an existing contact field setting + operationId: updateContactFieldSetting + parameters: + - name: contactCustomFieldSettingId + in: path + description: ID of contact field setting you want to update + required: true + schema: + type: integer + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Model_ContactCustomFieldSettingUpdate' + responses: + '200': + description: Successful operation + content: + application/json: + schema: + $ref: '#/components/schemas/Model_ContactCustomFieldSettingResponse' + '401': + description: Authentication required + '500': + description: Server Error + security: + - api_key: [] + delete: + tags: + - ContactField + summary: Deletes a contact field setting + operationId: deleteContactFieldSetting + parameters: + - name: contactCustomFieldSettingId + in: path + description: Id of contact field to delete + required: true + schema: + type: integer + responses: + '200': + description: Successful operation - contact field deleted + content: + application/json: + schema: + properties: + objects: + type: array + items: + default: null + type: object + '400': + description: Bad request + '401': + description: Authentication required + '409': + description: Conflict + '500': + description: Server Error + security: + - api_key: [] + /ContactCustomFieldSetting/{contactCustomFieldSettingId}/getReferenceCount: + get: + tags: + - ContactField + summary: Receive count reference + description: Receive count reference + operationId: getReferenceCount + parameters: + - name: contactCustomFieldSettingId + in: path + description: ID of contact field you want to get the reference count + required: true + schema: + type: integer + responses: + '200': + description: Successful operation - contact field deleted + content: + application/json: + schema: + properties: + objects: + description: the count of all references + type: integer + example: 1 + type: object + '400': + description: Bad request + '401': + description: Authentication required + '409': + description: Conflict + '500': + description: Server Error + security: + - api_key: [] + /CreditNote: + get: + tags: + - CreditNote + summary: Retrieve CreditNote + description: There are a multitude of parameter which can be used to filter. + operationId: getCreditNotes + parameters: + - name: status + in: query + description: Status of the CreditNote + required: false + explode: true + schema: + type: string + enum: + - '100' + - '200' + - '300' + - '500' + - '750' + - '1000' + - name: creditNoteNumber + in: query + description: Retrieve all CreditNotes with this creditNote number + required: false + explode: true + schema: + type: string + - name: startDate + in: query + description: Retrieve all CreditNotes with a date equal or higher + required: false + explode: true + example: 01.01.2020 + schema: + type: integer + - name: endDate + in: query + description: Retrieve all CreditNotes with a date equal or lower + required: false + explode: true + example: 01.01.2021 + schema: + type: integer + - name: contact[id] + in: query + description: >- + Retrieve all CreditNotes with this contact. Must be provided with + contact[objectName] + required: false + explode: false + schema: + type: integer + - name: contact[objectName] + in: query + description: >- + Only required if contact[id] was provided. 'Contact' should be used + as value. + required: false + explode: false + schema: + type: string + responses: + '200': + description: Successful operation + content: + application/json: + schema: + properties: + objects: + type: array + items: + $ref: '#/components/schemas/Model_creditNoteResponse' + type: object + '400': + description: Bad request + '401': + description: Authentication required + '500': + description: Server Error + deprecated: false + security: + - api_key: [] + /CreditNote/Factory/saveCreditNote: + post: + tags: + - CreditNote + summary: Create a new creditNote + description: >- + The list of parameters starts with the credit note array.
This array + contains all required attributes for a complete credit note.
Most of + the attributes are covered in the credit note attribute list, there are + only two parameters standing out, namely mapAll and + objectName.
These are just needed for our system and you + always need to provide them.
The list of parameters then continues + with the credit note position array.
With this array you have the + possibility to add multiple positions at once.
In the example it + only contains one position, again together with the parameters + mapAll and objectName, however, you can add more credit + note positions by extending the array.
So if you wanted to add + another position, you would add the same list of parameters with an + incremented array index of "1" instead of "0".

The list ends + with the five parameters creditNotePosDelete, discountSave, + discountDelete, takeDefaultAddress and forCashRegister.
They only + play a minor role if you only want to create a credit note but we will + shortly explain what they can do.
With creditNotePosDelete you have + to option to delete credit note positions as this request can also be + used to update credit notes.
Both discount parameters are deprecated + and have no use for credit notes, however they need to be provided in + case you want to use the following two parameters.
With + takeDefaultAddress you can specify that the first address of the contact + you are using for the credit note is taken for the credit note address + attribute automatically, so you don't need to provide the address + yourself.
Finally, the forCashRegister parameter needs to be set to + true if your credit note is to be booked on the cash + register.
If you want to know more about these parameters, for + example if you want to use this request to update credit notes, feel + free to contact our support.
Finally, after covering all parameters, + they only important information left, is that the order of the last five + attributes always needs to be kept.
You will also always need to + provide all of them, as otherwise the request won't work properly. + operationId: createcreditNote + requestBody: + description: "Creation data. Please be aware, that you need to provide at least all required parameter\r\n of the credit note model!" + content: + application/json: + schema: + $ref: '#/components/schemas/saveCreditNote' + responses: + '201': + description: Created - Returns created credit note + content: + application/json: + schema: + $ref: '#/components/schemas/saveCreditNoteResponse' + '400': + description: Bad request + '401': + description: Authentication required + '500': + description: Server Error + security: + - api_key: [] + /CreditNote/Factory/createFromInvoice: + post: + tags: + - CreditNote + summary: Creates a new creditNote from an invoice + description: Use this endpoint to create a new creditNote from an invoice. + operationId: createCreditNoteFromInvoice + requestBody: + content: + application/json: + schema: + type: object + required: + - invoice + properties: + invoice: + type: object + required: + - id + - objectName + properties: + id: + description: The id of the existing invoice + type: integer + example: 1234 + objectName: + description: The objectName must be 'Invoice' + type: string + example: Invoice + responses: + '201': + description: Created + content: + application/json: + schema: + type: object + properties: + objects: + type: object + properties: + creditNote: + $ref: '#/components/schemas/Model_creditNoteResponse' + creditNotePos: + description: An array of creditNote positions + type: array + items: + $ref: '#/components/schemas/Model_creditNotePosResponse' + discount: + description: An array of discounts (can be empty) + type: array + items: + $ref: '#/components/schemas/Model_discountsResponse' + '400': + description: Bad request + '401': + description: Authentication required + '500': + description: Server Error + security: + - api_key: [] + /CreditNote/Factory/createFromVoucher: + post: + tags: + - CreditNote + summary: Creates a new creditNote from a voucher + description: | + **Not supported with sevdesk-Update 2.0** + + Use this endpoint to create a new creditNote from a voucher. + operationId: createCreditNoteFromVoucher + requestBody: + content: + application/json: + schema: + type: object + required: + - voucher + properties: + voucher: + type: object + required: + - id + - objectName + properties: + id: + description: The id of the existing Voucher + type: integer + example: 1234 + objectName: + description: The objectName must be 'Voucher' + type: string + example: Voucher + responses: + '201': + description: Created + content: + application/json: + schema: + type: object + properties: + objects: + type: object + properties: + creditNote: + $ref: '#/components/schemas/Model_creditNoteResponse' + creditNotePos: + description: An array of creditNote positions + type: array + items: + $ref: '#/components/schemas/Model_creditNotePosResponse' + discount: + description: An array of discounts (can be empty) + type: array + items: + $ref: '#/components/schemas/Model_discountsResponse' + '400': + description: Bad request + '401': + description: Authentication required + '500': + description: Server Error + security: + - api_key: [] + /CreditNote/{creditNoteId}: + get: + tags: + - CreditNote + summary: Find creditNote by ID + description: Returns a single creditNote + operationId: getcreditNoteById + parameters: + - name: creditNoteId + in: path + description: ID of creditNote to return + required: true + schema: + type: integer + responses: + '200': + description: Successful operation + content: + application/json: + schema: + properties: + objects: + type: array + items: + $ref: '#/components/schemas/Model_creditNoteResponse' + type: object + '400': + description: Bad request. creditNote was not found + '401': + description: Authentication required + '500': + description: Server Error + security: + - api_key: [] + put: + tags: + - CreditNote + summary: Update an existing creditNote + description: Update a creditNote + operationId: updatecreditNote + parameters: + - name: creditNoteId + in: path + description: ID of creditNote to update + required: true + schema: + type: integer + requestBody: + description: Update data + content: + application/json: + schema: + $ref: '#/components/schemas/Model_creditNoteUpdate' + responses: + '200': + description: Successful operation - Returns changed creditNote resource + content: + application/json: + schema: + $ref: '#/components/schemas/Model_creditNoteResponse' + '400': + description: Bad request + '401': + description: Authentication required + '500': + description: Server Error + security: + - api_key: [] + delete: + tags: + - CreditNote + summary: Deletes an creditNote + operationId: deletecreditNote + parameters: + - name: creditNoteId + in: path + description: Id of creditNote resource to delete + required: true + schema: + type: integer + responses: + '200': + description: Successful operation - creditNote deleted + content: + application/json: + schema: + properties: + objects: + type: array + items: + default: null + type: object + '400': + description: Bad request + '401': + description: Authentication required + '409': + description: Conflict - f.e occurs if the creditNote is not a draft + '500': + description: Server Error + security: + - api_key: [] + /CreditNote/{creditNoteId}/sendByWithRender: + get: + tags: + - CreditNote + summary: Send credit note by printing + description: >- + Sending a credit note to end-customers is an important part of the + bookkeeping process.
Depending on the way you want to send the + credit note, you need to use different endpoints.
Let's start with + just printing out the credit note, meaning we only need to render the + pdf. + operationId: sendCreditNoteByPrinting + parameters: + - name: creditNoteId + in: path + description: ID of creditNote to return + required: true + schema: + type: integer + - name: sendType + in: query + description: the type you want to print. + schema: + type: string + example: PRN + required: true + responses: + '200': + description: Successful operation + content: + application/json: + schema: + $ref: '#/components/schemas/Model_CreditNote_sendByWithRender' + '400': + description: Bad request. + '401': + description: Authentication required + '500': + description: Server Error + security: + - api_key: [] + /CreditNote/{creditNoteId}/sendBy: + put: + tags: + - CreditNote + summary: Mark credit note as sent + description: Marks an credit note as sent by a chosen send type. + operationId: creditNoteSendBy + parameters: + - name: creditNoteId + in: path + description: ID of credit note to mark as sent + required: true + schema: + type: integer + requestBody: + description: Specify the send type + content: + application/json: + schema: + required: + - sendType + - sendDraft + properties: + sendType: + description: "Specifies the way in which the credit note was sent to the customer.
\r\n Accepts 'VPR' (print), 'VP' (postal), 'VM' (mail) and 'VPDF' (downloaded pfd)." + type: string + enum: + - VPR + - VP + - VM + - VPDF + example: VPDF + sendDraft: + description: >- + To create a draft of a credit note for internal use. This + operation will not alter the status of the credit note or + create bookings for reports. + type: boolean + example: false + type: object + responses: + '200': + description: Successful operation - Returns changed credit note log entry + content: + application/json: + schema: + $ref: '#/components/schemas/Model_creditNoteResponse' + '400': + description: Bad request + '401': + description: Authentication required + '500': + description: Server Error + security: + - api_key: [] + /CreditNote/{creditNoteId}/enshrine: + put: + tags: + - CreditNote + summary: Enshrine + description: > + Sets the current date and time as a value for the property + `enshrined`.
+ + This operation is only possible if the status is "Open" (`"status": + "200"`) or higher. + + + Enshrined credit notes cannot be changed. This operation cannot be + undone. + operationId: creditNoteEnshrine + parameters: + - name: creditNoteId + in: path + description: ID of the credit note to enshrine + required: true + schema: + type: integer + responses: + '200': + description: Successful operation + content: + application/json: + schema: + properties: + objects: + default: null + type: object + '400': + description: Bad request + '401': + description: Authentication required + '422': + description: Validation error + content: + application/json: + schema: + $ref: '#/components/schemas/validationError' + '500': + description: Server Error + security: + - api_key: [] + /CreditNote/{creditNoteId}/getPdf: + get: + tags: + - CreditNote + summary: Retrieve pdf document of a credit note + description: Retrieves the pdf document of a credit note with additional metadata. + operationId: creditNoteGetPdf + parameters: + - name: creditNoteId + in: path + description: ID of credit note from which you want the pdf + required: true + schema: + type: integer + - name: download + in: query + description: If u want to download the pdf of the credit note. + schema: + type: boolean + example: true + - name: preventSendBy + in: query + description: Defines if u want to send the credit note. + schema: + type: boolean + example: true + responses: + '200': + description: A pdf file + content: + application/json: + schema: + properties: + filename: + type: string + example: GU-1001.pdf + mimeType: + type: string + example: application/pdf + base64encoded: + type: boolean + example: true + content: + type: string + format: binary + type: object + '400': + description: Bad request. Invoice was not found + '401': + description: Authentication required + '500': + description: Server Error + security: + - api_key: [] + /CreditNote/{creditNoteId}/sendViaEmail: + post: + tags: + - CreditNote + summary: Send credit note via email + description: "This endpoint sends the specified credit note to a customer via email.
\r\n This will automatically mark the credit note as sent.
\r\n Please note, that in production an credit note is not allowed to be changed after this happened!" + operationId: sendCreditNoteViaEMail + parameters: + - name: creditNoteId + in: path + description: ID of credit note to be sent via email + required: true + schema: + type: integer + requestBody: + description: Mail data + content: + application/json: + schema: + required: + - toEmail + - subject + - text + properties: + toEmail: + description: The recipient of the email. + type: string + nullable: false + subject: + description: The subject of the email. + type: string + nullable: false + text: + description: The text of the email. Can contain html. + type: string + copy: + description: Should a copy of this email be sent to you? + type: boolean + additionalAttachments: + description: "Additional attachments to the mail. String of IDs of existing documents in your\r\n * sevdesk account separated by ','" + type: string + ccEmail: + description: String of mail addresses to be put as cc separated by ',' + type: string + bccEmail: + description: String of mail addresses to be put as bcc separated by ',' + type: string + type: object + responses: + '201': + description: Created - Returns created mail object + content: + application/json: + schema: + properties: + objects: + type: array + items: + $ref: '#/components/schemas/Model_creditNote_mailResponse' + type: object + '400': + description: Bad request + '401': + description: Authentication required + '500': + description: Server Error + security: + - api_key: [] + /CreditNote/{creditNoteId}/bookAmount: + put: + tags: + - CreditNote + summary: Book a credit note + description: >- + Booking the credit note with a transaction is probably the most + important part in the bookkeeping process.
There are several ways on + correctly booking a credit note, all by using the same endpoint.
+ Conveniently, the booking process is exactly the same as the process for + invoices and vouchers.
For this reason, you can have a look at it in + the invoice chapter + and all you need to do is to change "Invoice" into "CreditNote" in the + URL. + operationId: bookCreditNote + parameters: + - name: creditNoteId + in: path + description: ID of credit note to book + required: true + schema: + type: integer + requestBody: + description: Booking data + content: + application/json: + schema: + required: + - amount + - date + - type + - checkAccount + properties: + amount: + description: Amount which should be booked. Can also be a partial amount. + type: number + date: + description: The booking date. Most likely the current date. + type: integer + type: + description: "Define a type for the booking.
\r\n The following type abbreviations are available (abbreviation <-> meaning).
\r\n " + type: string + enum: + - FULL_PAYMENT + - 'N' + - CB + - CF + - O + - OF + - MTC + checkAccount: + description: The check account on which should be booked. + required: + - id + - objectName + properties: + id: + description: The id of the check account on which should be booked. + type: integer + objectName: + description: Internal object name which is 'CheckAccount'. + type: string + example: CheckAccount + type: object + checkAccountTransaction: + description: "The check account transaction on which should be booked.
\r\n The transaction will be linked to the credit note." + required: + - id + - objectName + properties: + id: + description: >- + The id of the check account transaction on which should + be booked. + type: integer + objectName: + description: Internal object name which is 'CheckAccountTransaction'. + type: string + example: CheckAccountTransaction + type: object + createFeed: + description: Determines if a feed is created for the booking process. + type: boolean + type: object + responses: + '200': + description: Successful operation - Returns changed invoice log entry + content: + application/json: + schema: + type: object + properties: + id: + type: string + example: 2 + objectName: + type: string + example: CreditNoteLog + additionalInformation: + type: string + default: null + create: + description: Date of email creation + type: string + format: date-time + example: '2023-04-18T15:45:38+02:00' + creditNote: + type: object + required: + - id + - objectName + properties: + id: + description: The id of the credit note + type: integer + example: 2 + objectName: + description: Internal object name which is 'CreditNote'. + type: string + example: CreditNote + fromStatus: + type: string + example: 200 + toStatus: + type: string + example: 1000 + ammountPayed: + type: string + example: 0 + bookingDate: + type: string + format: date-time + example: '2023-04-18T15:45:38+02:00' + sevClient: + type: object + description: >- + Client to which creditNote belongs. Will be filled + automatically + required: + - id + - objectName + properties: + id: + description: Unique identifier of the client + type: integer + example: 1 + objectName: + description: Model name, which is 'SevClient' + type: string + example: SevClient + '400': + description: Bad request + '401': + description: Authentication required + '500': + description: Server Error + security: + - api_key: [] + /CreditNote/{creditNoteId}/resetToOpen: + put: + tags: + - CreditNote + summary: Reset status to open + description: > + Resets the status "Open" (`"status": "200"`). Linked transactions will + be unlinked.
+ + This is not possible if the credit note itself or one of its + transactions (CheckAccountTransaction) is already enshrined. + + + This endpoint cannot be used to increase the status to "Open" + (`"status": "200"`).
+ + Use + [CreditNote/{creditNoteId}/sendBy](#tag/CreditNote/operation/creditNoteSendBy) + / + [CreditNote/{creditNoteId}/sendViaEmail](#tag/CreditNote/operation/sendCreditNoteViaEMail) + instead. + operationId: creditNoteResetToOpen + parameters: + - name: creditNoteId + in: path + description: ID of the credit note to reset + required: true + schema: + type: integer + responses: + '200': + description: Successful operation - Returns changed credit note + content: + application/json: + schema: + type: object + properties: + objects: + allOf: + - $ref: '#/components/schemas/Model_creditNoteResponse' + - type: object + properties: + status: + example: '200' + '400': + description: Bad request + '401': + description: Authentication required + '422': + description: Validation error + content: + application/json: + schema: + $ref: '#/components/schemas/validationError' + '500': + description: Server Error + security: + - api_key: [] + /CreditNote/{creditNoteId}/resetToDraft: + put: + tags: + - CreditNote + summary: Reset status to draft + description: > + Resets the status to "Draft" (`"status": "100"`).
+ + This is only possible if the credit note has the status "Open" + (`"status": "200"`).
+ + If it has a higher status use + [CreditNote/{creditNoteId}/resetToOpen](#tag/CreditNote/operation/creditNoteResetToOpen) + first. + operationId: creditNoteResetToDraft + parameters: + - name: creditNoteId + in: path + description: ID of the credit note to reset + required: true + schema: + type: integer + responses: + '200': + description: Successful operation - Returns changed credit note + content: + application/json: + schema: + type: object + properties: + objects: + allOf: + - $ref: '#/components/schemas/Model_creditNoteResponse' + - type: object + properties: + taxText: + example: null + customerInternalNote: + example: null + '400': + description: Bad request + '401': + description: Authentication required + '422': + description: Validation error + content: + application/json: + schema: + $ref: '#/components/schemas/validationError' + '500': + description: Server Error + security: + - api_key: [] + /CreditNotePos: + get: + tags: + - CreditNotePos + summary: Retrieve creditNote positions + description: >- + Retrieve all creditNote positions depending on the filters defined in + the query. + operationId: getcreditNotePositions + parameters: + - name: creditNote[id] + in: query + description: >- + Retrieve all creditNote positions belonging to this creditNote. Must + be provided with creditNote[objectName] + required: false + explode: false + schema: + type: integer + - name: creditNote[objectName] + in: query + description: >- + Only required if creditNote[id] was provided. 'creditNote' should be + used as value. + required: false + explode: false + schema: + type: string + responses: + '200': + description: Successful operation + content: + application/json: + schema: + properties: + objects: + type: array + items: + $ref: '#/components/schemas/Model_creditNotePosResponse' + type: object + '400': + description: Bad request + '401': + description: Authentication required + '500': + description: Server Error + deprecated: false + security: + - api_key: [] + /SevClient/{SevClientId}/updateExportConfig: + put: + tags: + - Export + summary: Update export config + description: Update export config to export datev CSV + operationId: updateExportConfig + parameters: + - name: SevClientId + in: path + description: id of sevClient + required: true + schema: + type: number + requestBody: + description: Specify the update + content: + application/json: + schema: + required: + - accountantNumber + - accountantClientNumber + - accountingYearBegin + properties: + accountantNumber: + type: number + example: 1324124 + accountantClientNumber: + type: number + example: 1234152 + accountingYearBegin: + type: number + format: timestamp + example: 1681907569 + responses: + '200': + description: Successful operation + content: + application/json: + schema: + properties: + objects: + default: null + type: object + '400': + description: Bad request + '401': + description: Authentication required + '500': + description: Server Error + security: + - api_key: [] + /Export/datevCSV: + get: + summary: Export datev + description: >- + Datev export as zip with csv´s. Before you can perform the datev export, + you must first set the "accountingYearBegin". To do this, you must use + the updateExportConfig + endpoint. + operationId: exportDatev + tags: + - Export + parameters: + - name: Download + in: query + description: Specifies if the document is downloaded + schema: + type: boolean + example: true + - name: startDate + in: query + description: the start date of the export as timestamp + schema: + type: integer + required: true + example: 1641032867 + - name: endDate + in: query + description: the end date of the export as timestamp + schema: + type: integer + required: true + example: 1648805267 + - name: scope + in: query + description: >- + Define what you want to include in the datev export. This parameter + takes a string of 5 letters. Each stands for a model that should be + included. Possible letters are: ‘E’ (Earnings), ‘X’ (Expenditure), + ‘T’ (Transactions), ‘C’ (Cashregister), ‘D’ (Assets). By providing + one of those letter you specify that it should be included in the + datev export. Some combinations are: ‘EXTCD’, ‘EXTD’ … + schema: + type: string + required: true + example: EXTCD + - name: withUnpaidDocuments + in: query + description: include unpaid documents + schema: + type: boolean + example: true + - name: withEnshrinedDocuments + in: query + description: include enshrined documents + schema: + type: boolean + example: true + - name: enshrine + in: query + description: >- + Specify if you want to enshrine all models which were included in + the export + schema: + type: boolean + example: false + responses: + '200': + description: Successful operation + content: + application/json: + schema: + type: object + '400': + description: Bad request + '401': + description: Authentication required + '409': + description: Conflict + '500': + description: Server Error + security: + - api_key: [] + /Export/invoiceCsv: + get: + summary: Export invoice + description: Export all invoices as csv + operationId: exportInvoice + tags: + - Export + parameters: + - name: download + in: query + schema: + type: boolean + - name: sevQuery + in: query + required: true + schema: + type: object + required: + - modelName + - objectName + properties: + limit: + type: integer + description: Limit export + example: 999999 + modelName: + description: Model name, which is 'Invoice' + example: Invoice + objectName: + description: Model name, which is 'SevQuery' + example: SevQuery + filter: + type: object + properties: + invoiceType: + type: array + description: |- + Type of invoices you want to export + 1. RE - Rechnung + 2. SR - Stornorechnung + 3. TR - Teilrechnung + 4. AR - Abschlagsrechnung + 5. ER - Endrechnung + 6. WKR - Wiederkehrende Rechnung + 7. MA - Mahnung + items: + enum: + - Re + - SR + - TR + - AR + - ER + - WKR + - MA + startDate: + description: Start date of the invoice + type: string + format: date-time + endDate: + description: End date of the invoice + type: string + format: date-time + contact: + description: filters the invoices by contact + type: object + required: + - id + - objectName + properties: + id: + description: ID of the contact + type: integer + objectName: + description: Model name, which is 'Contact' + type: string + example: Contact + startAmount: + description: filters the invoices by amount + type: integer + example: 100 + endAmount: + description: filters the invoices by amount + type: integer + example: 150 + responses: + '200': + description: Successful operation without download + content: + application/json: + schema: + type: object + properties: + objects: + type: object + properties: + filename: + type: string + example: invoices.csv + mimetype: + type: string + example: text/csv + base64Encoded: + type: boolean + example: true + content: + type: string + '400': + description: Bad request + '401': + description: Authentication required + '409': + description: Conflict + '500': + description: Server Error + security: + - api_key: [] + /Export/invoiceZip: + get: + summary: Export Invoice as zip + description: Export all invoices as zip + operationId: exportInvoiceZip + tags: + - Export + parameters: + - name: download + in: query + schema: + type: boolean + - name: sevQuery + in: query + required: true + schema: + type: object + required: + - modelName + - objectName + properties: + limit: + type: integer + description: Limit export + example: 999999 + modelName: + description: Model name, which is 'Invoice' + objectName: + description: Model name, which is 'SevQuery' + example: SevQuery + filter: + type: object + properties: + invoiceType: + type: array + description: |- + Type of invoices you want to export + 1. RE - Rechnung + 2. SR - Stornorechnung + 3. TR - Teilrechnung + 4. AR - Abschlagsrechnung + 5. ER - Endrechnung + 6. WKR - Wiederkehrende Rechnung + 7. MA - Mahnung + items: + enum: + - Re + - SR + - TR + - AR + - ER + - WKR + - MA + startDate: + description: Start date of the invoice + type: string + format: date-time + endDate: + description: End date of the invoice + type: string + format: date-time + contact: + description: filters the invoices by contact + type: object + required: + - id + - objectName + properties: + id: + description: ID of the contact + type: integer + objectName: + description: Model name, which is 'Contact' + type: string + example: Contact + startAmount: + description: filters the invoices by amount + type: integer + example: 100 + endAmount: + description: filters the invoices by amount + type: integer + example: 150 + responses: + '200': + description: Successful operation without download + content: + application/json: + schema: + description: Response without Download + type: object + properties: + objects: + type: object + properties: + filename: + type: string + example: Rechnungen_19.04.23.zip + mimetype: + type: string + example: application/zip + base64Encoded: + type: boolean + example: true + content: + type: string + default: null + '400': + description: Bad request + '401': + description: Authentication required + '409': + description: Conflict + '500': + description: Server Error + security: + - api_key: [] + /Export/creditNoteCsv: + get: + summary: Export creditNote + description: Export all credit notes as csv + operationId: exportCreditNote + tags: + - Export + parameters: + - name: download + in: query + schema: + type: boolean + - name: sevQuery + in: query + required: true + schema: + type: object + required: + - modelName + - objectName + properties: + limit: + type: integer + description: Limit export + example: 999999 + modelName: + description: Model name, which is 'CreditNote' + example: CreditNote + objectName: + description: Model name, which is 'SevQuery' + example: SevQuery + filter: + type: object + properties: + startDate: + description: Start date of the credit note + type: string + format: date-time + endDate: + description: End date of the credit note + type: string + format: date-time + contact: + description: filters the credit notes by contact + type: object + required: + - id + - objectName + properties: + id: + description: ID of the contact + type: integer + objectName: + description: Model name, which is 'Contact' + type: string + example: Contact + startAmount: + description: filters the credit notes by amount + type: integer + example: 100 + endAmount: + description: filters the credit notes by amount + type: integer + example: 150 + responses: + '200': + description: Successful operation with download + content: + application/json: + schema: + type: object + properties: + objects: + type: object + properties: + filename: + type: string + example: creditNote.csv + mimetype: + type: string + example: text/csv + base64Encoded: + type: boolean + example: true + content: + type: string + '400': + description: Bad request + '401': + description: Authentication required + '409': + description: Conflict + '500': + description: Server Error + security: + - api_key: [] + /Export/voucherListCsv: + get: + summary: Export voucher as zip + description: Export all vouchers as zip + operationId: exportVoucher + tags: + - Export + parameters: + - name: download + in: query + schema: + type: boolean + - name: sevQuery + in: query + required: true + schema: + type: object + required: + - modelName + - objectName + properties: + limit: + type: integer + description: Limit export + example: 999999 + modelName: + description: Model name, which is 'Voucher' + example: Voucher + objectName: + description: Model name, which is 'SevQuery' + example: SevQuery + filter: + type: object + properties: + startDate: + description: Start date of the voucher + type: string + format: date-time + endDate: + description: End date of the voucher + type: string + format: date-time + startPayDate: + description: Start pay date of the voucher + type: string + format: date-time + endPayDate: + description: End pay date of the voucher + type: string + format: date-time + contact: + description: filters the vouchers by contact + type: object + required: + - id + - objectName + properties: + id: + description: ID of the contact + type: integer + objectName: + description: Model name, which is 'Contact' + type: string + example: Contact + startAmount: + description: filters the vouchers by amount + type: integer + example: 100 + endAmount: + description: filters the vouchers by amount + type: integer + example: 150 + responses: + '200': + description: Successful operation without download + content: + application/json: + schema: + type: object + properties: + filename: + type: string + example: Gutschrift_19.04.23.zip + mimetype: + type: string + example: application/zip + base64Encoded: + type: boolean + example: true + content: + type: string + default: null + '400': + description: Bad request + '401': + description: Authentication required + '409': + description: Conflict + '500': + description: Server Error + security: + - api_key: [] + /Export/transactionsCsv: + get: + summary: Export transaction + description: Export all transactions as csv + operationId: exportTransactions + tags: + - Export + parameters: + - name: download + in: query + schema: + type: boolean + - name: sevQuery + in: query + required: true + schema: + type: object + required: + - modelName + - objectName + properties: + limit: + type: integer + description: Limit export + example: 999999 + modelName: + description: Model name, which is 'CheckAccountTransaction' + example: CheckAccountTransaction + objectName: + description: Model name, which is 'SevQuery' + example: SevQuery + filter: + type: object + properties: + paymtPurpose: + description: the payment purpose + type: string + example: salary + name: + description: the name of the payee/payer + type: string + example: Cercei Lannister + startDate: + description: Start date of the transactions + type: string + format: date-time + endDate: + description: End date of the transactions + type: string + format: date-time + startAmount: + description: filters the transactions by amount + type: integer + example: 100 + endAmount: + description: filters the transactions by amount + type: integer + example: 150 + checkAccount: + type: object + required: + - id + - objectName + properties: + id: + description: Id of the checkAccount + type: integer + example: 1 + objectName: + description: Model name, which is 'CheckAccount' + type: string + example: CheckAccount + responses: + '200': + description: Successful operation + content: + application/json: + schema: + type: object + properties: + objects: + type: object + properties: + filename: + type: string + example: transaction.csv + mimetype: + type: string + example: text/csv + base64Encoded: + type: boolean + example: true + content: + type: string + '400': + description: Bad request + '401': + description: Authentication required + '409': + description: Conflict + '500': + description: Server Error + security: + - api_key: [] + /Export/voucherZip: + get: + summary: Export voucher zip + description: export all vouchers as zip + operationId: exportVoucherZip + tags: + - Export + parameters: + - name: download + in: query + schema: + type: boolean + - name: sevQuery + in: query + required: true + schema: + type: object + required: + - modelName + - objectName + properties: + limit: + type: integer + description: Limit export + example: 999999 + modelName: + description: Model name, which is 'Voucher' + example: Voucher + objectName: + description: Model name, which is 'SevQuery' + example: SevQuery + filter: + type: object + properties: + startDate: + description: Start date of the voucher + type: string + format: date-time + endDate: + description: End date of the voucher + type: string + format: date-time + startPayDate: + description: Start pay date of the voucher + type: string + format: date-time + endPayDate: + description: End pay date of the voucher + type: string + format: date-time + contact: + description: filters the vouchers by contact + type: object + required: + - id + - objectName + properties: + id: + description: ID of the contact + type: integer + example: 1 + objectName: + description: Model name, which is 'Contact' + type: string + example: Contact + startAmount: + description: filters the vouchers by amount + type: integer + example: 100 + endAmount: + description: filters the vouchers by amount + type: integer + example: 150 + responses: + '200': + description: Successful operation without download + content: + application/json: + schema: + type: object + properties: + objects: + type: object + properties: + filename: + type: string + example: Belege_19.04.23.zip + mimetype: + type: string + example: application/zip + base64Encoded: + type: boolean + example: true + content: + type: string + default: null + '400': + description: Bad request + '401': + description: Authentication required + '409': + description: Conflict + '500': + description: Server Error + security: + - api_key: [] + /Export/contactListCsv: + get: + summary: Export contact + description: Contact export as csv + operationId: exportContact + tags: + - Export + parameters: + - name: download + in: query + schema: + type: boolean + - name: sevQuery + in: query + required: true + schema: + type: object + required: + - modelName + - objectName + properties: + limit: + type: integer + description: Limit export + example: 999999 + modelName: + description: Model name, which is 'Contact' + example: Contact + objectName: + description: Model name, which is 'SevQuery' + example: SevQuery + filter: + type: object + properties: + zip: + description: filters the contacts by zip code + type: integer + example: 77656 + city: + description: filters the contacts by city + type: string + example: Offenburg + country: + type: object + required: + - id + - objectName + properties: + id: + description: id of the country + type: integer + example: 1 + objectName: + description: Model name, which is 'StaticCountry' + type: string + example: StaticCountry + depth: + description: export only organisations + type: boolean + onlyPeople: + description: export only people + type: boolean + responses: + '200': + description: Successful operation + content: + application/json: + schema: + type: object + properties: + objects: + type: object + properties: + filename: + type: string + example: contacts.csv + mimetype: + type: string + example: text/csv + base64Encoded: + type: boolean + example: true + content: + type: string + '400': + description: Bad request + '401': + description: Authentication required + '409': + description: Conflict + '500': + description: Server Error + security: + - api_key: [] + /Part: + get: + tags: + - Part + summary: Retrieve parts + description: >- + Retrieve all parts in your sevdesk inventory according to the applied + filters. + operationId: getParts + parameters: + - name: partNumber + in: query + description: Retrieve all parts with this part number + required: false + explode: false + schema: + type: string + - name: name + in: query + description: Retrieve all parts with this name + required: false + explode: false + schema: + type: string + responses: + '200': + description: Successful operation + content: + application/json: + schema: + properties: + objects: + type: array + items: + $ref: '#/components/schemas/Model_Part' + type: object + '400': + description: Bad request + '401': + description: Authentication required + '500': + description: Server Error + deprecated: false + security: + - api_key: [] + post: + tags: + - Part + summary: Create a new part + description: Creates a part in your sevdesk inventory. + operationId: createPart + requestBody: + description: "Creation data. Please be aware, that you need to provide at least all required parameter\r\n of the part model!" + content: + application/json: + schema: + $ref: '#/components/schemas/Model_Part' + responses: + '201': + description: Created - Returns created part + content: + application/json: + schema: + $ref: '#/components/schemas/Model_Part' + '400': + description: Bad request + '401': + description: Authentication required + '500': + description: Server Error + security: + - api_key: [] + /Part/{partId}: + get: + tags: + - Part + summary: Find part by ID + description: Returns a single part + operationId: getPartById + parameters: + - name: partId + in: path + description: ID of part to return + required: true + schema: + type: integer + responses: + '200': + description: Successful operation + content: + application/json: + schema: + properties: + objects: + type: array + items: + $ref: '#/components/schemas/Model_Part' + type: object + '400': + description: Bad request. Part was not found + '401': + description: Authentication required + '500': + description: Server Error + security: + - api_key: [] + put: + tags: + - Part + summary: Update an existing part + description: Update a part + operationId: updatePart + parameters: + - name: partId + in: path + description: ID of part to update + required: true + schema: + type: integer + requestBody: + description: Update data + content: + application/json: + schema: + $ref: '#/components/schemas/Model_PartUpdate' + responses: + '200': + description: Successful operation - Returns changed part resource + content: + application/json: + schema: + $ref: '#/components/schemas/Model_Part' + '400': + description: Bad request + '401': + description: Authentication required + '500': + description: Server Error + security: + - api_key: [] + /Part/{partId}/getStock: + get: + tags: + - Part + summary: Get stock of a part + description: Returns the current stock amount of the given part. + operationId: partGetStock + parameters: + - name: partId + in: path + description: ID of part for which you want the current stock. + required: true + schema: + type: integer + responses: + '200': + description: Successful operation + content: + application/json: + schema: + properties: + objects: + description: Stock amount + type: integer + example: 10 + type: object + '400': + description: Bad request. Part was not found + '401': + description: Authentication required + '500': + description: Server Error + security: + - api_key: [] + /Invoice: + get: + tags: + - Invoice + summary: Retrieve invoices + description: "There are a multitude of parameter which can be used to filter. A few of them are attached but\r\n for a complete list please check out this list" + operationId: getInvoices + parameters: + - name: status + in: query + description: Status of the invoices + required: false + schema: + type: number + enum: + - 100 + - 200 + - 1000 + - name: invoiceNumber + in: query + description: Retrieve all invoices with this invoice number + required: false + schema: + type: string + - name: startDate + in: query + description: Retrieve all invoices with a date equal or higher + required: false + schema: + type: integer + - name: endDate + in: query + description: Retrieve all invoices with a date equal or lower + required: false + schema: + type: integer + - name: contact[id] + in: query + description: >- + Retrieve all invoices with this contact. Must be provided with + contact[objectName] + required: false + schema: + type: integer + - name: contact[objectName] + in: query + description: >- + Only required if contact[id] was provided. 'Contact' should be used + as value. + required: false + schema: + type: string + responses: + '200': + description: Successful operation + content: + application/json: + schema: + properties: + objects: + type: array + items: + $ref: '#/components/schemas/Model_InvoiceResponse' + type: object + '400': + description: Bad request + '401': + description: Authentication required + '500': + description: Server Error + deprecated: false + security: + - api_key: [] + /Invoice/Factory/saveInvoice: + post: + tags: + - Invoice + summary: Create a new invoice + description: "This endpoint offers you the following functionality.\r\n \r\n To make your own request sample slimmer, you can omit all parameters which are not required and nullable.\r\n However, for a valid and logical bookkeeping document, you will also need some of them to ensure that all the necessary data is in the invoice.

The list of parameters starts with the invoice array.
This array contains all required attributes for a complete invoice.
Most of the attributes are covered in the invoice attribute list, there are only two parameters standing out, namely mapAll and objectName.
These are just needed for our system and you always need to provide them.

The list of parameters then continues with the invoice position array.
With this array you have the possibility to add multiple positions at once.
In the example it only contains one position, again together with the parameters mapAll and objectName, however, you can add more invoice positions by extending the array.
So if you wanted to add another position, you would add the same list of parameters with an incremented array index of \"1\" instead of \"0\".

The list ends with the four parameters invoicePosDelete, discountSave, discountDelete and takeDefaultAddress.
They only play a minor role if you only want to create an invoice but we will shortly explain what they can do.
With invoicePosDelete you have to option to delete invoice positions as this request can also be used to update invoices.
With discountSave you can add discounts to your invoice.
With discountDelete you can delete discounts from your invoice.
With takeDefaultAddress you can specify that the first address of the contact you are using for the invoice is taken for the invoice address attribute automatically, so you don't need to provide the address yourself.
If you want to know more about these parameters, for example if you want to use this request to update invoices, feel free to contact our support.

Finally, after covering all parameters, they only important information left, is that the order of the last four attributes always needs to be kept.
You will also always need to provide all of them, as otherwise the request won't work properly.

Warning: You can not create a regular invoice with the deliveryDate being later than the invoiceDate.
To do that you will need to create a so called Abschlagsrechnung by setting the invoiceType parameter to AR." + operationId: createInvoiceByFactory + requestBody: + description: "Creation data. Please be aware, that you need to provide at least all required parameter\r\n of the invoice model!" + content: + application/json: + schema: + $ref: '#/components/schemas/saveInvoice' + responses: + '201': + description: Created - Returns created invoice + content: + application/json: + schema: + $ref: '#/components/schemas/saveInvoiceResponse' + '400': + description: Bad request + '401': + description: Authentication required + '500': + description: Server Error + security: + - api_key: [] + /Invoice/{invoiceId}: + get: + tags: + - Invoice + summary: Find invoice by ID + description: Returns a single invoice + operationId: getInvoiceById + parameters: + - name: invoiceId + in: path + description: ID of invoice to return + required: true + schema: + type: integer + responses: + '200': + description: Successful operation + content: + application/json: + schema: + properties: + objects: + type: array + items: + $ref: '#/components/schemas/Model_InvoiceResponse' + type: object + '400': + description: Bad request. Invoice was not found + '401': + description: Authentication required + '500': + description: Server Error + security: + - api_key: [] + /Invoice/{invoiceId}/getPositions: + get: + tags: + - Invoice + summary: Find invoice positions + description: Returns all positions of an invoice + operationId: getInvoicePositionsById + parameters: + - name: invoiceId + in: path + description: ID of invoice to return the positions + required: true + schema: + type: integer + - name: limit + in: query + description: limits the number of entries returned + required: false + schema: + type: integer + - name: offset + in: query + description: set the index where the returned entries start + required: false + schema: + type: integer + - name: embed + in: query + description: >- + Get some additional information. Embed can handle multiple values, + they must be separated by comma. + required: false + schema: + type: array + items: + type: string + responses: + '200': + description: Successful operation + content: + application/json: + schema: + properties: + objects: + type: array + items: + $ref: '#/components/schemas/Model_InvoicePosResponse' + type: object + '400': + description: Bad request. Invoice was not found + '401': + description: Authentication required + '500': + description: Server Error + security: + - api_key: [] + /Invoice/Factory/createInvoiceFromOrder: + post: + tags: + - Invoice + summary: Create invoice from order + description: Create an invoice from an order + operationId: createInvoiceFromOrder + requestBody: + description: Create invoice + content: + application/json: + schema: + $ref: '#/components/schemas/Model_CreateInvoiceFromOrder' + responses: + '200': + description: Successful operation + content: + application/json: + schema: + $ref: '#/components/schemas/Model_InvoiceResponse' + '400': + description: Bad Request + '401': + description: Authentication required + '500': + description: Server Error + security: + - api_key: [] + /Invoice/Factory/createInvoiceReminder: + post: + tags: + - Invoice + summary: Create invoice reminder + description: Create an reminder from an invoice + operationId: createInvoiceReminder + parameters: + - name: invoice[id] + in: query + description: the id of the invoice + required: true + schema: + type: integer + - name: invoice[objectName] + in: query + description: Model name, which is 'Invoice' + required: true + example: Invoice + schema: + type: string + requestBody: + description: Create invoice + content: + application/json: + schema: + required: + - invoice + properties: + invoice: + description: Invoice for the reminder + required: + - id + - objectName + properties: + id: + description: Id of the invoice + type: integer + objectName: + description: Model name, which is 'Invoice' + type: string + example: Invoice + type: object + responses: + '200': + description: Successful operation + content: + application/json: + schema: + $ref: '#/components/schemas/Model_InvoiceResponse' + '400': + description: Bad Request + '401': + description: Authentication required + '500': + description: Server Error + security: + - api_key: [] + /Invoice/{invoiceId}/getIsPartiallyPaid: + get: + tags: + - Invoice + summary: Check if an invoice is already partially paid + description: "Returns 'true' if the given invoice is partially paid - 'false' if it is not.\r\n Invoices which are completely paid are regarded as not partially paid." + operationId: getIsInvoicePartiallyPaid + parameters: + - name: invoiceId + in: path + description: ID of invoice to return + required: true + schema: + type: integer + responses: + '200': + description: Successful operation + content: + application/json: + schema: + properties: + objects: + type: boolean + type: object + '400': + description: Bad Request + '401': + description: Authentication required + '500': + description: Server Error + security: + - api_key: [] + /Invoice/{invoiceId}/cancelInvoice: + post: + tags: + - Invoice + summary: Cancel an invoice / Create cancellation invoice + description: "This endpoint will cancel the specified invoice therefor creating a cancellation invoice.
\r\n The cancellation invoice will be automatically paid and the source invoices status will change to 'cancelled'." + operationId: cancelInvoice + parameters: + - name: invoiceId + in: path + description: ID of invoice to be cancelled + required: true + schema: + type: integer + responses: + '201': + description: Created - Returns cancellation invoice + content: + application/json: + schema: + $ref: '#/components/schemas/Model_InvoiceResponse' + '400': + description: Bad request + '401': + description: Authentication required + '500': + description: Server Error + security: + - api_key: [] + /Invoice/{invoiceId}/render: + post: + tags: + - Invoice + summary: Render the pdf document of an invoice + description: "Using this endpoint you can render the pdf document of an invoice.
\r\n Use cases for this are the retrieval of the pdf location or the forceful re-render of a already sent invoice.
\r\n Please be aware that changing an invoice after it has been sent to a customer is not an allowed bookkeeping process." + operationId: invoiceRender + parameters: + - name: invoiceId + in: path + description: ID of invoice to render + required: true + schema: + type: integer + requestBody: + description: Define if the document should be forcefully re-rendered. + content: + application/json: + schema: + properties: + forceReload: + description: Define if a forceful re-render should occur. + type: boolean + type: object + responses: + '201': + description: Returns meta-data about pdf. + content: + application/json: + schema: + properties: + thumbs: + type: array + items: + example: null + pages: + type: integer + example: 2 + docId: + type: string + example: d4605b19248ad176443b7cb382679b1f + parameters: + type: array + items: + properties: + key: + type: string + example: language + name: + type: string + example: Sprache + values: + type: array + items: + properties: + name: + type: string + example: deutsch + translationCade: + type: string + example: SEVDOC_LANG_DE_DE + value: + type: string + example: de_DE + type: object + visible: + type: boolean + example: true + value: + type: string + example: de_DE + '400': + description: Bad request + '401': + description: Authentication required + '500': + description: Server Error + security: + - api_key: [] + /Invoice/{invoiceId}/sendViaEmail: + post: + tags: + - Invoice + summary: Send invoice via email + description: "This endpoint sends the specified invoice to a customer via email.
\r\n This will automatically mark the invoice as sent.
\r\n Please note, that in production an invoice is not allowed to be changed after this happened!" + operationId: sendInvoiceViaEMail + parameters: + - name: invoiceId + in: path + description: ID of invoice to be sent via email + required: true + schema: + type: integer + requestBody: + description: Mail data + content: + application/json: + schema: + required: + - toEmail + - subject + - text + properties: + toEmail: + description: The recipient of the email. + type: string + subject: + description: The subject of the email. + type: string + text: + description: The text of the email. Can contain html. + type: string + copy: + description: Should a copy of this email be sent to you? + type: boolean + additionalAttachments: + description: "Additional attachments to the mail. String of IDs of existing documents in your\r\n * sevdesk account separated by ','" + type: string + ccEmail: + description: String of mail addresses to be put as cc separated by ',' + type: string + bccEmail: + description: String of mail addresses to be put as bcc separated by ',' + type: string + sendXml: + description: >- + If true, the XML of the e-invoice is attached to the email + instead of the PDF + type: boolean + type: object + responses: + '201': + description: Created - Returns created mail object + content: + application/json: + schema: + $ref: '#/components/schemas/Model_Email' + '400': + description: Bad request + '401': + description: Authentication required + '500': + description: Server Error + security: + - api_key: [] + /Invoice/{invoiceId}/getPdf: + get: + tags: + - Invoice + summary: Retrieve pdf document of an invoice + description: Retrieves the pdf document of an invoice with additional metadata. + operationId: invoiceGetPdf + parameters: + - name: invoiceId + in: path + description: ID of invoice from which you want the pdf + required: true + schema: + type: integer + - name: download + in: query + description: If u want to download the pdf of the invoice. + schema: + type: boolean + example: true + - name: preventSendBy + in: query + description: Defines if u want to send the invoice. + schema: + type: boolean + example: true + responses: + '200': + description: A pdf file + content: + application/json: + schema: + properties: + filename: + type: string + example: RE-101.pdf + mimeType: + type: string + example: application/pdf + base64encoded: + type: boolean + example: true + content: + type: string + format: binary + type: object + '400': + description: Bad request. Invoice was not found + '401': + description: Authentication required + '500': + description: Server Error + security: + - api_key: [] + /Invoice/{invoiceId}/getXml: + get: + tags: + - Invoice + summary: Retrieve XML of an e-invoice + description: Retrieves the XML of an e-invoice + operationId: invoiceGetXml + parameters: + - name: invoiceId + in: path + description: ID of invoice from which you want the XML + required: true + schema: + type: integer + responses: + '200': + description: A xml file + content: + application/json: + schema: + properties: + object: + type: string + example: + type: object + '400': + description: Bad request. Invoice was not found + '401': + description: Authentication required + '500': + description: Server Error + security: + - api_key: [] + /Invoice/{invoiceId}/sendBy: + put: + tags: + - Invoice + summary: Mark invoice as sent + description: Marks an invoice as sent by a chosen send type. + operationId: invoiceSendBy + parameters: + - name: invoiceId + in: path + description: ID of invoice to mark as sent + required: true + schema: + type: integer + requestBody: + description: Specify the send type + content: + application/json: + schema: + required: + - sendType + - sendDraft + properties: + sendType: + description: "Specifies the way in which the invoice was sent to the customer.
\r\n Accepts 'VPR' (print), 'VP' (postal), 'VM' (mail) and 'VPDF' (downloaded pfd)." + type: string + enum: + - VPR + - VP + - VM + - VPDF + sendDraft: + description: >- + To create a draft of an invoice for internal use. This + operation will not alter the status of the invoice or create + bookings for reports. + type: boolean + type: object + responses: + '200': + description: Successful operation - Returns changed invoice log entry + content: + application/json: + schema: + $ref: '#/components/schemas/Model_InvoiceResponse' + '400': + description: Bad request + '401': + description: Authentication required + '500': + description: Server Error + security: + - api_key: [] + /Invoice/{invoiceId}/enshrine: + put: + tags: + - Invoice + summary: Enshrine + description: > + Sets the current date and time as a value for the property + `enshrined`.
+ + This operation is only possible if the status is "Open" (`"status": + "200"`) or higher. + + + Enshrined invoices cannot be changed. This operation cannot be undone. + operationId: invoiceEnshrine + parameters: + - name: invoiceId + in: path + description: ID of the invoice to enshrine + required: true + schema: + type: integer + responses: + '200': + description: Successful operation + content: + application/json: + schema: + properties: + objects: + default: null + type: object + '400': + description: Bad request + '401': + description: Authentication required + '422': + description: Validation error + content: + application/json: + schema: + $ref: '#/components/schemas/validationError' + '500': + description: Server Error + security: + - api_key: [] + /Invoice/{invoiceId}/bookAmount: + put: + tags: + - Invoice + summary: Book an invoice + description: >- + Booking the invoice with a transaction is probably the most important + part in the bookkeeping process.
There are several ways on correctly + booking an invoice, all by using the same endpoint.
for more + information look here. + operationId: bookInvoice + parameters: + - name: invoiceId + in: path + description: ID of invoice to book + required: true + schema: + type: integer + requestBody: + description: Booking data + content: + application/json: + schema: + required: + - amount + - date + - type + - checkAccount + properties: + amount: + description: Amount which should be booked. Can also be a partial amount. + type: number + date: + description: The booking date. Most likely the current date. + type: integer + type: + description: "Define a type for the booking.
\r\n The following type abbreviations are available (abbreviation <-> meaning).
\r\n " + type: string + enum: + - FULL_PAYMENT + - 'N' + - CB + - CF + - O + - OF + - MTC + checkAccount: + description: The check account on which should be booked. + required: + - id + - objectName + properties: + id: + description: The id of the check account on which should be booked. + type: integer + objectName: + description: Internal object name which is 'CheckAccount'. + type: string + example: CheckAccount + type: object + checkAccountTransaction: + description: "The check account transaction on which should be booked.
\r\n The transaction will be linked to the invoice." + required: + - id + - objectName + properties: + id: + description: >- + The id of the check account transaction on which should + be booked. + type: integer + objectName: + description: Internal object name which is 'CheckAccountTransaction'. + type: string + example: CheckAccountTransaction + type: object + createFeed: + description: Determines if a feed is created for the booking process. + type: boolean + type: object + responses: + '200': + description: Successful operation - Returns changed invoice log entry + content: + application/json: + schema: + type: object + properties: + id: + type: string + example: 2 + objectName: + type: string + example: InvoiceLog + additionalInformation: + type: string + default: null + create: + description: Date of email creation + type: string + format: date-time + example: '2023-04-18T15:45:38+02:00' + creditNote: + type: object + required: + - id + - objectName + properties: + id: + description: The id of the invoice + type: integer + example: 2 + objectName: + description: Internal object name which is 'Invoice'. + type: string + example: Invoice + fromStatus: + type: string + example: 200 + toStatus: + type: string + example: 1000 + ammountPayed: + type: string + example: 0 + bookingDate: + type: string + format: date-time + example: '2023-04-18T15:45:38+02:00' + sevClient: + type: object + description: >- + Client to which invoice belongs. Will be filled + automatically + required: + - id + - objectName + properties: + id: + description: Unique identifier of the client + type: integer + example: 1 + objectName: + description: Model name, which is 'SevClient' + type: string + example: SevClient + '400': + description: Bad request + '401': + description: Authentication required + '500': + description: Server Error + security: + - api_key: [] + /Invoice/{invoiceId}/resetToOpen: + put: + tags: + - Invoice + summary: Reset status to open + description: > + Resets the status "Open" (`"status": "200"`). Linked transactions will + be unlinked.
+ + This is not possible if the invoice itself or one of its transactions + (CheckAccountTransaction) is already enshrined. + + + This endpoint cannot be used to increase the status to "Open" + (`"status": "200"`).
+ + Use [Invoice/{invoiceId}/sendBy](#tag/Invoice/operation/invoiceSendBy) / + [Invoice/{invoiceId}/sendViaEmail](#tag/Invoice/operation/sendInvoiceViaEMail) + instead. + + + This endpoint cannot be used for recurring invoices (`"invoiceType": + "WKR"`). + + Use + [Invoice/Factory/saveInvoice](#tag/Invoice/operation/createInvoiceByFactory) + instead. + operationId: invoiceResetToOpen + parameters: + - name: invoiceId + in: path + description: ID of the invoice to reset + required: true + schema: + type: integer + responses: + '200': + description: Successful operation - Returns changed invoice + content: + application/json: + schema: + type: object + properties: + objects: + allOf: + - $ref: '#/components/schemas/Model_InvoiceResponse' + - type: object + properties: + status: + example: '200' + payDate: + example: null + enshrined: + example: null + accountIntervall: + example: null + accountNextInvoice: + example: null + '400': + description: Bad request + '401': + description: Authentication required + '422': + description: Validation error + content: + application/json: + schema: + $ref: '#/components/schemas/validationError' + '500': + description: Server Error + security: + - api_key: [] + /Invoice/{invoiceId}/resetToDraft: + put: + tags: + - Invoice + summary: Reset status to draft + description: > + Resets the status to "Draft" (`"status": "100"`).
+ + This is only possible if the invoice has the status "Open" (`"status": + "200"`).
+ + If it has a higher status use + [Invoice/{invoiceId}/resetToOpen](#tag/Invoice/operation/invoiceResetToOpen) + first. + + + This endpoint cannot be used for recurring invoices (`"invoiceType": + "WKR"`).
+ + Use + [Invoice/Factory/saveInvoice](#tag/Invoice/operation/createInvoiceByFactory) + instead. + operationId: invoiceResetToDraft + parameters: + - name: invoiceId + in: path + description: ID of the invoice to reset + required: true + schema: + type: integer + responses: + '200': + description: Successful operation - Returns changed invoice + content: + application/json: + schema: + type: object + properties: + objects: + allOf: + - $ref: '#/components/schemas/Model_InvoiceResponse' + - properties: + payDate: + example: null + enshrined: + example: null + accountIntervall: + example: null + accountNextInvoice: + example: null + '400': + description: Bad request + '401': + description: Authentication required + '422': + description: Validation error + content: + application/json: + schema: + $ref: '#/components/schemas/validationError' + '500': + description: Server Error + security: + - api_key: [] + /InvoicePos: + get: + tags: + - InvoicePos + summary: Retrieve InvoicePos + description: There are a multitude of parameter which can be used to filter. + operationId: getInvoicePos + parameters: + - name: id + in: query + description: Retrieve all InvoicePos with this InvoicePos id + required: false + schema: + type: number + - name: invoice[id] + in: query + description: >- + Retrieve all invoices positions with this invoice. Must be provided + with invoice[objectName] + required: false + schema: + type: number + - name: invoice[objectName] + in: query + description: >- + Only required if invoice[id] was provided. 'Invoice' should be used + as value. + required: false + schema: + type: string + - name: part[id] + in: query + description: >- + Retrieve all invoices positions with this part. Must be provided + with part[objectName] + required: false + schema: + type: number + - name: part[objectName] + in: query + description: >- + Only required if part[id] was provided. 'Part' should be used as + value. + required: false + schema: + type: string + responses: + '200': + description: Successful operation + content: + application/json: + schema: + properties: + objects: + type: array + items: + $ref: '#/components/schemas/Model_InvoicePosResponse' + type: object + '400': + description: Bad request + '401': + description: Authentication required + '500': + description: Server Error + deprecated: false + security: + - api_key: [] + /DocServer/getLetterpapersWithThumb: + get: + tags: + - Layout + summary: Retrieve letterpapers + description: Retrieve all letterpapers with Thumb + operationId: getLetterpapersWithThumb + responses: + '200': + description: Successful operation + content: + application/json: + schema: + properties: + result: + type: string + example: '1' + letterpapers: + type: array + items: + properties: + id: + type: string + example: 57d7ff34f23ada297d265f21 + pdf: + type: string + sevClient: + type: string + example: '0' + name: + type: string + example: Blanko + default: + type: integer + img: + type: string + '401': + description: Authentication required + '500': + description: Server Error + security: + - api_key: [] + /DocServer/getTemplatesWithThumb: + get: + tags: + - Layout + summary: Retrieve templates + description: Retrieve all templates + operationId: getTemplates + parameters: + - name: type + in: query + description: Type of the templates you want to get. + schema: + type: string + enum: + - Invoice + - invoicereminder + - Order + - Contractnote + - Packinglist + - Letter + - Creditnote + responses: + '200': + description: Successful operation + content: + application/json: + schema: + properties: + result: + type: string + example: '1' + templates: + type: array + items: + properties: + id: + type: string + example: 57986aee6bd2d53306068da1 + name: + type: string + example: SEVDOC_TEMPLATE_STANDARD + translationCode: + type: string + example: SEVDOC_TEMPLATE_STANDARD + sevClient: + type: string + example: '0' + type: + type: string + example: Invoice + html: + type: string + default: + type: integer + premium: + type: boolean + example: false + '401': + description: Authentication required + '500': + description: Server Error + security: + - api_key: [] + /Invoice/{invoiceId}/changeParameter: + put: + tags: + - Layout + summary: Update an invoice template + description: Update an existing invoice template + operationId: updateInvoiceTemplate + parameters: + - name: invoiceId + in: path + description: ID of invoice to update + required: true + schema: + type: integer + requestBody: + description: Change Layout + content: + application/json: + schema: + $ref: '#/components/schemas/Model_ChangeLayout' + responses: + '200': + description: Successful operation + content: + application/json: + schema: + $ref: '#/components/schemas/Model_ChangeLayoutResponse' + '400': + description: Bad request + '401': + description: Authentication required + '500': + description: Server Error + security: + - api_key: [] + /Order/{orderId}/changeParameter: + put: + tags: + - Layout + summary: Update an order template + description: Update an existing order template + operationId: updateOrderTemplate + parameters: + - name: orderId + in: path + description: ID of order to update + required: true + schema: + type: integer + requestBody: + description: Change Layout + content: + application/json: + schema: + $ref: '#/components/schemas/Model_ChangeLayout' + responses: + '200': + description: Successful operation + content: + application/json: + schema: + $ref: '#/components/schemas/Model_ChangeLayoutResponse' + '400': + description: Bad request + '401': + description: Authentication required + '500': + description: Server Error + security: + - api_key: [] + /CreditNote/{creditNoteId}/changeParameter: + put: + tags: + - Layout + summary: Update an of credit note template + description: Update an existing of credit note template + operationId: updateCreditNoteTemplate + parameters: + - name: creditNoteId + in: path + description: ID of credit note to update + required: true + schema: + type: integer + requestBody: + description: Change Layout + content: + application/json: + schema: + $ref: '#/components/schemas/Model_ChangeLayout' + responses: + '200': + description: Successful operation + content: + application/json: + schema: + $ref: '#/components/schemas/Model_ChangeLayoutResponse' + '400': + description: Bad request + '401': + description: Authentication required + '500': + description: Server Error + security: + - api_key: [] + /Order: + get: + tags: + - Order + summary: Retrieve orders + description: "There are a multitude of parameter which can be used to filter. A few of them are attached but\r\n for a complete list please check out this list" + operationId: getOrders + parameters: + - name: status + in: query + description: Status of the order + required: false + explode: true + schema: + type: integer + enum: + - 100 + - 200 + - 300 + - 500 + - 750 + - 1000 + - name: orderNumber + in: query + description: Retrieve all orders with this order number + required: false + explode: true + schema: + type: string + - name: startDate + in: query + description: Retrieve all orders with a date equal or higher + required: false + explode: true + schema: + type: integer + - name: endDate + in: query + description: Retrieve all orders with a date equal or lower + required: false + explode: true + schema: + type: integer + - name: contact[id] + in: query + description: >- + Retrieve all orders with this contact. Must be provided with + contact[objectName] + required: false + explode: false + schema: + type: integer + - name: contact[objectName] + in: query + description: >- + Only required if contact[id] was provided. 'Contact' should be used + as value. + required: false + explode: false + schema: + type: string + responses: + '200': + description: Successful operation + content: + application/json: + schema: + properties: + objects: + type: array + items: + $ref: '#/components/schemas/Model_OrderResponse' + type: object + '400': + description: Bad request + '401': + description: Authentication required + '500': + description: Server Error + deprecated: false + security: + - api_key: [] + /Order/Factory/saveOrder: + post: + tags: + - Order + summary: Create a new order + description: Creates an order to which positions can be added later. + operationId: createOrder + requestBody: + description: "Creation data. Please be aware, that you need to provide at least all required parameter\r\n of the order model!" + content: + application/json: + schema: + $ref: '#/components/schemas/saveOrder' + responses: + '201': + description: Created - Returns created voucher + content: + application/json: + schema: + $ref: '#/components/schemas/saveOrderResponse' + '400': + description: Bad request + '401': + description: Authentication required + '500': + description: Server Error + security: + - api_key: [] + /Order/{orderId}: + get: + tags: + - Order + summary: Find order by ID + description: Returns a single order + operationId: getOrderById + parameters: + - name: orderId + in: path + description: ID of order to return + required: true + schema: + type: integer + responses: + '200': + description: Successful operation + content: + application/json: + schema: + properties: + objects: + type: array + items: + $ref: '#/components/schemas/Model_OrderResponse' + type: object + '400': + description: Bad request. Order was not found + '401': + description: Authentication required + '500': + description: Server Error + security: + - api_key: [] + put: + tags: + - Order + summary: Update an existing order + description: Update an order + operationId: updateOrder + parameters: + - name: orderId + in: path + description: ID of order to update + required: true + schema: + type: integer + requestBody: + description: Update data + content: + application/json: + schema: + $ref: '#/components/schemas/Model_OrderUpdate' + responses: + '200': + description: Successful operation - Returns changed order resource + content: + application/json: + schema: + $ref: '#/components/schemas/Model_OrderResponse' + '400': + description: Bad request + '401': + description: Authentication required + '500': + description: Server Error + security: + - api_key: [] + delete: + tags: + - Order + summary: Deletes an order + operationId: deleteOrder + parameters: + - name: orderId + in: path + description: Id of order resource to delete + required: true + schema: + type: integer + responses: + '200': + description: Successful operation - Order deleted + content: + application/json: + schema: + properties: + objects: + type: array + items: + default: null + type: object + '400': + description: Bad request + '401': + description: Authentication required + '409': + description: Conflict - f.e occurs if the order is not a draft + '500': + description: Server Error + security: + - api_key: [] + /Order/{orderId}/getPositions: + get: + tags: + - Order + summary: Find order positions + description: Returns all positions of an order + operationId: getOrderPositionsById + parameters: + - name: orderId + in: path + description: ID of order to return the positions + required: true + schema: + type: integer + - name: limit + in: query + description: limits the number of entries returned + required: false + schema: + type: integer + - name: offset + in: query + description: set the index where the returned entries start + required: false + schema: + type: integer + - name: embed + in: query + description: >- + Get some additional information. Embed can handle multiple values, + they must be separated by comma. + required: false + schema: + type: array + items: + type: string + responses: + '200': + description: Successful operation + content: + application/json: + schema: + properties: + objects: + type: array + items: + $ref: '#/components/schemas/Model_OrderPosResponse' + type: object + '400': + description: Bad request. order was not found + '401': + description: Authentication required + '500': + description: Server Error + security: + - api_key: [] + /Order/{orderId}/getDiscounts: + get: + tags: + - Order + summary: Find order discounts + description: Returns all discounts of an order + operationId: getDiscounts + parameters: + - name: orderId + in: path + description: ID of order to return the positions + required: true + schema: + type: integer + - name: limit + in: query + description: limits the number of entries returned + required: false + schema: + type: integer + - name: offset + in: query + description: set the index where the returned entries start + required: false + schema: + type: integer + - name: embed + in: query + description: >- + Get some additional information. Embed can handle multiple values, + they must be separated by comma. + required: false + schema: + type: array + items: + type: string + responses: + '200': + description: Successful operation + content: + application/json: + schema: + properties: + objects: + type: array + items: + $ref: '#/components/schemas/Model_Discount' + type: object + '400': + description: Bad request. order was not found + '401': + description: Authentication required + '500': + description: Server Error + security: + - api_key: [] + /Order/{orderId}/getRelatedObjects: + get: + tags: + - Order + summary: Find related objects + description: Get related objects of a specified order + operationId: getRelatedObjects + parameters: + - name: orderId + in: path + description: ID of order to return the positions + required: true + schema: + type: integer + - name: includeItself + in: query + description: Define if the related objects include the order itself + required: false + schema: + type: boolean + - name: sortByType + in: query + description: Define if you want the related objects sorted by type + required: false + schema: + type: boolean + - name: embed + in: query + description: >- + Get some additional information. Embed can handle multiple values, + they must be separated by comma. + required: false + schema: + type: array + items: + type: string + responses: + '200': + description: Successful operation + content: + application/json: + schema: + properties: + objects: + type: array + items: + $ref: '#/components/schemas/Model_OrderPosResponse' + type: object + '400': + description: Bad request. order was not found + '401': + description: Authentication required + '500': + description: Server Error + security: + - api_key: [] + /Order/{orderId}/sendViaEmail: + post: + tags: + - Order + summary: Send order via email + description: "This endpoint sends the specified order to a customer via email.
\r\n This will automatically mark the order as sent.
\r\n Please note, that in production an order is not allowed to be changed after this happened!" + operationId: sendorderViaEMail + parameters: + - name: orderId + in: path + description: ID of order to be sent via email + required: true + schema: + type: integer + requestBody: + description: Mail data + content: + application/json: + schema: + required: + - toEmail + - subject + - text + properties: + toEmail: + description: The recipient of the email. + type: string + subject: + description: The subject of the email. + type: string + text: + description: The text of the email. Can contain html. + type: string + copy: + description: Should a copy of this email be sent to you? + type: boolean + additionalAttachments: + description: "Additional attachments to the mail. String of IDs of existing documents in your\r\n * sevdesk account separated by ','" + type: string + ccEmail: + description: String of mail addresses to be put as cc separated by ',' + type: string + bccEmail: + description: String of mail addresses to be put as bcc separated by ',' + type: string + type: object + responses: + '201': + description: Created - Returns created mail object + content: + application/json: + schema: + properties: + objects: + type: array + items: + $ref: '#/components/schemas/Model_EmailOrder' + type: object + '400': + description: Bad request + '401': + description: Authentication required + '500': + description: Server Error + security: + - api_key: [] + /Order/Factory/createPackingListFromOrder: + post: + tags: + - Order + summary: Create packing list from order + description: Create packing list from order + operationId: createPackingListFromOrder + parameters: + - name: order[id] + in: query + description: the id of the order + required: true + explode: false + schema: + type: integer + - name: order[objectName] + in: query + description: Model name, which is 'Order' + required: true + explode: false + example: Order + schema: + type: string + requestBody: + description: Create packing list + content: + application/json: + schema: + $ref: '#/components/schemas/Model_CreatePackingListFromOrder' + responses: + '200': + description: Successful operation + content: + application/json: + schema: + $ref: '#/components/schemas/Model_OrderResponse' + '400': + description: Bad Request + '401': + description: Authentication required + '500': + description: Server Error + security: + - api_key: [] + /Order/Factory/createContractNoteFromOrder: + post: + tags: + - Order + summary: Create contract note from order + description: Create contract note from order + operationId: createContractNoteFromOrder + parameters: + - name: order[id] + in: query + description: the id of the order + required: true + explode: false + schema: + type: integer + - name: order[objectName] + in: query + description: Model name, which is 'Order' + required: true + explode: false + example: Order + schema: + type: string + requestBody: + description: Create contract note + content: + application/json: + schema: + $ref: '#/components/schemas/Model_CreatePackingListFromOrder' + responses: + '200': + description: Successful operation + content: + application/json: + schema: + $ref: '#/components/schemas/Model_OrderResponse' + '400': + description: Bad Request + '401': + description: Authentication required + '500': + description: Server Error + security: + - api_key: [] + /Order/{orderId}/getPdf: + get: + tags: + - Order + summary: Retrieve pdf document of an order + description: >- + Retrieves the pdf document of an order with additional metadata and + commit the order. + operationId: orderGetPdf + parameters: + - name: orderId + in: path + description: ID of order from which you want the pdf + required: true + schema: + type: integer + - name: download + in: query + description: If u want to download the pdf of the order. + schema: + type: boolean + example: true + - name: preventSendBy + in: query + description: Defines if u want to send the order. + schema: + type: boolean + example: true + responses: + '200': + description: A pdf file + content: + application/json: + schema: + properties: + filename: + type: string + example: OR-1001.pdf + mimeType: + type: string + example: application/pdf + base64encoded: + type: boolean + example: true + content: + type: string + format: binary + type: object + '400': + description: Bad request. order was not found + '401': + description: Authentication required + '500': + description: Server Error + security: + - api_key: [] + /Order/{orderId}/sendBy: + put: + tags: + - Order + summary: Mark order as sent + description: Marks an order as sent by a chosen send type. + operationId: orderSendBy + parameters: + - name: orderId + in: path + description: ID of order to mark as sent + required: true + schema: + type: integer + requestBody: + description: Specify the send type + content: + application/json: + schema: + required: + - sendType + - sendDraft + properties: + sendType: + description: "Specifies the way in which the order was sent to the customer.
\r\n Accepts 'VPR' (print), 'VP' (postal), 'VM' (mail) and 'VPDF' (downloaded pfd)." + type: string + enum: + - VPR + - VP + - VM + - VPDF + sendDraft: + description: >- + To create a draft of an order for internal use. This + operation will not alter the status of the order. + type: boolean + type: object + responses: + '200': + description: Successful operation - Returns changed order log entry + content: + application/json: + schema: + $ref: '#/components/schemas/Model_OrderResponse' + '400': + description: Bad request + '401': + description: Authentication required + '500': + description: Server Error + security: + - api_key: [] + /OrderPos: + get: + tags: + - OrderPos + summary: Retrieve order positions + description: >- + Retrieve all order positions depending on the filters defined in the + query. + operationId: getOrderPositions + parameters: + - name: order[id] + in: query + description: >- + Retrieve all order positions belonging to this order. Must be + provided with voucher[objectName] + required: false + explode: false + schema: + type: integer + - name: order[objectName] + in: query + description: >- + Only required if order[id] was provided. 'Order' should be used as + value. + required: false + explode: false + schema: + type: string + responses: + '200': + description: Successful operation + content: + application/json: + schema: + properties: + objects: + type: array + items: + $ref: '#/components/schemas/Model_OrderPosResponse' + type: object + '400': + description: Bad request + '401': + description: Authentication required + '500': + description: Server Error + deprecated: false + security: + - api_key: [] + /OrderPos/{orderPosId}: + get: + tags: + - OrderPos + summary: Find order position by ID + description: Returns a single order position + operationId: getOrderPositionById + parameters: + - name: orderPosId + in: path + description: ID of order position to return + required: true + schema: + type: integer + responses: + '200': + description: Successful operation + content: + application/json: + schema: + properties: + objects: + type: array + items: + $ref: '#/components/schemas/Model_OrderPosResponse' + type: object + '400': + description: Bad request. Order position was not found + '401': + description: Authentication required + '500': + description: Server Error + security: + - api_key: [] + put: + tags: + - OrderPos + summary: Update an existing order position + description: Update an order position + operationId: updateOrderPosition + parameters: + - name: orderPosId + in: path + description: ID of order position to update + required: true + schema: + type: integer + requestBody: + description: Update data + content: + application/json: + schema: + $ref: '#/components/schemas/Model_OrderPosUpdate' + responses: + '200': + description: Successful operation - Returns changed order position resource + content: + application/json: + schema: + $ref: '#/components/schemas/Model_OrderPosResponse' + '400': + description: Bad request + '401': + description: Authentication required + '500': + description: Server Error + security: + - api_key: [] + delete: + tags: + - OrderPos + summary: Deletes an order Position + operationId: deleteOrderPos + parameters: + - name: orderPosId + in: path + description: Id of order position resource to delete + required: true + schema: + type: integer + responses: + '200': + description: Successful operation - order position deleted + content: + application/json: + schema: + properties: + objects: + type: array + items: + default: null + type: object + '400': + description: Bad request + '401': + description: Authentication required + '409': + description: Conflict - f.e occurs if the order is not a draft + '500': + description: Server Error + security: + - api_key: [] + /Voucher/Factory/saveVoucher: + post: + tags: + - Voucher + summary: Create a new voucher + description: >- + Bundles the creation or updating of voucher and voucher position.
+ The list of parameters starts with the voucher model.
This contains + all required attributes for a complete voucher.
Most of the + attributes are covered in the voucher attribute list, there are only two + parameters standing out, namely mapAll and objectName.
+ These are just needed for our system and you always need to provide + them.

The list of parameters then continues with the voucher + position array.
With this array you have the possibility to add + multiple positions at once.
In the example it only contains one + position, again together with the parameters mapAll and + objectName, however, you can add more voucher positions by + extending the array.
So if you wanted to add another position, you + would add the same list of parameters with an incremented array index of + \"1\" instead of \"0\".

The list ends with the two parameters + voucherPosDelete and filename.
We will shortly explain what they can + do.
With voucherPosDelete you can delete voucher positions as this + request can also be used to update draft vouchers.
With filename you + can attach a file to the voucher.
For most of our customers this is + a really important step, as they need to digitize their receipts.
+ Finally, after covering all parameters, the only important information + left, is that the order of the last two attributes always needs to be + kept.

The only valid status values for this endpoint are 50 + (draft) and 100 (open). You can only update draft vouchers. If you have + to, you can downgrade the status by calling resetToOpen (from paid) and + resetToDraft (from open). + operationId: voucherFactorySaveVoucher + requestBody: + description: >- + Creation data. Please be aware, that you need to provide at least all + required parameters of the voucher and voucher position model! + content: + application/json: + schema: + $ref: '#/components/schemas/saveVoucher' + responses: + '201': + description: Created - Returns created voucher + content: + application/json: + schema: + $ref: '#/components/schemas/saveVoucherResponse' + '400': + description: Bad request + '401': + description: Authentication required + '422': + description: Validation error + content: + application/json: + schema: + $ref: '#/components/schemas/validationError' + '500': + description: Server Error + security: + - api_key: [] + /Voucher/Factory/uploadTempFile: + post: + tags: + - Voucher + summary: Upload voucher file + description: >- + To attach a document to a voucher, you will need to upload it first for + later use.
To do this, you can use this request.
When you + successfully uploaded the file, you will get a sevdesk internal filename + in the response.
The filename will be a hash generated from your + uploaded file. You will need it in the next request!
After you got + the just mentioned filename, you can enter it as a value for the + filename parameter of the saveVoucher request.
If you provided all + necessary parameters and kept all of them in the right order, the file + will be attached to your voucher. + operationId: voucherUploadFile + requestBody: + description: File to upload + content: + form-data: + schema: + properties: + file: + description: The file to upload + type: string + format: binary + type: object + responses: + '201': + description: A pdf file + content: + application/json: + schema: + type: object + properties: + objects: + type: object + properties: + pages: + type: number + example: 1 + mimeType: + type: string + example: image/jpg + originMimeType: + type: string + example: application/pdf + filename: + type: string + example: f019bec36c65f5a0e7d2c63cc33f0681.pdf + contentHash: + type: string + example: >- + 1998dea8c6e9e489139caf896690641c0ea065ce5770b51cf2a4d10797f99685 + content: + type: array + items: + example: null + '400': + description: Bad request + '401': + description: Authentication required + '500': + description: Server Error + deprecated: false + security: + - api_key: [] + /Voucher: + get: + tags: + - Voucher + summary: Retrieve vouchers + description: "There are a multitude of parameter which can be used to filter. A few of them are attached but\r\n for a complete list please check out this list" + operationId: getVouchers + parameters: + - name: status + in: query + description: Status of the vouchers to retrieve. + required: false + explode: true + schema: + type: number + enum: + - 50 + - 100 + - 1000 + - name: creditDebit + in: query + description: Define if you only want credit or debit vouchers. + required: false + explode: true + schema: + type: string + enum: + - C + - D + - name: descriptionLike + in: query + description: Retrieve all vouchers with a description like this. + required: false + explode: true + schema: + type: string + - name: startDate + in: query + description: Retrieve all vouchers with a date equal or higher + required: false + explode: true + example: 01.01.2020 + schema: + type: integer + - name: endDate + in: query + description: Retrieve all vouchers with a date equal or lower + required: false + explode: true + example: 01.01.2020 + schema: + type: integer + - name: contact[id] + in: query + description: >- + Retrieve all vouchers with this contact. Must be provided with + contact[objectName] + required: false + explode: false + schema: + type: integer + - name: contact[objectName] + in: query + description: >- + Only required if contact[id] was provided. 'Contact' should be used + as value. + required: false + explode: false + schema: + type: string + responses: + '200': + description: Successful operation + content: + application/json: + schema: + properties: + objects: + type: array + items: + $ref: '#/components/schemas/Model_VoucherResponse' + type: object + '400': + description: Bad request + '401': + description: Authentication required + '500': + description: Server Error + deprecated: false + security: + - api_key: [] + /Voucher/{voucherId}: + get: + tags: + - Voucher + summary: Find voucher by ID + description: Returns a single voucher + operationId: getVoucherById + parameters: + - name: voucherId + in: path + description: ID of voucher to return + required: true + schema: + type: integer + responses: + '200': + description: Successful operation + content: + application/json: + schema: + properties: + objects: + type: array + items: + $ref: '#/components/schemas/Model_VoucherResponse' + type: object + '400': + description: Bad request. Voucher was not found + '401': + description: Authentication required + '500': + description: Server Error + security: + - api_key: [] + put: + tags: + - Voucher + summary: Update an existing voucher + description: >- + Update a draft voucher using this method if you want to change simple + values like the description. Complex changes like adding a position + should use /Voucher/Factory/saveVoucher.
You can not change the + status using this endpoint. + operationId: updateVoucher + parameters: + - name: voucherId + in: path + description: ID of voucher to update + required: true + schema: + type: integer + requestBody: + description: Update data + content: + application/json: + schema: + $ref: '#/components/schemas/Model_VoucherUpdate' + responses: + '200': + description: Successful operation - Returns changed voucher resource + content: + application/json: + schema: + $ref: '#/components/schemas/Model_VoucherResponse' + '400': + description: Bad request + '401': + description: Authentication required + '500': + description: Server Error + security: + - api_key: [] + /Voucher/{voucherId}/enshrine: + put: + tags: + - Voucher + summary: Enshrine + description: > + Sets the current date and time as a value for the property + `enshrined`.
+ + This operation is only possible if the status is "Open" (`"status": + "100"`) or higher. + + + Enshrined vouchers cannot be changed. This operation cannot be undone. + operationId: voucherEnshrine + parameters: + - name: voucherId + in: path + description: ID of the voucher to enshrine + required: true + schema: + type: integer + responses: + '200': + description: Successful operation + content: + application/json: + schema: + properties: + objects: + default: null + type: object + '400': + description: Bad request + '401': + description: Authentication required + '422': + description: Validation error + content: + application/json: + schema: + $ref: '#/components/schemas/validationError' + '500': + description: Server Error + security: + - api_key: [] + /Voucher/{voucherId}/bookAmount: + put: + tags: + - Voucher + summary: Book a voucher + description: >- + Booking the voucher with a transaction is probably the most important + part in the bookkeeping process.
There are several ways on correctly + booking a voucher, all by using the same endpoint.
Conveniently, the + booking process is exactly the same as the process for invoices.
For + this reason, you can have a look at it here and all + you need to to is to change "Invoice" into "Voucher" in the URL. + operationId: bookVoucher + parameters: + - name: voucherId + in: path + description: ID of voucher to book + required: true + schema: + type: integer + requestBody: + description: Booking data + content: + application/json: + schema: + required: + - amount + - date + - type + - checkAccount + properties: + amount: + description: Amount which should be booked. Can also be a partial amount. + type: number + date: + description: The booking date. Most likely the current date. + type: string + format: date-time + nullable: false + type: + description: "Define a type for the booking.
\r\n The following type abbreviations are available (abbreviation <-> meaning).
\r\n " + type: string + enum: + - FULL_PAYMENT + - 'N' + - CB + - CF + - O + - OF + - MTC + checkAccount: + description: The check account on which should be booked. + required: + - id + - objectName + properties: + id: + description: The id of the check account on which should be booked. + type: integer + objectName: + description: Internal object name which is 'CheckAccount'. + type: string + example: CheckAccount + type: object + checkAccountTransaction: + description: "The check account transaction on which should be booked.
\r\n The transaction will be linked to the voucher." + required: + - id + - objectName + properties: + id: + description: >- + The id of the check account transaction on which should + be booked. + type: integer + objectName: + description: Internal object name which is 'CheckAccountTransaction'. + type: string + example: CheckAccountTransaction + type: object + createFeed: + description: Determines if a feed is created for the booking process. + type: boolean + type: object + responses: + '200': + description: Successful operation - Returns changed voucher log entry + content: + application/json: + schema: + type: object + properties: + id: + type: string + example: 2 + objectName: + type: string + example: VoucherLog + additionalInformation: + type: string + default: null + create: + description: Date of email creation + type: string + format: date-time + example: '2023-04-18T15:45:38+02:00' + creditNote: + type: object + required: + - id + - objectName + properties: + id: + description: The id of the voucher + type: integer + example: 2 + objectName: + description: Internal object name which is 'Voucher'. + type: string + example: Voucher + fromStatus: + type: string + example: 200 + toStatus: + type: string + example: 1000 + ammountPayed: + type: string + example: 0 + bookingDate: + type: string + format: date-time + example: '2023-04-18T15:45:38+02:00' + sevClient: + type: object + description: >- + Client to which invoice belongs. Will be filled + automatically + required: + - id + - objectName + properties: + id: + description: Unique identifier of the client + type: integer + example: 1 + objectName: + description: Model name, which is 'SevClient' + type: string + example: SevClient + '400': + description: Bad request + '401': + description: Authentication required + '500': + description: Server Error + security: + - api_key: [] + /Voucher/{voucherId}/resetToOpen: + put: + tags: + - Voucher + summary: Reset status to open + description: > + Resets the status to "Open" (`"status": "100"`). Linked payments will be + unlinked. Created asset depreciation will be reset.
+ + This is not possible if the voucher is already enshrined! + + + This endpoint can not be used to increase the status from "Draft" to + "Open".
+ + You can only change the status from higher to lower ("Open" to + "Draft").
+ + To change to higher status use + [Voucher/{voucherId}/bookAmount](#tag/Voucher/operation/bookVoucher). + + To change to lower status use + [Voucher/{voucherId}/resetToDraft](#tag/Voucher/operation/voucherResetToDraft). + operationId: voucherResetToOpen + parameters: + - name: voucherId + in: path + description: ID of the voucher to reset + required: true + schema: + type: integer + responses: + '200': + description: Successful operation - Returns changed voucher + content: + application/json: + schema: + type: object + properties: + objects: + allOf: + - $ref: '#/components/schemas/Model_VoucherResponse' + - type: object + properties: + status: + example: '200' + '400': + description: Bad request + '401': + description: Authentication required + '422': + description: Validation error + content: + application/json: + schema: + $ref: '#/components/schemas/validationError' + '500': + description: Server Error + security: + - api_key: [] + /Voucher/{voucherId}/resetToDraft: + put: + tags: + - Voucher + summary: Reset status to draft + description: > + Resets the status "Draft" (`"status": "50"`). Linked payments will be + unlinked. Created asset depreciation will be reset.
+ + This is not possible if the voucher is already enshrined! + + + You can only change the status from higher to lower ("Open" to + "Draft").
+ + To change to higher status use + [/Voucher/Factory/saveVoucher](#tag/Voucher/operation/voucherFactorySaveVoucher). + operationId: voucherResetToDraft + parameters: + - name: voucherId + in: path + description: ID of the voucher to reset + required: true + schema: + type: integer + responses: + '200': + description: Successful operation - Returns changed voucher + content: + application/json: + schema: + type: object + properties: + objects: + allOf: + - $ref: '#/components/schemas/Model_VoucherResponse' + - type: object + properties: + status: + example: '200' + '400': + description: Bad request + '401': + description: Authentication required + '422': + description: Validation error + content: + application/json: + schema: + $ref: '#/components/schemas/validationError' + '500': + description: Server Error + security: + - api_key: [] + /VoucherPos: + get: + tags: + - VoucherPos + summary: Retrieve voucher positions + description: >- + Retrieve all voucher positions depending on the filters defined in the + query. + operationId: getVoucherPositions + parameters: + - name: voucher[id] + in: query + description: >- + Retrieve all vouchers positions belonging to this voucher. Must be + provided with voucher[objectName] + required: false + explode: false + schema: + type: integer + - name: voucher[objectName] + in: query + description: >- + Only required if voucher[id] was provided. 'Voucher' should be used + as value. + required: false + explode: false + schema: + type: string + responses: + '200': + description: Successful operation + content: + application/json: + schema: + properties: + objects: + type: array + items: + $ref: '#/components/schemas/Model_VoucherPosResponse' + type: object + '400': + description: Bad request + '401': + description: Authentication required + '500': + description: Server Error + deprecated: false + security: + - api_key: [] + /ReceiptGuidance/forAllAccounts: + get: + tags: + - Voucher + summary: Get all account guides + description: >- + You can use this endpoint to help you decide which accounts you can use + when creating a voucher + operationId: forAllAccounts + responses: + '200': + description: Successful operation + content: + application/json: + schema: + properties: + objects: + type: array + items: + $ref: '#/components/schemas/ReceiptGuideDto' + '401': + description: Authentication required + '500': + description: Server Error + security: + - api_key: [] + /ReceiptGuidance/forAccountNumber: + get: + tags: + - Voucher + summary: Get guidance by account number + description: >- + You can use this endpoint to get additional information about the + account that you may want to use. + operationId: forAccountNumber + parameters: + - name: accountNumber + in: query + description: The datev account number you want to get additional information of + required: true + schema: + type: integer + responses: + '200': + description: Successful operation + content: + application/json: + schema: + properties: + objects: + type: array + items: + $ref: '#/components/schemas/ReceiptGuideDto' + '401': + description: Authentication required + '422': + description: The account you requested could not be found. + '500': + description: Server Error + security: + - api_key: [] + /ReceiptGuidance/forTaxRule: + get: + tags: + - Voucher + summary: Get guidance by Tax Rule + description: >- + You can use this endpoint to get additional information about the tax + rule (for example, USTPFL_UMS_EINN) that you may want to use. + operationId: forTaxRule + parameters: + - name: taxRule + in: query + description: The code of the tax rule you want to get guidance for. + required: true + schema: + type: string + example: USTPFL_UMS_EINN + responses: + '200': + description: Successful operation + content: + application/json: + schema: + properties: + objects: + type: array + items: + $ref: '#/components/schemas/ReceiptGuideDto' + '401': + description: Authentication required + '422': + description: No account guides were found for the requested tax rule. + '500': + description: Server Error + security: + - api_key: [] + /ReceiptGuidance/forRevenue: + get: + tags: + - Voucher + summary: Get guidance for revenue accounts + description: >- + Provides all possible combinations for revenue accounts to be used with + revenue receipts/vouchers. + operationId: forRevenue + responses: + '200': + description: Successful operation + content: + application/json: + schema: + properties: + objects: + type: array + items: + $ref: '#/components/schemas/ReceiptGuideDto' + '401': + description: Authentication required + '500': + description: Server Error + security: + - api_key: [] + /ReceiptGuidance/forExpense: + get: + tags: + - Voucher + summary: Get guidance for expense accounts + description: >- + Provides all possible combinations for expense accounts to be used with + expense receipts/vouchers. + operationId: forExpense + responses: + '200': + description: Successful operation + content: + application/json: + schema: + properties: + objects: + type: array + items: + $ref: '#/components/schemas/ReceiptGuideDto' + '401': + description: Authentication required + '500': + description: Server Error + security: + - api_key: [] + /Report/invoicelist: + get: + summary: Export invoice list + description: Export invoice list + operationId: reportInvoice + tags: + - Report + parameters: + - name: download + in: query + schema: + type: boolean + - name: view + in: query + required: true + schema: + type: string + example: all + - name: sevQuery + in: query + required: true + schema: + type: object + required: + - modelName + - objectName + properties: + limit: + type: integer + description: Limit export + example: 999999 + modelName: + description: Model name which is exported + example: Invoice + objectName: + description: SevQuery object name + example: SevQuery + filter: + type: object + properties: + invoiceType: + type: array + description: |- + Type of invoices you want to export + 1. RE - Rechnung + 2. SR - Stornorechnung + 3. TR - Teilrechnung + 4. AR - Abschlagsrechnung + 5. ER - Endrechnung + 6. WKR - Wiederkehrende Rechnung + 7. MA - Mahnung + items: + enum: + - Re + - SR + - TR + - AR + - ER + - WKR + - MA + startDate: + description: Start date of the invoice + type: string + format: date-time + endDate: + description: End date of the invoice + type: string + format: date-time + contact: + description: filters the invoices by contact + type: object + required: + - id + - objectName + properties: + id: + description: ID of the contact + type: integer + objectName: + description: Model name, which is 'Contact' + type: string + example: Contact + startAmount: + description: filters the invoices by amount + type: integer + example: 100 + endAmount: + description: filters the invoices by amount + type: integer + example: 150 + responses: + '200': + description: Successful operation + content: + application/json: + schema: + type: object + properties: + objects: + type: object + properties: + filename: + type: string + example: invoice.pdf + mimetype: + type: string + example: application/pdf + base64Encoded: + type: boolean + example: true + content: + type: string + '400': + description: Bad request + '401': + description: Authentication required + '409': + description: Conflict + '500': + description: Server Error + security: + - api_key: [] + /Report/orderlist: + get: + summary: Export order list + description: Export order list + operationId: reportOrder + tags: + - Report + parameters: + - name: download + in: query + schema: + type: boolean + - name: view + in: query + required: true + schema: + type: string + example: all + - name: sevQuery + in: query + required: true + schema: + type: object + required: + - modelName + - objectName + properties: + limit: + type: integer + description: Limit export + example: 999999 + modelName: + description: Model name which is exported + example: Order + objectName: + description: SevQuery object name + example: SevQuery + filter: + type: object + properties: + orderType: + type: string + description: |- + Type of orders you want to export + 1. AN - Angebote + 2. AB - Aufträge + 3. LI - Lieferscheine + enum: + - AN + - AB + - LI + startDate: + description: Start date of the order + type: string + format: date-time + endDate: + description: End date of the order + type: string + format: date-time + contact: + description: filters the orders by contact + type: object + required: + - id + - objectName + properties: + id: + description: ID of the contact + type: integer + objectName: + description: Model name, which is 'Contact' + type: string + example: Contact + startAmount: + description: filters the orders by amount + type: integer + example: 100 + endAmount: + description: filters the orders by amount + type: integer + example: 150 + responses: + '200': + description: Successful operation + content: + application/json: + schema: + type: object + properties: + objects: + type: object + properties: + filename: + type: string + example: order.pdf + mimetype: + type: string + example: application/pdf + base64Encoded: + type: boolean + example: true + content: + type: string + '400': + description: Bad request + '401': + description: Authentication required + '409': + description: Conflict + '500': + description: Server Error + security: + - api_key: [] + /Report/contactlist: + get: + summary: Export contact list + description: Export contact list + operationId: reportContact + tags: + - Report + parameters: + - name: download + in: query + schema: + type: boolean + - name: sevQuery + in: query + required: true + schema: + type: object + required: + - modelName + - objectName + properties: + limit: + type: integer + description: Limit export + example: 999999 + modelName: + description: Model name which is exported + example: Contact + objectName: + description: SevQuery object name + example: SevQuery + filter: + type: object + properties: + zip: + description: filters the contacts by zip code + type: integer + example: 77656 + city: + description: filters the contacts by city + type: string + example: Offenburg + country: + type: object + required: + - id + - objectName + properties: + id: + description: id of the country + type: integer + example: 1 + objectName: + description: Model name, which is 'StaticCountry' + type: string + example: StaticCountry + depth: + description: export only organisations + type: boolean + onlyPeople: + description: export only people + type: boolean + responses: + '200': + description: Successful operation + content: + application/json: + schema: + type: object + properties: + objects: + type: object + properties: + filename: + type: string + example: contact.pdf + mimetype: + type: string + example: application/pdf + base64Encoded: + type: boolean + example: true + content: + type: string + '400': + description: Bad request + '401': + description: Authentication required + '409': + description: Conflict + '500': + description: Server Error + security: + - api_key: [] + /Report/voucherlist: + get: + summary: Export voucher list + description: Export voucher list + operationId: reportVoucher + tags: + - Report + parameters: + - name: download + in: query + schema: + type: boolean + - name: sevQuery + in: query + required: true + schema: + type: object + required: + - modelName + - objectName + properties: + limit: + type: integer + description: Limit export + example: 999999 + modelName: + description: Model name which is exported + example: Voucher + objectName: + description: SevQuery object name + example: SevQuery + filter: + type: object + properties: + startDate: + description: Start date of the voucher + type: string + format: date-time + endDate: + description: End date of the voucher + type: string + format: date-time + startPayDate: + description: Start pay date of the voucher + type: string + format: date-time + endPayDate: + description: End pay date of the voucher + type: string + format: date-time + contact: + description: filters the vouchers by contact + type: object + required: + - id + - objectName + properties: + id: + description: ID of the contact + type: integer + objectName: + description: Model name, which is 'Contact' + type: string + example: Contact + startAmount: + description: filters the vouchers by amount + type: integer + example: 100 + endAmount: + description: filters the vouchers by amount + type: integer + example: 150 + responses: + '200': + description: Successful operation + content: + application/json: + schema: + type: object + properties: + objects: + type: object + properties: + filename: + type: string + example: voucher.pdf + mimetype: + type: string + example: application/pdf + base64Encoded: + type: boolean + example: true + content: + type: string + '400': + description: Bad request + '401': + description: Authentication required + '409': + description: Conflict + '500': + description: Server Error + security: + - api_key: [] + /Tag: + get: + tags: + - Tag + summary: Retrieve tags + description: Retrieve all tags + operationId: getTags + parameters: + - name: id + in: query + description: ID of the Tag + required: false + schema: + type: number + - name: name + in: query + description: Name of the Tag + required: false + schema: + type: string + responses: + '200': + description: Successful operation + content: + application/json: + schema: + properties: + objects: + type: array + items: + $ref: '#/components/schemas/Model_TagResponse' + '401': + description: Authentication required + '500': + description: Server Error + security: + - api_key: [] + /Tag/{tagId}: + get: + tags: + - Tag + summary: Find tag by ID + description: Returns a single tag + operationId: getTagById + parameters: + - name: tagId + in: path + description: ID of tag to return + required: true + schema: + type: integer + responses: + '200': + description: Successful operation + content: + application/json: + schema: + properties: + objects: + type: array + items: + $ref: '#/components/schemas/Model_TagResponse' + '401': + description: Authentication required + '500': + description: Server Error + security: + - api_key: [] + put: + tags: + - Tag + summary: Update tag + description: Update an existing tag + operationId: updateTag + parameters: + - name: tagId + in: path + description: ID of tag you want to update + required: true + schema: + type: integer + requestBody: + content: + application/json: + schema: + properties: + name: + description: The name of the tag u want to update + type: string + responses: + '200': + description: Successful operation + content: + application/json: + schema: + $ref: '#/components/schemas/Model_TagResponse' + '401': + description: Authentication required + '500': + description: Server Error + security: + - api_key: [] + delete: + tags: + - Tag + summary: Deletes a tag + operationId: deleteTag + parameters: + - name: tagId + in: path + description: Id of tag to delete + required: true + schema: + type: integer + responses: + '200': + description: Successful operation - tag deleted + content: + application/json: + schema: + properties: + objects: + type: array + items: + default: null + type: object + '400': + description: Bad request + '401': + description: Authentication required + '409': + description: Conflict + '500': + description: Server Error + security: + - api_key: [] + /Tag/Factory/create: + post: + tags: + - Tag + summary: Create a new tag + description: Create a new tag + operationId: createTag + requestBody: + content: + application/json: + schema: + required: + - object + properties: + name: + description: Name of the tag + type: string + object: + required: + - id + - objectName + properties: + id: + description: Id of the invoice/order/voucher/creditNote + type: integer + example: 1 + objectName: + description: Model name + type: string + example: Invoice + enum: + - Invoice + - Voucher + - Order + - CreditNote + type: object + responses: + '200': + description: Successful operation + content: + application/json: + schema: + $ref: '#/components/schemas/Model_TagCreateResponse' + '401': + description: Authentication required + '500': + description: Server Error + security: + - api_key: [] + /TagRelation: + get: + tags: + - Tag + summary: Retrieve tag relations + description: Retrieve all tag relations + operationId: getTagRelations + responses: + '200': + description: Successful operation + content: + application/json: + schema: + properties: + objects: + type: array + items: + $ref: '#/components/schemas/Model_TagCreateResponse' + '401': + description: Authentication required + '500': + description: Server Error + security: + - api_key: [] +components: + schemas: + Model_CheckAccountResponse: + title: CheckAccount model + description: CheckAccount model. Responsible for the payment accounts. + properties: + id: + description: The check account id + type: string + readOnly: true + example: '2' + objectName: + description: The check account object name + type: string + example: CheckAccount + readOnly: true + create: + description: Date of check account creation + type: string + format: date-time + example: '2024-06-28T14:42:58+02:00' + readOnly: true + update: + description: Date of last check account update + type: string + format: date-time + example: '2024-06-28T14:42:58+02:00' + readOnly: true + sevClient: + description: Client to which check account belongs. Will be filled automatically + required: + - id + - objectName + properties: + id: + description: Unique identifier of the client + type: string + example: '0' + objectName: + description: Model name, which is 'SevClient' + type: string + example: SevClient + type: object + readOnly: true + name: + description: Name of the check account + type: string + example: Iron Bank + iban: + description: The IBAN of the account + type: string + nullable: true + example: DE02100500000054540402 + type: + description: "The type of the check account. Account with a CSV or MT940 import are regarded as online.
\r\n Apart from that, created check accounts over the API need to be offline, as online accounts with an active connection\r\n to a bank application can not be managed over the API." + type: string + enum: + - online + - offline + example: online + importType: + description: >- + Import type, for accounts that are type "online" but not connected + to a data provider. Transactions can be imported by this method on + the check account. + type: string + enum: + - CSV + - MT940 + - null + example: CSV + nullable: true + currency: + description: The currency of the check account. + type: string + example: EUR + defaultAccount: + description: Defines if this check account is the default account. + type: string + default: '0' + status: + description: Status of the check account. 0 <-> Archived - 100 <-> Active + type: string + default: '100' + enum: + - '0' + - '100' + example: '100' + bankServer: + description: >- + Bank server of check account, only set if the account is connected + to a data provider + type: string + nullable: true + example: FINAPI + autoMapTransactions: + description: >- + Defines if transactions on this account are automatically mapped to + invoice and vouchers when imported if possible. + type: string + default: '1' + nullable: true + accountingNumber: + description: >- + The booking account used for this bank account, e.g. 1800 in SKR04 + and 1200 in SKR03. Must be unique among all your CheckAccounts. + Ignore to use a sensible default. + type: string + example: '1800' + type: object + Model_CheckAccount: + title: CheckAccount model + description: CheckAccount model. Responsible for the payment accounts. + required: + - name + - type + - currency + - status + properties: + id: + description: The check account id + type: integer + readOnly: true + nullable: false + objectName: + description: The check account object name + type: string + readOnly: true + nullable: false + create: + description: Date of check account creation + type: string + format: date-time + readOnly: true + update: + description: Date of last check account update + type: string + format: date-time + readOnly: true + sevClient: + description: Client to which check account belongs. Will be filled automatically + required: + - id + - objectName + properties: + id: + description: Unique identifier of the client + type: integer + objectName: + description: Model name, which is 'SevClient' + type: string + type: object + readOnly: true + name: + description: Name of the check account + type: string + example: Iron Bank + nullable: false + type: + description: "The type of the check account. Account with a CSV or MT940 import are regarded as online.
\r\n Apart from that, created check accounts over the API need to be offline, as online accounts with an active connection\r\n to a bank application can not be managed over the API." + type: string + enum: + - online + - offline + example: online + nullable: false + importType: + description: >- + Import type. Transactions can be imported by this method on the + check account. + type: string + enum: + - CSV + - MT940 + - null + example: CSV + nullable: true + currency: + description: The currency of the check account. + type: string + example: EUR + nullable: false + defaultAccount: + description: Defines if this check account is the default account. + type: integer + default: 0 + enum: + - 0 + - 1 + status: + description: Status of the check account. 0 <-> Archived - 100 <-> Active + type: integer + default: 100 + enum: + - 0 + - 100 + nullable: false + bankServer: + description: Bank server of check account + type: string + readOnly: true + autoMapTransactions: + description: >- + Defines if transactions on this account are automatically mapped to + invoice and vouchers when imported if possible. + type: integer + default: 1 + nullable: true + accountingNumber: + description: >- + The booking account used for this bank account, e.g. 1800 in SKR04 + and 1200 in SKR03. Must be unique among all your CheckAccounts. + Ignore to use a sensible default. + type: string + type: object + createFileImportAccount: + title: Data to create a file import account + type: object + properties: + name: + description: Name of the check account + type: string + example: Iron Bank + importType: + description: >- + Import type. Transactions can be imported by this method on the + check account. + type: string + enum: + - CSV + - MT940 + example: CSV + accountingNumber: + description: >- + The booking account used for this bank account, e.g. 1800 in SKR04 + and 1200 in SKR03. Must be unique among all your CheckAccounts. + Ignore to use a sensible default. + type: integer + example: 1800 + nullable: true + iban: + description: IBAN of the bank account, without spaces + type: string + example: DE02100500000054540402 + nullable: true + createFileImportAccountResponse: + title: CheckAccount model + description: >- + CheckAccount model. Showing the properties relevant to file import + accounts. + properties: + id: + description: The check account id + type: string + example: '2' + objectName: + description: The check account object name, always 'CheckAccount' + type: string + example: CheckAccount + create: + description: Date of check account creation + type: string + format: date-time + example: '2024-06-28T14:42:58+02:00' + update: + description: Date of last check account update + type: string + format: date-time + example: '2024-06-28T14:42:58+02:00' + sevClient: + description: Client to which check account belongs. Will be filled automatically + required: + - id + - objectName + properties: + id: + description: Unique identifier of the client + type: string + example: '0' + objectName: + description: Model name, which is 'SevClient' + type: string + example: SevClient + type: object + name: + description: Name of the check account + type: string + example: Iron Bank + iban: + description: The IBAN of the account + type: string + nullable: true + example: DE02100500000054540402 + type: + description: >- + The type of the check account. Account with a CSV or MT940 import + are regarded as online. + type: string + enum: + - online + - offline + example: online + importType: + description: >- + Import type, for accounts that are type "online" but not connected + to a data provider. Transactions can be imported by this method on + the check account. + type: string + enum: + - CSV + - MT940 + example: CSV + currency: + description: The currency of the check account. + type: string + example: EUR + defaultAccount: + description: Defines if this check account is the default account. + type: string + enum: + - '0' + - '1' + default: '0' + status: + description: Status of the check account. 0 <-> Archived - 100 <-> Active + type: string + default: '100' + enum: + - '0' + - '100' + example: '100' + autoMapTransactions: + description: >- + Defines if transactions on this account are automatically mapped to + invoice and vouchers when imported if possible. + type: string + enum: + - '0' + - '1' + default: '1' + accountingNumber: + description: >- + The booking account used for this bank account, e.g. 1800 in SKR04 + and 1200 in SKR03. Must be unique among all your CheckAccounts. + Ignore to use a sensible default. + type: string + example: '1800' + type: object + createClearingAccount: + title: Data to create a clearing account + type: object + properties: + name: + description: Name of the check account + type: string + example: Coupons + accountingNumber: + description: >- + The booking account used for this clearing account, e.g. 3320 in + SKR04 and 1723 in SKR03. Must be unique among all your + CheckAccounts. Ask your tax consultant what to choose. + type: integer + nullable: true + createClearingAccountResponse: + title: CheckAccount model + description: >- + CheckAccount model. Showing the properties relevant to clearing + accounts. + properties: + id: + description: The check account id + type: string + example: '2' + objectName: + description: The check account object name, always 'CheckAccount' + type: string + example: CheckAccount + create: + description: Date of check account creation + type: string + format: date-time + example: '2024-06-28T14:42:58+02:00' + update: + description: Date of last check account update + type: string + format: date-time + example: '2024-06-28T14:42:58+02:00' + sevClient: + description: Client to which check account belongs. Will be filled automatically + required: + - id + - objectName + properties: + id: + description: Unique identifier of the client + type: string + example: '0' + objectName: + description: Model name, which is 'SevClient' + type: string + example: SevClient + type: object + name: + description: Name of the check account + type: string + example: Coupons + type: + description: >- + The type of the check account. Clearing accounts are regarded as + offline. + type: string + enum: + - online + - offline + example: offline + currency: + description: The currency of the check account. + type: string + example: EUR + defaultAccount: + description: Defines if this check account is the default account. + type: string + enum: + - '0' + - '1' + default: '0' + status: + description: Status of the check account. 0 <-> Archived - 100 <-> Active + type: string + default: '100' + enum: + - '0' + - '100' + example: '100' + accountingNumber: + description: The booking account used for this clearing account. + type: string + example: '3320' + type: object + Model_CheckAccountUpdate: + title: CheckAccount model + description: CheckAccount model. Responsible for the payment accounts. + properties: + name: + description: Name of the check account + type: string + example: Iron Bank + type: + description: "The type of the check account. Account with a CSV or MT940 import are regarded as online.
\r\n Apart from that, created check accounts over the API need to be offline, as online accounts with an active connection\r\n to a bank application can not be managed over the API." + type: string + enum: + - online + - offline + example: online + importType: + description: >- + Import type. Transactions can be imported by this method on the + check account. + type: string + enum: + - CSV + - MT940 + - null + example: CSV + nullable: true + currency: + description: The currency of the check account. + type: string + example: EUR + defaultAccount: + description: Defines if this check account is the default account. + type: integer + default: 0 + enum: + - 0 + - 1 + status: + description: Status of the check account. 0 <-> Archived - 100 <-> Active + type: integer + default: 100 + enum: + - 0 + - 100 + autoMapTransactions: + description: >- + Defines if transactions on this account are automatically mapped to + invoice and vouchers when imported if possible. + type: integer + default: 1 + nullable: true + accountingNumber: + description: >- + The booking account used for this bank account, e.g. 1800 in SKR04 + and 1200 in SKR03. Must be unique among all your CheckAccounts. + Ignore to use a sensible default. + type: string + type: object + Model_CheckAccountTransactionResponse: + title: CheckAccountTransaction model + description: >- + CheckAccountTransaction model. Responsible for the transactions on + payment accounts. + properties: + id: + description: The check account transaction id + type: string + example: '0' + readOnly: true + objectName: + description: The check account transaction object name + type: string + example: CheckAccountTransaction + readOnly: true + create: + description: Date of check account transaction creation + type: string + format: date-time + readOnly: true + update: + description: Date of last check account transaction update + type: string + format: date-time + readOnly: true + sevClient: + description: >- + Client to which check account transaction belongs. Will be filled + automatically + required: + - id + - objectName + properties: + id: + description: Unique identifier of the client + type: string + example: '0' + objectName: + description: Model name, which is 'SevClient' + type: string + example: SevClient + type: object + readOnly: true + valueDate: + description: Date the check account transaction was imported + type: string + format: date-time + example: '2024-05-10T00:00:00+02:00' + entryDate: + description: Date the check account transaction was booked + type: string + format: date-time + example: '2024-05-10T00:00:00+02:00' + nullable: true + paymtPurpose: + description: The purpose of the transaction + type: string + example: salary + nullable: true + amount: + description: Amount of the transaction + type: string + example: '-100.32' + payeePayerName: + description: Name of the other party + type: string + example: Cercei Lannister + nullable: true + payeePayerAcctNo: + description: IBAN or account number of the other party + type: string + nullable: true + payeePayerBankCode: + description: BIC or bank code of the other party + type: string + nullable: true + checkAccount: + description: The check account to which the transaction belongs + required: + - id + - objectName + properties: + id: + description: Unique identifier of the check account + type: string + example: '0' + objectName: + description: Model name, which is 'CheckAccount' + type: string + example: CheckAccount + type: object + readOnly: true + status: + description: "Status of the check account transaction.
\r\n 100 <-> Created
\r\n 200 <-> Linked
\r\n 300 <-> Private
\r\n 400 <-> Booked" + type: string + readOnly: true + enum: + - '100' + - '200' + - '300' + - '400' + sourceTransaction: + description: The check account transaction serving as the source of the rebooking + required: + - id + - objectName + properties: + id: + description: Unique identifier of the check account transaction + type: string + example: '0' + objectName: + description: Model name, which is 'CheckAccountTransaction' + type: string + example: CheckAccountTransaction + type: object + readOnly: true + targetTransaction: + description: The check account transaction serving as the target of the rebooking + required: + - id + - objectName + properties: + id: + description: Unique identifier of the check account transaction + type: string + example: '0' + objectName: + description: Model name, which is 'CheckAccountTransaction' + type: string + default: CheckAccountTransaction + type: object + readOnly: true + enshrined: + description: > + Can only be set via + [CheckAccountTransaction/{checkAccountTransactionId}/enshrine](#tag/CheckAccountTransaction/operation/checkAccountTransactionEnshrine) + type: string + format: date-time + readOnly: true + type: object + Model_CheckAccountTransaction: + title: CheckAccountTransaction model + description: >- + CheckAccountTransaction model. Responsible for the transactions on + payment accounts. + type: object + required: + - valueDate + - checkAccount + - amount + - status + - payeePayerName + properties: + id: + description: The check account transaction id + type: integer + readOnly: true + objectName: + description: The check account transaction object name + type: string + readOnly: true + create: + description: Date of check account transaction creation + type: string + format: date-time + readOnly: true + update: + description: Date of last check account transaction update + type: string + format: date-time + readOnly: true + sevClient: + description: >- + Client to which check account transaction belongs. Will be filled + automatically + required: + - id + - objectName + properties: + id: + description: Unique identifier of the client + type: integer + objectName: + description: Model name, which is 'SevClient' + type: string + type: object + readOnly: true + valueDate: + description: Date the check account transaction was booked + type: string + format: date-time + example: '2024-05-10T00:00:00+02:00' + entryDate: + description: Date the check account transaction was imported + type: string + format: date-time + example: '2024-05-10T00:00:00+02:00' + nullable: true + paymtPurpose: + description: The purpose of the transaction + type: string + example: salary + nullable: true + amount: + description: Amount of the transaction + type: number + format: float + example: 100.1 + nullable: false + payeePayerName: + description: Name of the other party + type: string + example: Cercei Lannister + nullable: true + payeePayerAcctNo: + description: IBAN or account number of the other party + type: string + nullable: true + payeePayerBankCode: + description: BIC or bank code of the other party + type: string + nullable: true + checkAccount: + description: The check account to which the transaction belongs + required: + - id + - objectName + properties: + id: + description: Unique identifier of the check account + type: integer + objectName: + description: Model name, which is 'CheckAccount' + type: string + default: CheckAccount + type: object + nullable: false + status: + description: "Status of the check account transaction.
\r\n 100 <-> Created
\r\n 200 <-> Linked
\r\n 300 <-> Private
\r\n 400 <-> Booked" + type: integer + nullable: false + enum: + - 100 + - 200 + - 300 + - 400 + sourceTransaction: + description: The check account transaction serving as the source of the rebooking + required: + - id + - objectName + properties: + id: + description: Unique identifier of the check account transaction + type: integer + objectName: + description: Model name, which is 'CheckAccountTransaction' + type: string + default: CheckAccountTransaction + type: object + nullable: true + targetTransaction: + description: The check account transaction serving as the target of the rebooking + required: + - id + - objectName + properties: + id: + description: Unique identifier of the check account transaction + type: integer + objectName: + description: Model name, which is 'CheckAccountTransaction' + type: string + default: CheckAccountTransaction + type: object + nullable: true + Model_CheckAccountTransactionUpdate: + title: CheckAccountTransaction model + description: >- + CheckAccountTransaction model. Responsible for the transactions on + payment accounts. + properties: + valueDate: + description: Date the check account transaction was booked + type: string + format: date-time + example: '2024-05-10T00:00:00+02:00' + entryDate: + description: Date the check account transaction was imported + type: string + format: date-time + example: '2024-05-10T00:00:00+02:00' + nullable: true + paymtPurpose: + description: the purpose of the transaction + type: string + example: salary + amount: + description: Amount of the transaction + type: number + format: float + example: 100 + nullable: true + payeePayerName: + description: Name of the payee/payer + type: string + example: Cercei Lannister + nullable: true + checkAccount: + description: The check account to which the transaction belongs + required: + - id + - objectName + properties: + id: + description: Unique identifier of the check account + type: integer + objectName: + description: Model name, which is 'CheckAccount' + type: string + default: CheckAccount + type: object + status: + description: "Status of the check account transaction.
\r\n 100 <-> Created
\r\n 200 <-> Linked
\r\n 300 <-> Private
\r\n 400 <-> Booked" + type: integer + enum: + - 100 + - 200 + - 300 + - 400 + sourceTransaction: + description: The check account transaction serving as the source of the rebooking + required: + - id + - objectName + properties: + id: + description: Unique identifier of the check account transaction + type: integer + objectName: + description: Model name, which is 'CheckAccountTransaction' + type: string + default: CheckAccountTransaction + type: object + nullable: true + targetTransaction: + description: The check account transaction serving as the target of the rebooking + required: + - id + - objectName + properties: + id: + description: Unique identifier of the check account transaction + type: integer + objectName: + description: Model name, which is 'CheckAccountTransaction' + type: string + default: CheckAccountTransaction + type: object + nullable: true + type: object + validationError: + type: object + properties: + error: + type: object + properties: + message: + type: string + exceptionUUID: + type: string + description: >- + An identifier of this exact problem that can be given to the + support team. + Model_ContactResponse: + title: Contact model + description: Contact model + properties: + id: + description: The contact id + type: string + example: '0' + readOnly: true + objectName: + description: The contact object name + type: string + example: Contact + readOnly: true + create: + description: Date of contact creation + type: string + format: date-time + readOnly: true + update: + description: Date of last contact update + type: string + format: date-time + readOnly: true + name: + description: >- + The organization name.
+ + Be aware that the type of contact will depend on this attribute.
+ + If it holds a value, the contact will be regarded as an + organization. + type: string + example: string + readOnly: true + status: + description: >- + Defines the status of the contact. 100 <-> Lead - 500 <-> Pending - + 1000 <-> Active. + type: string + example: '100' + readOnly: true + customerNumber: + description: The customer number + type: string + example: Customer-1337 + readOnly: true + parent: + description: >- + The parent contact to which this contact belongs. Must be an + organization. + required: + - id + - objectName + properties: + id: + description: Unique identifier of the parent contact + type: string + example: '0' + objectName: + description: Model name, which is 'Contact' + type: string + example: Contact + type: object + readOnly: true + surename: + description: |- + The first name of the contact.
+ Yeah... not quite right in literally every way. We know.
+ Not to be used for organizations. + type: string + example: John + readOnly: true + familyname: + description: |- + The last name of the contact.
+ Not to be used for organizations. + type: string + example: Snow + readOnly: true + titel: + description: |- + A non-academic title for the contact. + Not to be used for organizations. + type: string + example: Commander + readOnly: true + category: + description: "Category of the contact.
For more information,\r\n see here." + required: + - id + - objectName + properties: + id: + description: Unique identifier of the category + type: string + example: '3' + objectName: + description: Model name, which is 'Category' + type: string + example: Category + type: object + readOnly: true + description: + description: A description for the contact. + type: string + example: Rightful king of the seven kingdoms + readOnly: true + academicTitle: + description: |- + A academic title for the contact. + Not to be used for organizations. + type: string + readOnly: true + gender: + description: |- + Gender of the contact.
+ Not to be used for organizations. + type: string + readOnly: true + sevClient: + description: Client to which contact belongs. Will be filled automatically + required: + - id + - objectName + properties: + id: + description: Unique identifier of the client + type: integer + example: '0' + objectName: + description: Model name, which is 'SevClient' + type: string + example: SevClient + type: object + readOnly: true + name2: + description: |- + Second name of the contact.
+ Not to be used for organizations. + type: string + example: Targaryen + readOnly: true + birthday: + description: |- + Birthday of the contact.
+ Not to be used for organizations. + type: string + format: date + readOnly: true + vatNumber: + description: Vat number of the contact. + type: string + readOnly: true + bankAccount: + description: Bank account number (IBAN) of the contact. + type: string + readOnly: true + bankNumber: + description: Bank number of the bank used by the contact. + type: string + readOnly: true + defaultCashbackTime: + description: >- + Absolute time in days which the contact has to pay his invoices and + subsequently get a cashback. + type: string + example: string + readOnly: true + defaultCashbackPercent: + description: >- + Percentage of the invoice sum the contact gets back if he paid + invoices in time. + type: string + format: float + example: string + readOnly: true + defaultTimeToPay: + description: >- + The payment goal in days which is set for every invoice of the + contact. + type: string + example: string + readOnly: true + taxNumber: + description: The tax number of the contact. + type: string + readOnly: true + taxOffice: + description: The tax office of the contact (only for greek customers). + type: string + example: string + readOnly: true + exemptVat: + description: Defines if the contact is freed from paying vat. + type: string + example: 'false' + readOnly: true + defaultDiscountAmount: + description: >- + The default discount the contact gets for every invoice.
+ + Depending on defaultDiscountPercentage attribute, in percent or + absolute value. + type: string + format: float + example: string + readOnly: true + defaultDiscountPercentage: + description: >- + Defines if the discount is a percentage (true) or an absolute value + (false). + type: string + example: 'false' + readOnly: true + buyerReference: + description: Buyer reference of the contact. + example: string + type: string + readOnly: true + governmentAgency: + description: >- + Defines whether the contact is a government agency (true) or not + (false). + type: string + example: 'false' + readOnly: true + additionalInformation: + description: Additional information stored for the contact. + type: string + example: string + readOnly: true + deprecated: true + type: object + Model_Contact: + title: Contact model + description: Contact model + required: + - category + properties: + name: + description: >- + The organization name.
+ + Be aware that the type of contact will depend on this attribute.
+ + If it holds a value, the contact will be regarded as an + organization. + type: string + nullable: true + status: + description: >- + Defines the status of the contact. 100 <-> Lead - 500 <-> Pending - + 1000 <-> Active. + type: integer + default: 100 + nullable: true + customerNumber: + description: The customer number + type: string + example: Customer-1337 + nullable: true + parent: + description: >- + The parent contact to which this contact belongs. Must be an + organization. + required: + - id + - objectName + properties: + id: + description: Unique identifier of the parent contact + type: integer + objectName: + description: Model name, which is 'Contact' + type: string + example: Contact + type: object + nullable: true + surename: + description: |- + The first name of the contact.
+ Yeah... not quite right in literally every way. We know.
+ Not to be used for organizations. + type: string + example: John + nullable: true + familyname: + description: |- + The last name of the contact.
+ Not to be used for organizations. + type: string + example: Snow + nullable: true + titel: + description: |- + A non-academic title for the contact. + Not to be used for organizations. + type: string + example: Commander + nullable: true + category: + description: "Category of the contact.
For more information,\r\n see here." + required: + - id + - objectName + properties: + id: + description: Unique identifier of the category + type: integer + example: 3 + objectName: + description: Model name, which is 'Category' + type: string + example: Category + type: object + nullable: false + description: + description: A description for the contact. + type: string + example: Rightful king of the seven kingdoms + nullable: true + academicTitle: + description: |- + A academic title for the contact. + Not to be used for organizations. + type: string + nullable: true + gender: + description: |- + Gender of the contact.
+ Not to be used for organizations. + type: string + nullable: true + name2: + description: |- + Second name of the contact.
+ Not to be used for organizations. + type: string + example: Targaryen + nullable: true + birthday: + description: |- + Birthday of the contact.
+ Not to be used for organizations. + type: string + format: date + nullable: true + vatNumber: + description: Vat number of the contact. + type: string + nullable: true + bankAccount: + description: Bank account number (IBAN) of the contact. + type: string + nullable: true + bankNumber: + description: Bank number of the bank used by the contact. + type: string + nullable: true + defaultCashbackTime: + description: >- + Absolute time in days which the contact has to pay his invoices and + subsequently get a cashback. + type: integer + nullable: true + defaultCashbackPercent: + description: >- + Percentage of the invoice sum the contact gets back if he paid + invoices in time. + type: number + format: float + nullable: true + defaultTimeToPay: + description: >- + The payment goal in days which is set for every invoice of the + contact. + type: integer + nullable: true + taxNumber: + description: The tax number of the contact. + type: string + nullable: true + taxOffice: + description: The tax office of the contact (only for greek customers). + type: string + nullable: true + exemptVat: + description: Defines if the contact is freed from paying vat. + type: boolean + nullable: true + defaultDiscountAmount: + description: >- + The default discount the contact gets for every invoice.
+ + Depending on defaultDiscountPercentage attribute, in percent or + absolute value. + type: number + format: float + nullable: true + defaultDiscountPercentage: + description: >- + Defines if the discount is a percentage (true) or an absolute value + (false). + type: boolean + nullable: true + buyerReference: + description: Buyer reference of the contact. + type: string + nullable: true + governmentAgency: + description: >- + Defines whether the contact is a government agency (true) or not + (false). + type: boolean + nullable: true + type: object + Model_ContactUpdate: + title: Contact model + description: Contact model + properties: + name: + description: >- + The organization name.
+ + Be aware that the type of contact will depend on this attribute.
+ + If it holds a value, the contact will be regarded as an + organization. + type: string + nullable: true + status: + description: >- + Defines the status of the contact. 100 <-> Lead - 500 <-> Pending - + 1000 <-> Active. + type: integer + default: 100 + nullable: true + customerNumber: + description: The customer number + type: string + example: Customer-1337 + nullable: true + parent: + description: >- + The parent contact to which this contact belongs. Must be an + organization. + required: + - id + - objectName + properties: + id: + description: Unique identifier of the parent contact + type: integer + objectName: + description: Model name, which is 'Contact' + type: string + type: object + nullable: true + surename: + description: |- + The first name of the contact.
+ Yeah... not quite right in literally every way. We know.
+ Not to be used for organizations. + type: string + example: John + nullable: true + familyname: + description: |- + The last name of the contact.
+ Not to be used for organizations. + type: string + example: Snow + nullable: true + titel: + description: |- + A non-academic title for the contact. + Not to be used for organizations. + type: string + example: Commander + nullable: true + category: + description: "Category of the contact.
For more information,\r\n see here." + required: + - id + - objectName + properties: + id: + description: Unique identifier of the category + type: integer + example: 3 + objectName: + description: Model name, which is 'Category' + type: string + example: Category + type: object + nullable: true + description: + description: A description for the contact. + type: string + example: Rightful king of the seven kingdoms + nullable: true + academicTitle: + description: |- + A academic title for the contact. + Not to be used for organizations. + type: string + nullable: true + gender: + description: |- + Gender of the contact.
+ Not to be used for organizations. + type: string + nullable: true + name2: + description: |- + Second name of the contact.
+ Not to be used for organizations. + type: string + example: Targaryen + nullable: true + birthday: + description: |- + Birthday of the contact.
+ Not to be used for organizations. + type: string + format: date + nullable: true + vatNumber: + description: Vat number of the contact. + type: string + nullable: true + bankAccount: + description: Bank account number (IBAN) of the contact. + type: string + nullable: true + bankNumber: + description: Bank number of the bank used by the contact. + type: string + nullable: true + defaultCashbackTime: + description: >- + Absolute time in days which the contact has to pay his invoices and + subsequently get a cashback. + type: integer + nullable: true + defaultCashbackPercent: + description: >- + Percentage of the invoice sum the contact gets back if he paid + invoices in time. + type: number + format: float + nullable: true + defaultTimeToPay: + description: >- + The payment goal in days which is set for every invoice of the + contact. + type: integer + nullable: true + taxNumber: + description: The tax number of the contact. + type: string + nullable: true + taxOffice: + description: The tax office of the contact (only for greek customers). + type: string + nullable: true + exemptVat: + description: Defines if the contact is freed from paying vat. + type: boolean + nullable: true + defaultDiscountAmount: + description: >- + The default discount the contact gets for every invoice.
+ + Depending on defaultDiscountPercentage attribute, in percent or + absolute value. + type: number + format: float + nullable: true + defaultDiscountPercentage: + description: >- + Defines if the discount is a percentage (true) or an absolute value + (false). + type: boolean + nullable: true + buyerReference: + description: Buyer reference of the contact. + type: string + nullable: true + governmentAgency: + description: >- + Defines whether the contact is a government agency (true) or not + (false). + type: boolean + nullable: true + type: object + Model_ContactAddressResponse: + title: Contact address + description: ContactAddress model + required: + - contact + - country + properties: + id: + description: The contact address id + type: integer + readOnly: true + nullable: false + objectName: + description: The contact address object name + type: string + readOnly: true + nullable: false + example: ContactAddress + create: + description: Date of contact address creation + type: string + format: date-time + readOnly: true + update: + description: Date of last contact address update + type: string + format: date-time + readOnly: true + contact: + description: The contact to which this contact address belongs. + required: + - id + - objectName + properties: + id: + description: Unique identifier of the contact + type: integer + objectName: + description: Model name, which is 'Contact' + type: string + example: Contact + type: object + nullable: false + street: + description: Street name + type: string + example: South road 15 + nullable: true + zip: + description: Zib code + type: string + example: '12345' + nullable: true + city: + description: City name + type: string + example: The North + nullable: true + country: + description: "Country of the contact address.
\r\n For all countries, send a GET to /StaticCountry" + required: + - id + - objectName + properties: + id: + description: Unique identifier of the country + type: integer + objectName: + description: Model name, which is 'StaticCountry' + type: string + example: StaticCountry + type: object + nullable: false + category: + description: "Category of the contact address.
\r\n For all categories, send a GET to /Category?objectType=ContactAddress." + required: + - id + - objectName + properties: + id: + description: Unique identifier of the category + type: integer + objectName: + description: Model name, which is 'Category' + type: string + type: object + nullable: true + name: + description: Name in address + type: string + example: John Snow + nullable: true + sevClient: + description: >- + Client to which contact address belongs. Will be filled + automatically + required: + - id + - objectName + properties: + id: + description: Unique identifier of the client + type: integer + objectName: + description: Model name, which is 'SevClient' + type: string + type: object + readOnly: true + name2: + description: Second name in address + type: string + example: Targaryen + name3: + description: Third name in address + type: string + nullable: true + name4: + description: Fourth name in address + type: string + nullable: true + type: object + Model_ContactAddress: + title: Contact address + description: ContactAddress model + required: + - contact + - country + - category + properties: + id: + description: The contact address id + type: integer + readOnly: true + nullable: false + objectName: + description: The contact address object name + type: string + readOnly: true + nullable: false + create: + description: Date of contact address creation + type: string + format: date-time + readOnly: true + update: + description: Date of last contact address update + type: string + format: date-time + readOnly: true + contact: + description: The contact to which this contact address belongs. + required: + - id + - objectName + properties: + id: + description: Unique identifier of the contact + type: integer + objectName: + description: Model name, which is 'Contact' + type: string + example: Contact + type: object + nullable: false + street: + description: Street name + type: string + example: South road 15 + nullable: true + zip: + description: Zib code + type: string + example: '12345' + nullable: true + city: + description: City name + type: string + example: The North + nullable: true + country: + description: "Country of the contact address.
\r\n For all countries, send a GET to /StaticCountry" + required: + - id + - objectName + properties: + id: + description: Unique identifier of the country + type: integer + objectName: + description: Model name, which is 'StaticCountry' + type: string + example: StaticCountry + type: object + nullable: false + category: + description: "Category of the contact address.
\r\n For all categories, send a GET to /Category?objectType=ContactAddress." + required: + - id + - objectName + properties: + id: + description: Unique identifier of the category + type: integer + objectName: + description: Model name, which is 'Category' + type: string + type: object + nullable: true + name: + description: Name in address + type: string + example: John Snow + nullable: true + sevClient: + description: >- + Client to which contact address belongs. Will be filled + automatically + required: + - id + - objectName + properties: + id: + description: Unique identifier of the client + type: integer + objectName: + description: Model name, which is 'SevClient' + type: string + type: object + readOnly: true + name2: + description: Second name in address + type: string + example: Targaryen + name3: + description: Third name in address + type: string + nullable: true + name4: + description: Fourth name in address + type: string + nullable: true + type: object + Model_ContactAddressUpdate: + title: Contact address + description: ContactAddress model + properties: + contact: + description: The contact to which this contact address belongs. + required: + - id + - objectName + properties: + id: + description: Unique identifier of the contact + type: integer + objectName: + description: Model name, which is 'Contact' + type: string + example: Contact + type: object + nullable: true + street: + description: Street name + type: string + example: South road 15 + nullable: true + zip: + description: Zib code + type: string + example: '12345' + nullable: true + city: + description: City name + type: string + example: The North + nullable: true + country: + description: "Country of the contact address.
\r\n For all countries, send a GET to /StaticCountry" + required: + - id + - objectName + properties: + id: + description: Unique identifier of the country + type: integer + objectName: + description: Model name, which is 'StaticCountry' + type: string + example: StaticCountry + type: object + nullable: true + category: + description: "Category of the contact address.
\r\n For all categories, send a GET to /Category?objectType=ContactAddress." + required: + - id + - objectName + properties: + id: + description: Unique identifier of the category + type: integer + objectName: + description: Model name, which is 'Category' + type: string + type: object + nullable: true + name: + description: Name in address + type: string + example: John Snow + nullable: true + name2: + description: Second name in address + type: string + example: Targaryen + name3: + description: Third name in address + type: string + nullable: true + name4: + description: Fourth name in address + type: string + nullable: true + type: object + Model_CommunicationWayResponse: + title: CommunicationWay model + description: Contact communication way model + properties: + id: + description: The communication way id + type: string + example: '0' + readOnly: true + objectName: + description: The communication way object name + type: string + example: CommunicationWay + readOnly: true + create: + description: Date of communication way creation + type: string + format: date-time + readOnly: true + update: + description: Date of last communication way update + type: string + format: date-time + readOnly: true + contact: + description: The contact to which this communication way belongs. + required: + - id + - objectName + properties: + id: + description: Unique identifier of the contact + type: string + example: '0' + objectName: + description: Model name, which is 'Contact' + type: string + example: Contact + type: object + readOnly: true + type: + description: Type of the communication way + type: string + enum: + - EMAIL + - PHONE + - WEB + - MOBILE + example: EMAIL + readOnly: true + value: + description: "The value of the communication way.
\r\n For example the phone number, e-mail address or website." + type: string + readOnly: true + key: + description: >- + The key of the communication way.
+ + Similar to the category of addresses.
+ + For all communication way keys please send a GET to + /CommunicationWayKey. + required: + - id + - objectName + properties: + id: + description: Unique identifier of the key + type: string + example: '0' + objectName: + description: Model name, which is 'CommunicationWayKey' + type: string + example: CommunicationWayKey + type: object + readOnly: true + main: + description: >- + Defines whether the communication way is the main communication way + for the contact. + type: string + example: '0' + readOnly: true + sevClient: + description: >- + Client to which communication way key belongs. Will be filled + automatically + required: + - id + - objectName + properties: + id: + description: Unique identifier of the client + type: string + example: '0' + objectName: + description: Model name, which is 'SevClient' + type: string + example: SevClient + type: object + readOnly: true + type: object + Model_CommunicationWay: + title: CommunicationWay model + description: Contact communication way model + required: + - type + - value + - key + properties: + id: + description: The communication way id + type: integer + readOnly: true + nullable: false + objectName: + description: The communication way object name + type: string + readOnly: true + nullable: false + create: + description: Date of communication way creation + type: string + format: date-time + readOnly: true + update: + description: Date of last communication way update + type: string + format: date-time + readOnly: true + contact: + description: The contact to which this communication way belongs. + required: + - id + - objectName + properties: + id: + description: Unique identifier of the contact + type: integer + objectName: + description: Model name, which is 'Contact' + type: string + example: Contact + type: object + nullable: false + type: + description: Type of the communication way + type: string + enum: + - EMAIL + - PHONE + - WEB + - MOBILE + example: EMAIL + value: + description: "The value of the communication way.
\r\n For example the phone number, e-mail address or website." + type: string + key: + description: >- + The key of the communication way.
+ + Similar to the category of addresses.
+ + For all communication way keys please send a GET to + /CommunicationWayKey. + required: + - id + - objectName + properties: + id: + description: Unique identifier of the key + type: integer + objectName: + description: Model name, which is 'CommunicationWayKey' + type: string + example: CommunicationWayKey + type: object + nullable: false + main: + description: >- + Defines whether the communication way is the main communication way + for the contact. + type: boolean + example: 0 + nullable: true + sevClient: + description: >- + Client to which communication way key belongs. Will be filled + automatically + required: + - id + - objectName + properties: + id: + description: Unique identifier of the client + type: integer + objectName: + description: Model name, which is 'SevClient' + type: string + type: object + readOnly: true + type: object + Model_CommunicationWayUpdate: + title: CommunicationWay model + description: Contact communication way model + properties: + contact: + description: The contact to which this communication way belongs. + required: + - id + - objectName + properties: + id: + description: Unique identifier of the contact + type: integer + objectName: + description: Model name, which is 'Contact' + type: string + example: Contact + type: object + nullable: true + type: + description: Type of the communication way + type: string + enum: + - EMAIL + - PHONE + - WEB + - MOBILE + example: EMAIL + value: + description: "The value of the communication way.
\r\n For example the phone number, e-mail address or website." + type: string + key: + description: >- + The key of the communication way.
+ + Similar to the category of addresses.
+ + For all communication way keys please send a GET to + /CommunicationWayKey. + required: + - id + - objectName + properties: + id: + description: Unique identifier of the key + type: integer + objectName: + description: Model name, which is 'CommunicationWayKey' + type: string + example: CommunicationWayKey + type: object + nullable: true + main: + description: >- + Defines whether the communication way is the main communication way + for the contact. + type: boolean + example: 0 + nullable: true + type: object + Model_AccountingContactResponse: + title: AccountingContact model + description: Accounting contact model + properties: + id: + description: The accounting contact id + type: string + example: '0' + readOnly: true + objectName: + description: The accounting contact object name + type: string + readOnly: true + example: AccountingContact + create: + description: Date of accounting contact creation + type: string + format: date-time + readOnly: true + update: + description: Date of last accounting contact update + type: string + format: date-time + readOnly: true + contact: + description: The contact to which this accounting contact belongs. + required: + - id + - objectName + properties: + id: + description: Unique identifier of the contact + type: string + example: '0' + objectName: + description: Model name, which is 'Contact' + type: string + example: Contact + type: object + readOnly: true + sevClient: + description: >- + Client to which accounting contact belongs. Will be filled + automatically + required: + - id + - objectName + properties: + id: + description: Unique identifier of the client + type: string + example: '0' + objectName: + description: Model name, which is 'SevClient' + type: string + example: SevClient + type: object + readOnly: true + debitorNumber: + description: Debitor number of the accounting contact. + type: string + example: '0' + readOnly: true + creditorNumber: + description: Creditor number of the accounting contact. + type: string + example: '0' + readOnly: true + type: object + Model_AccountingContact: + title: AccountingContact model + description: Accounting contact model + required: + - contact + properties: + contact: + description: The contact to which this accounting contact belongs. + required: + - id + - objectName + properties: + id: + description: Unique identifier of the contact + type: integer + objectName: + description: Model name, which is 'Contact' + type: string + example: Contact + type: object + nullable: false + debitorNumber: + description: Debitor number of the accounting contact. + type: integer + nullable: true + creditorNumber: + description: Creditor number of the accounting contact. + type: integer + nullable: true + type: object + Model_AccountingContactUpdate: + title: AccountingContact model + description: Accounting contact model + properties: + contact: + description: The contact to which this accounting contact belongs. + required: + - id + - objectName + properties: + id: + description: Unique identifier of the contact + type: integer + objectName: + description: Model name, which is 'Contact' + type: string + example: Contact + type: object + nullable: true + debitorNumber: + description: Debitor number of the accounting contact. + type: integer + nullable: true + creditorNumber: + description: Creditor number of the accounting contact. + type: integer + nullable: true + type: object + Model_Textparser_fetchDictionaryEntriesByType_response: + title: Textparser fetchDictionaryEntriesByType model + description: Textparser fetchDictionaryEntriesByType model + properties: + key: + type: string + example: Contact + value: + type: array + items: + properties: + key: + type: string + example: BANK_NUMBER + value: + type: string + example: '[%BIC%]' + Model_ContactCustomFieldSettingResponse: + title: contact fields model + description: contact fields model + properties: + id: + description: Id of the contact field + type: string + example: '1' + readOnly: true + objectName: + description: Internal object name which is 'ContactCustomFieldSetting'. + type: string + example: ContactCustomFieldSetting + readOnly: true + create: + description: Date of contact field creation + type: string + format: date-time + readOnly: true + update: + description: Date of contact field updated + type: string + format: date-time + readOnly: true + sevClient: + description: Client to which invoice belongs. Will be filled automatically + required: + - id + - objectName + properties: + id: + description: Unique identifier of the client + type: string + example: '0' + objectName: + description: Model name, which is 'SevClient' + type: string + example: SevClient + type: object + readOnly: true + name: + description: name of the contact fields + type: string + readOnly: true + identifier: + description: Unique identifier for the contact field + type: string + readOnly: true + description: + description: The description of the contact field + type: string + readOnly: true + Model_ContactCustomFieldResponse: + title: contact fields model + description: contact fields model + properties: + id: + description: id of the contact field + type: string + example: '0' + objectName: + description: Internal object name which is 'ContactCustomField'. + type: string + example: ContactCustomField + create: + description: Date of contact field creation + type: string + format: date-time + update: + description: Date of contact field update + type: string + format: date-time + sevClient: + description: Client to which contact field belongs. Will be filled automatically + required: + - id + - objectName + properties: + id: + description: Unique identifier of the client + type: string + example: '0' + objectName: + description: Model name, which is 'SevClient' + type: string + example: SevClient + type: object + contact: + description: name of the contact + type: object + required: + - id + - objectName + properties: + id: + description: Unique identifier of contact + type: string + example: '0' + objectName: + description: Model name, which is 'Contact' + type: string + example: Contact + contactCustomFieldSetting: + description: the contact custom field setting + type: object + allOf: + - $ref: '#/components/schemas/Model_ContactCustomFieldSettingResponse' + value: + description: The value of the contact field + type: string + Model_ContactCustomField: + title: Contact fields model + description: Contact fields model + required: + - contact + - contactCustomFieldSetting + - value + - objectName + properties: + contact: + description: name of the contact + type: object + required: + - id + - objectName + properties: + id: + description: Unique identifier of contact + type: integer + objectName: + description: Model name, which is 'Contact' + type: string + example: Contact + contactCustomFieldSetting: + description: name of the contact custom field setting + type: object + required: + - id + - objectName + properties: + id: + description: Unique identifier of contact custom field setting + type: integer + objectName: + description: Model name, which is 'ContactCustomFieldSetting' + type: string + example: ContactCustomFieldSetting + value: + description: The value of the contact field + type: string + objectName: + description: Internal object name which is 'ContactCustomField'. + type: string + example: ContactCustomField + Model_ContactCustomFieldUpdate: + title: contact fields model + description: contact fields model + properties: + contact: + description: name of the contact + type: object + required: + - id + - objectName + properties: + id: + description: Unique identifier of contact + type: integer + objectName: + description: Model name, which is 'Contact' + type: string + example: Contact + contactCustomFieldSetting: + description: name of the contact custom field setting + type: object + required: + - id + - objectName + properties: + id: + description: Unique identifier of contact custom field setting + type: integer + objectName: + description: Model name, which is 'contactCustomFieldSetting' + type: string + example: contactCustomFieldSetting + value: + description: The value of the contact field + type: string + objectName: + description: Internal object name which is 'ContactCustomField'. + type: string + example: ContactCustomField + Model_ContactCustomFieldSetting: + title: contact field settings model + description: contact field settings model + required: + - name + properties: + name: + description: name of the contact fields + type: string + nullable: false + description: + description: The description of the contact field + type: string + objectName: + description: Internal object name which is 'ContactCustomFieldSetting'. + type: string + example: ContactCustomFieldSetting + Model_ContactCustomFieldSettingUpdate: + title: contact fields model + description: contact fields model + properties: + name: + description: name of the contact fields + type: string + description: + description: The description of the contact field + type: string + objectName: + description: Internal object name which is 'ContactCustomFieldSetting'. + type: string + example: ContactCustomFieldSetting + Model_creditNoteResponse: + title: creditNote model + description: creditNote model + properties: + id: + description: The creditNote id + type: string + example: '1' + readOnly: true + nullable: false + objectName: + description: The creditNote object name + type: string + readOnly: true + nullable: false + example: CreditNote + create: + description: Date of creditNote creation + type: string + format: date-time + readOnly: true + example: '2023-04-18T15:45:38+02:00' + update: + description: Date of last creditNote update + type: string + format: date-time + readOnly: true + example: '2023-04-18T15:45:38+02:00' + creditNoteNumber: + description: The creditNote number + type: string + example: GU-1000 + nullable: true + contact: + description: The contact used in the creditNote + required: + - id + - objectName + properties: + id: + description: Unique identifier of the contact + type: string + example: '1' + objectName: + description: Model name, which is 'Contact' + type: string + example: Contact + type: object + nullable: true + creditNoteDate: + description: The credit note date + type: string + format: date-time + example: '2023-04-18T15:45:38+02:00' + nullable: false + status: + description: "Please have a look in \r\n status of credit note\r\n to see what the different status codes mean" + type: string + enum: + - '100' + - '200' + - '750' + - '1000' + example: '100' + nullable: false + header: + description: Normally consist of prefix plus the creditNote number + type: string + example: My GU-1000 + nullable: true + headText: + description: Certain html tags can be used here to format your text + type: string + nullable: true + footText: + description: Certain html tags can be used here to format your text + type: string + nullable: true + addressCountry: + description: Can be omitted as complete address is defined in address attribute + required: + - id + - objectName + properties: + id: + description: Unique identifier of the country + type: string + example: '1' + objectName: + description: Model name, which is 'StaticCountry' + type: string + example: StaticCountry + type: object + nullable: true + createUser: + description: Will be filled automatically by our system and can't be changed + required: + - id + - objectName + properties: + id: + description: Unique identifier of the user + type: string + example: '1' + objectName: + description: Model name, which is 'SevUser' + type: string + example: SevUser + type: object + readOnly: true + sevClient: + description: Client to which creditNote belongs. Will be filled automatically + required: + - id + - objectName + properties: + id: + description: Unique identifier of the client + type: string + example: '1' + objectName: + description: Model name, which is 'SevClient' + type: string + example: SevClient + type: object + readOnly: true + deliveryDate: + description: >- + Timestamp. This can also be a date range if you also use the + attribute deliveryDateUntil + type: string + format: date-time + example: '2023-04-18T15:45:38+02:00' + nullable: false + smallSettlement: + description: "Defines if the client uses the small settlement scheme.\r\n If yes, the creditNote must not contain any vat" + type: boolean + example: '0' + nullable: true + contactPerson: + description: The user who acts as a contact person for the creditNote + required: + - id + - objectName + properties: + id: + description: Unique identifier of the user + type: string + example: '1' + objectName: + description: Model name, which is 'SevUser' + type: string + example: SevUser + type: object + nullable: true + taxRate: + description: >- + This is not used anymore. Use the taxRate of the individual + positions instead. + type: string + example: '0' + nullable: true + taxRule: + description: '**Use this in sevdesk-Update 2.0 (replaces taxType / taxSet).**' + required: + - id + - objectName + properties: + id: + description: |- + **Use this in sevdesk-Update 2.0 (replaces taxType / taxSet).** + + Defines the vat-regulation. + For "Regelbesteuerung" it can be one of: + - `1` - Umsatzsteuerpflichtige Umsätze - tax rates: 0.0, 7.0, 19.0 - replaces `"taxType": "default"` + - `2` - Ausfuhren - allowedTaxRates: 0.0 + - `3` - Innergemeinschaftliche Lieferungen - tax rates: 0.0, 7.0, 19.0 - replaces `"taxType": "eu"` + - `4` - Steuerfreie Umsätze §4 UStG - tax rates: 0.0 + - `5` - Reverse Charge gem. §13b UStG - tax rates: 0.0 + - `17` - Nicht im Inland steuerbare Leistung - tax rates: 0.0 - replaces `"taxType": "noteu"` + + For small business owner ("Kleinunternehmer") it can be: + - `11` - Steuer nicht erhoben nach §19UStG - tax rates: 0.0 - replaces `"taxType": "ss"` + type: string + enum: + - '1' + - '2' + - '3' + - '4' + - '5' + - '11' + objectName: + description: Name of the object. Must always be TaxRule + type: string + enum: + - TaxRule + type: object + nullable: false + taxSet: + description: >- + **Use this in sevdesk-Update 1.0 (instead of taxRule).** + + + Tax set of the creditNote. Needs to be added if you chose the tax + type custom + required: + - id + - objectName + properties: + id: + description: Unique identifier of the object + type: string + example: '1' + objectName: + description: Model name, which is 'TaxSet' + type: string + example: TaxSet + type: object + nullable: true + taxText: + description: A common tax text would be 'Umsatzsteuer 19%' + type: string + example: Umsatzsteuer 19% + nullable: true + taxType: + description: >- + **Use this in sevdesk-Update 1.0 (instead of taxRule).** + + + Tax type of the creditNote. + + There are four tax types: + + 1. default - Umsatzsteuer ausweisen + + 2. eu - Steuerfreie innergemeinschaftliche Lieferung (Europäische + Union) + + 3. noteu - Steuerschuldnerschaft des Leistungsempfängers (außerhalb + EU, z. B. Schweiz) + + 4. custom - Using custom tax set + + 5. ss - Not subject to VAT according to §19 1 UStG + + Tax rates are heavily connected to the tax type used. + type: string + example: default + nullable: true + sendDate: + description: The date the creditNote was sent to the customer + type: string + format: date-time + example: '2023-04-18T15:45:38+02:00' + nullable: true + address: + description: "Complete address of the recipient including name, street, city, zip and country.
\r\n Line breaks can be used and will be displayed on the invoice pdf." + type: string + nullable: true + currency: + description: >- + Currency used in the creditNote. Needs to be currency code according + to ISO-4217 + type: string + example: EUR + nullable: true + sumNet: + description: Net sum of the creditNote + type: string + example: '0' + readOnly: true + sumTax: + description: Tax sum of the creditNote + type: string + example: '0' + readOnly: true + sumGross: + description: Gross sum of the creditNote + type: string + example: '0' + readOnly: true + sumDiscounts: + description: Sum of all discounts in the creditNote + type: string + example: '0' + readOnly: true + sumNetForeignCurrency: + description: Net sum of the creditNote in the foreign currency + type: string + example: '0' + readOnly: true + sumTaxForeignCurrency: + description: Tax sum of the creditNote in the foreign currency + type: string + example: '0' + readOnly: true + sumGrossForeignCurrency: + description: Gross sum of the creditNote in the foreign currency + type: string + example: '0' + readOnly: true + sumDiscountsForeignCurrency: + description: Discounts sum of the creditNote in the foreign currency + type: string + example: '0' + readOnly: true + customerInternalNote: + description: >- + Internal note of the customer. Contains data entered into field + 'Referenz/Bestellnummer' + type: string + nullable: true + showNet: + description: >- + If true, the net amount of each position will be shown on the + creditNote. Otherwise gross amount + type: boolean + example: '1' + sendType: + description: "Type which was used to send the creditNote. IMPORTANT: Please refer to the creditNote section of the\r\n * API-Overview to understand how this attribute can be used before using it!" + type: string + enum: + - VPR + - VPDF + - VM + - VP + nullable: true + type: object + Model_creditNote: + title: creditNote model + description: creditNote model + required: + - creditNoteNumber + - creditNoteDate + - contact + - status + - deliveryDate + - addressCountry + - contactPerson + - taxRate + - taxRule + - taxText + - taxType + - bookingCategory + - invoiceType + - currency + - header + - mapAll + - objectName + properties: + id: + description: >- + The creditNote id. Required if you + want to create/update an credit note position for an existing credit + note" + type: integer + nullable: false + objectName: + description: The creditNote object name + type: string + nullable: false + example: CreditNote + mapAll: + type: boolean + nullable: false + create: + description: Date of creditNote creation + type: string + format: date-time + readOnly: true + example: '2023-04-18T15:45:38+02:00' + update: + description: Date of last creditNote update + type: string + format: date-time + readOnly: true + example: '2023-04-18T15:45:38+02:00' + creditNoteNumber: + description: The creditNote number + type: string + example: GU-1000 + contact: + description: The contact used in the creditNote + required: + - id + - objectName + properties: + id: + description: Unique identifier of the contact + type: integer + objectName: + description: Model name, which is 'Contact' + type: string + example: Contact + type: object + nullable: false + creditNoteDate: + description: Needs to be provided as timestamp or dd.mm.yyyy + type: string + format: date-time + example: 22.02.2022 + nullable: false + status: + description: "Please have a look in \r\n status of credit note\r\n to see what the different status codes mean" + type: string + enum: + - '100' + - '200' + - '300' + - '500' + - '750' + - '1000' + example: '100' + nullable: false + header: + description: Normally consist of prefix plus the creditNote number + type: string + example: My GU-1000 + nullable: false + headText: + description: Certain html tags can be used here to format your text + type: string + nullable: true + footText: + description: Certain html tags can be used here to format your text + type: string + nullable: true + addressCountry: + description: Can be omitted as complete address is defined in address attribute + required: + - id + - objectName + properties: + id: + description: Unique identifier of the country + type: integer + example: 1 + objectName: + description: Model name, which is 'StaticCountry' + type: string + example: StaticCountry + type: object + nullable: true + createUser: + description: Will be filled automatically by our system and can't be changed + required: + - id + - objectName + properties: + id: + description: Unique identifier of the user + type: integer + objectName: + description: Model name, which is 'SevUser' + type: string + example: SevUser + type: object + readOnly: true + sevClient: + description: Client to which creditNote belongs. Will be filled automatically + required: + - id + - objectName + properties: + id: + description: Unique identifier of the client + type: integer + objectName: + description: Model name, which is 'SevClient' + type: string + example: SevClient + type: object + readOnly: true + smallSettlement: + description: "Defines if the client uses the small settlement scheme.\r\n If yes, the creditNote must not contain any vat" + type: boolean + example: 0 + nullable: true + contactPerson: + description: The user who acts as a contact person for the creditNote + required: + - id + - objectName + properties: + id: + description: Unique identifier of the user + type: integer + objectName: + description: Model name, which is 'SevUser' + type: string + example: SevUser + type: object + taxRule: + description: '**Use this in sevdesk-Update 2.0 (replaces taxType / taxSet).**' + required: + - id + - objectName + properties: + id: + description: |- + **Use this in sevdesk-Update 2.0 (replaces taxType / taxSet).** + + Defines the vat-regulation. + For "Regelbesteuerung" it can be one of: + - `1` - Umsatzsteuerpflichtige Umsätze - tax rates: 0.0, 7.0, 19.0 - replaces `"taxType": "default"` + - `2` - Ausfuhren - allowedTaxRates: 0.0 + - `3` - Innergemeinschaftliche Lieferungen - tax rates: 0.0, 7.0, 19.0 - replaces `"taxType": "eu"` + - `4` - Steuerfreie Umsätze §4 UStG - tax rates: 0.0 + - `5` - Reverse Charge gem. §13b UStG - tax rates: 0.0 + - `17` - Nicht im Inland steuerbare Leistung - tax rates: 0.0 - replaces `"taxType": "noteu"` + + For small business owner ("Kleinunternehmer") it can be: + - `11` - Steuer nicht erhoben nach §19UStG - tax rates: 0.0 - replaces `"taxType": "ss"` + type: string + enum: + - '1' + - '2' + - '3' + - '4' + - '5' + - '11' + objectName: + description: Name of the object. Must always be TaxRule + type: string + enum: + - TaxRule + type: object + nullable: false + taxRate: + description: >- + This is not used anymore. Use the taxRate of the individual + positions instead. + type: number + format: float + example: 0 + nullable: false + taxSet: + description: >- + **Use this in sevdesk-Update 1.0 (instead of taxRule).** + + + Tax set of the creditNote. Needs to be added if you chose the tax + type custom + required: + - id + - objectName + properties: + id: + description: Unique identifier of the object + type: integer + objectName: + description: Model name, which is 'TaxSet' + type: string + example: TaxSet + type: object + nullable: true + taxText: + description: A common tax text would be 'Umsatzsteuer 19%' + type: string + example: Umsatzsteuer 19% + nullable: false + taxType: + description: >- + **Use this in sevdesk-Update 1.0 (instead of taxRule).** + + + Tax type of the creditNote. + + There are four tax types: + + 1. default - Umsatzsteuer ausweisen + + 2. eu - Steuerfreie innergemeinschaftliche Lieferung (Europäische + Union) + + 3. noteu - Steuerschuldnerschaft des Leistungsempfängers (außerhalb + EU, z. B. Schweiz) + + 4. custom - Using custom tax set + + 5. ss - Not subject to VAT according to §19 1 UStG + + Tax rates are heavily connected to the tax type used. + type: string + example: default + nullable: false + sendDate: + description: The date the creditNote was sent to the customer + type: string + format: date-time + example: 01.01.2020 + nullable: true + address: + description: "Complete address of the recipient including name, street, city, zip and country.
\r\n Line breaks can be used and will be displayed on the invoice pdf." + type: string + nullable: true + bookingCategory: + description: >- + Defines the booking category, for more information see the section + [Credit note booking + categories](#tag/CreditNote/Credit-note-booking-categories) + + + The booking category of the credit note. + + + **Must be UNDERACHIEVEMENT in sevdesk-Update 2.0.** + type: string + enum: + - PROVISION + - ROYALTY_ASSIGNED + - ROYALTY_UNASSIGNED + - UNDERACHIEVEMENT + - ACCOUNTING_TYPE + example: PROVISION + nullable: false + currency: + description: >- + Currency used in the creditNote. Needs to be currency code according + to ISO-4217 + type: string + example: EUR + nullable: false + sumNet: + description: Net sum of the creditNote + type: number + format: float + readOnly: true + nullable: false + sumTax: + description: Tax sum of the creditNote + type: number + format: float + readOnly: true + nullable: false + sumGross: + description: Gross sum of the creditNote + type: number + format: float + readOnly: true + nullable: false + sumDiscounts: + description: Sum of all discounts in the creditNote + type: number + format: float + readOnly: true + nullable: false + sumNetForeignCurrency: + description: Net sum of the creditNote in the foreign currency + type: number + format: float + readOnly: true + nullable: false + sumTaxForeignCurrency: + description: Tax sum of the creditNote in the foreign currency + type: number + format: float + readOnly: true + nullable: false + sumGrossForeignCurrency: + description: Gross sum of the creditNote in the foreign currency + type: number + format: float + readOnly: true + nullable: false + sumDiscountsForeignCurrency: + description: Discounts sum of the creditNote in the foreign currency + type: number + format: float + readOnly: true + nullable: false + customerInternalNote: + description: >- + Internal note of the customer. Contains data entered into field + 'Referenz/Bestellnummer' + type: string + nullable: true + showNet: + description: >- + If true, the net amount of each position will be shown on the + creditNote. Otherwise gross amount + type: boolean + example: 1 + nullable: false + sendType: + description: "Type which was used to send the creditNote. IMPORTANT: Please refer to the creditNote section of the\r\n * API-Overview to understand how this attribute can be used before using it!" + type: string + enum: + - VPR + - VPDF + - VM + - VP + nullable: true + type: object + Model_creditNotePos: + title: creditNote position model + description: creditNote position model + required: + - unity + - taxRate + - quantity + - mapAll + - objectName + properties: + id: + description: The creditNote position id. + type: integer + readOnly: true + nullable: true + objectName: + description: The creditNote position object name + type: string + nullable: false + example: CreditNotePos + mapAll: + type: boolean + nullable: false + create: + description: Date of creditNote position creation + type: string + readOnly: true + example: '2023-04-18T15:45:38+02:00' + update: + description: Date of last creditNote position update + type: string + readOnly: true + example: '2023-04-18T15:45:38+02:00' + creditNote: + description: >- + The creditNote to which the position belongs. Required if you want to create/update an + credit note position for an existing credit note" + required: + - id + - objectName + properties: + id: + description: Unique identifier of the creditNote + type: integer + objectName: + description: Model name, which is 'creditNote' + type: string + example: creditNote + type: object + part: + description: Part from your inventory which is used in the position. + required: + - id + - objectName + properties: + id: + description: Unique identifier of the part + type: integer + objectName: + description: Model name, which is 'Part' + type: string + example: Part + type: object + quantity: + description: Quantity of the article/part + type: number + format: float + example: 1 + nullable: false + price: + description: >- + Price of the article/part. Is either gross or net, depending on the + sevdesk account setting. + type: number + format: float + example: 100 + nullable: true + priceNet: + description: Net price of the part + type: number + format: float + readOnly: true + nullable: true + priceTax: + description: Tax on the price of the part + type: number + format: float + example: 19 + nullable: true + priceGross: + description: Gross price of the part + type: number + format: float + example: 119 + nullable: true + name: + description: Name of the article/part. + type: string + example: Dragonglass + nullable: true + unity: + description: The unit in which the positions part is measured + required: + - id + - objectName + properties: + id: + description: Unique identifier of the unit + type: integer + objectName: + description: Model name, which is 'Unity' + type: string + example: Unity + type: object + sevClient: + description: >- + Client to which creditNote position belongs. Will be filled + automatically + required: + - id + - objectName + properties: + id: + description: Unique identifier of the client + type: integer + objectName: + description: Model name, which is 'SevClient' + type: string + example: SevClient + type: object + readOnly: true + positionNumber: + description: >- + Position number of your position. Can be used to creditNote multiple + positions. + type: integer + example: 1 + nullable: true + text: + description: A text describing your position. + type: string + nullable: true + discount: + description: An optional discount of the position. + type: number + format: float + nullable: true + optional: + description: Defines if the position is optional. + type: boolean + nullable: true + taxRate: + description: Tax rate of the position. + type: number + format: float + example: 19 + nullable: false + sumDiscount: + description: Discount sum of the position + type: number + format: float + readOnly: true + nullable: true + type: object + saveCreditNote: + type: object + required: + - creditNote + - creditNotePos + properties: + creditNote: + $ref: '#/components/schemas/Model_creditNote' + creditNotePosSave: + type: array + items: + $ref: '#/components/schemas/Model_creditNotePos' + creditNotePosDelete: + required: + - id + - objectName + properties: + id: + description: Id of credit note position + type: integer + objectName: + description: Object name of credit note position + type: string + default: null + discountSave: + required: + - discount + - text + - percentage + - value + - objectName + - mapAll + properties: + discount: + description: Defines if this is a discount or a surcharge + type: boolean + example: true + text: + description: A text for your discount + type: string + percentage: + description: Defines if this is a percentage or an absolute discount + type: boolean + value: + description: Value of the discount + type: number + objectName: + description: Object name of the discount + type: string + example: Discounts + mapAll: + description: Internal param + type: boolean + example: true + default: null + discountDelete: + required: + - id + - objectName + properties: + id: + description: ID of discount to delete + type: integer + objectName: + description: Object name of discount + type: string + example: Discounts + default: null + Model_creditNotePosResponse: + title: creditNote position model + description: creditNote position model + required: + - creditNote + - unity + - taxRate + - quantity + properties: + id: + description: The creditNote position id + type: string + example: '1' + readOnly: true + nullable: false + objectName: + description: The creditNote position object name + type: string + readOnly: true + nullable: false + example: CreditNotePos + create: + description: Date of creditNote position creation + type: string + readOnly: true + example: '2023-04-18T15:45:38+02:00' + update: + description: Date of last creditNote position update + type: string + readOnly: true + example: '2023-04-18T15:45:38+02:00' + creditNote: + description: The creditNote to which the position belongs. + required: + - id + - objectName + properties: + id: + description: Unique identifier of the creditNote + type: string + example: '1' + objectName: + description: Model name, which is 'creditNote' + type: string + example: creditNote + type: object + part: + description: Part from your inventory which is used in the position. + required: + - id + - objectName + properties: + id: + description: Unique identifier of the part + type: string + example: '1' + objectName: + description: Model name, which is 'Part' + type: string + example: Part + type: object + quantity: + description: Quantity of the article/part + type: string + example: '1' + nullable: false + price: + description: >- + Price of the article/part. Is either gross or net, depending on the + sevdesk account setting. + type: string + example: '100' + nullable: true + priceNet: + description: Net price of the part + type: string + example: '100' + readOnly: true + nullable: true + priceTax: + description: Tax on the price of the part + type: string + example: '19' + nullable: true + priceGross: + description: Gross price of the part + type: string + example: '119' + nullable: true + name: + description: Name of the article/part. + type: string + example: Dragonglass + nullable: true + unity: + description: The unit in which the positions part is measured + required: + - id + - objectName + properties: + id: + description: Unique identifier of the unit + type: string + example: '1' + objectName: + description: Model name, which is 'Unity' + type: string + example: Unity + type: object + sevClient: + description: >- + Client to which creditNote position belongs. Will be filled + automatically + required: + - id + - objectName + properties: + id: + description: Unique identifier of the client + type: string + example: '1' + objectName: + description: Model name, which is 'SevClient' + type: string + example: SevClient + type: object + readOnly: true + positionNumber: + description: >- + Position number of your position. Can be used to creditNote multiple + positions. + type: string + example: '1' + nullable: true + text: + description: A text describing your position. + type: string + nullable: true + discount: + description: An optional discount of the position. + type: string + example: '0' + nullable: true + optional: + description: Defines if the position is optional. + type: boolean + nullable: true + taxRate: + description: Tax rate of the position. + type: string + example: '19' + nullable: false + sumDiscount: + description: Discount sum of the position + type: string + example: '0' + readOnly: true + nullable: true + type: object + saveCreditNoteResponse: + type: object + properties: + creditNote: + $ref: '#/components/schemas/Model_creditNoteResponse' + creditNotePos: + type: array + items: + $ref: '#/components/schemas/Model_creditNotePosResponse' + Model_discountsResponse: + properties: + id: + description: The id of the discount + type: integer + example: 1234 + objectName: + description: Model name, which is 'Discounts' + type: string + example: Discounts + create: + description: Date of discount creation + type: string + example: '2023-03-15T13:46:33+01:00' + update: + description: Date of last discount update + type: string + example: '2023-03-15T13:46:33+01:00' + sevClient: + description: Client to which the discount belongs + type: string + example: '1234' + discount: + description: >- + Indicates that this is a discount or a surcharge (0 = surcharge, 1 = + discount) + type: string + example: '1' + text: + description: A text describing your position. + type: string + example: Info about the discount + percentage: + description: Defines if this is a percentage or an absolute discount + type: string + example: '1' + value: + description: Value of the discount + type: string + example: '5' + isNet: + description: Defines is the Discount net or gross (0 = net, 1 = gross) + type: string + example: '0' + Model_creditNoteUpdate: + title: creditNote model + description: creditNote model + properties: + id: + description: The creditNote id + type: integer + readOnly: true + nullable: false + objectName: + description: The creditNote object name + type: string + readOnly: true + nullable: false + create: + description: Date of creditNote creation + type: string + format: date-time + readOnly: true + example: '2023-04-18T15:45:38+02:00' + update: + description: Date of last creditNote update + type: string + format: date-time + readOnly: true + example: '2023-04-18T15:45:38+02:00' + creditNoteNumber: + description: The creditNote number + type: string + example: GU-1000 + nullable: true + contact: + description: The contact used in the creditNote + required: + - id + - objectName + properties: + id: + description: Unique identifier of the contact + type: integer + objectName: + description: Model name, which is 'Contact' + type: string + example: Contact + type: object + nullable: true + creditNoteDate: + description: Needs to be provided as timestamp or dd.mm.yyyy + type: string + format: date-time + example: 01.01.2020 + nullable: false + status: + description: "Please have a look in \r\n status of credit note\r\n to see what the different status codes mean" + type: string + enum: + - '100' + - '200' + - '750' + - '1000' + example: '100' + nullable: false + header: + description: Normally consist of prefix plus the creditNote number + type: string + example: My GU-1000 + nullable: true + headText: + description: Certain html tags can be used here to format your text + type: string + nullable: true + footText: + description: Certain html tags can be used here to format your text + type: string + nullable: true + addressCountry: + description: Can be omitted as complete address is defined in address attribute + required: + - id + - objectName + properties: + id: + description: Unique identifier of the country + type: integer + example: 1 + objectName: + description: Model name, which is 'StaticCountry' + type: string + example: StaticCountry + type: object + nullable: true + createUser: + description: Will be filled automatically by our system and can't be changed + required: + - id + - objectName + properties: + id: + description: Unique identifier of the user + type: integer + objectName: + description: Model name, which is 'SevUser' + type: string + example: SevUser + type: object + readOnly: true + sevClient: + description: Client to which creditNote belongs. Will be filled automatically + required: + - id + - objectName + properties: + id: + description: Unique identifier of the client + type: integer + objectName: + description: Model name, which is 'SevClient' + type: string + example: SevClient + type: object + readOnly: true + deliveryDate: + description: >- + Timestamp. This can also be a date range if you also use the + attribute deliveryDateUntil + type: string + format: date-time + example: '2023-04-18T15:45:38+02:00' + nullable: false + smallSettlement: + description: "Defines if the client uses the small settlement scheme.\r\n If yes, the creditNote must not contain any vat" + type: boolean + example: 0 + nullable: true + contactPerson: + description: The user who acts as a contact person for the creditNote + required: + - id + - objectName + properties: + id: + description: Unique identifier of the user + type: integer + objectName: + description: Model name, which is 'SevUser' + type: string + example: SevUser + type: object + nullable: true + taxRate: + description: >- + This is not used anymore. Use the taxRate of the individual + positions instead. + type: number + format: float + example: 0 + nullable: true + taxRule: + description: '**Use this in sevdesk-Update 2.0 (replaces taxType / taxSet).**' + required: + - id + - objectName + properties: + id: + description: |- + **Use this in sevdesk-Update 2.0 (replaces taxType / taxSet).** + + Defines the vat-regulation. + For "Regelbesteuerung" it can be one of: + - `1` - Umsatzsteuerpflichtige Umsätze - tax rates: 0.0, 7.0, 19.0 - replaces `"taxType": "default"` + - `2` - Ausfuhren - allowedTaxRates: 0.0 + - `3` - Innergemeinschaftliche Lieferungen - tax rates: 0.0, 7.0, 19.0 - replaces `"taxType": "eu"` + - `4` - Steuerfreie Umsätze §4 UStG - tax rates: 0.0 + - `5` - Reverse Charge gem. §13b UStG - tax rates: 0.0 + - `17` - Nicht im Inland steuerbare Leistung - tax rates: 0.0 - replaces `"taxType": "noteu"` + + For small business owner ("Kleinunternehmer") it can be: + - `11` - Steuer nicht erhoben nach §19UStG - tax rates: 0.0 - replaces `"taxType": "ss"` + type: string + enum: + - '1' + - '2' + - '3' + - '4' + - '5' + - '11' + objectName: + description: Name of the object. Must always be TaxRule + type: string + enum: + - TaxRule + type: object + nullable: false + taxSet: + description: >- + **Use this in sevdesk-Update 1.0 (instead of taxRule).** + + + Tax set of the creditNote. Needs to be added if you chose the tax + type custom + required: + - id + - objectName + properties: + id: + description: Unique identifier of the object + type: integer + objectName: + description: Model name, which is 'TaxSet' + type: string + example: TaxSet + type: object + nullable: true + taxText: + description: A common tax text would be 'Umsatzsteuer 19%' + type: string + example: Umsatzsteuer 19% + nullable: true + taxType: + description: >- + **Use this in sevdesk-Update 1.0 (instead of taxRule).** + + + Tax type of the creditNote. + + There are four tax types: + + 1. default - Umsatzsteuer ausweisen + + 2. eu - Steuerfreie innergemeinschaftliche Lieferung (Europäische + Union) + + 3. noteu - Steuerschuldnerschaft des Leistungsempfängers (außerhalb + EU, z. B. Schweiz) + + 4. custom - Using custom tax set + + 5. ss - Not subject to VAT according to §19 1 UStG + + Tax rates are heavily connected to the tax type used. + type: string + example: default + nullable: true + sendDate: + description: The date the creditNote was sent to the customer + type: string + format: date-time + example: 01.01.2020 + nullable: true + address: + description: "Complete address of the recipient including name, street, city, zip and country.
\r\n Line breaks can be used and will be displayed on the invoice pdf." + type: string + nullable: true + currency: + description: >- + Currency used in the creditNote. Needs to be currency code according + to ISO-4217 + type: string + example: EUR + nullable: true + sumNet: + description: Net sum of the creditNote + type: number + format: float + readOnly: true + sumTax: + description: Tax sum of the creditNote + type: number + format: float + readOnly: true + sumGross: + description: Gross sum of the creditNote + type: number + format: float + readOnly: true + sumDiscounts: + description: Sum of all discounts in the creditNote + type: number + format: float + readOnly: true + sumNetForeignCurrency: + description: Net sum of the creditNote in the foreign currency + type: number + format: float + readOnly: true + sumTaxForeignCurrency: + description: Tax sum of the creditNote in the foreign currency + type: number + format: float + readOnly: true + sumGrossForeignCurrency: + description: Gross sum of the creditNote in the foreign currency + type: number + format: float + readOnly: true + sumDiscountsForeignCurrency: + description: Discounts sum of the creditNote in the foreign currency + type: number + format: float + readOnly: true + customerInternalNote: + description: >- + Internal note of the customer. Contains data entered into field + 'Referenz/Bestellnummer' + type: string + nullable: true + showNet: + description: >- + If true, the net amount of each position will be shown on the + creditNote. Otherwise gross amount + type: boolean + example: 1 + sendType: + description: "Type which was used to send the creditNote. IMPORTANT: Please refer to the creditNote section of the\r\n * API-Overview to understand how this attribute can be used before using it!" + type: string + enum: + - VPR + - VPDF + - VM + - VP + nullable: true + type: object + Model_CreditNote_sendByWithRender: + type: object + properties: + thumbs: + type: array + items: + example: null + pages: + type: integer + example: 2 + docId: + type: string + example: d4605b19248ad176443b7cb382679b1f + parameters: + type: array + items: + properties: + key: + type: string + example: language + name: + type: string + example: Sprache + values: + type: array + items: + properties: + name: + type: string + example: deutsch + translationCade: + type: string + example: SEVDOC_LANG_DE_DE + value: + type: string + example: de_DE + type: object + visible: + type: boolean + example: true + value: + type: string + example: de_DE + Model_creditNote_mailResponse: + type: object + properties: + id: + type: integer + example: 1 + objectName: + type: string + example: Email + additionalInformation: + type: string + default: null + create: + description: Date of email creation + type: string + format: date-time + readOnly: true + example: '2023-04-18T15:45:38+02:00' + update: + description: Date of last email update + type: string + format: date-time + readOnly: true + example: '2023-04-18T15:45:38+02:00' + object: + $ref: '#/components/schemas/Model_creditNoteResponse' + from: + type: string + example: example@mail.com + to: + type: string + example: example2@mail.com + subject: + type: string + example: subject + text: + type: string + example: example + sevClient: + description: Client to which creditNote belongs. Will be filled automatically + required: + - id + - objectName + properties: + id: + description: Unique identifier of the client + type: integer + example: 1 + objectName: + description: Model name, which is 'SevClient' + type: string + example: SevClient + Model_Part: + title: Part model + description: Part model + required: + - taxRate + - unity + - stock + - name + - partNumber + properties: + id: + description: The part id + type: integer + readOnly: true + nullable: false + objectName: + description: The part object name + type: string + readOnly: true + nullable: false + create: + description: Date of part creation + type: string + format: date-time + readOnly: true + update: + description: Date of last part update + type: string + format: date-time + readOnly: true + name: + description: Name of the part + type: string + example: Dragonglass + partNumber: + description: The part number + type: string + example: Part-1000 + text: + description: A text describing the part + type: string + nullable: true + category: + description: "Category of the part.
\r\n For all categories, send a GET to /Category?objectType=Part" + required: + - id + - objectName + properties: + id: + description: Unique identifier of the category + type: integer + objectName: + description: Model name, which is 'Category' + type: string + example: Category + type: object + nullable: true + stock: + description: The stock of the part + type: number + format: float + example: 10000 + stockEnabled: + description: Defines if the stock should be enabled + type: boolean + example: 1 + nullable: false + unity: + description: The unit in which the part is measured + required: + - id + - objectName + properties: + id: + description: Unique identifier of the unit + type: integer + example: 1 + objectName: + description: Model name, which is 'Unity' + type: string + example: Unity + type: object + price: + description: >- + Net price for which the part is sold. we will change this parameter + so that the gross price is calculated automatically, until then the + priceGross parameter must be used. + type: number + format: float + example: 100 + nullable: true + priceNet: + description: Net price for which the part is sold + type: number + format: float + example: 100 + nullable: true + priceGross: + description: Gross price for which the part is sold + type: number + format: float + example: 119 + nullable: true + sevClient: + description: Client to which part belongs. Will be filled automatically + required: + - id + - objectName + properties: + id: + description: Unique identifier of the client + type: integer + objectName: + description: Model name, which is 'SevClient' + type: string + type: object + readOnly: true + pricePurchase: + description: Purchase price of the part + type: number + format: float + example: 50 + nullable: true + taxRate: + description: Tax rate of the part + type: number + format: float + example: 19 + status: + description: Status of the part. 50 <-> Inactive - 100 <-> Active + type: integer + example: 100 + enum: + - 50 + - 100 + nullable: true + internalComment: + description: "An internal comment for the part.
\r\n Does not appear on invoices and orders." + type: string + nullable: true + type: object + Model_PartUpdate: + title: Part model + description: Part model + properties: + id: + description: The part id + type: integer + readOnly: true + nullable: true + objectName: + description: The part object name + type: string + readOnly: true + nullable: true + create: + description: Date of part creation + type: string + format: date-time + readOnly: true + update: + description: Date of last part update + type: string + format: date-time + readOnly: true + name: + description: Name of the part + type: string + example: Dragonglass + partNumber: + description: The part number + type: string + example: Part-1000 + text: + description: A text describing the part + type: string + nullable: true + category: + description: "Category of the part.
\r\n For all categories, send a GET to /Category?objectType=Part" + required: + - id + - objectName + properties: + id: + description: Unique identifier of the category + type: integer + objectName: + description: Model name, which is 'Category' + type: string + example: Category + type: object + nullable: true + stock: + description: The stock of the part + type: number + format: float + example: 10000 + stockEnabled: + description: Defines if the stock should be enabled + type: boolean + example: 1 + nullable: true + unity: + description: The unit in which the part is measured + required: + - id + - objectName + properties: + id: + description: Unique identifier of the unit + type: integer + example: 1 + objectName: + description: Model name, which is 'Unity' + type: string + example: Unity + type: object + price: + description: >- + Net price for which the part is sold. we will change this parameter + so that the gross price is calculated automatically, until then the + priceGross parameter must be used. + type: number + format: float + example: 100 + nullable: true + priceNet: + description: Net price for which the part is sold + type: number + format: float + example: 100 + nullable: true + priceGross: + description: Gross price for which the part is sold + type: number + format: float + example: 119 + nullable: true + sevClient: + description: Client to which part belongs. Will be filled automatically + required: + - id + - objectName + properties: + id: + description: Unique identifier of the client + type: integer + objectName: + description: Model name, which is 'SevClient' + type: string + type: object + readOnly: true + pricePurchase: + description: Purchase price of the part + type: number + format: float + example: 50 + nullable: true + taxRate: + description: Tax rate of the part + type: number + format: float + example: 19 + status: + description: Status of the part. 50 <-> Inactive - 100 <-> Active + type: integer + example: 100 + enum: + - 50 + - 100 + nullable: true + internalComment: + description: "An internal comment for the part.
\r\n Does not appear on invoices and orders." + type: string + nullable: true + type: object + Model_InvoiceResponse: + title: Invoice model + description: Invoice model + properties: + id: + description: The invoice id + type: string + example: '1' + readOnly: true + objectName: + description: The invoice object name + type: string + example: Invoice + readOnly: true + invoiceNumber: + description: The invoice number + type: string + example: RE-1000 + readOnly: true + contact: + description: The contact used in the invoice + readOnly: true + required: + - id + - objectName + properties: + id: + description: Unique identifier of the contact + type: string + example: '1' + objectName: + description: Model name, which is 'Contact' + type: string + example: Contact + type: object + create: + description: Date of invoice creation + type: string + format: date-time + example: '2024-04-08T00:00:00+02:00' + readOnly: true + update: + description: Date of last invoice update + type: string + format: date-time + example: '2024-04-08T00:00:00+02:00' + readOnly: true + sevClient: + description: Client to which invoice belongs. Will be filled automatically + required: + - id + - objectName + properties: + id: + description: Unique identifier of the client + type: string + example: '1' + objectName: + description: Model name, which is 'SevClient' + type: string + example: SevClient + type: object + readOnly: true + invoiceDate: + description: The invoice date. + type: string + example: '2024-04-08T00:00:00+02:00' + readOnly: true + header: + description: Normally consist of prefix plus the invoice number + type: string + example: My RE-1000 + readOnly: true + headText: + description: Certain html tags can be used here to format your text + type: string + example: header information + readOnly: true + footText: + description: Certain html tags can be used here to format your text + type: string + example: footer information + readOnly: true + timeToPay: + description: The time the customer has to pay the invoice in days + type: string + example: '10' + readOnly: true + discountTime: + description: "If a value other than zero is used for the discount attribute,\r\n you need to specify the amount of days for which the discount is granted." + type: string + example: '0' + readOnly: true + discount: + description: >- + If you want to give a discount, define the percentage here. + Otherwise provide zero as value + type: string + example: '0' + readOnly: true + addressCountry: + description: Can be omitted as complete address is defined in address attribute + required: + - id + - objectName + properties: + id: + description: Unique identifier of the country + type: string + example: '1' + objectName: + description: Model name, which is 'StaticCountry' + type: string + example: StaticCountry + type: object + readOnly: true + payDate: + description: Needs to be timestamp or dd.mm.yyyy + type: string + format: date-time + example: '2024-04-08T00:00:00+02:00' + readOnly: true + createUser: + description: Will be filled automatically by our system and can't be changed + required: + - id + - objectName + properties: + id: + description: Unique identifier of the user + type: string + example: '1' + objectName: + description: Model name, which is 'SevUser' + type: string + example: SevUser + type: object + readOnly: true + deliveryDate: + description: >- + Timestamp. This can also be a date range if you also use the + attribute deliveryDateUntil + type: string + format: date-time + example: '2024-04-08T00:00:00+02:00' + readOnly: true + status: + description: "Please have a look in our\r\n Types and status of invoices\r\n to see what the different status codes mean" + type: string + enum: + - '50' + - '100' + - '200' + - '750' + - '1000' + example: '100' + readOnly: true + smallSettlement: + description: "Defines if the client uses the small settlement scheme.\r\n If yes, the invoice must not contain any vat" + type: boolean + example: '0' + readOnly: true + contactPerson: + description: The user who acts as a contact person for the invoice + required: + - id + - objectName + properties: + id: + description: Unique identifier of the user + type: string + example: '1' + objectName: + description: Model name, which is 'SevUser' + type: string + example: SevUser + type: object + readOnly: true + taxRate: + description: >- + This is not used anymore. Use the taxRate of the individual + positions instead. + type: string + example: '0' + readOnly: true + taxRule: + description: '**Use this in sevdesk-Update 2.0 (replaces taxType / taxSet).**' + required: + - id + - objectName + properties: + id: + description: |- + **Use this in sevdesk-Update 2.0 (replaces taxType / taxSet).** + + Defines the vat-regulation. + For "Regelbesteuerung" it can be one of: + - `1` - Umsatzsteuerpflichtige Umsätze - tax rates: 0.0, 7.0, 19.0 - replaces `"taxType": "default"` + - `2` - Ausfuhren - allowedTaxRates: 0.0 + - `3` - Innergemeinschaftliche Lieferungen - tax rates: 0.0, 7.0, 19.0 - replaces `"taxType": "eu"` + - `4` - Steuerfreie Umsätze §4 UStG - tax rates: 0.0 + - `5` - Reverse Charge gem. §13b UStG - tax rates: 0.0 + - `17` - Nicht im Inland steuerbare Leistung - tax rates: 0.0 - replaces `"taxType": "noteu"` + - "Nicht im Inland steuerbare Leistung" is not available for: + - advance invoice (`"invoiceType": "AR"`) + - partial invoice (`"invoiceType": "TR"`) + - final invoice (`"invoiceType": "ER"`) + + For small business owner ("Kleinunternehmer") it can be: + - `11` - Steuer nicht erhoben nach §19UStG - tax rates: 0.0 - replaces `"taxType": "ss"` + type: string + enum: + - '1' + - '2' + - '3' + - '4' + - '5' + - '11' + objectName: + description: Name of the object. Must always be TaxRule + type: string + enum: + - TaxRule + type: object + nullable: false + taxText: + description: A common tax text would be 'Umsatzsteuer 19%' + type: string + example: Umsatzsteuer 19% + readOnly: true + dunningLevel: + description: "Defines how many reminders have already been sent for the invoice.\r\n Starts with 1 (Payment reminder) and should be incremented by one every time another reminder is sent." + type: string + example: '0' + readOnly: true + taxType: + description: >- + **Use this in sevdesk-Update 1.0 (instead of taxRule).** + + + Tax type of the invoice. + + There are four tax types: + + 1. default - Umsatzsteuer ausweisen + + 2. eu - Steuerfreie innergemeinschaftliche Lieferung (Europäische + Union) + + 3. noteu - Steuerschuldnerschaft des Leistungsempfängers (außerhalb + EU, z. B. Schweiz) + + 4. custom - Using custom tax set + + 5. ss - Not subject to VAT according to §19 1 UStG + + Tax rates are heavily connected to the tax type used. + type: string + example: default + enum: + - default + - eu + - noteu + - custom + readOnly: true + paymentMethod: + description: Payment method used for the invoice + required: + - id + - objectName + properties: + id: + description: Unique identifier of the payment method + type: string + example: '1' + objectName: + description: Model name, which is 'PaymentMethod' + type: string + example: PaymentMethod + type: object + readOnly: true + costCentre: + description: Cost centre for the invoice + required: + - id + - objectName + properties: + id: + description: Unique identifier of the cost centre + type: string + example: '1' + objectName: + description: Model name, which is 'CostCentre' + type: string + example: CostCentre + type: object + readOnly: true + sendDate: + description: The date the invoice was sent to the customer + type: string + format: date-time + example: '2024-04-08T00:00:00+02:00' + readOnly: true + origin: + description: Origin of the invoice. Could f.e. be an order + required: + - id + - objectName + properties: + id: + description: Unique identifier of the object + type: string + example: '1' + objectName: + description: Model name. Could f.e. be 'Order'' + type: string + type: object + readOnly: true + invoiceType: + description: "Type of the invoice. For more information on the different types, check\r\n this section\r\n" + type: string + example: RE + enum: + - RE + - WKR + - SR + - MA + - TR + - ER + readOnly: true + accountIntervall: + description: "The interval in which recurring invoices are due as ISO-8601 duration.
\r\n Necessary attribute for all recurring invoices." + type: string + example: '2022-03-14' + readOnly: true + accountNextInvoice: + description: >- + Timestamp when the next invoice will be generated by this recurring + invoice. + type: string + example: '1647259198' + readOnly: true + reminderTotal: + description: Total reminder amount + type: string + example: '0' + readOnly: true + reminderDebit: + description: Debit of the reminder + type: string + example: '0' + readOnly: true + reminderDeadline: + description: Deadline of the reminder as timestamp + type: string + format: date-time + example: 01.01.2020 + readOnly: true + reminderCharge: + description: The additional reminder charge + type: string + example: '0' + readOnly: true + taxSet: + description: >- + **Use this in sevdesk-Update 1.0 (instead of taxRule).** + + + Tax set of the invoice. Needs to be added if you chose the tax type + custom + required: + - id + - objectName + properties: + id: + description: Unique identifier of the object + type: string + example: '1' + objectName: + description: Model name, which is 'TaxSet' + type: string + example: TaxSet + type: object + readOnly: true + address: + description: "Complete address of the recipient including name, street, city, zip and country.\r\n * Line breaks can be used and will be displayed on the invoice pdf." + type: string + example: |- + name + street + postCode city + readOnly: true + currency: + description: >- + Currency used in the invoice. Needs to be currency code according to + ISO-4217 + type: string + example: EUR + readOnly: true + sumNet: + description: Net sum of the invoice + type: string + example: '100' + readOnly: true + sumTax: + description: Tax sum of the invoice + type: string + example: '19' + readOnly: true + sumGross: + description: Gross sum of the invoice + type: string + example: '119' + readOnly: true + sumDiscounts: + description: Sum of all discounts in the invoice + type: string + example: '0' + readOnly: true + sumNetForeignCurrency: + description: Net sum of the invoice in the foreign currency + type: string + example: '0' + readOnly: true + sumTaxForeignCurrency: + description: Tax sum of the invoice in the foreign currency + type: string + example: '0' + readOnly: true + sumGrossForeignCurrency: + description: Gross sum of the invoice in the foreign currency + type: string + example: '0' + readOnly: true + sumDiscountsForeignCurrency: + description: Discounts sum of the invoice in the foreign currency + type: string + example: '0' + readOnly: true + sumNetAccounting: + description: Net accounting sum of the invoice. Is usually the same as sumNet + type: string + example: '0' + readOnly: true + sumTaxAccounting: + description: Tax accounting sum of the invoice. Is usually the same as sumTax + type: string + example: '0' + readOnly: true + sumGrossAccounting: + description: Gross accounting sum of the invoice. Is usually the same as sumGross + type: string + example: '0' + readOnly: true + paidAmount: + description: Amount which has already been paid for this invoice by the customer + type: number + format: float + example: 0 + readOnly: true + customerInternalNote: + description: >- + Internal note of the customer. Contains data entered into field + 'Referenz/Bestellnummer' + type: string + readOnly: true + showNet: + description: >- + If true, the net amount of each position will be shown on the + invoice. Otherwise gross amount + type: boolean + example: '1' + readOnly: true + enshrined: + description: >- + Enshrined invoices cannot be changed. Can only be set via + [Invoice/{invoiceId}/enshrine](#tag/Invoice/operation/invoiceEnshrine). + This operation cannot be undone. + type: string + format: date-time + example: '2024-04-08T00:00:00+02:00' + readOnly: true + sendType: + description: "Type which was used to send the invoice. IMPORTANT: Please refer to the invoice section of the\r\n * API-Overview to understand how this attribute can be used before using it!" + type: string + enum: + - VPR + - VPDF + - VM + - VP + readOnly: true + deliveryDateUntil: + description: "If the delivery date should be a time range, another timestamp can be provided in this attribute\r\n * to define a range from timestamp used in deliveryDate attribute to the timestamp used here." + type: string + example: '2024-04-08T00:00:00+02:00' + readOnly: true + datevConnectOnline: + description: Internal attribute + type: object + readOnly: true + sendPaymentReceivedNotificationDate: + description: Internal attribute + type: string + example: '0' + readOnly: true + type: object + Model_Invoice: + title: Invoice model + description: Invoice model + required: + - invoiceDate + - contact + - discount + - status + - addressCountry + - contactPerson + - taxRate + - taxRule + - taxText + - taxType + - invoiceType + - currency + - mapAll + properties: + id: + description: >- + The invoice id. Required if you want + to create or update an invoice position for an existing invoice + type: integer + example: null + nullable: true + objectName: + description: The invoice object name. + type: string + example: Invoice + nullable: false + invoiceNumber: + description: The invoice number + type: string + readOnly: false + example: RE-1000 + nullable: true + contact: + description: The contact used in the invoice + required: + - id + - objectName + properties: + id: + description: Unique identifier of the contact + type: integer + objectName: + description: Model name, which is 'Contact' + type: string + example: Contact + type: object + nullable: false + contactPerson: + description: The user who acts as a contact person for the invoice + required: + - id + - objectName + properties: + id: + description: Unique identifier of the user + type: integer + objectName: + description: Model name, which is 'SevUser' + type: string + example: SevUser + type: object + create: + description: Date of invoice creation + type: string + format: date-time + readOnly: true + update: + description: Date of last invoice update + type: string + format: date-time + readOnly: true + sevClient: + description: Client to which invoice belongs. Will be filled automatically + required: + - id + - objectName + properties: + id: + description: Unique identifier of the client + type: integer + objectName: + description: Model name, which is 'SevClient' + type: string + example: SevClient + type: object + readOnly: true + invoiceDate: + description: >- + Needs to be provided as timestamp or dd.mm.yyyy + + + **Requirements:** + + * For final invoices (invoiceType = 'ER'), the invoiceDate must be + later than or equal to the invoiceDate of related advance + (invoiceType = 'AR') / partial (invoiceType = 'TR') invoices. + type: string + example: 01.01.2022 + nullable: false + header: + description: Normally consist of prefix plus the invoice number + type: string + nullable: true + example: Invoice RE-1000 + headText: + description: Certain html tags can be used here to format your text + type: string + nullable: true + example: header information + footText: + description: Certain html tags can be used here to format your text + type: string + nullable: true + example: footer information + timeToPay: + description: The time the customer has to pay the invoice in days + type: integer + nullable: true + example: 20 + discount: + description: >- + If you want to give a discount, define the percentage here. + Otherwise provide zero as value + type: integer + example: 0 + nullable: false + address: + description: "Complete address of the recipient including name, street, city, zip and country.\r\n * Line breaks can be used and will be displayed on the invoice pdf." + type: string + example: |- + name + street + postCode city + nullable: true + addressCountry: + description: Can be omitted as complete address is defined in address attribute + required: + - id + - objectName + properties: + id: + description: Unique identifier of the country + type: integer + example: 1 + objectName: + description: Model name, which is 'StaticCountry' + type: string + example: StaticCountry + type: object + nullable: false + payDate: + description: Needs to be timestamp or dd.mm.yyyy + type: string + format: date-time + nullable: true + createUser: + description: Will be filled automatically by our system and can't be changed + required: + - id + - objectName + properties: + id: + description: Unique identifier of the user + type: integer + objectName: + description: Model name, which is 'SevUser' + type: string + example: SevUser + type: object + readOnly: true + deliveryDate: + description: >- + Timestamp. This can also be a date range if you also use the + attribute deliveryDateUntil + type: string + format: date-time + example: 01.01.2022 + nullable: true + deliveryDateUntil: + description: "If the delivery date should be a time range, another timestamp can be provided in this attribute\r\n * to define a range from timestamp used in deliveryDate attribute to the timestamp used here." + type: integer + example: null + nullable: true + status: + description: "Please have a look in our\r\n Types and status of invoices\r\n to see what the different status codes mean" + type: string + enum: + - '50' + - '100' + - '200' + - '750' + - '1000' + example: '100' + nullable: false + smallSettlement: + description: "Defines if the client uses the small settlement scheme.\r\n If yes, the invoice must not contain any vat" + type: boolean + example: 0 + nullable: true + taxRate: + description: >- + This is not used anymore. Use the taxRate of the individual + positions instead. + type: number + format: float + example: 0 + nullable: false + taxRule: + description: '**Use this in sevdesk-Update 2.0 (replaces taxType / taxSet).**' + required: + - id + - objectName + properties: + id: + description: |- + **Use this in sevdesk-Update 2.0 (replaces taxType / taxSet).** + + Defines the vat-regulation. + For "Regelbesteuerung" it can be one of: + - `1` - Umsatzsteuerpflichtige Umsätze - tax rates: 0.0, 7.0, 19.0 - replaces `"taxType": "default"` + - `2` - Ausfuhren - allowedTaxRates: 0.0 + - `3` - Innergemeinschaftliche Lieferungen - tax rates: 0.0, 7.0, 19.0 - replaces `"taxType": "eu"` + - `4` - Steuerfreie Umsätze §4 UStG - tax rates: 0.0 + - `5` - Reverse Charge gem. §13b UStG - tax rates: 0.0 + - `17` - Nicht im Inland steuerbare Leistung - tax rates: 0.0 - replaces `"taxType": "noteu"` + - "Nicht im Inland steuerbare Leistung" is not available for: + - advance invoice (`"invoiceType": "AR"`) + - partial invoice (`"invoiceType": "TR"`) + - final invoice (`"invoiceType": "ER"`) + + For small business owner ("Kleinunternehmer") it can be: + - `11` - Steuer nicht erhoben nach §19UStG - tax rates: 0.0 - replaces `"taxType": "ss"` + type: string + enum: + - '1' + - '2' + - '3' + - '4' + - '5' + - '11' + objectName: + description: Name of the object. Must always be TaxRule + type: string + enum: + - TaxRule + type: object + nullable: false + taxText: + description: A common tax text would be 'Umsatzsteuer 19%' + type: string + example: Umsatzsteuer 19% + nullable: false + taxType: + description: >- + **Use this in sevdesk-Update 1.0 (instead of taxRule).** + + + Tax type of the invoice. + + There are four tax types: + + 1. default - Umsatzsteuer ausweisen + + 2. eu - Steuerfreie innergemeinschaftliche Lieferung (Europäische + Union) + + 3. noteu - Steuerschuldnerschaft des Leistungsempfängers (außerhalb + EU, z. B. Schweiz) + + 4. custom - Using custom tax set + + 5. ss - Not subject to VAT according to §19 1 UStG + + Tax rates are heavily connected to the tax type used. + type: string + example: default + enum: + - default + - eu + - noteu + - custom + nullable: false + taxSet: + description: >- + **Use this in sevdesk-Update 1.0 (instead of taxRule).** + + + Tax set of the invoice. Needs to be added if you chose the tax type + custom + required: + - id + - objectName + properties: + id: + description: Unique identifier of the object + type: string + example: '1' + objectName: + description: Model name, which is 'TaxSet' + type: string + example: TaxSet + example: null + type: object + nullable: true + dunningLevel: + description: "Defines how many reminders have already been sent for the invoice.\r\n Starts with 1 (Payment reminder) and should be incremented by one every time another reminder is sent." + type: integer + nullable: true + readOnly: true + paymentMethod: + description: Payment method used for the invoice + required: + - id + - objectName + properties: + id: + description: Unique identifier of the payment method + type: integer + example: 21919 + objectName: + description: Model name, which is 'PaymentMethod' + type: string + example: PaymentMethod + type: object + sendDate: + description: The date the invoice was sent to the customer + type: string + format: date-time + example: 01.01.2020 + nullable: true + invoiceType: + description: "Type of the invoice. For more information on the different types, check\r\n this section\r\n" + type: string + example: RE + enum: + - RE + - WKR + - SR + - MA + - TR + - ER + nullable: false + accountIntervall: + description: "The interval in which recurring invoices are due as ISO-8601 duration.
\r\n Necessary attribute for all recurring invoices." + type: string + nullable: true + readOnly: true + accountNextInvoice: + description: >- + Timestamp when the next invoice will be generated by this recurring + invoice. + type: integer + nullable: true + readOnly: true + currency: + description: >- + Currency used in the invoice. Needs to be currency code according to + ISO-4217 + type: string + example: EUR + nullable: false + sumNet: + description: Net sum of the invoice + type: number + format: float + readOnly: true + nullable: false + sumTax: + description: Tax sum of the invoice + type: number + format: float + readOnly: true + nullable: false + sumGross: + description: Gross sum of the invoice + type: number + format: float + readOnly: true + nullable: false + sumDiscounts: + description: Sum of all discounts in the invoice + type: number + format: float + readOnly: true + nullable: false + sumNetForeignCurrency: + description: Net sum of the invoice in the foreign currency + type: number + format: float + readOnly: true + nullable: false + sumTaxForeignCurrency: + description: Tax sum of the invoice in the foreign currency + type: number + format: float + readOnly: true + nullable: false + sumGrossForeignCurrency: + description: Gross sum of the invoice in the foreign currency + type: number + format: float + readOnly: true + nullable: false + sumDiscountsForeignCurrency: + description: Discounts sum of the invoice in the foreign currency + type: number + format: float + readOnly: true + nullable: false + sumNetAccounting: + description: Net accounting sum of the invoice. Is usually the same as sumNet + type: number + format: float + readOnly: true + nullable: false + sumTaxAccounting: + description: Tax accounting sum of the invoice. Is usually the same as sumTax + type: number + format: float + readOnly: true + nullable: false + sumGrossAccounting: + description: Gross accounting sum of the invoice. Is usually the same as sumGross + type: number + format: float + readOnly: true + nullable: false + paidAmount: + description: Amount which has already been paid for this invoice by the customer + type: number + format: float + readOnly: true + nullable: true + showNet: + description: >- + If true, the net amount of each position will be shown on the + invoice. Otherwise gross amount + type: boolean + example: '1' + nullable: false + enshrined: + description: >- + Enshrined invoices cannot be changed. Can only be set via + [Invoice/{invoiceId}/enshrine](#tag/Invoice/operation/invoiceEnshrine). + This operation cannot be undone. + type: string + format: date-time + example: '2024-04-08T00:00:00+02:00' + readOnly: true + sendType: + description: Type which was used to send the invoice. + type: string + enum: + - VPR + - VPDF + - VM + - VP + nullable: true + origin: + description: Origin of the invoice. Could f.e. be an order + required: + - id + - objectName + properties: + id: + description: Unique identifier of the object + type: string + example: '1' + objectName: + description: Model name, which could be 'Order' + type: string + example: Order + example: null + type: object + nullable: true + customerInternalNote: + description: >- + Internal note of the customer. Contains data entered into field + 'Referenz/Bestellnummer' + type: string + example: null + nullable: true + propertyIsEInvoice: + description: |- + If true, the invoice will be created as e-invoice. + + To create a valid e-invoice some extra data are required + - sevClient + - addressStreet + - addressZip + - addressCity + - bankIban + - bankBic + - contactEmail + - contactPhone + - taxNumber + - vatNumber + - contact + - buyerReference + - email + - invoice + - paymentMethod + - addressStreet + - addressZip + - addressCity + - addressCountry + - contact + type: boolean + example: false + nullable: true + mapAll: + type: boolean + nullable: false + type: object + Model_InvoicePos: + title: Invoice position model + description: Invoice position model + required: + - unity + - taxRate + - quantity + - objectName + - mapAll + properties: + id: + description: >- + The invoice position id. Required if + you want to update an invoice position for an existing invoice + type: integer + example: null + nullable: false + objectName: + description: The invoice position object name + type: string + example: InvoicePos + nullable: false + mapAll: + type: boolean + nullable: false + create: + description: Date of invoice position creation + type: string + format: date-time + example: 01.01.2020 + readOnly: true + update: + description: Date of last invoice position update + type: string + format: date-time + example: 01.01.2020 + readOnly: true + invoice: + description: The invoice to which the position belongs. + required: + - id + - objectName + properties: + id: + description: Unique identifier of the invoice + type: integer + objectName: + description: Model name, which is 'Invoice' + type: string + example: Invoice + type: object + readOnly: true + part: + description: Part from your inventory which is used in the position. + required: + - id + - objectName + properties: + id: + description: Unique identifier of the part + type: integer + objectName: + description: Model name, which is 'Part' + type: string + example: Part + type: object + quantity: + description: Quantity of the article/part + type: number + format: float + example: 1 + nullable: false + price: + description: >- + Price of the article/part. Is either gross or net, depending on the + sevdesk account setting. + type: number + format: float + example: 100 + nullable: true + name: + description: Name of the article/part. + type: string + example: Dragonglass + nullable: true + unity: + description: The unit in which the positions part is measured + required: + - id + - objectName + properties: + id: + description: Unique identifier of the unit + type: integer + example: 1 + objectName: + description: Model name, which is 'Unity' + type: string + example: Unity + type: object + sevClient: + description: >- + Client to which invoice position belongs. Will be filled + automatically + required: + - id + - objectName + properties: + id: + description: Unique identifier of the client + type: integer + objectName: + description: Model name, which is 'SevClient' + type: string + example: SevClient + type: object + readOnly: true + positionNumber: + description: >- + Position number of your position. Can be used to order multiple + positions. + type: integer + nullable: true + text: + description: A text describing your position. + type: string + nullable: true + discount: + description: An optional discount of the position. + type: number + format: float + nullable: true + taxRate: + description: Tax rate of the position. + type: number + format: float + example: 19 + nullable: false + sumDiscount: + description: Discount sum of the position + type: number + format: float + readOnly: true + nullable: true + sumNetAccounting: + description: Net accounting sum of the position + type: number + format: float + readOnly: true + nullable: true + sumTaxAccounting: + description: Tax accounting sum of the position + type: number + format: float + readOnly: true + nullable: true + sumGrossAccounting: + description: Gross accounting sum of the position + type: number + format: float + readOnly: true + nullable: true + priceNet: + description: Net price of the part + type: number + format: float + readOnly: true + nullable: true + priceGross: + description: Gross price of the part + type: number + format: float + example: 100 + nullable: true + priceTax: + description: Tax on the price of the part + type: number + format: float + nullable: true + type: object + saveInvoice: + type: object + required: + - invoice + - invoicePos + properties: + invoice: + $ref: '#/components/schemas/Model_Invoice' + invoicePosSave: + type: array + items: + $ref: '#/components/schemas/Model_InvoicePos' + invoicePosDelete: + required: + - id + - objectName + properties: + id: + description: Id of invoice position + type: integer + objectName: + description: Object name of invoice position + type: string + default: null + filename: + description: Filename of a previously upload file which should be attached. + type: string + format: binary + discountSave: + required: + - discount + - text + - percentage + - value + - objectName + - mapAll + type: array + items: + properties: + discount: + description: Defines if this is a discount or a surcharge + type: boolean + example: 'true' + text: + description: A text for your discount + type: string + percentage: + description: Defines if this is a percentage or an absolute discount + type: boolean + value: + description: Value of the discount + type: number + objectName: + description: Object name of the discount + type: string + example: Discounts + mapAll: + description: Internal param + type: boolean + example: 'true' + discountDelete: + properties: + id: + description: ID of discount to delete + type: integer + objectName: + description: Object name of discount + type: string + example: Discounts + example: null + type: object + Model_InvoicePosResponse: + title: Invoice position model + description: Invoice position model + properties: + id: + description: The invoice position id + type: string + readOnly: true + objectName: + description: The invoice position object name + type: string + example: InvoicePos + readOnly: true + create: + description: Date of invoice position creation + type: string + format: date-time + example: 01.01.2020 + readOnly: true + update: + description: Date of last invoice position update + type: string + format: date-time + example: 01.01.2020 + readOnly: true + invoice: + description: The invoice to which the position belongs. + required: + - id + - objectName + properties: + id: + description: Unique identifier of the invoice + type: string + example: '1' + objectName: + description: Model name, which is 'Invoice' + type: string + example: Invoice + type: object + readOnly: true + part: + description: Part from your inventory which is used in the position. + required: + - id + - objectName + properties: + id: + description: Unique identifier of the part + type: string + example: '1' + objectName: + description: Model name, which is 'Part' + type: string + example: Part + type: object + readOnly: true + quantity: + description: Quantity of the article/part + type: boolean + example: true + readOnly: true + price: + description: >- + Price of the article/part. Is either gross or net, depending on the + sevdesk account setting. + type: string + example: '100' + readOnly: true + name: + description: Name of the article/part. + type: string + example: Dragonglass + readOnly: true + unity: + description: The unit in which the positions part is measured + required: + - id + - objectName + properties: + id: + description: Unique identifier of the unit + type: string + example: '1' + objectName: + description: Model name, which is 'Unity' + type: string + example: Unity + type: object + readOnly: true + sevClient: + description: >- + Client to which invoice position belongs. Will be filled + automatically + required: + - id + - objectName + properties: + id: + description: Unique identifier of the client + type: string + example: '1' + objectName: + description: Model name, which is 'SevClient' + type: string + example: SevClient + type: object + readOnly: true + positionNumber: + description: >- + Position number of your position. Can be used to order multiple + positions. + type: string + example: '0' + readOnly: true + text: + description: A text describing your position. + type: string + readOnly: true + discount: + description: An optional discount of the position. + type: string + example: '0' + readOnly: true + taxRate: + description: Tax rate of the position. + type: string + example: '19' + readOnly: true + sumDiscount: + description: Discount sum of the position + type: string + example: '0' + readOnly: true + sumNetAccounting: + description: Net accounting sum of the position + type: string + example: '0' + readOnly: true + sumTaxAccounting: + description: Tax accounting sum of the position + type: string + example: '0' + readOnly: true + sumGrossAccounting: + description: Gross accounting sum of the position + type: string + example: '0' + readOnly: true + priceNet: + description: Net price of the part + type: string + example: '0' + readOnly: true + priceGross: + description: Gross price of the part + type: string + example: '100' + readOnly: true + priceTax: + description: Tax on the price of the part + type: string + example: '0' + readOnly: true + type: object + saveInvoiceResponse: + type: object + properties: + invoice: + $ref: '#/components/schemas/Model_InvoiceResponse' + invoicePos: + type: array + items: + $ref: '#/components/schemas/Model_InvoicePosResponse' + filename: + description: Filename of a previously upload file which should be attached. + type: string + format: binary + Model_CreateInvoiceFromOrder: + title: Create Invoice + description: Invoice model + required: + - order + properties: + order: + description: select the order for which you want to create the invoice + required: + - id + - objectName + properties: + id: + description: Unique identifier of the order + type: integer + objectName: + description: Model name, which is 'Order' + type: string + example: Order + nullable: false + type: object + type: + description: defines the type of amount + type: string + enum: + - percentage + - net + - gross + nullable: true + amount: + description: Amount which has already been paid for this Invoice + type: number + example: 100 + nullable: true + partialType: + description: |- + defines the type of the invoice + 1. RE - Schlussrechnung + 2. TR - Teilrechnung + 3. AR - Abschlagsrechnung + enum: + - RE + - TR + - AR + type: string + nullable: true + Model_Email: + title: Email model + description: Email model + required: + - from + - to + - subject + properties: + id: + description: The email id + type: integer + readOnly: true + nullable: false + objectName: + description: The email object name + type: string + readOnly: true + nullable: false + create: + description: Date of mail creation + type: string + format: date-time + example: 01.01.2020 + readOnly: true + update: + description: Date of last mail update + type: string + format: date-time + example: 01.01.2020 + readOnly: true + object: + $ref: '#/components/schemas/Model_InvoiceResponse' + from: + description: The sender of the email + type: string + nullable: false + to: + description: The recipient of the email + type: string + nullable: false + subject: + description: The subject of the email + type: string + nullable: false + text: + description: The text of the email + type: string + nullable: true + sevClient: + description: Client to which mail belongs. Will be filled automatically + required: + - id + - objectName + properties: + id: + description: Unique identifier of the client + type: integer + objectName: + description: Model name, which is 'SevClient' + type: string + type: object + readOnly: true + cc: + description: A list of mail addresses which are in the cc + type: string + nullable: true + bcc: + description: A list of mail addresses which are in the bcc + type: string + nullable: true + arrived: + description: Date the mail arrived + type: string + format: date-time + example: 01.01.2020 + nullable: true + type: object + Model_ChangeLayout: + title: Layout model + description: Layout model + required: + - key + - value + properties: + key: + description: the type to be changed + type: string + enum: + - language + - template + - letterpaper + - payPal + example: template + nullable: false + value: + description: the id/value of the template/letterpaper/language/payPal. + type: string + example: 573ef2706bd2d50366786471 + Model_ChangeLayoutResponse: + title: Layout model + description: Layout model + type: object + properties: + result: + type: string + example: '1' + metadaten: + type: object + properties: + pages: + description: the number of pages in the document + type: integer + example: 1 + docId: + description: the id of the document + type: string + readOnly: true + thumbs: + description: the pdf file + type: array + items: + properties: + key: + type: string + example: language + name: + type: string + example: Sprache + values: + type: array + items: + properties: + name: + type: string + example: deutsch + value: + type: string + example: de_DE + translationCode: + type: string + example: SEVDOC_LANG_DE_DE + Model_OrderResponse: + title: Order model + description: Order model + properties: + id: + description: The order id + type: string + readOnly: true + nullable: false + example: '0' + objectName: + description: The order object name + type: string + readOnly: true + nullable: false + example: Order + create: + description: Date of order creation + type: string + format: date-time + readOnly: true + update: + description: Date of last order update + type: string + format: date-time + readOnly: true + orderNumber: + description: The order number + type: string + example: Offer-1000 + contact: + description: The contact used in the order + required: + - id + - objectName + properties: + id: + description: Unique identifier of the contact + type: string + example: '0' + objectName: + description: Model name, which is 'Contact' + type: string + example: Contact + type: object + nullable: false + orderDate: + description: Needs to be provided as timestamp or dd.mm.yyyy + type: string + format: date-time + example: 01.01.2020 + nullable: false + status: + description: "Please have a look in \r\n status of orders\r\n to see what the different status codes mean" + type: string + enum: + - '100' + - '200' + - '300' + - '500' + - '750' + - '1000' + example: '100' + nullable: false + header: + description: Normally consist of prefix plus the order number + type: string + example: My Offer-1000 + nullable: false + headText: + description: Certain html tags can be used here to format your text + type: string + nullable: true + footText: + description: Certain html tags can be used here to format your text + type: string + nullable: true + addressCountry: + description: Can be omitted as complete address is defined in address attribute + required: + - id + - objectName + properties: + id: + description: Unique identifier of the country + type: string + objectName: + description: Model name, which is 'StaticCountry' + type: string + type: object + nullable: true + createUser: + description: Will be filled automatically by our system and can't be changed + required: + - id + - objectName + properties: + id: + description: Unique identifier of the user + type: string + example: '0' + objectName: + description: Model name, which is 'SevUser' + type: string + example: SevUser + type: object + readOnly: true + sevClient: + description: Client to which order belongs. Will be filled automatically + required: + - id + - objectName + properties: + id: + description: Unique identifier of the client + type: string + example: '0' + objectName: + description: Model name, which is 'SevClient' + type: string + example: SevClient + type: object + readOnly: true + deliveryTerms: + description: Delivery terms of the order + type: string + nullable: true + paymentTerms: + description: Payment terms of the order + type: string + nullable: true + origin: + description: Object from which the order was created. For example an offer. + required: + - id + - objectName + properties: + id: + description: Unique identifier of the object + type: string + example: '0' + objectName: + description: Model name of the object. Could be 'Order'. + type: string + example: Order + type: object + nullable: true + version: + description: "Version of the order.
\r\n Can be used if you have multiple drafts for the same order.
\r\n Should start with 0" + type: string + example: '0' + nullable: false + smallSettlement: + description: "Defines if the client uses the small settlement scheme.\r\n If yes, the order must not contain any vat" + type: boolean + example: '0' + nullable: false + contactPerson: + description: The user who acts as a contact person for the order + required: + - id + - objectName + properties: + id: + description: Unique identifier of the user + type: string + example: '0' + objectName: + description: Model name, which is 'SevUser' + type: string + example: SevUser + type: object + taxRate: + description: >- + This is not used anymore. Use the taxRate of the individual + positions instead. + type: string + example: '0' + nullable: false + taxRule: + description: '**Use this in sevdesk-Update 2.0 (replaces taxType / taxSet).**' + required: + - id + - objectName + properties: + id: + description: |- + **Use this in sevdesk-Update 2.0 (replaces taxType / taxSet).** + + Defines the vat-regulation. + For "Regelbesteuerung" it can be one of: + - `1` - Umsatzsteuerpflichtige Umsätze - tax rates: 0.0, 7.0, 19.0 - replaces `"taxType": "default"` + - `2` - Ausfuhren - allowedTaxRates: 0.0 + - `3` - Innergemeinschaftliche Lieferungen - tax rates: 0.0, 7.0, 19.0 - replaces `"taxType": "eu"` + - `4` - Steuerfreie Umsätze §4 UStG - tax rates: 0.0 + - `5` - Reverse Charge gem. §13b UStG - tax rates: 0.0 + - `17` - Nicht im Inland steuerbare Leistung - tax rates: 0.0 - replaces `"taxType": "noteu"` + - If \"Nicht im Inland steuerbare Leistung\" is used, no advance or partial invoice can be created from this order + - See the example request ([Invoice/Factory/createInvoiceFromOrder](#tag/Invoice/operation/createInvoiceFromOrder)) to create a normal invoice `"invoiceType": "RE"` from such an order + + For small business owner ("Kleinunternehmer") it can be: + - `11` - Steuer nicht erhoben nach §19UStG - tax rates: 0.0 - replaces `"taxType": "ss"` + type: string + enum: + - '1' + - '2' + - '3' + - '4' + - '5' + - '11' + objectName: + description: Name of the object. Must always be TaxRule + type: string + enum: + - TaxRule + type: object + nullable: false + taxSet: + description: >- + **Use this in sevdesk-Update 1.0 (instead of taxRule).** + + + Tax set of the order. Needs to be added if you chose the tax type + custom + required: + - id + - objectName + properties: + id: + description: Unique identifier of the object + type: string + example: '0' + objectName: + description: Model name, which is 'TaxSet' + type: string + example: TaxSet + type: object + nullable: true + taxText: + description: A common tax text would be 'Umsatzsteuer 19%' + type: string + example: Umsatzsteuer 19% + nullable: false + taxType: + description: >- + **Use this in sevdesk-Update 1.0 (instead of taxRule).** + + + Tax type of the order. + + There are four tax types: + + 1. default - Umsatzsteuer ausweisen + + 2. eu - Steuerfreie innergemeinschaftliche Lieferung (Europäische + Union) + + 3. noteu - Steuerschuldnerschaft des Leistungsempfängers (außerhalb + EU, z. B. Schweiz) + + 4. custom - Using custom tax set + + 5. ss - Not subject to VAT according to §19 1 UStG + + Tax rates are heavily connected to the tax type used. + type: string + example: default + nullable: false + orderType: + description: "Type of the order. For more information on the different types, check\r\n this\r\n" + type: string + enum: + - AN + - AB + - LI + example: AN + nullable: false + sendDate: + description: The date the order was sent to the customer + type: string + format: date-time + nullable: true + address: + description: "Complete address of the recipient including name, street, city, zip and country.
\r\n Line breaks can be used and will be displayed on the invoice pdf." + type: string + nullable: true + currency: + description: >- + Currency used in the order. Needs to be currency code according to + ISO-4217 + type: string + example: EUR + nullable: false + sumNet: + description: Net sum of the order + type: string + readOnly: true + nullable: false + sumTax: + description: Tax sum of the order + type: string + readOnly: true + nullable: false + sumGross: + description: Gross sum of the order + type: string + readOnly: true + nullable: false + sumDiscounts: + description: Sum of all discounts in the order + type: string + readOnly: true + nullable: false + sumNetForeignCurrency: + description: Net sum of the order in the foreign currency + type: string + readOnly: true + nullable: false + sumTaxForeignCurrency: + description: Tax sum of the order in the foreign currency + type: string + readOnly: true + nullable: false + sumGrossForeignCurrency: + description: Gross sum of the order in the foreign currency + type: string + readOnly: true + nullable: false + sumDiscountsForeignCurrency: + description: Discounts sum of the order in the foreign currency + type: string + readOnly: true + nullable: false + customerInternalNote: + description: >- + Internal note of the customer. Contains data entered into field + 'Referenz/Bestellnummer' + type: string + nullable: true + showNet: + description: >- + If true, the net amount of each position will be shown on the order. + Otherwise gross amount + type: boolean + example: 1 + nullable: false + sendType: + description: "Type which was used to send the order. IMPORTANT: Please refer to the order section of the\r\n * API-Overview to understand how this attribute can be used before using it!" + type: string + enum: + - VPR + - VPDF + - VM + - VP + nullable: true + type: object + Model_Order: + title: Order model + description: Order model + required: + - orderNumber + - orderDate + - contact + - status + - addressCountry + - contactPerson + - taxRate + - taxRule + - taxText + - taxType + - currency + - header + - version + - mapAll + properties: + id: + description: The order id + type: integer + readOnly: true + nullable: false + objectName: + description: The order object name + type: string + nullable: false + mapAll: + type: boolean + nullable: false + create: + description: Date of order creation + type: string + format: date-time + readOnly: true + update: + description: Date of last order update + type: string + format: date-time + readOnly: true + orderNumber: + description: The order number + type: string + example: Offer-1000 + contact: + description: The contact used in the order + required: + - id + - objectName + properties: + id: + description: Unique identifier of the contact + type: integer + objectName: + description: Model name, which is 'Contact' + type: string + example: Contact + type: object + nullable: false + orderDate: + description: Needs to be provided as timestamp or dd.mm.yyyy + type: string + format: date-time + example: 01.01.2020 + nullable: false + status: + description: "Please have a look in \r\n status of orders\r\n to see what the different status codes mean" + type: integer + enum: + - 100 + - 200 + - 300 + - 500 + - 750 + - 1000 + example: 100 + nullable: false + header: + description: Normally consist of prefix plus the order number + type: string + example: My Offer-1000 + nullable: false + headText: + description: Certain html tags can be used here to format your text + type: string + default: null + example: header information + nullable: true + footText: + description: Certain html tags can be used here to format your text + type: string + default: null + example: footer information + nullable: true + addressCountry: + description: Can be omitted as complete address is defined in address attribute + required: + - id + - objectName + properties: + id: + description: Unique identifier of the country + type: integer + objectName: + description: Model name, which is 'StaticCountry' + type: string + example: StaticCountry + type: object + nullable: false + deliveryTerms: + description: Delivery terms of the order + type: string + default: null + example: delivery terms + nullable: true + paymentTerms: + description: Payment terms of the order + type: string + default: null + example: payment terms + nullable: true + version: + description: "Version of the order.
\r\n Can be used if you have multiple drafts for the same order.
\r\n Should start with 0" + type: integer + example: 0 + nullable: false + smallSettlement: + description: "Defines if the client uses the small settlement scheme.\r\n If yes, the order must not contain any vat" + type: boolean + example: 0 + nullable: false + contactPerson: + description: The user who acts as a contact person for the order + required: + - id + - objectName + properties: + id: + description: Unique identifier of the user + type: integer + example: 0 + objectName: + description: Model name, which is 'SevUser' + type: string + example: SevUser + type: object + nullable: false + taxRate: + description: >- + This is not used anymore. Use the taxRate of the individual + positions instead. + type: number + example: 0 + nullable: false + taxRule: + description: '**Use this in sevdesk-Update 2.0 (replaces taxType / taxSet).**' + required: + - id + - objectName + properties: + id: + description: |- + **Use this in sevdesk-Update 2.0 (replaces taxType / taxSet).** + + Defines the vat-regulation. + For "Regelbesteuerung" it can be one of: + - `1` - Umsatzsteuerpflichtige Umsätze - tax rates: 0.0, 7.0, 19.0 - replaces `"taxType": "default"` + - `2` - Ausfuhren - allowedTaxRates: 0.0 + - `3` - Innergemeinschaftliche Lieferungen - tax rates: 0.0, 7.0, 19.0 - replaces `"taxType": "eu"` + - `4` - Steuerfreie Umsätze §4 UStG - tax rates: 0.0 + - `5` - Reverse Charge gem. §13b UStG - tax rates: 0.0 + - `17` - Nicht im Inland steuerbare Leistung - tax rates: 0.0 - replaces `"taxType": "noteu"` + - If \"Nicht im Inland steuerbare Leistung\" is used, no advance or partial invoice can be created from this order + - See the example request ([Invoice/Factory/createInvoiceFromOrder](#tag/Invoice/operation/createInvoiceFromOrder)) to create a normal invoice `"invoiceType": "RE"` from such an order + + For small business owner ("Kleinunternehmer") it can be: + - `11` - Steuer nicht erhoben nach §19UStG - tax rates: 0.0 - replaces `"taxType": "ss"` + type: string + enum: + - '1' + - '2' + - '3' + - '4' + - '5' + - '11' + objectName: + description: Name of the object. Must always be TaxRule + type: string + enum: + - TaxRule + type: object + nullable: false + taxSet: + description: >- + **Use this in sevdesk-Update 1.0 (instead of taxRule).** + + + Tax set of the order. Needs to be added if you chose the tax type + custom + required: + - id + - objectName + properties: + id: + description: Unique identifier of the object + type: integer + objectName: + description: Model name, which is 'TaxSet' + type: string + example: TaxSet + type: object + nullable: true + taxText: + description: A common tax text would be 'Umsatzsteuer 19%' + type: string + example: Umsatzsteuer 19% + nullable: false + taxType: + description: >- + **Use this in sevdesk-Update 1.0 (instead of taxRule).** + + + Tax type of the order. + + There are four tax types: + + 1. default - Umsatzsteuer ausweisen + + 2. eu - Steuerfreie innergemeinschaftliche Lieferung (Europäische + Union) + + 3. noteu - Steuerschuldnerschaft des Leistungsempfängers (außerhalb + EU, z. B. Schweiz) + + 4. custom - Using custom tax set + + 5. ss - Not subject to VAT according to §19 1 UStG + + Tax rates are heavily connected to the tax type used. + type: string + example: default + nullable: false + orderType: + description: "Type of the order. For more information on the different types, check\r\n this \r\n" + type: string + enum: + - AN + - AB + - LI + example: AN + nullable: false + sendDate: + description: The date the order was sent to the customer + type: string + format: date-time + example: 26.07.2022 + nullable: true + address: + description: "Complete address of the recipient including name, street, city, zip and country.
\r\n Line breaks can be used and will be displayed on the invoice pdf." + type: string + default: null + example: name\nstreet\npostCode city + nullable: true + currency: + description: >- + Currency used in the order. Needs to be currency code according to + ISO-4217 + type: string + example: EUR + nullable: false + customerInternalNote: + description: >- + Internal note of the customer. Contains data entered into field + 'Referenz/Bestellnummer' + type: string + default: null + example: customer internal note + nullable: true + showNet: + description: >- + If true, the net amount of each position will be shown on the order. + Otherwise gross amount + type: boolean + example: 1 + nullable: false + sendType: + description: "Type which was used to send the order. IMPORTANT: Please refer to the order section of the\r\n * API-Overview to understand how this attribute can be used before using it!" + type: string + default: null + example: VPR + enum: + - VPR + - VPDF + - VM + - VP + nullable: true + origin: + description: Object from which the order was created. For example an offer. + required: + - id + - objectName + properties: + id: + description: Unique identifier of the object + type: integer + objectName: + description: Model name of the object. Could be 'Order'. + type: string + type: object + nullable: true + type: object + Model_OrderPos: + title: Order position model + description: Order position model + required: + - unity + - taxRate + - quantity + properties: + id: + description: The order position id + type: integer + readOnly: true + nullable: false + objectName: + description: The order position object name + type: string + readOnly: true + nullable: false + create: + description: Date of order position creation + type: string + readOnly: true + update: + description: Date of last order position update + type: string + readOnly: true + order: + description: The order to which the position belongs. + required: + - id + - objectName + properties: + id: + description: Unique identifier of the order + type: integer + objectName: + description: Model name, which is 'Order' + type: string + example: Order + type: object + part: + description: Part from your inventory which is used in the position. + required: + - id + - objectName + properties: + id: + description: Unique identifier of the part + type: integer + objectName: + description: Model name, which is 'Part' + type: string + example: Part + type: object + quantity: + description: Quantity of the article/part + type: number + example: 1 + nullable: false + price: + description: >- + Price of the article/part. Is either gross or net, depending on the + sevdesk account setting. + type: number + example: 100 + nullable: true + priceNet: + description: Net price of the part + type: number + readOnly: true + nullable: true + priceTax: + description: Tax on the price of the part + type: number + nullable: true + priceGross: + description: Gross price of the part + type: number + nullable: true + name: + description: Name of the article/part. + type: string + example: Dragonglass + nullable: true + unity: + description: The unit in which the positions part is measured + required: + - id + - objectName + properties: + id: + description: Unique identifier of the unit + type: integer + objectName: + description: Model name, which is 'Unity' + type: string + example: Unity + type: object + sevClient: + description: Client to which order position belongs. Will be filled automatically + required: + - id + - objectName + properties: + id: + description: Unique identifier of the client + type: integer + objectName: + description: Model name, which is 'SevClient' + type: string + type: object + readOnly: true + positionNumber: + description: >- + Position number of your position. Can be used to order multiple + positions. + type: integer + example: 1 + nullable: true + text: + description: A text describing your position. + type: string + nullable: true + discount: + description: An optional discount of the position. + type: number + nullable: true + optional: + description: Defines if the position is optional. + type: boolean + nullable: true + taxRate: + description: Tax rate of the position. + type: number + example: 19 + nullable: false + sumDiscount: + description: Discount sum of the position + type: number + readOnly: true + nullable: true + type: object + saveOrder: + type: object + required: + - order + - orderPos + properties: + order: + $ref: '#/components/schemas/Model_Order' + orderPosSave: + type: array + items: + $ref: '#/components/schemas/Model_OrderPos' + orderPosDelete: + required: + - id + - objectName + properties: + id: + description: Id of order position + type: integer + objectName: + description: Object name of order position + type: string + default: null + Model_OrderPosResponse: + title: Order position model + description: Order position model + properties: + id: + description: The order position id + type: string + readOnly: true + example: '0' + nullable: false + objectName: + description: The order position object name + type: string + example: OrderPos + readOnly: true + nullable: false + create: + description: Date of order position creation + type: string + format: date-time + readOnly: true + example: 01.01.2020 + update: + description: Date of last order position update + type: string + format: date-time + readOnly: true + example: 01.01.2020 + order: + description: The order to which the position belongs. + required: + - id + - objectName + properties: + id: + description: Unique identifier of the order + type: string + example: '0' + objectName: + description: Model name, which is 'Order' + type: string + example: Order + type: object + part: + description: Part from your inventory which is used in the position. + required: + - id + - objectName + properties: + id: + description: Unique identifier of the part + type: string + example: '0' + objectName: + description: Model name, which is 'Part' + type: string + example: Part + type: object + quantity: + description: Quantity of the article/part + type: string + example: '1' + nullable: false + price: + description: >- + Price of the article/part. Is either gross or net, depending on the + sevdesk account setting. + type: string + example: '100' + nullable: true + priceNet: + description: Net price of the part + type: string + readOnly: true + example: '100' + nullable: true + priceTax: + description: Tax on the price of the part + type: string + example: '19' + nullable: true + priceGross: + description: Gross price of the part + type: string + example: '119' + nullable: true + name: + description: Name of the article/part. + type: string + example: Dragonglass + nullable: true + unity: + description: The unit in which the positions part is measured + required: + - id + - objectName + properties: + id: + description: Unique identifier of the unit + type: string + example: '0' + objectName: + description: Model name, which is 'Unity' + type: string + example: Unity + type: object + sevClient: + description: Client to which order position belongs. Will be filled automatically + required: + - id + - objectName + properties: + id: + description: Unique identifier of the client + type: string + example: '0' + objectName: + description: Model name, which is 'SevClient' + type: string + type: object + readOnly: true + positionNumber: + description: >- + Position number of your position. Can be used to order multiple + positions. + type: string + example: '1' + nullable: true + text: + description: A text describing your position. + type: string + nullable: true + discount: + description: An optional discount of the position. + type: string + nullable: true + optional: + description: Defines if the position is optional. + type: boolean + nullable: true + taxRate: + description: Tax rate of the position. + type: string + example: '19' + nullable: false + sumDiscount: + description: Discount sum of the position + type: string + readOnly: true + nullable: true + type: object + saveOrderResponse: + type: object + properties: + order: + $ref: '#/components/schemas/Model_OrderResponse' + orderPos: + type: array + items: + $ref: '#/components/schemas/Model_OrderPosResponse' + Model_OrderUpdate: + title: Order model + description: Order model + properties: + id: + description: The order id + type: integer + readOnly: true + nullable: false + objectName: + description: The order object name + type: string + readOnly: true + nullable: false + create: + description: Date of order creation + type: string + format: date-time + readOnly: true + update: + description: Date of last order update + type: string + format: date-time + readOnly: true + orderNumber: + description: The order number + type: string + example: Offer-1000 + contact: + description: The contact used in the order + required: + - id + - objectName + properties: + id: + description: Unique identifier of the contact + type: integer + objectName: + description: Model name, which is 'Contact' + type: string + example: Contact + type: object + nullable: true + orderDate: + description: Needs to be provided as timestamp or dd.mm.yyyy + type: string + format: date-time + example: 01.01.2020 + nullable: true + status: + description: "Please have a look in \r\n status of orders\r\n to see what the different status codes mean" + type: integer + enum: + - 100 + - 200 + - 300 + - 500 + - 750 + - 1000 + example: 100 + nullable: true + header: + description: Normally consist of prefix plus the order number + type: string + example: My Offer-1000 + nullable: true + headText: + description: Certain html tags can be used here to format your text + type: string + nullable: true + footText: + description: Certain html tags can be used here to format your text + type: string + nullable: true + addressCountry: + description: Can be omitted as complete address is defined in address attribute + required: + - id + - objectName + properties: + id: + description: Unique identifier of the country + type: integer + objectName: + description: Model name, which is 'StaticCountry' + type: string + type: object + nullable: true + createUser: + description: Will be filled automatically by our system and can't be changed + required: + - id + - objectName + properties: + id: + description: Unique identifier of the user + type: integer + objectName: + description: Model name, which is 'SevUser' + type: string + type: object + readOnly: true + sevClient: + description: Client to which order belongs. Will be filled automatically + required: + - id + - objectName + properties: + id: + description: Unique identifier of the client + type: integer + objectName: + description: Model name, which is 'SevClient' + type: string + type: object + readOnly: true + deliveryTerms: + description: Delivery terms of the order + type: string + nullable: true + paymentTerms: + description: Payment terms of the order + type: string + nullable: true + origin: + description: Object from which the order was created. For example an offer. + required: + - id + - objectName + properties: + id: + description: Unique identifier of the object + type: integer + objectName: + description: Model name of the object. Could be 'Order'. + type: string + type: object + nullable: true + version: + description: "Version of the order.
\r\n Can be used if you have multiple drafts for the same order.
\r\n Should start with 0" + type: integer + example: 0 + nullable: true + smallSettlement: + description: "Defines if the client uses the small settlement scheme.\r\n If yes, the order must not contain any vat" + type: boolean + example: 0 + nullable: true + contactPerson: + description: The user who acts as a contact person for the order + required: + - id + - objectName + properties: + id: + description: Unique identifier of the user + type: integer + objectName: + description: Model name, which is 'SevUser' + type: string + example: SevUser + type: object + taxRate: + description: >- + This is not used anymore. Use the taxRate of the individual + positions instead. + type: number + example: 0 + nullable: true + taxRule: + description: '**Use this in sevdesk-Update 2.0 (replaces taxType / taxSet).**' + required: + - id + - objectName + properties: + id: + description: |- + **Use this in sevdesk-Update 2.0 (replaces taxType / taxSet).** + + Defines the vat-regulation. + For "Regelbesteuerung" it can be one of: + - `1` - Umsatzsteuerpflichtige Umsätze - tax rates: 0.0, 7.0, 19.0 - replaces `"taxType": "default"` + - `2` - Ausfuhren - allowedTaxRates: 0.0 + - `3` - Innergemeinschaftliche Lieferungen - tax rates: 0.0, 7.0, 19.0 - replaces `"taxType": "eu"` + - `4` - Steuerfreie Umsätze §4 UStG - tax rates: 0.0 + - `5` - Reverse Charge gem. §13b UStG - tax rates: 0.0 + - `17` - Nicht im Inland steuerbare Leistung - tax rates: 0.0 - replaces `"taxType": "noteu"` + - If \"Nicht im Inland steuerbare Leistung\" is used, no advance or partial invoice can be created from this order + - See the example request ([Invoice/Factory/createInvoiceFromOrder](#tag/Invoice/operation/createInvoiceFromOrder)) to create a normal invoice `"invoiceType": "RE"` from such an order + + For small business owner ("Kleinunternehmer") it can be: + - `11` - Steuer nicht erhoben nach §19UStG - tax rates: 0.0 - replaces `"taxType": "ss"` + type: string + enum: + - '1' + - '2' + - '3' + - '4' + - '5' + - '11' + objectName: + description: Name of the object. Must always be TaxRule + type: string + enum: + - TaxRule + type: object + nullable: false + taxSet: + description: >- + **Use this in sevdesk-Update 1.0 (instead of taxRule).** + + + Tax set of the order. Needs to be added if you chose the tax type + custom + required: + - id + - objectName + properties: + id: + description: Unique identifier of the object + type: integer + objectName: + description: Model name, which is 'TaxSet' + type: string + type: object + nullable: true + taxText: + description: A common tax text would be 'Umsatzsteuer 19%' + type: string + example: Umsatzsteuer 19% + nullable: true + taxType: + description: >- + **Use this in sevdesk-Update 1.0 (instead of taxRule).** + + + Tax type of the order. + + There are four tax types: + + 1. default - Umsatzsteuer ausweisen + + 2. eu - Steuerfreie innergemeinschaftliche Lieferung (Europäische + Union) + + 3. noteu - Steuerschuldnerschaft des Leistungsempfängers (außerhalb + EU, z. B. Schweiz) + + 4. custom - Using custom tax set + + 5. ss - Not subject to VAT according to §19 1 UStG + + Tax rates are heavily connected to the tax type used. + type: string + example: default + nullable: true + orderType: + description: "Type of the order. For more information on the different types, check\r\n this\r\n" + type: string + enum: + - AN + - AB + - LI + example: AN + nullable: true + sendDate: + description: The date the order was sent to the customer + type: string + format: date-time + nullable: true + address: + description: "Complete address of the recipient including name, street, city, zip and country.
\r\n Line breaks can be used and will be displayed on the invoice pdf." + type: string + nullable: true + currency: + description: >- + Currency used in the order. Needs to be currency code according to + ISO-4217 + type: string + example: EUR + nullable: true + sumNet: + description: Net sum of the order + type: number + readOnly: true + nullable: false + sumTax: + description: Tax sum of the order + type: number + readOnly: true + nullable: false + sumGross: + description: Gross sum of the order + type: number + readOnly: true + nullable: false + sumDiscounts: + description: Sum of all discounts in the order + type: number + readOnly: true + nullable: false + sumNetForeignCurrency: + description: Net sum of the order in the foreign currency + type: number + readOnly: true + nullable: false + sumTaxForeignCurrency: + description: Tax sum of the order in the foreign currency + type: number + readOnly: true + nullable: false + sumGrossForeignCurrency: + description: Gross sum of the order in the foreign currency + type: number + readOnly: true + nullable: false + sumDiscountsForeignCurrency: + description: Discounts sum of the order in the foreign currency + type: number + readOnly: true + nullable: false + customerInternalNote: + description: >- + Internal note of the customer. Contains data entered into field + 'Referenz/Bestellnummer' + type: string + nullable: true + showNet: + description: >- + If true, the net amount of each position will be shown on the order. + Otherwise gross amount + type: boolean + example: 1 + nullable: true + sendType: + description: "Type which was used to send the order. IMPORTANT: Please refer to the order section of the\r\n * API-Overview to understand how this attribute can be used before using it!" + type: string + enum: + - VPR + - VPDF + - VM + - VP + nullable: true + type: object + Model_Discount: + title: Discounts + description: Discount model + properties: + id: + description: the id of the discount + type: string + example: '0' + readOnly: true + objectName: + description: Model name, which is 'Discounts' + type: string + example: Discounts + readOnly: true + create: + description: Date of discount creation + type: string + format: date-time + example: 01.01.2020 + readOnly: true + update: + description: Date of last discount update + type: string + format: date-time + example: 01.01.2020 + readOnly: true + object: + description: The order used for the discount + required: + - id + - objectName + properties: + id: + description: Unique identifier of the order + type: string + example: '0' + objectName: + description: Model name, which is 'Order' + type: string + example: Order + type: object + readOnly: true + sevClient: + description: Client to which invoice belongs. Will be filled automatically + type: string + example: '0' + readOnly: true + text: + description: A text describing your position. + type: string + readOnly: true + percentage: + description: Defines if this is a percentage or an absolute discount + type: string + example: '1' + value: + description: Value of the discount + type: string + example: '10' + isNet: + description: |- + Defines is the Discount net or gross + 0 - gross + 1 - net + type: string + example: '1' + Model_EmailOrder: + title: Email model + description: Email model + required: + - from + - to + - subject + properties: + id: + description: The email id + type: integer + readOnly: true + nullable: false + objectName: + description: The email object name + type: string + readOnly: true + nullable: false + create: + description: Date of mail creation + type: string + format: date-time + example: 01.01.2020 + readOnly: true + update: + description: Date of last mail update + type: string + format: date-time + example: 01.01.2020 + readOnly: true + object: + $ref: '#/components/schemas/Model_OrderResponse' + from: + description: The sender of the email + type: string + nullable: false + to: + description: The recipient of the email + type: string + nullable: false + subject: + description: The subject of the email + type: string + nullable: false + text: + description: The text of the email + type: string + nullable: true + sevClient: + description: Client to which mail belongs. Will be filled automatically + required: + - id + - objectName + properties: + id: + description: Unique identifier of the client + type: integer + objectName: + description: Model name, which is 'SevClient' + type: string + type: object + readOnly: true + cc: + description: A list of mail addresses which are in the cc + type: string + nullable: true + bcc: + description: A list of mail addresses which are in the bcc + type: string + nullable: true + arrived: + description: Date the mail arrived + type: string + format: date-time + example: 01.01.2020 + nullable: true + type: object + Model_CreatePackingListFromOrder: + title: Create packing list + description: order model + required: + - id + - objectName + properties: + id: + description: Unique identifier of the order + type: integer + objectName: + description: Model name, which is 'Order' + type: string + example: Order + nullable: false + type: object + Model_OrderPosUpdate: + title: Order position model + description: Order position model + properties: + id: + description: The order position id + type: integer + readOnly: true + nullable: false + objectName: + description: The order position object name + type: string + example: OrderPos + readOnly: true + nullable: false + create: + description: Date of order position creation + type: string + format: date-time + readOnly: true + example: 01.01.2020 + update: + description: Date of last order position update + type: string + format: date-time + readOnly: true + example: 01.01.2020 + order: + description: The order to which the position belongs. + required: + - id + - objectName + properties: + id: + description: Unique identifier of the order + type: integer + objectName: + description: Model name, which is 'Order' + type: string + example: Order + type: object + part: + description: Part from your inventory which is used in the position. + required: + - id + - objectName + properties: + id: + description: Unique identifier of the part + type: integer + objectName: + description: Model name, which is 'Part' + type: string + example: Part + type: object + quantity: + description: Quantity of the article/part + type: number + example: 1 + nullable: true + price: + description: >- + Price of the article/part. Is either gross or net, depending on the + sevdesk account setting. + type: number + example: 100 + nullable: true + priceNet: + description: Net price of the part + type: number + readOnly: true + nullable: true + priceTax: + description: Tax on the price of the part + type: number + nullable: true + priceGross: + description: Gross price of the part + type: number + nullable: true + name: + description: Name of the article/part. + type: string + example: Dragonglass + nullable: true + unity: + description: The unit in which the positions part is measured + required: + - id + - objectName + properties: + id: + description: Unique identifier of the unit + type: integer + objectName: + description: Model name, which is 'Unity' + type: string + example: Unity + type: object + sevClient: + description: Client to which order position belongs. Will be filled automatically + required: + - id + - objectName + properties: + id: + description: Unique identifier of the client + type: integer + objectName: + description: Model name, which is 'SevClient' + type: string + type: object + readOnly: true + positionNumber: + description: >- + Position number of your position. Can be used to order multiple + positions. + type: integer + example: 1 + nullable: true + text: + description: A text describing your position. + type: string + nullable: true + discount: + description: An optional discount of the position. + type: number + nullable: true + optional: + description: Defines if the position is optional. + type: boolean + nullable: true + taxRate: + description: Tax rate of the position. + type: number + example: 19 + nullable: true + sumDiscount: + description: Discount sum of the position + type: number + readOnly: true + nullable: true + type: object + Model_Voucher: + title: Voucher model + description: Voucher model + required: + - creditDebit + - taxType + - taxRule + - status + - voucherType + - mapAll + - objectName + properties: + id: + description: The voucher id + type: integer + readOnly: true + nullable: false + objectName: + description: The voucher object name + type: string + nullable: false + mapAll: + type: boolean + example: true + nullable: false + create: + description: Date of voucher creation + type: string + format: date-time + readOnly: true + example: 01.01.2020 + update: + description: Date of last voucher update + type: string + format: date-time + readOnly: true + example: 01.01.2020 + sevClient: + description: Client to which voucher belongs. Will be filled automatically + required: + - id + - objectName + properties: + id: + description: Unique identifier of the client + type: integer + objectName: + description: Model name, which is 'SevClient' + type: string + example: SevClient + type: object + readOnly: true + createUser: + description: User who created the voucher. Will be filled automatically. + required: + - id + - objectName + properties: + id: + description: Unique identifier of the user + type: integer + objectName: + description: Model name, which is 'SevUser' + type: string + example: SevUser + type: object + readOnly: true + voucherDate: + description: Needs to be provided as timestamp or dd.mm.yyyy + type: string + format: date-time + example: 01.01.2022 + nullable: true + supplier: + description: >- + The contact used in the voucher as a supplier.
+ + If you don't have a contact as a supplier, you can set this object + to null. + required: + - id + - objectName + properties: + id: + description: Unique identifier of the contact + type: integer + objectName: + description: Model name, which is 'Contact' + type: string + example: Contact + type: object + nullable: true + supplierName: + description: "The supplier name.
\r\n The value you provide here will determine what supplier name is shown for the voucher in case you did not provide a supplier." + type: string + example: John Snow + nullable: true + description: + description: The description of the voucher. Essentially the voucher number. + type: string + example: Voucher-1000 + nullable: true + payDate: + description: Needs to be timestamp or dd.mm.yyyy + type: string + format: date-time + nullable: true + example: 01.01.2022 + status: + description: "Please have a look in \r\n status of vouchers\r\n to see what the different status codes mean" + type: number + enum: + - 50 + - 100 + - 1000 + example: 50 + nullable: false + sumNet: + description: Net sum of the voucher + type: number + format: float + readOnly: true + nullable: false + sumTax: + description: Tax sum of the voucher + type: number + format: float + readOnly: true + nullable: false + sumGross: + description: Gross sum of the voucher + type: number + format: float + readOnly: true + nullable: false + sumNetAccounting: + description: Net accounting sum of the voucher. Is usually the same as sumNet + type: number + format: float + readOnly: true + nullable: false + sumTaxAccounting: + description: Tax accounting sum of the voucher. Is usually the same as sumTax + type: number + format: float + readOnly: true + nullable: false + sumGrossAccounting: + description: Gross accounting sum of the voucher. Is usually the same as sumGross + type: number + format: float + readOnly: true + nullable: false + sumDiscounts: + description: Sum of all discounts in the voucher + type: number + format: float + readOnly: true + nullable: false + sumDiscountsForeignCurrency: + description: Discounts sum of the voucher in the foreign currency + type: number + format: float + readOnly: true + nullable: false + paidAmount: + description: Amount which has already been paid for this voucher by the customer + type: number + format: float + readOnly: true + nullable: true + taxRule: + description: '**Use this in sevdesk-Update 2.0 (replaces taxType / taxSet).**' + required: + - id + - objectName + properties: + id: + description: |- + **Use this in sevdesk-Update 2.0 (replaces taxType / taxSet).** + + Defines the vat-regulation. + For "Regelbesteuerung" it can be one of: + - `1` - Umsatzsteuerpflichtige Umsätze (tax rates: 0.0, 7.0, 19.0) - replaces `"taxType": "default"` + - `2` - Ausfuhren (tax rates: 0.0) + - `3` - Innergemeinschaftliche Lieferungen (tax rates: 0.0, 7.0, 19.0) - replaces `"taxType": "eu"` + - `4` - Steuerfreie Umsätze §4 UStG (tax rates: 0.0) + - `5` - Reverse Charge gem. §13b UStG (tax rates: 0.0) + + For small business owner ("Kleinunternehmer") it can be: + - `11` - Steuer nicht erhoben nach §19UStG (tax rates: 0.0) - replaces `"taxType": "ss"` + type: string + enum: + - '1' + - '2' + - '3' + - '4' + - '5' + - '11' + objectName: + description: Name of the object. Must always be TaxRule + type: string + enum: + - TaxRule + type: object + nullable: false + taxType: + description: >- + **Use this in sevdesk-Update 1.0 (instead of taxRule).** + + + Tax type of the voucher. + + There are four tax types: + + 1. default - Umsatzsteuer ausweisen + + 2. eu - Steuerfreie innergemeinschaftliche Lieferung (Europäische + Union) + + 3. noteu - Steuerschuldnerschaft des Leistungsempfängers (außerhalb + EU, z. B. Schweiz) + + 4. custom - Using custom tax set + + 5. ss - Not subject to VAT according to §19 1 UStG + + Tax rates are heavily connected to the tax type used. + type: string + example: default + nullable: false + creditDebit: + description: Defines if your voucher is a credit (C) or debit (D) + type: string + enum: + - C + - D + example: C + nullable: false + voucherType: + description: "Type of the voucher. For more information on the different types, check\r\n this\r\n" + type: string + enum: + - VOU + - RV + example: VOU + nullable: false + currency: + description: >- + specifies which currency the voucher should have. Attention: If the + currency differs from the default currency stored in the account, + then either the "propertyForeignCurrencyDeadline" or + "propertyExchangeRate" parameter must be specified. If both + parameters are specified, then the "propertyForeignCurrencyDeadline" + parameter is preferred + type: string + example: EUR + nullable: true + propertyForeignCurrencyDeadline: + description: >- + Defines the exchange rate day and and then the exchange rate is set + from sevdesk. Needs to be provided as timestamp or dd.mm.yyyy + type: string + format: date-time + example: 01.01.2022 + nullable: true + propertyExchangeRate: + description: Defines the exchange rate + type: number + format: float + example: 0.8912 + nullable: true + recurringInterval: + description: "The DateInterval in which recurring vouchers are generated.
\r\n Necessary attribute for all recurring vouchers." + type: string + enum: + - P0Y0M1W + - P0Y0M2W + - P0Y1M0W + - P0Y3M0W + - P0Y6M0W + - P1Y0M0W + - P2Y0M0W + - P3Y0M0W + - P4Y0M0W + - P5Y0M0W + nullable: true + readOnly: true + recurringStartDate: + description: "The date when the recurring vouchers start being generated.
\r\n Necessary attribute for all recurring vouchers." + type: string + format: date-time + example: 01.01.2020 + nullable: true + readOnly: true + recurringNextVoucher: + description: "The date when the next voucher should be generated.
\r\n Necessary attribute for all recurring vouchers." + type: string + format: date-time + example: 01.02.2020 + nullable: true + readOnly: true + recurringLastVoucher: + description: The date when the last voucher was generated. + type: string + format: date-time + example: 01.01.2021 + nullable: true + readOnly: true + recurringEndDate: + description: "The date when the recurring vouchers end being generated.
\r\n Necessary attribute for all recurring vouchers." + type: string + format: date-time + example: 01.01.2021 + nullable: true + readOnly: true + enshrined: + description: >- + Enshrined vouchers cannot be changed. Can only be set via + [Voucher/{voucherId}/enshrine](#tag/Voucher/operation/voucherEnshrine). + This operation cannot be undone. + type: string + format: date-time + example: '2024-04-08T00:00:00+02:00' + readOnly: true + taxSet: + description: >- + ** Use this in sevdesk-Update 2.0 (replaces taxType / taxSet).** + + + Tax set of the voucher. Needs to be added if you chose the + taxType=custom. + required: + - id + - objectName + properties: + id: + description: Unique identifier of the object + type: integer + objectName: + description: Model name, which is 'TaxSet' + type: string + example: TaxSet + type: object + example: null + nullable: true + paymentDeadline: + description: Payment deadline of the voucher. + type: string + format: date-time + nullable: true + example: 01.01.2022 + deliveryDate: + description: Needs to be provided as timestamp or dd.mm.yyyy + type: string + format: date-time + example: 01.01.2022 + nullable: false + deliveryDateUntil: + description: Needs to be provided as timestamp or dd.mm.yyyy + type: string + format: date-time + example: 22.02.2022 + nullable: true + document: + description: The document of the voucher. + required: + - id + - objectName + properties: + id: + description: Unique identifier of the document + type: integer + objectName: + description: Model name, which is 'Document' + type: string + example: Document + example: null + type: object + nullable: true + costCentre: + description: Cost centre for the voucher + required: + - id + - objectName + properties: + id: + description: Unique identifier of the cost centre + type: integer + objectName: + description: Model name, which is 'CostCentre' + type: string + example: CostCentre + example: null + type: object + type: object + Model_VoucherPos: + title: VoucherPos model + description: Voucher position model + required: + - accountDatev + - accountingType + - voucher + - taxRate + - sumGross + - sumNet + - net + - mapAll + - objectName + properties: + id: + description: The voucher position id + type: integer + readOnly: true + nullable: false + objectName: + description: The voucher position object name + type: string + nullable: false + mapAll: + type: boolean + nullable: false + create: + description: Date of voucher position creation + type: string + readOnly: true + example: 01.01.2020 + update: + description: Date of last voucher position update + type: string + readOnly: true + example: 01.01.2020 + sevClient: + description: >- + Client to which voucher position belongs. Will be filled + automatically + required: + - id + - objectName + properties: + id: + description: Unique identifier of the client + type: integer + objectName: + description: Model name, which is 'SevClient' + type: string + type: object + readOnly: true + voucher: + description: The voucher to which the position belongs. + required: + - id + - objectName + properties: + id: + description: Unique identifier of the voucher + type: integer + objectName: + description: Model name, which is 'Voucher' + type: string + example: Voucher + type: object + readOnly: true + accountDatev: + description: "Use this in sevdesk-Update 2.0 (replaces accountingType).\r\n The account datev to which the position belongs.
\r\n An account datev is the booking account to which the position belongs.
\r\n For more information, please refer to\r\n this section." + required: + - id + - objectName + properties: + id: + description: Unique identifier of the account datev + type: integer + objectName: + description: Model name, which is 'AccountDatev' + type: string + example: AccountDatev + type: object + accountingType: + description: "The accounting type to which the position belongs.
\r\n An accounting type is the booking account to which the position belongs.
\r\n For more information, please refer to\r\n this section." + required: + - id + - objectName + properties: + id: + description: Unique identifier of the accounting type + type: integer + objectName: + description: Model name, which is 'AccountingType' + type: string + example: AccountingType + type: object + estimatedAccountingType: + description: "The accounting type to which the position belongs estimated by our voucher recognition.
\r\n An accounting type is the booking account to which the position belongs.
\r\n For more information, please refer to\r\n this section." + required: + - id + - objectName + properties: + id: + description: Unique identifier of the accounting type + type: integer + objectName: + description: Model name, which is 'AccountingType' + type: string + example: AccountingType + type: object + readOnly: true + taxRate: + description: Tax rate of the voucher position. + type: number + format: float + example: 19 + net: + description: "Determines whether 'sumNet' or 'sumGross' is regarded.
\r\n If both are not given, 'sum' is regarded and treated as net or gross depending on 'net'. \n All positions must be either net or gross, a mixture of the two is not possible." + type: boolean + example: 'true' + isAsset: + description: >- + Determines whether position is regarded as an asset which can be + depreciated. + type: boolean + example: 'false' + sumNet: + description: "Net sum of the voucher position.
\r\n Only regarded if 'net' is 'true', otherwise its readOnly." + type: number + format: float + example: 100 + sumTax: + description: Tax sum of the voucher position. + type: number + format: float + readOnly: true + example: 19 + sumGross: + description: "Gross sum of the voucher position.
\r\n Only regarded if 'net' is 'false', otherwise its readOnly." + type: number + format: float + example: 119 + sumNetAccounting: + description: Net accounting sum. Is equal to sumNet. + type: number + format: float + readOnly: true + sumTaxAccounting: + description: Tax accounting sum. Is equal to sumTax. + type: number + format: float + readOnly: true + sumGrossAccounting: + description: Gross accounting sum. Is equal to sumGross. + type: number + format: float + readOnly: true + comment: + description: Comment for the voucher position. + type: string + nullable: true + type: object + saveVoucher: + type: object + required: + - voucher + - voucherPos + properties: + voucher: + $ref: '#/components/schemas/Model_Voucher' + voucherPosSave: + type: array + items: + $ref: '#/components/schemas/Model_VoucherPos' + voucherPosDelete: + required: + - id + - objectName + properties: + id: + description: Id of voucher position + type: integer + objectName: + description: Object name of voucher position + type: string + default: null + filename: + description: Filename of a previously upload file which should be attached. + type: string + format: binary + Model_VoucherResponse: + title: Voucher model + description: Voucher model + properties: + id: + description: The voucher id + type: string + example: '0' + readOnly: true + nullable: false + objectName: + description: The voucher object name + type: string + readOnly: true + nullable: false + mapAll: + type: boolean + example: true + nullable: false + create: + description: Date of voucher creation + type: string + format: date-time + readOnly: true + example: 01.01.2020 + update: + description: Date of last voucher update + type: string + format: date-time + readOnly: true + example: 01.01.2020 + sevClient: + description: Client to which voucher belongs. Will be filled automatically + required: + - id + - objectName + properties: + id: + description: Unique identifier of the client + type: string + example: '0' + objectName: + description: Model name, which is 'SevClient' + type: string + example: SevClient + type: object + readOnly: true + createUser: + description: User who created the voucher. Will be filled automatically. + required: + - id + - objectName + properties: + id: + description: Unique identifier of the user + type: string + example: '0' + objectName: + description: Model name, which is 'SevUser' + type: string + example: SevUser + type: object + readOnly: true + voucherDate: + description: Needs to be provided as timestamp or dd.mm.yyyy + type: string + format: date-time + example: 01.01.2020 + nullable: true + supplier: + description: >- + The contact used in the voucher as a supplier.
+ + If you don't have a contact as a supplier, you can set this object + to null. + required: + - id + - objectName + properties: + id: + description: Unique identifier of the contact + type: string + example: '0' + objectName: + description: Model name, which is 'Contact' + type: string + example: Contact + type: object + nullable: true + supplierName: + description: "The supplier name.
\r\n The value you provide here will determine what supplier name is shown for the voucher in case you did not provide a supplier." + type: string + example: John Snow + nullable: true + description: + description: The description of the voucher. Essentially the voucher number. + type: string + example: Voucher-1000 + nullable: true + document: + description: The document of the voucher. + required: + - id + - objectName + properties: + id: + description: Unique identifier of the document + type: string + example: '0' + objectName: + description: Model name, which is 'Document' + type: string + example: Document + type: object + nullable: true + payDate: + description: Needs to be timestamp or dd.mm.yyyy + type: string + format: date-time + nullable: true + example: 01.01.2020 + status: + description: "Please have a look in \r\n status of vouchers\r\n to see what the different status codes mean" + type: string + enum: + - '50' + - '100' + - '1000' + example: '50' + nullable: true + sumNet: + description: Net sum of the voucher + type: string + example: '0' + readOnly: true + nullable: false + sumTax: + description: Tax sum of the voucher + type: string + example: '0' + readOnly: true + nullable: false + sumGross: + description: Gross sum of the voucher + type: string + example: '0' + readOnly: true + nullable: false + sumNetAccounting: + description: Net accounting sum of the voucher. Is usually the same as sumNet + type: string + example: '0' + readOnly: true + nullable: false + sumTaxAccounting: + description: Tax accounting sum of the voucher. Is usually the same as sumTax + type: string + example: '0' + readOnly: true + nullable: false + sumGrossAccounting: + description: Gross accounting sum of the voucher. Is usually the same as sumGross + type: string + example: '0' + readOnly: true + nullable: false + sumDiscounts: + description: Sum of all discounts in the voucher + type: string + example: '0' + readOnly: true + nullable: false + sumDiscountsForeignCurrency: + description: Discounts sum of the voucher in the foreign currency + type: string + example: '0' + readOnly: true + nullable: false + paidAmount: + description: Amount which has already been paid for this voucher by the customer + type: number + example: 0 + readOnly: true + nullable: true + taxRule: + description: '**Use this in sevdesk-Update 2.0 (replaces taxType / taxSet).**' + required: + - id + - objectName + properties: + id: + description: |- + **Use this in sevdesk-Update 2.0 (replaces taxType / taxSet).** + + Defines the vat-regulation. + For "Regelbesteuerung" it can be one of: + - `1` - Umsatzsteuerpflichtige Umsätze (tax rates: 0.0, 7.0, 19.0) - replaces `"taxType": "default"` + - `2` - Ausfuhren (tax rates: 0.0) + - `3` - Innergemeinschaftliche Lieferungen (tax rates: 0.0, 7.0, 19.0) - replaces `"taxType": "eu"` + - `4` - Steuerfreie Umsätze §4 UStG (tax rates: 0.0) + - `5` - Reverse Charge gem. §13b UStG (tax rates: 0.0) + + For small business owner ("Kleinunternehmer") it can be: + - `11` - Steuer nicht erhoben nach §19UStG (tax rates: 0.0) - replaces `"taxType": "ss"` + type: string + enum: + - '1' + - '2' + - '3' + - '4' + - '5' + - '11' + objectName: + description: Name of the object. Must always be TaxRule + type: string + enum: + - TaxRule + type: object + nullable: false + taxType: + description: >- + **Use this in sevdesk-Update 1.0 (instead of taxRule).** + + + Tax type of the voucher. + + There are four tax types: + + 1. default - Umsatzsteuer ausweisen + + 2. eu - Steuerfreie innergemeinschaftliche Lieferung (Europäische + Union) + + 3. noteu - Steuerschuldnerschaft des Leistungsempfängers (außerhalb + EU, z. B. Schweiz) + + 4. custom - Using custom tax set + + 5. ss - Not subject to VAT according to §19 1 UStG + + Tax rates are heavily connected to the tax type used. + type: string + example: default + nullable: true + creditDebit: + description: Defines if your voucher is a credit (C) or debit (D) + type: string + enum: + - C + - D + example: C + nullable: true + costCentre: + description: Cost centre for the voucher + required: + - id + - objectName + properties: + id: + description: Unique identifier of the cost centre + type: string + example: '0' + objectName: + description: Model name, which is 'CostCentre' + type: string + type: object + voucherType: + description: "Type of the voucher. For more information on the different types, check\r\n this\r\n" + type: string + enum: + - VOU + - RV + example: VOU + nullable: true + currency: + description: >- + specifies which currency the voucher should have. Attention: If the + currency differs from the default currency stored in the account, + then either the "propertyForeignCurrencyDeadline" or + "propertyExchangeRate" parameter must be specified. If both + parameters are specified, then the "propertyForeignCurrencyDeadline" + parameter is preferred + type: string + example: EUR + nullable: true + propertyForeignCurrencyDeadline: + description: >- + Defines the exchange rate day and and then the exchange rate is set + from sevdesk. Needs to be provided as timestamp or dd.mm.yyyy + type: string + format: date-time + example: 01.01.2022 + nullable: true + propertyExchangeRate: + description: Defines the exchange rate + type: string + example: '0.8912' + nullable: true + recurringInterval: + description: "The DateInterval in which recurring vouchers are generated.
\r\n Necessary attribute for all recurring vouchers." + type: string + enum: + - P0Y0M1W + - P0Y0M2W + - P0Y1M0W + - P0Y3M0W + - P0Y6M0W + - P1Y0M0W + - P2Y0M0W + - P3Y0M0W + - P4Y0M0W + - P5Y0M0W + nullable: true + recurringStartDate: + description: "The date when the recurring vouchers start being generated.
\r\n Necessary attribute for all recurring vouchers." + type: string + format: date-time + example: 01.01.2020 + nullable: true + recurringNextVoucher: + description: "The date when the next voucher should be generated.
\r\n Necessary attribute for all recurring vouchers." + type: string + format: date-time + example: 01.02.2020 + nullable: true + recurringLastVoucher: + description: The date when the last voucher was generated. + type: string + format: date-time + example: 01.01.2021 + nullable: true + recurringEndDate: + description: "The date when the recurring vouchers end being generated.
\r\n Necessary attribute for all recurring vouchers." + type: string + format: date-time + example: 01.01.2021 + nullable: true + enshrined: + description: >- + Enshrined vouchers cannot be changed. Can only be set via + [Voucher/{voucherId}/enshrine](#tag/Voucher/operation/voucherEnshrine). + This operation cannot be undone. + type: string + format: date-time + example: '2024-04-08T00:00:00+02:00' + readOnly: true + taxSet: + description: >- + **Use this in sevdesk-Update 2.0 (replaces taxType / taxSet).** + + + Tax set of the voucher. Needs to be added if you chose the + taxType=custom. + required: + - id + - objectName + properties: + id: + description: Unique identifier of the object + type: string + example: '0' + objectName: + description: Model name, which is 'TaxSet' + type: string + example: TaxSet + type: object + nullable: true + paymentDeadline: + description: Payment deadline of the voucher. + type: string + format: date-time + nullable: true + example: 01.01.2020 + deliveryDate: + description: Needs to be provided as timestamp or dd.mm.yyyy + type: string + format: date-time + example: 01.01.2020 + nullable: false + deliveryDateUntil: + description: Needs to be provided as timestamp or dd.mm.yyyy + type: string + format: date-time + example: 01.01.2020 + nullable: true + type: object + Model_VoucherPosResponse: + title: VoucherPos model + description: Voucher position model + required: + - accountDatev + - accountingType + - voucher + - taxRate + - sumGross + - sumNet + - net + properties: + id: + description: The voucher position id + type: string + example: '0' + readOnly: true + nullable: false + objectName: + description: The voucher position object name + type: string + readOnly: true + nullable: false + create: + description: Date of voucher position creation + type: string + readOnly: true + example: 01.01.2020 + update: + description: Date of last voucher position update + type: string + readOnly: true + example: 01.01.2020 + sevClient: + description: >- + Client to which voucher position belongs. Will be filled + automatically + required: + - id + - objectName + properties: + id: + description: Unique identifier of the client + type: string + example: '0' + objectName: + description: Model name, which is 'SevClient' + type: string + example: SevClient + type: object + readOnly: true + voucher: + description: The voucher to which the position belongs. + required: + - id + - objectName + properties: + id: + description: Unique identifier of the voucher + type: string + example: '0' + objectName: + description: Model name, which is 'Voucher' + type: string + example: Voucher + type: object + readOnly: true + accountDatev: + description: "Use this in sevdesk-Update 2.0 (replaces accountingType).\r\n The account datev to which the position belongs.
\r\n An account datev is the booking account to which the position belongs.
\r\n For more information, please refer to\r\n this section." + required: + - id + - objectName + properties: + id: + description: Unique identifier of the account datev + type: integer + objectName: + description: Model name, which is 'AccountDatev' + type: string + example: AccountDatev + type: object + accountingType: + description: "The accounting type to which the position belongs.
\r\n An accounting type is the booking account to which the position belongs.
\r\n For more information, please refer to\r\n this section." + required: + - id + - objectName + properties: + id: + description: Unique identifier of the accounting type + type: string + example: '0' + objectName: + description: Model name, which is 'AccountingType' + type: string + example: AccountingType + type: object + estimatedAccountingType: + description: "The accounting type to which the position belongs estimated by our voucher recognition.
\r\n An accounting type is the booking account to which the position belongs.
\r\n For more information, please refer to\r\n this section." + required: + - id + - objectName + properties: + id: + description: Unique identifier of the accounting type + type: string + example: '0' + objectName: + description: Model name, which is 'AccountingType' + type: string + example: AccountingType + type: object + readOnly: true + taxRate: + description: Tax rate of the voucher position. + type: string + example: '19' + net: + description: "Determines whether 'sumNet' or 'sumGross' is regarded.
\r\n If both are not given, 'sum' is regarded and treated as net or gross depending on 'net'.\n All positions must be either net or gross, a mixture of the two is not possible." + type: boolean + example: 'true' + isAsset: + description: >- + Determines whether position is regarded as an asset which can be + depreciated. + type: boolean + example: 'false' + sumNet: + description: "Net sum of the voucher position.
\r\n Only regarded if 'net' is 'true', otherwise its readOnly." + type: string + example: '100' + sumTax: + description: Tax sum of the voucher position. + type: string + readOnly: true + example: '19' + sumGross: + description: "Gross sum of the voucher position.
\r\n Only regarded if 'net' is 'false', otherwise its readOnly." + type: string + example: '119' + sumNetAccounting: + description: Net accounting sum. Is equal to sumNet. + type: string + example: '0' + readOnly: true + sumTaxAccounting: + description: Tax accounting sum. Is equal to sumTax. + type: string + example: '0' + readOnly: true + sumGrossAccounting: + description: Gross accounting sum. Is equal to sumGross. + type: string + example: '0' + readOnly: true + comment: + description: Comment for the voucher position. + type: string + nullable: true + type: object + saveVoucherResponse: + type: object + properties: + voucher: + $ref: '#/components/schemas/Model_VoucherResponse' + voucherPos: + type: array + items: + $ref: '#/components/schemas/Model_VoucherPosResponse' + filename: + description: Filename of a previously upload file which should be attached. + type: string + format: binary + Model_VoucherUpdate: + title: Voucher model + description: Voucher model + properties: + voucherDate: + description: Needs to be provided as timestamp or dd.mm.yyyy + type: string + format: date-time + example: 01.01.2022 + nullable: true + supplier: + description: >- + The contact used in the voucher as a supplier.
+ + If you don't have a contact as a supplier, you can set this object + to null. + required: + - id + - objectName + properties: + id: + description: Unique identifier of the contact + type: integer + objectName: + description: Model name, which is 'Contact' + type: string + default: Contact + type: object + nullable: true + supplierName: + description: "The supplier name.
\r\n The value you provide here will determine what supplier name is shown for the voucher in case you did not provide a supplier." + type: string + example: John Snow + nullable: true + description: + description: The description of the voucher. Essentially the voucher number. + type: string + example: Voucher-1000 + nullable: true + payDate: + description: Needs to be timestamp or dd.mm.yyyy + type: string + format: date-time + nullable: true + example: 01.01.2022 + status: + description: >- + Not supported in sevdesk-Update 2.0.

Please have a + look in status + of vouchers to see what the different status codes mean + type: number + enum: + - 50 + - 100 + - 1000 + example: 50 + paidAmount: + description: Amount which has already been paid for this voucher by the customer + type: number + format: float + readOnly: true + nullable: true + taxRule: + description: '**Use this in sevdesk-Update 2.0 (replaces taxType / taxSet).**' + required: + - id + - objectName + properties: + id: + description: |- + **Use this in sevdesk-Update 2.0 (replaces taxType / taxSet).** + + Defines the vat-regulation. + For "Regelbesteuerung" it can be one of: + - `1` - Umsatzsteuerpflichtige Umsätze (tax rates: 0.0, 7.0, 19.0) - replaces `"taxType": "default"` + - `2` - Ausfuhren (tax rates: 0.0) + - `3` - Innergemeinschaftliche Lieferungen (tax rates: 0.0, 7.0, 19.0) - replaces `"taxType": "eu"` + - `4` - Steuerfreie Umsätze §4 UStG (tax rates: 0.0) + - `5` - Reverse Charge gem. §13b UStG (tax rates: 0.0) + + For small business owner ("Kleinunternehmer") it can be: + - `11` - Steuer nicht erhoben nach §19UStG (tax rates: 0.0) - replaces `"taxType": "ss"` + type: string + enum: + - '1' + - '2' + - '3' + - '4' + - '5' + - '11' + objectName: + description: Name of the object. Must always be TaxRule + type: string + enum: + - TaxRule + type: object + nullable: false + taxType: + description: >- + **Use this in sevdesk-Update 1.0 (instead of taxRule).** + + + Tax type of the voucher. + + There are four tax types: + + 1. default - Umsatzsteuer ausweisen + + 2. eu - Steuerfreie innergemeinschaftliche Lieferung (Europäische + Union) + + 3. noteu - Steuerschuldnerschaft des Leistungsempfängers (außerhalb + EU, z. B. Schweiz) + + 4. custom - Using custom tax set + + 5. ss - Not subject to VAT according to §19 1 UStG + + Tax rates are heavily connected to the tax type used. + type: string + example: default + creditDebit: + description: Defines if your voucher is a credit (C) or debit (D) + type: string + enum: + - C + - D + example: C + voucherType: + description: "Type of the voucher. For more information on the different types, check\r\n this\r\n" + type: string + enum: + - VOU + - RV + example: VOU + currency: + description: >- + specifies which currency the voucher should have. Attention: If the + currency differs from the default currency stored in the account, + then either the "propertyForeignCurrencyDeadline" or + "propertyExchangeRate" parameter must be specified. If both + parameters are specified, then the "propertyForeignCurrencyDeadline" + parameter is preferred + type: string + example: EUR + nullable: true + propertyForeignCurrencyDeadline: + description: >- + Defines the exchange rate day and and then the exchange rate is set + from sevdesk. Needs to be provided as timestamp or dd.mm.yyyy + type: string + format: date-time + example: 01.01.2022 + nullable: true + propertyExchangeRate: + description: Defines the exchange rate + type: number + format: float + example: 0.8912 + nullable: true + taxSet: + description: >- + **Use this in sevdesk-Update 2.0 (replaces taxType / taxSet).** + + + Tax set of the voucher. Needs to be added if you chose the + taxType=custom. + required: + - id + - objectName + properties: + id: + description: Unique identifier of the object + type: integer + objectName: + description: Model name, which is 'TaxSet' + type: string + example: TaxSet + type: object + example: null + nullable: true + paymentDeadline: + description: Payment deadline of the voucher. + type: string + format: date-time + nullable: true + example: 01.01.2022 + deliveryDate: + description: Needs to be provided as timestamp or dd.mm.yyyy + type: string + format: date-time + example: 01.01.2022 + deliveryDateUntil: + description: Needs to be provided as timestamp or dd.mm.yyyy + type: string + format: date-time + example: 22.02.2022 + nullable: true + document: + description: The document of the voucher. + required: + - id + - objectName + properties: + id: + description: Unique identifier of the document + type: integer + objectName: + description: Model name, which is 'Document' + type: string + example: Document + example: null + type: object + nullable: true + costCentre: + description: Cost centre for the voucher + required: + - id + - objectName + properties: + id: + description: Unique identifier of the cost centre + type: integer + objectName: + description: Model name, which is 'CostCentre' + type: string + example: CostCentre + example: null + type: object + ReceiptGuideDto: + title: ReceiptGuide Data Transfer Object + description: >- + Model holds data about a single selectable account with additional + information matching to that account. + properties: + accountDatevId: + description: The ID of the matching account datev + type: integer + nullable: false + accountNumber: + description: >- + The account number of the account datev (dependent on the active + accounting system of the client) + type: string + example: '4000' + nullable: false + accountName: + description: The name of the account + type: string + example: Umsatzerlöse + nullable: false + description: + description: The description of the account and/or what the account is used for + type: string + example: Einnahmen aus dem Verkauf von Waren und Dienstleistungen + allowedTaxRules: + description: An array that holds all possible tax rules for this account + type: array + items: + properties: + name: + description: The name of the tax rule + type: string + nullable: false + example: USTPFL_UMS_EINN + description: + description: A readable description of the tax rule + type: string + nullable: false + example: Umsatzsteuerpflichtige Umsätze + id: + description: The id of the tax rule to use in different scenarios + type: integer + example: 1 + taxRates: + description: An array of tax rates which are combinable with this tax rule + type: array + items: + type: string + example: + - ZERO + - SEVEN + - NINETEEN + nullable: false + allowedReceiptTypes: + description: An array that holds the viable receipt types for this account + type: array + items: + type: string + example: + - EXPENSE + nullable: false + Model_TagResponse: + title: Tag model + description: tag model + properties: + id: + description: Id of the tag + type: string + example: '1' + readOnly: true + objectName: + description: Internal object name which is 'Tag'. + type: string + example: Tag + readOnly: true + additionalInformation: + type: string + default: null + create: + description: Date of tag creation + type: string + format: date-time + readOnly: true + name: + description: name of the tag + type: string + readOnly: true + sevClient: + description: Client to which invoice belongs. Will be filled automatically + required: + - id + - objectName + properties: + id: + description: Unique identifier of the client + type: string + example: '1' + objectName: + description: Model name, which is 'SevClient' + type: string + example: SevClient + type: object + Model_TagCreateResponse: + title: Tag model + description: tag model + properties: + id: + description: Id of the tag + type: string + example: '1' + readOnly: true + objectName: + description: Internal object name which is 'TagRelation'. + type: string + example: TagRelation + readOnly: true + additionalInformation: + type: string + default: null + create: + description: Date of tag creation + type: string + format: date-time + readOnly: true + tag: + description: The tag information + required: + - id + - objectName + properties: + id: + description: Unique identifier of the tag + type: string + example: '1' + objectName: + description: Model name, which is 'Tag' + type: string + example: Tag + type: object + object: + required: + - id + - objectName + properties: + id: + description: Id of the invoice/order/voucher/creditNote + type: integer + example: 1 + objectName: + description: Model name + type: string + example: Invoice + enum: + - Invoice + - Voucher + - Order + - CreditNote + type: object + sevClient: + description: Client to which invoice belongs. Will be filled automatically + required: + - id + - objectName + properties: + id: + description: Unique identifier of the client + type: string + example: '1' + objectName: + description: Model name, which is 'SevClient' + type: string + example: SevClient + type: object + securitySchemes: + api_key: + type: apiKey + name: Authorization + in: header +x-tagGroups: + - name: sevdesk API + tags: + - Basics + - CheckAccount + - CheckAccountTransaction + - AccountingContact + - CommunicationWay + - ContactAddress + - Contact + - ContactField + - CreditNote + - CreditNotePos + - Export + - Part + - Invoice + - InvoicePos + - Layout + - Order + - OrderPos + - Voucher + - VoucherPos + - Report + - Tag From 54e72a166c19ddb59ce80d08a222ea9437864eac Mon Sep 17 00:00:00 2001 From: Simon Lukas <60503970+Plaenkler@users.noreply.github.com> Date: Mon, 30 Dec 2024 12:11:18 +0100 Subject: [PATCH 06/13] [FIX] Format accountingYearBegin --- openapi.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openapi.yaml b/openapi.yaml index d40e15f..5149da2 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -3159,8 +3159,8 @@ paths: type: number example: 1234152 accountingYearBegin: - type: number - format: timestamp + type: integer + format: int64 example: 1681907569 responses: '200': From 0b1130552d2c15fc36e2835de80dcab7e38eb388 Mon Sep 17 00:00:00 2001 From: Simon Lukas <60503970+Plaenkler@users.noreply.github.com> Date: Mon, 30 Dec 2024 12:12:12 +0100 Subject: [PATCH 07/13] [ADD] Generated v1.0.0 (sevDesk 2.0.0) --- client/client.go | 23197 +++++++++++++++++++++++++++++++++++++++++++++ go.mod | 19 + go.sum | 44 + server/server.go | 3773 ++++++++ types/types.go | 7840 +++++++++++++++ 5 files changed, 34873 insertions(+) create mode 100644 client/client.go create mode 100644 go.sum create mode 100644 server/server.go create mode 100644 types/types.go diff --git a/client/client.go b/client/client.go new file mode 100644 index 0000000..5fab634 --- /dev/null +++ b/client/client.go @@ -0,0 +1,23197 @@ +// Package client provides primitives to interact with the openapi HTTP API. +// +// Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.4.1 DO NOT EDIT. +package client + +import ( + "bytes" + "context" + "encoding/json" + "fmt" + "io" + "net/http" + "net/url" + "strings" + "time" + + "github.com/oapi-codegen/runtime" + openapi_types "github.com/oapi-codegen/runtime/types" +) + +// RequestEditorFn is the function signature for the RequestEditor callback function +type RequestEditorFn func(ctx context.Context, req *http.Request) error + +// Doer performs HTTP requests. +// +// The standard http.Client implements this interface. +type HttpRequestDoer interface { + Do(req *http.Request) (*http.Response, error) +} + +// Client which conforms to the OpenAPI3 specification for this service. +type Client struct { + // The endpoint of the server conforming to this interface, with scheme, + // https://api.deepmap.com for example. This can contain a path relative + // to the server, such as https://api.deepmap.com/dev-test, and all the + // paths in the swagger spec will be appended to the server. + Server string + + // Doer for performing requests, typically a *http.Client with any + // customized settings, such as certificate chains. + Client HttpRequestDoer + + // A list of callbacks for modifying requests which are generated before sending over + // the network. + RequestEditors []RequestEditorFn +} + +// ClientOption allows setting custom parameters during construction +type ClientOption func(*Client) error + +// Creates a new Client, with reasonable defaults +func NewClient(server string, opts ...ClientOption) (*Client, error) { + // create a client with sane default values + client := Client{ + Server: server, + } + // mutate client and add all optional params + for _, o := range opts { + if err := o(&client); err != nil { + return nil, err + } + } + // ensure the server URL always has a trailing slash + if !strings.HasSuffix(client.Server, "/") { + client.Server += "/" + } + // create httpClient, if not already present + if client.Client == nil { + client.Client = &http.Client{} + } + return &client, nil +} + +// WithHTTPClient allows overriding the default Doer, which is +// automatically created using http.Client. This is useful for tests. +func WithHTTPClient(doer HttpRequestDoer) ClientOption { + return func(c *Client) error { + c.Client = doer + return nil + } +} + +// WithRequestEditorFn allows setting up a callback function, which will be +// called right before sending the request. This can be used to mutate the request. +func WithRequestEditorFn(fn RequestEditorFn) ClientOption { + return func(c *Client) error { + c.RequestEditors = append(c.RequestEditors, fn) + return nil + } +} + +// The interface specification for the client above. +type ClientInterface interface { + // GetAccountingContact request + GetAccountingContact(ctx context.Context, params *GetAccountingContactParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // CreateAccountingContactWithBody request with any body + CreateAccountingContactWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + CreateAccountingContact(ctx context.Context, body CreateAccountingContactJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // DeleteAccountingContact request + DeleteAccountingContact(ctx context.Context, accountingContactId int, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetAccountingContactById request + GetAccountingContactById(ctx context.Context, accountingContactId int, reqEditors ...RequestEditorFn) (*http.Response, error) + + // UpdateAccountingContactWithBody request with any body + UpdateAccountingContactWithBody(ctx context.Context, accountingContactId int, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + UpdateAccountingContact(ctx context.Context, accountingContactId int, body UpdateAccountingContactJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetCheckAccounts request + GetCheckAccounts(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) + + // CreateCheckAccountWithBody request with any body + CreateCheckAccountWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + CreateCheckAccount(ctx context.Context, body CreateCheckAccountJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // CreateClearingAccountWithBody request with any body + CreateClearingAccountWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + CreateClearingAccount(ctx context.Context, body CreateClearingAccountJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // CreateFileImportAccountWithBody request with any body + CreateFileImportAccountWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + CreateFileImportAccount(ctx context.Context, body CreateFileImportAccountJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // DeleteCheckAccount request + DeleteCheckAccount(ctx context.Context, checkAccountId int, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetCheckAccountById request + GetCheckAccountById(ctx context.Context, checkAccountId int, reqEditors ...RequestEditorFn) (*http.Response, error) + + // UpdateCheckAccountWithBody request with any body + UpdateCheckAccountWithBody(ctx context.Context, checkAccountId int, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + UpdateCheckAccount(ctx context.Context, checkAccountId int, body UpdateCheckAccountJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetBalanceAtDate request + GetBalanceAtDate(ctx context.Context, checkAccountId int, params *GetBalanceAtDateParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetTransactions request + GetTransactions(ctx context.Context, params *GetTransactionsParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // CreateTransactionWithBody request with any body + CreateTransactionWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + CreateTransaction(ctx context.Context, body CreateTransactionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // DeleteCheckAccountTransaction request + DeleteCheckAccountTransaction(ctx context.Context, checkAccountTransactionId int, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetCheckAccountTransactionById request + GetCheckAccountTransactionById(ctx context.Context, checkAccountTransactionId int, reqEditors ...RequestEditorFn) (*http.Response, error) + + // UpdateCheckAccountTransactionWithBody request with any body + UpdateCheckAccountTransactionWithBody(ctx context.Context, checkAccountTransactionId int, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + UpdateCheckAccountTransaction(ctx context.Context, checkAccountTransactionId int, body UpdateCheckAccountTransactionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // CheckAccountTransactionEnshrine request + CheckAccountTransactionEnshrine(ctx context.Context, checkAccountTransactionId int, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetCommunicationWays request + GetCommunicationWays(ctx context.Context, params *GetCommunicationWaysParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // CreateCommunicationWayWithBody request with any body + CreateCommunicationWayWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + CreateCommunicationWay(ctx context.Context, body CreateCommunicationWayJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // DeleteCommunicationWay request + DeleteCommunicationWay(ctx context.Context, communicationWayId int, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetCommunicationWayById request + GetCommunicationWayById(ctx context.Context, communicationWayId int, reqEditors ...RequestEditorFn) (*http.Response, error) + + // UpdateCommunicationWayWithBody request with any body + UpdateCommunicationWayWithBody(ctx context.Context, communicationWayId int, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + UpdateCommunicationWay(ctx context.Context, communicationWayId int, body UpdateCommunicationWayJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetCommunicationWayKeys request + GetCommunicationWayKeys(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetContacts request + GetContacts(ctx context.Context, params *GetContactsParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // CreateContactWithBody request with any body + CreateContactWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + CreateContact(ctx context.Context, body CreateContactJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // FindContactsByCustomFieldValue request + FindContactsByCustomFieldValue(ctx context.Context, params *FindContactsByCustomFieldValueParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetNextCustomerNumber request + GetNextCustomerNumber(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) + + // ContactCustomerNumberAvailabilityCheck request + ContactCustomerNumberAvailabilityCheck(ctx context.Context, params *ContactCustomerNumberAvailabilityCheckParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // DeleteContact request + DeleteContact(ctx context.Context, contactId int, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetContactById request + GetContactById(ctx context.Context, contactId int, reqEditors ...RequestEditorFn) (*http.Response, error) + + // UpdateContactWithBody request with any body + UpdateContactWithBody(ctx context.Context, contactId int, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + UpdateContact(ctx context.Context, contactId int, body UpdateContactJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetContactTabsItemCountById request + GetContactTabsItemCountById(ctx context.Context, contactId int, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetContactAddresses request + GetContactAddresses(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) + + // CreateContactAddressWithBody request with any body + CreateContactAddressWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + CreateContactAddress(ctx context.Context, body CreateContactAddressJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // DeleteContactAddress request + DeleteContactAddress(ctx context.Context, contactAddressId int, reqEditors ...RequestEditorFn) (*http.Response, error) + + // ContactAddressId request + ContactAddressId(ctx context.Context, contactAddressId int, reqEditors ...RequestEditorFn) (*http.Response, error) + + // UpdateContactAddressWithBody request with any body + UpdateContactAddressWithBody(ctx context.Context, contactAddressId int, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + UpdateContactAddress(ctx context.Context, contactAddressId int, body UpdateContactAddressJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetContactFields request + GetContactFields(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) + + // CreateContactFieldWithBody request with any body + CreateContactFieldWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + CreateContactField(ctx context.Context, body CreateContactFieldJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // DeleteContactCustomFieldId request + DeleteContactCustomFieldId(ctx context.Context, contactCustomFieldId int, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetContactFieldsById request + GetContactFieldsById(ctx context.Context, contactCustomFieldId float32, reqEditors ...RequestEditorFn) (*http.Response, error) + + // UpdateContactfieldWithBody request with any body + UpdateContactfieldWithBody(ctx context.Context, contactCustomFieldId float32, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + UpdateContactfield(ctx context.Context, contactCustomFieldId float32, body UpdateContactfieldJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetContactFieldSettings request + GetContactFieldSettings(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) + + // CreateContactFieldSettingWithBody request with any body + CreateContactFieldSettingWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + CreateContactFieldSetting(ctx context.Context, body CreateContactFieldSettingJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // DeleteContactFieldSetting request + DeleteContactFieldSetting(ctx context.Context, contactCustomFieldSettingId int, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetContactFieldSettingById request + GetContactFieldSettingById(ctx context.Context, contactCustomFieldSettingId int, reqEditors ...RequestEditorFn) (*http.Response, error) + + // UpdateContactFieldSettingWithBody request with any body + UpdateContactFieldSettingWithBody(ctx context.Context, contactCustomFieldSettingId int, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + UpdateContactFieldSetting(ctx context.Context, contactCustomFieldSettingId int, body UpdateContactFieldSettingJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetReferenceCount request + GetReferenceCount(ctx context.Context, contactCustomFieldSettingId int, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetCreditNotes request + GetCreditNotes(ctx context.Context, params *GetCreditNotesParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // CreateCreditNoteFromInvoiceWithBody request with any body + CreateCreditNoteFromInvoiceWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + CreateCreditNoteFromInvoice(ctx context.Context, body CreateCreditNoteFromInvoiceJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // CreateCreditNoteFromVoucherWithBody request with any body + CreateCreditNoteFromVoucherWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + CreateCreditNoteFromVoucher(ctx context.Context, body CreateCreditNoteFromVoucherJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // CreatecreditNoteWithBody request with any body + CreatecreditNoteWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + CreatecreditNote(ctx context.Context, body CreatecreditNoteJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // DeletecreditNote request + DeletecreditNote(ctx context.Context, creditNoteId int, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetcreditNoteById request + GetcreditNoteById(ctx context.Context, creditNoteId int, reqEditors ...RequestEditorFn) (*http.Response, error) + + // UpdatecreditNoteWithBody request with any body + UpdatecreditNoteWithBody(ctx context.Context, creditNoteId int, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + UpdatecreditNote(ctx context.Context, creditNoteId int, body UpdatecreditNoteJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // BookCreditNoteWithBody request with any body + BookCreditNoteWithBody(ctx context.Context, creditNoteId int, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + BookCreditNote(ctx context.Context, creditNoteId int, body BookCreditNoteJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // UpdateCreditNoteTemplateWithBody request with any body + UpdateCreditNoteTemplateWithBody(ctx context.Context, creditNoteId int, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + UpdateCreditNoteTemplate(ctx context.Context, creditNoteId int, body UpdateCreditNoteTemplateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // CreditNoteEnshrine request + CreditNoteEnshrine(ctx context.Context, creditNoteId int, reqEditors ...RequestEditorFn) (*http.Response, error) + + // CreditNoteGetPdf request + CreditNoteGetPdf(ctx context.Context, creditNoteId int, params *CreditNoteGetPdfParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // CreditNoteResetToDraft request + CreditNoteResetToDraft(ctx context.Context, creditNoteId int, reqEditors ...RequestEditorFn) (*http.Response, error) + + // CreditNoteResetToOpen request + CreditNoteResetToOpen(ctx context.Context, creditNoteId int, reqEditors ...RequestEditorFn) (*http.Response, error) + + // CreditNoteSendByWithBody request with any body + CreditNoteSendByWithBody(ctx context.Context, creditNoteId int, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + CreditNoteSendBy(ctx context.Context, creditNoteId int, body CreditNoteSendByJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // SendCreditNoteByPrinting request + SendCreditNoteByPrinting(ctx context.Context, creditNoteId int, params *SendCreditNoteByPrintingParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // SendCreditNoteViaEMailWithBody request with any body + SendCreditNoteViaEMailWithBody(ctx context.Context, creditNoteId int, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + SendCreditNoteViaEMail(ctx context.Context, creditNoteId int, body SendCreditNoteViaEMailJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetcreditNotePositions request + GetcreditNotePositions(ctx context.Context, params *GetcreditNotePositionsParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetLetterpapersWithThumb request + GetLetterpapersWithThumb(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetTemplates request + GetTemplates(ctx context.Context, params *GetTemplatesParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // ExportContact request + ExportContact(ctx context.Context, params *ExportContactParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // ExportCreditNote request + ExportCreditNote(ctx context.Context, params *ExportCreditNoteParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // ExportDatev request + ExportDatev(ctx context.Context, params *ExportDatevParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // ExportInvoice request + ExportInvoice(ctx context.Context, params *ExportInvoiceParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // ExportInvoiceZip request + ExportInvoiceZip(ctx context.Context, params *ExportInvoiceZipParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // ExportTransactions request + ExportTransactions(ctx context.Context, params *ExportTransactionsParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // ExportVoucher request + ExportVoucher(ctx context.Context, params *ExportVoucherParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // ExportVoucherZip request + ExportVoucherZip(ctx context.Context, params *ExportVoucherZipParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetInvoices request + GetInvoices(ctx context.Context, params *GetInvoicesParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // CreateInvoiceFromOrderWithBody request with any body + CreateInvoiceFromOrderWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + CreateInvoiceFromOrder(ctx context.Context, body CreateInvoiceFromOrderJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // CreateInvoiceReminderWithBody request with any body + CreateInvoiceReminderWithBody(ctx context.Context, params *CreateInvoiceReminderParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + CreateInvoiceReminder(ctx context.Context, params *CreateInvoiceReminderParams, body CreateInvoiceReminderJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // CreateInvoiceByFactoryWithBody request with any body + CreateInvoiceByFactoryWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + CreateInvoiceByFactory(ctx context.Context, body CreateInvoiceByFactoryJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetInvoiceById request + GetInvoiceById(ctx context.Context, invoiceId int, reqEditors ...RequestEditorFn) (*http.Response, error) + + // BookInvoiceWithBody request with any body + BookInvoiceWithBody(ctx context.Context, invoiceId int, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + BookInvoice(ctx context.Context, invoiceId int, body BookInvoiceJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // CancelInvoice request + CancelInvoice(ctx context.Context, invoiceId int, reqEditors ...RequestEditorFn) (*http.Response, error) + + // UpdateInvoiceTemplateWithBody request with any body + UpdateInvoiceTemplateWithBody(ctx context.Context, invoiceId int, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + UpdateInvoiceTemplate(ctx context.Context, invoiceId int, body UpdateInvoiceTemplateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // InvoiceEnshrine request + InvoiceEnshrine(ctx context.Context, invoiceId int, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetIsInvoicePartiallyPaid request + GetIsInvoicePartiallyPaid(ctx context.Context, invoiceId int, reqEditors ...RequestEditorFn) (*http.Response, error) + + // InvoiceGetPdf request + InvoiceGetPdf(ctx context.Context, invoiceId int, params *InvoiceGetPdfParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetInvoicePositionsById request + GetInvoicePositionsById(ctx context.Context, invoiceId int, params *GetInvoicePositionsByIdParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // InvoiceGetXml request + InvoiceGetXml(ctx context.Context, invoiceId int, reqEditors ...RequestEditorFn) (*http.Response, error) + + // InvoiceRenderWithBody request with any body + InvoiceRenderWithBody(ctx context.Context, invoiceId int, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + InvoiceRender(ctx context.Context, invoiceId int, body InvoiceRenderJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // InvoiceResetToDraft request + InvoiceResetToDraft(ctx context.Context, invoiceId int, reqEditors ...RequestEditorFn) (*http.Response, error) + + // InvoiceResetToOpen request + InvoiceResetToOpen(ctx context.Context, invoiceId int, reqEditors ...RequestEditorFn) (*http.Response, error) + + // InvoiceSendByWithBody request with any body + InvoiceSendByWithBody(ctx context.Context, invoiceId int, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + InvoiceSendBy(ctx context.Context, invoiceId int, body InvoiceSendByJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // SendInvoiceViaEMailWithBody request with any body + SendInvoiceViaEMailWithBody(ctx context.Context, invoiceId int, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + SendInvoiceViaEMail(ctx context.Context, invoiceId int, body SendInvoiceViaEMailJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetInvoicePos request + GetInvoicePos(ctx context.Context, params *GetInvoicePosParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetOrders request + GetOrders(ctx context.Context, params *GetOrdersParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // CreateContractNoteFromOrderWithBody request with any body + CreateContractNoteFromOrderWithBody(ctx context.Context, params *CreateContractNoteFromOrderParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + CreateContractNoteFromOrder(ctx context.Context, params *CreateContractNoteFromOrderParams, body CreateContractNoteFromOrderJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // CreatePackingListFromOrderWithBody request with any body + CreatePackingListFromOrderWithBody(ctx context.Context, params *CreatePackingListFromOrderParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + CreatePackingListFromOrder(ctx context.Context, params *CreatePackingListFromOrderParams, body CreatePackingListFromOrderJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // CreateOrderWithBody request with any body + CreateOrderWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + CreateOrder(ctx context.Context, body CreateOrderJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // DeleteOrder request + DeleteOrder(ctx context.Context, orderId int, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetOrderById request + GetOrderById(ctx context.Context, orderId int, reqEditors ...RequestEditorFn) (*http.Response, error) + + // UpdateOrderWithBody request with any body + UpdateOrderWithBody(ctx context.Context, orderId int, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + UpdateOrder(ctx context.Context, orderId int, body UpdateOrderJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // UpdateOrderTemplateWithBody request with any body + UpdateOrderTemplateWithBody(ctx context.Context, orderId int, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + UpdateOrderTemplate(ctx context.Context, orderId int, body UpdateOrderTemplateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetDiscounts request + GetDiscounts(ctx context.Context, orderId int, params *GetDiscountsParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // OrderGetPdf request + OrderGetPdf(ctx context.Context, orderId int, params *OrderGetPdfParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetOrderPositionsById request + GetOrderPositionsById(ctx context.Context, orderId int, params *GetOrderPositionsByIdParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetRelatedObjects request + GetRelatedObjects(ctx context.Context, orderId int, params *GetRelatedObjectsParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // OrderSendByWithBody request with any body + OrderSendByWithBody(ctx context.Context, orderId int, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + OrderSendBy(ctx context.Context, orderId int, body OrderSendByJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // SendorderViaEMailWithBody request with any body + SendorderViaEMailWithBody(ctx context.Context, orderId int, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + SendorderViaEMail(ctx context.Context, orderId int, body SendorderViaEMailJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetOrderPositions request + GetOrderPositions(ctx context.Context, params *GetOrderPositionsParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // DeleteOrderPos request + DeleteOrderPos(ctx context.Context, orderPosId int, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetOrderPositionById request + GetOrderPositionById(ctx context.Context, orderPosId int, reqEditors ...RequestEditorFn) (*http.Response, error) + + // UpdateOrderPositionWithBody request with any body + UpdateOrderPositionWithBody(ctx context.Context, orderPosId int, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + UpdateOrderPosition(ctx context.Context, orderPosId int, body UpdateOrderPositionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetParts request + GetParts(ctx context.Context, params *GetPartsParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // CreatePartWithBody request with any body + CreatePartWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + CreatePart(ctx context.Context, body CreatePartJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetPartById request + GetPartById(ctx context.Context, partId int, reqEditors ...RequestEditorFn) (*http.Response, error) + + // UpdatePartWithBody request with any body + UpdatePartWithBody(ctx context.Context, partId int, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + UpdatePart(ctx context.Context, partId int, body UpdatePartJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PartGetStock request + PartGetStock(ctx context.Context, partId int, reqEditors ...RequestEditorFn) (*http.Response, error) + + // ForAccountNumber request + ForAccountNumber(ctx context.Context, params *ForAccountNumberParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // ForAllAccounts request + ForAllAccounts(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) + + // ForExpense request + ForExpense(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) + + // ForRevenue request + ForRevenue(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) + + // ForTaxRule request + ForTaxRule(ctx context.Context, params *ForTaxRuleParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // ReportContact request + ReportContact(ctx context.Context, params *ReportContactParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // ReportInvoice request + ReportInvoice(ctx context.Context, params *ReportInvoiceParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // ReportOrder request + ReportOrder(ctx context.Context, params *ReportOrderParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // ReportVoucher request + ReportVoucher(ctx context.Context, params *ReportVoucherParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // UpdateExportConfigWithBody request with any body + UpdateExportConfigWithBody(ctx context.Context, sevClientId float32, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + UpdateExportConfig(ctx context.Context, sevClientId float32, body UpdateExportConfigJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetTags request + GetTags(ctx context.Context, params *GetTagsParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // CreateTagWithBody request with any body + CreateTagWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + CreateTag(ctx context.Context, body CreateTagJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // DeleteTag request + DeleteTag(ctx context.Context, tagId int, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetTagById request + GetTagById(ctx context.Context, tagId int, reqEditors ...RequestEditorFn) (*http.Response, error) + + // UpdateTagWithBody request with any body + UpdateTagWithBody(ctx context.Context, tagId int, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + UpdateTag(ctx context.Context, tagId int, body UpdateTagJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetTagRelations request + GetTagRelations(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetPlaceholder request + GetPlaceholder(ctx context.Context, params *GetPlaceholderParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // BookkeepingSystemVersion request + BookkeepingSystemVersion(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetVouchers request + GetVouchers(ctx context.Context, params *GetVouchersParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // VoucherFactorySaveVoucherWithBody request with any body + VoucherFactorySaveVoucherWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + VoucherFactorySaveVoucher(ctx context.Context, body VoucherFactorySaveVoucherJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // VoucherUploadFileWithBody request with any body + VoucherUploadFileWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetVoucherById request + GetVoucherById(ctx context.Context, voucherId int, reqEditors ...RequestEditorFn) (*http.Response, error) + + // UpdateVoucherWithBody request with any body + UpdateVoucherWithBody(ctx context.Context, voucherId int, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + UpdateVoucher(ctx context.Context, voucherId int, body UpdateVoucherJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // BookVoucherWithBody request with any body + BookVoucherWithBody(ctx context.Context, voucherId int, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + BookVoucher(ctx context.Context, voucherId int, body BookVoucherJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // VoucherEnshrine request + VoucherEnshrine(ctx context.Context, voucherId int, reqEditors ...RequestEditorFn) (*http.Response, error) + + // VoucherResetToDraft request + VoucherResetToDraft(ctx context.Context, voucherId int, reqEditors ...RequestEditorFn) (*http.Response, error) + + // VoucherResetToOpen request + VoucherResetToOpen(ctx context.Context, voucherId int, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetVoucherPositions request + GetVoucherPositions(ctx context.Context, params *GetVoucherPositionsParams, reqEditors ...RequestEditorFn) (*http.Response, error) +} + +func (c *Client) GetAccountingContact(ctx context.Context, params *GetAccountingContactParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetAccountingContactRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) CreateAccountingContactWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateAccountingContactRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) CreateAccountingContact(ctx context.Context, body CreateAccountingContactJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateAccountingContactRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) DeleteAccountingContact(ctx context.Context, accountingContactId int, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteAccountingContactRequest(c.Server, accountingContactId) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetAccountingContactById(ctx context.Context, accountingContactId int, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetAccountingContactByIdRequest(c.Server, accountingContactId) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) UpdateAccountingContactWithBody(ctx context.Context, accountingContactId int, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUpdateAccountingContactRequestWithBody(c.Server, accountingContactId, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) UpdateAccountingContact(ctx context.Context, accountingContactId int, body UpdateAccountingContactJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUpdateAccountingContactRequest(c.Server, accountingContactId, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetCheckAccounts(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetCheckAccountsRequest(c.Server) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) CreateCheckAccountWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateCheckAccountRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) CreateCheckAccount(ctx context.Context, body CreateCheckAccountJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateCheckAccountRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) CreateClearingAccountWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateClearingAccountRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) CreateClearingAccount(ctx context.Context, body CreateClearingAccountJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateClearingAccountRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) CreateFileImportAccountWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateFileImportAccountRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) CreateFileImportAccount(ctx context.Context, body CreateFileImportAccountJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateFileImportAccountRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) DeleteCheckAccount(ctx context.Context, checkAccountId int, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteCheckAccountRequest(c.Server, checkAccountId) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetCheckAccountById(ctx context.Context, checkAccountId int, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetCheckAccountByIdRequest(c.Server, checkAccountId) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) UpdateCheckAccountWithBody(ctx context.Context, checkAccountId int, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUpdateCheckAccountRequestWithBody(c.Server, checkAccountId, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) UpdateCheckAccount(ctx context.Context, checkAccountId int, body UpdateCheckAccountJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUpdateCheckAccountRequest(c.Server, checkAccountId, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetBalanceAtDate(ctx context.Context, checkAccountId int, params *GetBalanceAtDateParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetBalanceAtDateRequest(c.Server, checkAccountId, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetTransactions(ctx context.Context, params *GetTransactionsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetTransactionsRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) CreateTransactionWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateTransactionRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) CreateTransaction(ctx context.Context, body CreateTransactionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateTransactionRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) DeleteCheckAccountTransaction(ctx context.Context, checkAccountTransactionId int, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteCheckAccountTransactionRequest(c.Server, checkAccountTransactionId) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetCheckAccountTransactionById(ctx context.Context, checkAccountTransactionId int, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetCheckAccountTransactionByIdRequest(c.Server, checkAccountTransactionId) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) UpdateCheckAccountTransactionWithBody(ctx context.Context, checkAccountTransactionId int, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUpdateCheckAccountTransactionRequestWithBody(c.Server, checkAccountTransactionId, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) UpdateCheckAccountTransaction(ctx context.Context, checkAccountTransactionId int, body UpdateCheckAccountTransactionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUpdateCheckAccountTransactionRequest(c.Server, checkAccountTransactionId, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) CheckAccountTransactionEnshrine(ctx context.Context, checkAccountTransactionId int, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCheckAccountTransactionEnshrineRequest(c.Server, checkAccountTransactionId) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetCommunicationWays(ctx context.Context, params *GetCommunicationWaysParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetCommunicationWaysRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) CreateCommunicationWayWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateCommunicationWayRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) CreateCommunicationWay(ctx context.Context, body CreateCommunicationWayJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateCommunicationWayRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) DeleteCommunicationWay(ctx context.Context, communicationWayId int, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteCommunicationWayRequest(c.Server, communicationWayId) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetCommunicationWayById(ctx context.Context, communicationWayId int, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetCommunicationWayByIdRequest(c.Server, communicationWayId) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) UpdateCommunicationWayWithBody(ctx context.Context, communicationWayId int, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUpdateCommunicationWayRequestWithBody(c.Server, communicationWayId, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) UpdateCommunicationWay(ctx context.Context, communicationWayId int, body UpdateCommunicationWayJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUpdateCommunicationWayRequest(c.Server, communicationWayId, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetCommunicationWayKeys(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetCommunicationWayKeysRequest(c.Server) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetContacts(ctx context.Context, params *GetContactsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetContactsRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) CreateContactWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateContactRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) CreateContact(ctx context.Context, body CreateContactJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateContactRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) FindContactsByCustomFieldValue(ctx context.Context, params *FindContactsByCustomFieldValueParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewFindContactsByCustomFieldValueRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetNextCustomerNumber(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetNextCustomerNumberRequest(c.Server) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) ContactCustomerNumberAvailabilityCheck(ctx context.Context, params *ContactCustomerNumberAvailabilityCheckParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewContactCustomerNumberAvailabilityCheckRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) DeleteContact(ctx context.Context, contactId int, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteContactRequest(c.Server, contactId) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetContactById(ctx context.Context, contactId int, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetContactByIdRequest(c.Server, contactId) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) UpdateContactWithBody(ctx context.Context, contactId int, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUpdateContactRequestWithBody(c.Server, contactId, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) UpdateContact(ctx context.Context, contactId int, body UpdateContactJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUpdateContactRequest(c.Server, contactId, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetContactTabsItemCountById(ctx context.Context, contactId int, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetContactTabsItemCountByIdRequest(c.Server, contactId) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetContactAddresses(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetContactAddressesRequest(c.Server) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) CreateContactAddressWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateContactAddressRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) CreateContactAddress(ctx context.Context, body CreateContactAddressJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateContactAddressRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) DeleteContactAddress(ctx context.Context, contactAddressId int, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteContactAddressRequest(c.Server, contactAddressId) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) ContactAddressId(ctx context.Context, contactAddressId int, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewContactAddressIdRequest(c.Server, contactAddressId) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) UpdateContactAddressWithBody(ctx context.Context, contactAddressId int, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUpdateContactAddressRequestWithBody(c.Server, contactAddressId, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) UpdateContactAddress(ctx context.Context, contactAddressId int, body UpdateContactAddressJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUpdateContactAddressRequest(c.Server, contactAddressId, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetContactFields(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetContactFieldsRequest(c.Server) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) CreateContactFieldWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateContactFieldRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) CreateContactField(ctx context.Context, body CreateContactFieldJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateContactFieldRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) DeleteContactCustomFieldId(ctx context.Context, contactCustomFieldId int, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteContactCustomFieldIdRequest(c.Server, contactCustomFieldId) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetContactFieldsById(ctx context.Context, contactCustomFieldId float32, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetContactFieldsByIdRequest(c.Server, contactCustomFieldId) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) UpdateContactfieldWithBody(ctx context.Context, contactCustomFieldId float32, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUpdateContactfieldRequestWithBody(c.Server, contactCustomFieldId, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) UpdateContactfield(ctx context.Context, contactCustomFieldId float32, body UpdateContactfieldJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUpdateContactfieldRequest(c.Server, contactCustomFieldId, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetContactFieldSettings(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetContactFieldSettingsRequest(c.Server) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) CreateContactFieldSettingWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateContactFieldSettingRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) CreateContactFieldSetting(ctx context.Context, body CreateContactFieldSettingJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateContactFieldSettingRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) DeleteContactFieldSetting(ctx context.Context, contactCustomFieldSettingId int, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteContactFieldSettingRequest(c.Server, contactCustomFieldSettingId) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetContactFieldSettingById(ctx context.Context, contactCustomFieldSettingId int, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetContactFieldSettingByIdRequest(c.Server, contactCustomFieldSettingId) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) UpdateContactFieldSettingWithBody(ctx context.Context, contactCustomFieldSettingId int, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUpdateContactFieldSettingRequestWithBody(c.Server, contactCustomFieldSettingId, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) UpdateContactFieldSetting(ctx context.Context, contactCustomFieldSettingId int, body UpdateContactFieldSettingJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUpdateContactFieldSettingRequest(c.Server, contactCustomFieldSettingId, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetReferenceCount(ctx context.Context, contactCustomFieldSettingId int, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetReferenceCountRequest(c.Server, contactCustomFieldSettingId) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetCreditNotes(ctx context.Context, params *GetCreditNotesParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetCreditNotesRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) CreateCreditNoteFromInvoiceWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateCreditNoteFromInvoiceRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) CreateCreditNoteFromInvoice(ctx context.Context, body CreateCreditNoteFromInvoiceJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateCreditNoteFromInvoiceRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) CreateCreditNoteFromVoucherWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateCreditNoteFromVoucherRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) CreateCreditNoteFromVoucher(ctx context.Context, body CreateCreditNoteFromVoucherJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateCreditNoteFromVoucherRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) CreatecreditNoteWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreatecreditNoteRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) CreatecreditNote(ctx context.Context, body CreatecreditNoteJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreatecreditNoteRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) DeletecreditNote(ctx context.Context, creditNoteId int, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeletecreditNoteRequest(c.Server, creditNoteId) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetcreditNoteById(ctx context.Context, creditNoteId int, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetcreditNoteByIdRequest(c.Server, creditNoteId) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) UpdatecreditNoteWithBody(ctx context.Context, creditNoteId int, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUpdatecreditNoteRequestWithBody(c.Server, creditNoteId, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) UpdatecreditNote(ctx context.Context, creditNoteId int, body UpdatecreditNoteJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUpdatecreditNoteRequest(c.Server, creditNoteId, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) BookCreditNoteWithBody(ctx context.Context, creditNoteId int, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewBookCreditNoteRequestWithBody(c.Server, creditNoteId, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) BookCreditNote(ctx context.Context, creditNoteId int, body BookCreditNoteJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewBookCreditNoteRequest(c.Server, creditNoteId, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) UpdateCreditNoteTemplateWithBody(ctx context.Context, creditNoteId int, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUpdateCreditNoteTemplateRequestWithBody(c.Server, creditNoteId, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) UpdateCreditNoteTemplate(ctx context.Context, creditNoteId int, body UpdateCreditNoteTemplateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUpdateCreditNoteTemplateRequest(c.Server, creditNoteId, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) CreditNoteEnshrine(ctx context.Context, creditNoteId int, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreditNoteEnshrineRequest(c.Server, creditNoteId) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) CreditNoteGetPdf(ctx context.Context, creditNoteId int, params *CreditNoteGetPdfParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreditNoteGetPdfRequest(c.Server, creditNoteId, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) CreditNoteResetToDraft(ctx context.Context, creditNoteId int, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreditNoteResetToDraftRequest(c.Server, creditNoteId) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) CreditNoteResetToOpen(ctx context.Context, creditNoteId int, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreditNoteResetToOpenRequest(c.Server, creditNoteId) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) CreditNoteSendByWithBody(ctx context.Context, creditNoteId int, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreditNoteSendByRequestWithBody(c.Server, creditNoteId, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) CreditNoteSendBy(ctx context.Context, creditNoteId int, body CreditNoteSendByJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreditNoteSendByRequest(c.Server, creditNoteId, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) SendCreditNoteByPrinting(ctx context.Context, creditNoteId int, params *SendCreditNoteByPrintingParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewSendCreditNoteByPrintingRequest(c.Server, creditNoteId, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) SendCreditNoteViaEMailWithBody(ctx context.Context, creditNoteId int, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewSendCreditNoteViaEMailRequestWithBody(c.Server, creditNoteId, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) SendCreditNoteViaEMail(ctx context.Context, creditNoteId int, body SendCreditNoteViaEMailJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewSendCreditNoteViaEMailRequest(c.Server, creditNoteId, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetcreditNotePositions(ctx context.Context, params *GetcreditNotePositionsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetcreditNotePositionsRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetLetterpapersWithThumb(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetLetterpapersWithThumbRequest(c.Server) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetTemplates(ctx context.Context, params *GetTemplatesParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetTemplatesRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) ExportContact(ctx context.Context, params *ExportContactParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewExportContactRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) ExportCreditNote(ctx context.Context, params *ExportCreditNoteParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewExportCreditNoteRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) ExportDatev(ctx context.Context, params *ExportDatevParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewExportDatevRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) ExportInvoice(ctx context.Context, params *ExportInvoiceParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewExportInvoiceRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) ExportInvoiceZip(ctx context.Context, params *ExportInvoiceZipParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewExportInvoiceZipRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) ExportTransactions(ctx context.Context, params *ExportTransactionsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewExportTransactionsRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) ExportVoucher(ctx context.Context, params *ExportVoucherParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewExportVoucherRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) ExportVoucherZip(ctx context.Context, params *ExportVoucherZipParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewExportVoucherZipRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetInvoices(ctx context.Context, params *GetInvoicesParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetInvoicesRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) CreateInvoiceFromOrderWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateInvoiceFromOrderRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) CreateInvoiceFromOrder(ctx context.Context, body CreateInvoiceFromOrderJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateInvoiceFromOrderRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) CreateInvoiceReminderWithBody(ctx context.Context, params *CreateInvoiceReminderParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateInvoiceReminderRequestWithBody(c.Server, params, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) CreateInvoiceReminder(ctx context.Context, params *CreateInvoiceReminderParams, body CreateInvoiceReminderJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateInvoiceReminderRequest(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) CreateInvoiceByFactoryWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateInvoiceByFactoryRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) CreateInvoiceByFactory(ctx context.Context, body CreateInvoiceByFactoryJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateInvoiceByFactoryRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetInvoiceById(ctx context.Context, invoiceId int, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetInvoiceByIdRequest(c.Server, invoiceId) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) BookInvoiceWithBody(ctx context.Context, invoiceId int, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewBookInvoiceRequestWithBody(c.Server, invoiceId, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) BookInvoice(ctx context.Context, invoiceId int, body BookInvoiceJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewBookInvoiceRequest(c.Server, invoiceId, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) CancelInvoice(ctx context.Context, invoiceId int, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCancelInvoiceRequest(c.Server, invoiceId) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) UpdateInvoiceTemplateWithBody(ctx context.Context, invoiceId int, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUpdateInvoiceTemplateRequestWithBody(c.Server, invoiceId, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) UpdateInvoiceTemplate(ctx context.Context, invoiceId int, body UpdateInvoiceTemplateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUpdateInvoiceTemplateRequest(c.Server, invoiceId, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) InvoiceEnshrine(ctx context.Context, invoiceId int, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewInvoiceEnshrineRequest(c.Server, invoiceId) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetIsInvoicePartiallyPaid(ctx context.Context, invoiceId int, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetIsInvoicePartiallyPaidRequest(c.Server, invoiceId) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) InvoiceGetPdf(ctx context.Context, invoiceId int, params *InvoiceGetPdfParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewInvoiceGetPdfRequest(c.Server, invoiceId, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetInvoicePositionsById(ctx context.Context, invoiceId int, params *GetInvoicePositionsByIdParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetInvoicePositionsByIdRequest(c.Server, invoiceId, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) InvoiceGetXml(ctx context.Context, invoiceId int, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewInvoiceGetXmlRequest(c.Server, invoiceId) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) InvoiceRenderWithBody(ctx context.Context, invoiceId int, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewInvoiceRenderRequestWithBody(c.Server, invoiceId, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) InvoiceRender(ctx context.Context, invoiceId int, body InvoiceRenderJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewInvoiceRenderRequest(c.Server, invoiceId, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) InvoiceResetToDraft(ctx context.Context, invoiceId int, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewInvoiceResetToDraftRequest(c.Server, invoiceId) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) InvoiceResetToOpen(ctx context.Context, invoiceId int, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewInvoiceResetToOpenRequest(c.Server, invoiceId) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) InvoiceSendByWithBody(ctx context.Context, invoiceId int, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewInvoiceSendByRequestWithBody(c.Server, invoiceId, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) InvoiceSendBy(ctx context.Context, invoiceId int, body InvoiceSendByJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewInvoiceSendByRequest(c.Server, invoiceId, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) SendInvoiceViaEMailWithBody(ctx context.Context, invoiceId int, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewSendInvoiceViaEMailRequestWithBody(c.Server, invoiceId, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) SendInvoiceViaEMail(ctx context.Context, invoiceId int, body SendInvoiceViaEMailJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewSendInvoiceViaEMailRequest(c.Server, invoiceId, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetInvoicePos(ctx context.Context, params *GetInvoicePosParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetInvoicePosRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetOrders(ctx context.Context, params *GetOrdersParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetOrdersRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) CreateContractNoteFromOrderWithBody(ctx context.Context, params *CreateContractNoteFromOrderParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateContractNoteFromOrderRequestWithBody(c.Server, params, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) CreateContractNoteFromOrder(ctx context.Context, params *CreateContractNoteFromOrderParams, body CreateContractNoteFromOrderJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateContractNoteFromOrderRequest(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) CreatePackingListFromOrderWithBody(ctx context.Context, params *CreatePackingListFromOrderParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreatePackingListFromOrderRequestWithBody(c.Server, params, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) CreatePackingListFromOrder(ctx context.Context, params *CreatePackingListFromOrderParams, body CreatePackingListFromOrderJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreatePackingListFromOrderRequest(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) CreateOrderWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateOrderRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) CreateOrder(ctx context.Context, body CreateOrderJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateOrderRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) DeleteOrder(ctx context.Context, orderId int, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteOrderRequest(c.Server, orderId) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetOrderById(ctx context.Context, orderId int, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetOrderByIdRequest(c.Server, orderId) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) UpdateOrderWithBody(ctx context.Context, orderId int, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUpdateOrderRequestWithBody(c.Server, orderId, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) UpdateOrder(ctx context.Context, orderId int, body UpdateOrderJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUpdateOrderRequest(c.Server, orderId, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) UpdateOrderTemplateWithBody(ctx context.Context, orderId int, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUpdateOrderTemplateRequestWithBody(c.Server, orderId, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) UpdateOrderTemplate(ctx context.Context, orderId int, body UpdateOrderTemplateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUpdateOrderTemplateRequest(c.Server, orderId, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetDiscounts(ctx context.Context, orderId int, params *GetDiscountsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetDiscountsRequest(c.Server, orderId, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) OrderGetPdf(ctx context.Context, orderId int, params *OrderGetPdfParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewOrderGetPdfRequest(c.Server, orderId, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetOrderPositionsById(ctx context.Context, orderId int, params *GetOrderPositionsByIdParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetOrderPositionsByIdRequest(c.Server, orderId, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetRelatedObjects(ctx context.Context, orderId int, params *GetRelatedObjectsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetRelatedObjectsRequest(c.Server, orderId, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) OrderSendByWithBody(ctx context.Context, orderId int, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewOrderSendByRequestWithBody(c.Server, orderId, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) OrderSendBy(ctx context.Context, orderId int, body OrderSendByJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewOrderSendByRequest(c.Server, orderId, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) SendorderViaEMailWithBody(ctx context.Context, orderId int, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewSendorderViaEMailRequestWithBody(c.Server, orderId, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) SendorderViaEMail(ctx context.Context, orderId int, body SendorderViaEMailJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewSendorderViaEMailRequest(c.Server, orderId, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetOrderPositions(ctx context.Context, params *GetOrderPositionsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetOrderPositionsRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) DeleteOrderPos(ctx context.Context, orderPosId int, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteOrderPosRequest(c.Server, orderPosId) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetOrderPositionById(ctx context.Context, orderPosId int, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetOrderPositionByIdRequest(c.Server, orderPosId) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) UpdateOrderPositionWithBody(ctx context.Context, orderPosId int, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUpdateOrderPositionRequestWithBody(c.Server, orderPosId, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) UpdateOrderPosition(ctx context.Context, orderPosId int, body UpdateOrderPositionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUpdateOrderPositionRequest(c.Server, orderPosId, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetParts(ctx context.Context, params *GetPartsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetPartsRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) CreatePartWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreatePartRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) CreatePart(ctx context.Context, body CreatePartJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreatePartRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetPartById(ctx context.Context, partId int, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetPartByIdRequest(c.Server, partId) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) UpdatePartWithBody(ctx context.Context, partId int, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUpdatePartRequestWithBody(c.Server, partId, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) UpdatePart(ctx context.Context, partId int, body UpdatePartJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUpdatePartRequest(c.Server, partId, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PartGetStock(ctx context.Context, partId int, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPartGetStockRequest(c.Server, partId) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) ForAccountNumber(ctx context.Context, params *ForAccountNumberParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewForAccountNumberRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) ForAllAccounts(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewForAllAccountsRequest(c.Server) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) ForExpense(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewForExpenseRequest(c.Server) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) ForRevenue(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewForRevenueRequest(c.Server) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) ForTaxRule(ctx context.Context, params *ForTaxRuleParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewForTaxRuleRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) ReportContact(ctx context.Context, params *ReportContactParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewReportContactRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) ReportInvoice(ctx context.Context, params *ReportInvoiceParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewReportInvoiceRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) ReportOrder(ctx context.Context, params *ReportOrderParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewReportOrderRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) ReportVoucher(ctx context.Context, params *ReportVoucherParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewReportVoucherRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) UpdateExportConfigWithBody(ctx context.Context, sevClientId float32, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUpdateExportConfigRequestWithBody(c.Server, sevClientId, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) UpdateExportConfig(ctx context.Context, sevClientId float32, body UpdateExportConfigJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUpdateExportConfigRequest(c.Server, sevClientId, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetTags(ctx context.Context, params *GetTagsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetTagsRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) CreateTagWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateTagRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) CreateTag(ctx context.Context, body CreateTagJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateTagRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) DeleteTag(ctx context.Context, tagId int, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteTagRequest(c.Server, tagId) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetTagById(ctx context.Context, tagId int, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetTagByIdRequest(c.Server, tagId) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) UpdateTagWithBody(ctx context.Context, tagId int, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUpdateTagRequestWithBody(c.Server, tagId, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) UpdateTag(ctx context.Context, tagId int, body UpdateTagJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUpdateTagRequest(c.Server, tagId, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetTagRelations(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetTagRelationsRequest(c.Server) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetPlaceholder(ctx context.Context, params *GetPlaceholderParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetPlaceholderRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) BookkeepingSystemVersion(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewBookkeepingSystemVersionRequest(c.Server) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetVouchers(ctx context.Context, params *GetVouchersParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetVouchersRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) VoucherFactorySaveVoucherWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewVoucherFactorySaveVoucherRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) VoucherFactorySaveVoucher(ctx context.Context, body VoucherFactorySaveVoucherJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewVoucherFactorySaveVoucherRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) VoucherUploadFileWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewVoucherUploadFileRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetVoucherById(ctx context.Context, voucherId int, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetVoucherByIdRequest(c.Server, voucherId) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) UpdateVoucherWithBody(ctx context.Context, voucherId int, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUpdateVoucherRequestWithBody(c.Server, voucherId, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) UpdateVoucher(ctx context.Context, voucherId int, body UpdateVoucherJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUpdateVoucherRequest(c.Server, voucherId, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) BookVoucherWithBody(ctx context.Context, voucherId int, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewBookVoucherRequestWithBody(c.Server, voucherId, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) BookVoucher(ctx context.Context, voucherId int, body BookVoucherJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewBookVoucherRequest(c.Server, voucherId, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) VoucherEnshrine(ctx context.Context, voucherId int, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewVoucherEnshrineRequest(c.Server, voucherId) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) VoucherResetToDraft(ctx context.Context, voucherId int, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewVoucherResetToDraftRequest(c.Server, voucherId) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) VoucherResetToOpen(ctx context.Context, voucherId int, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewVoucherResetToOpenRequest(c.Server, voucherId) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetVoucherPositions(ctx context.Context, params *GetVoucherPositionsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetVoucherPositionsRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +// NewGetAccountingContactRequest generates requests for GetAccountingContact +func NewGetAccountingContactRequest(server string, params *GetAccountingContactParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/AccountingContact") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.ContactId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "contact[id]", runtime.ParamLocationQuery, *params.ContactId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.ContactObjectName != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "contact[objectName]", runtime.ParamLocationQuery, *params.ContactObjectName); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewCreateAccountingContactRequest calls the generic CreateAccountingContact builder with application/json body +func NewCreateAccountingContactRequest(server string, body CreateAccountingContactJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewCreateAccountingContactRequestWithBody(server, "application/json", bodyReader) +} + +// NewCreateAccountingContactRequestWithBody generates requests for CreateAccountingContact with any type of body +func NewCreateAccountingContactRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/AccountingContact") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewDeleteAccountingContactRequest generates requests for DeleteAccountingContact +func NewDeleteAccountingContactRequest(server string, accountingContactId int) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "accountingContactId", runtime.ParamLocationPath, accountingContactId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/AccountingContact/%s", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("DELETE", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewGetAccountingContactByIdRequest generates requests for GetAccountingContactById +func NewGetAccountingContactByIdRequest(server string, accountingContactId int) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "accountingContactId", runtime.ParamLocationPath, accountingContactId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/AccountingContact/%s", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewUpdateAccountingContactRequest calls the generic UpdateAccountingContact builder with application/json body +func NewUpdateAccountingContactRequest(server string, accountingContactId int, body UpdateAccountingContactJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewUpdateAccountingContactRequestWithBody(server, accountingContactId, "application/json", bodyReader) +} + +// NewUpdateAccountingContactRequestWithBody generates requests for UpdateAccountingContact with any type of body +func NewUpdateAccountingContactRequestWithBody(server string, accountingContactId int, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "accountingContactId", runtime.ParamLocationPath, accountingContactId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/AccountingContact/%s", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("PUT", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewGetCheckAccountsRequest generates requests for GetCheckAccounts +func NewGetCheckAccountsRequest(server string) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/CheckAccount") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewCreateCheckAccountRequest calls the generic CreateCheckAccount builder with application/json body +func NewCreateCheckAccountRequest(server string, body CreateCheckAccountJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewCreateCheckAccountRequestWithBody(server, "application/json", bodyReader) +} + +// NewCreateCheckAccountRequestWithBody generates requests for CreateCheckAccount with any type of body +func NewCreateCheckAccountRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/CheckAccount") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewCreateClearingAccountRequest calls the generic CreateClearingAccount builder with application/json body +func NewCreateClearingAccountRequest(server string, body CreateClearingAccountJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewCreateClearingAccountRequestWithBody(server, "application/json", bodyReader) +} + +// NewCreateClearingAccountRequestWithBody generates requests for CreateClearingAccount with any type of body +func NewCreateClearingAccountRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/CheckAccount/Factory/clearingAccount") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewCreateFileImportAccountRequest calls the generic CreateFileImportAccount builder with application/json body +func NewCreateFileImportAccountRequest(server string, body CreateFileImportAccountJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewCreateFileImportAccountRequestWithBody(server, "application/json", bodyReader) +} + +// NewCreateFileImportAccountRequestWithBody generates requests for CreateFileImportAccount with any type of body +func NewCreateFileImportAccountRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/CheckAccount/Factory/fileImportAccount") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewDeleteCheckAccountRequest generates requests for DeleteCheckAccount +func NewDeleteCheckAccountRequest(server string, checkAccountId int) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "checkAccountId", runtime.ParamLocationPath, checkAccountId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/CheckAccount/%s", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("DELETE", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewGetCheckAccountByIdRequest generates requests for GetCheckAccountById +func NewGetCheckAccountByIdRequest(server string, checkAccountId int) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "checkAccountId", runtime.ParamLocationPath, checkAccountId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/CheckAccount/%s", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewUpdateCheckAccountRequest calls the generic UpdateCheckAccount builder with application/json body +func NewUpdateCheckAccountRequest(server string, checkAccountId int, body UpdateCheckAccountJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewUpdateCheckAccountRequestWithBody(server, checkAccountId, "application/json", bodyReader) +} + +// NewUpdateCheckAccountRequestWithBody generates requests for UpdateCheckAccount with any type of body +func NewUpdateCheckAccountRequestWithBody(server string, checkAccountId int, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "checkAccountId", runtime.ParamLocationPath, checkAccountId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/CheckAccount/%s", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("PUT", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewGetBalanceAtDateRequest generates requests for GetBalanceAtDate +func NewGetBalanceAtDateRequest(server string, checkAccountId int, params *GetBalanceAtDateParams) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "checkAccountId", runtime.ParamLocationPath, checkAccountId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/CheckAccount/%s/getBalanceAtDate", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "date", runtime.ParamLocationQuery, params.Date); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewGetTransactionsRequest generates requests for GetTransactions +func NewGetTransactionsRequest(server string, params *GetTransactionsParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/CheckAccountTransaction") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.CheckAccountId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", false, "checkAccount[id]", runtime.ParamLocationQuery, *params.CheckAccountId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.CheckAccountObjectName != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", false, "checkAccount[objectName]", runtime.ParamLocationQuery, *params.CheckAccountObjectName); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.IsBooked != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", false, "isBooked", runtime.ParamLocationQuery, *params.IsBooked); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PaymtPurpose != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", false, "paymtPurpose", runtime.ParamLocationQuery, *params.PaymtPurpose); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.StartDate != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", false, "startDate", runtime.ParamLocationQuery, *params.StartDate); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.EndDate != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", false, "endDate", runtime.ParamLocationQuery, *params.EndDate); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PayeePayerName != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", false, "payeePayerName", runtime.ParamLocationQuery, *params.PayeePayerName); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.OnlyCredit != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", false, "onlyCredit", runtime.ParamLocationQuery, *params.OnlyCredit); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.OnlyDebit != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", false, "onlyDebit", runtime.ParamLocationQuery, *params.OnlyDebit); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewCreateTransactionRequest calls the generic CreateTransaction builder with application/json body +func NewCreateTransactionRequest(server string, body CreateTransactionJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewCreateTransactionRequestWithBody(server, "application/json", bodyReader) +} + +// NewCreateTransactionRequestWithBody generates requests for CreateTransaction with any type of body +func NewCreateTransactionRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/CheckAccountTransaction") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewDeleteCheckAccountTransactionRequest generates requests for DeleteCheckAccountTransaction +func NewDeleteCheckAccountTransactionRequest(server string, checkAccountTransactionId int) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "checkAccountTransactionId", runtime.ParamLocationPath, checkAccountTransactionId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/CheckAccountTransaction/%s", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("DELETE", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewGetCheckAccountTransactionByIdRequest generates requests for GetCheckAccountTransactionById +func NewGetCheckAccountTransactionByIdRequest(server string, checkAccountTransactionId int) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "checkAccountTransactionId", runtime.ParamLocationPath, checkAccountTransactionId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/CheckAccountTransaction/%s", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewUpdateCheckAccountTransactionRequest calls the generic UpdateCheckAccountTransaction builder with application/json body +func NewUpdateCheckAccountTransactionRequest(server string, checkAccountTransactionId int, body UpdateCheckAccountTransactionJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewUpdateCheckAccountTransactionRequestWithBody(server, checkAccountTransactionId, "application/json", bodyReader) +} + +// NewUpdateCheckAccountTransactionRequestWithBody generates requests for UpdateCheckAccountTransaction with any type of body +func NewUpdateCheckAccountTransactionRequestWithBody(server string, checkAccountTransactionId int, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "checkAccountTransactionId", runtime.ParamLocationPath, checkAccountTransactionId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/CheckAccountTransaction/%s", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("PUT", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewCheckAccountTransactionEnshrineRequest generates requests for CheckAccountTransactionEnshrine +func NewCheckAccountTransactionEnshrineRequest(server string, checkAccountTransactionId int) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "checkAccountTransactionId", runtime.ParamLocationPath, checkAccountTransactionId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/CheckAccountTransaction/%s/enshrine", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("PUT", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewGetCommunicationWaysRequest generates requests for GetCommunicationWays +func NewGetCommunicationWaysRequest(server string, params *GetCommunicationWaysParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/CommunicationWay") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.ContactId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "contact[id]", runtime.ParamLocationQuery, *params.ContactId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.ContactObjectName != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "contact[objectName]", runtime.ParamLocationQuery, *params.ContactObjectName); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Type != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "type", runtime.ParamLocationQuery, *params.Type); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Main != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "main", runtime.ParamLocationQuery, *params.Main); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewCreateCommunicationWayRequest calls the generic CreateCommunicationWay builder with application/json body +func NewCreateCommunicationWayRequest(server string, body CreateCommunicationWayJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewCreateCommunicationWayRequestWithBody(server, "application/json", bodyReader) +} + +// NewCreateCommunicationWayRequestWithBody generates requests for CreateCommunicationWay with any type of body +func NewCreateCommunicationWayRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/CommunicationWay") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewDeleteCommunicationWayRequest generates requests for DeleteCommunicationWay +func NewDeleteCommunicationWayRequest(server string, communicationWayId int) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "communicationWayId", runtime.ParamLocationPath, communicationWayId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/CommunicationWay/%s", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("DELETE", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewGetCommunicationWayByIdRequest generates requests for GetCommunicationWayById +func NewGetCommunicationWayByIdRequest(server string, communicationWayId int) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "communicationWayId", runtime.ParamLocationPath, communicationWayId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/CommunicationWay/%s", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewUpdateCommunicationWayRequest calls the generic UpdateCommunicationWay builder with application/json body +func NewUpdateCommunicationWayRequest(server string, communicationWayId int, body UpdateCommunicationWayJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewUpdateCommunicationWayRequestWithBody(server, communicationWayId, "application/json", bodyReader) +} + +// NewUpdateCommunicationWayRequestWithBody generates requests for UpdateCommunicationWay with any type of body +func NewUpdateCommunicationWayRequestWithBody(server string, communicationWayId int, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "communicationWayId", runtime.ParamLocationPath, communicationWayId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/CommunicationWay/%s", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("PUT", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewGetCommunicationWayKeysRequest generates requests for GetCommunicationWayKeys +func NewGetCommunicationWayKeysRequest(server string) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/CommunicationWayKey") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewGetContactsRequest generates requests for GetContacts +func NewGetContactsRequest(server string, params *GetContactsParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/Contact") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.Depth != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "depth", runtime.ParamLocationQuery, *params.Depth); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.CustomerNumber != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "customerNumber", runtime.ParamLocationQuery, *params.CustomerNumber); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewCreateContactRequest calls the generic CreateContact builder with application/json body +func NewCreateContactRequest(server string, body CreateContactJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewCreateContactRequestWithBody(server, "application/json", bodyReader) +} + +// NewCreateContactRequestWithBody generates requests for CreateContact with any type of body +func NewCreateContactRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/Contact") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewFindContactsByCustomFieldValueRequest generates requests for FindContactsByCustomFieldValue +func NewFindContactsByCustomFieldValueRequest(server string, params *FindContactsByCustomFieldValueParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/Contact/Factory/findContactsByCustomFieldValue") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "value", runtime.ParamLocationQuery, params.Value); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + if params.CustomFieldSettingId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "customFieldSetting[id]", runtime.ParamLocationQuery, *params.CustomFieldSettingId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.CustomFieldSettingObjectName != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "customFieldSetting[objectName]", runtime.ParamLocationQuery, *params.CustomFieldSettingObjectName); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "customFieldName", runtime.ParamLocationQuery, params.CustomFieldName); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewGetNextCustomerNumberRequest generates requests for GetNextCustomerNumber +func NewGetNextCustomerNumberRequest(server string) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/Contact/Factory/getNextCustomerNumber") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewContactCustomerNumberAvailabilityCheckRequest generates requests for ContactCustomerNumberAvailabilityCheck +func NewContactCustomerNumberAvailabilityCheckRequest(server string, params *ContactCustomerNumberAvailabilityCheckParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/Contact/Mapper/checkCustomerNumberAvailability") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.CustomerNumber != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "customerNumber", runtime.ParamLocationQuery, *params.CustomerNumber); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewDeleteContactRequest generates requests for DeleteContact +func NewDeleteContactRequest(server string, contactId int) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "contactId", runtime.ParamLocationPath, contactId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/Contact/%s", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("DELETE", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewGetContactByIdRequest generates requests for GetContactById +func NewGetContactByIdRequest(server string, contactId int) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "contactId", runtime.ParamLocationPath, contactId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/Contact/%s", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewUpdateContactRequest calls the generic UpdateContact builder with application/json body +func NewUpdateContactRequest(server string, contactId int, body UpdateContactJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewUpdateContactRequestWithBody(server, contactId, "application/json", bodyReader) +} + +// NewUpdateContactRequestWithBody generates requests for UpdateContact with any type of body +func NewUpdateContactRequestWithBody(server string, contactId int, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "contactId", runtime.ParamLocationPath, contactId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/Contact/%s", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("PUT", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewGetContactTabsItemCountByIdRequest generates requests for GetContactTabsItemCountById +func NewGetContactTabsItemCountByIdRequest(server string, contactId int) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "contactId", runtime.ParamLocationPath, contactId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/Contact/%s/getTabsItemCount", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewGetContactAddressesRequest generates requests for GetContactAddresses +func NewGetContactAddressesRequest(server string) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/ContactAddress") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewCreateContactAddressRequest calls the generic CreateContactAddress builder with application/json body +func NewCreateContactAddressRequest(server string, body CreateContactAddressJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewCreateContactAddressRequestWithBody(server, "application/json", bodyReader) +} + +// NewCreateContactAddressRequestWithBody generates requests for CreateContactAddress with any type of body +func NewCreateContactAddressRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/ContactAddress") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewDeleteContactAddressRequest generates requests for DeleteContactAddress +func NewDeleteContactAddressRequest(server string, contactAddressId int) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "contactAddressId", runtime.ParamLocationPath, contactAddressId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/ContactAddress/%s", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("DELETE", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewContactAddressIdRequest generates requests for ContactAddressId +func NewContactAddressIdRequest(server string, contactAddressId int) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "contactAddressId", runtime.ParamLocationPath, contactAddressId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/ContactAddress/%s", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewUpdateContactAddressRequest calls the generic UpdateContactAddress builder with application/json body +func NewUpdateContactAddressRequest(server string, contactAddressId int, body UpdateContactAddressJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewUpdateContactAddressRequestWithBody(server, contactAddressId, "application/json", bodyReader) +} + +// NewUpdateContactAddressRequestWithBody generates requests for UpdateContactAddress with any type of body +func NewUpdateContactAddressRequestWithBody(server string, contactAddressId int, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "contactAddressId", runtime.ParamLocationPath, contactAddressId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/ContactAddress/%s", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("PUT", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewGetContactFieldsRequest generates requests for GetContactFields +func NewGetContactFieldsRequest(server string) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/ContactCustomField") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewCreateContactFieldRequest calls the generic CreateContactField builder with application/json body +func NewCreateContactFieldRequest(server string, body CreateContactFieldJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewCreateContactFieldRequestWithBody(server, "application/json", bodyReader) +} + +// NewCreateContactFieldRequestWithBody generates requests for CreateContactField with any type of body +func NewCreateContactFieldRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/ContactCustomField") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewDeleteContactCustomFieldIdRequest generates requests for DeleteContactCustomFieldId +func NewDeleteContactCustomFieldIdRequest(server string, contactCustomFieldId int) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "contactCustomFieldId", runtime.ParamLocationPath, contactCustomFieldId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/ContactCustomField/%s", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("DELETE", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewGetContactFieldsByIdRequest generates requests for GetContactFieldsById +func NewGetContactFieldsByIdRequest(server string, contactCustomFieldId float32) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "contactCustomFieldId", runtime.ParamLocationPath, contactCustomFieldId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/ContactCustomField/%s", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewUpdateContactfieldRequest calls the generic UpdateContactfield builder with application/json body +func NewUpdateContactfieldRequest(server string, contactCustomFieldId float32, body UpdateContactfieldJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewUpdateContactfieldRequestWithBody(server, contactCustomFieldId, "application/json", bodyReader) +} + +// NewUpdateContactfieldRequestWithBody generates requests for UpdateContactfield with any type of body +func NewUpdateContactfieldRequestWithBody(server string, contactCustomFieldId float32, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "contactCustomFieldId", runtime.ParamLocationPath, contactCustomFieldId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/ContactCustomField/%s", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("PUT", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewGetContactFieldSettingsRequest generates requests for GetContactFieldSettings +func NewGetContactFieldSettingsRequest(server string) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/ContactCustomFieldSetting") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewCreateContactFieldSettingRequest calls the generic CreateContactFieldSetting builder with application/json body +func NewCreateContactFieldSettingRequest(server string, body CreateContactFieldSettingJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewCreateContactFieldSettingRequestWithBody(server, "application/json", bodyReader) +} + +// NewCreateContactFieldSettingRequestWithBody generates requests for CreateContactFieldSetting with any type of body +func NewCreateContactFieldSettingRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/ContactCustomFieldSetting") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewDeleteContactFieldSettingRequest generates requests for DeleteContactFieldSetting +func NewDeleteContactFieldSettingRequest(server string, contactCustomFieldSettingId int) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "contactCustomFieldSettingId", runtime.ParamLocationPath, contactCustomFieldSettingId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/ContactCustomFieldSetting/%s", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("DELETE", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewGetContactFieldSettingByIdRequest generates requests for GetContactFieldSettingById +func NewGetContactFieldSettingByIdRequest(server string, contactCustomFieldSettingId int) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "contactCustomFieldSettingId", runtime.ParamLocationPath, contactCustomFieldSettingId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/ContactCustomFieldSetting/%s", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewUpdateContactFieldSettingRequest calls the generic UpdateContactFieldSetting builder with application/json body +func NewUpdateContactFieldSettingRequest(server string, contactCustomFieldSettingId int, body UpdateContactFieldSettingJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewUpdateContactFieldSettingRequestWithBody(server, contactCustomFieldSettingId, "application/json", bodyReader) +} + +// NewUpdateContactFieldSettingRequestWithBody generates requests for UpdateContactFieldSetting with any type of body +func NewUpdateContactFieldSettingRequestWithBody(server string, contactCustomFieldSettingId int, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "contactCustomFieldSettingId", runtime.ParamLocationPath, contactCustomFieldSettingId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/ContactCustomFieldSetting/%s", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("PUT", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewGetReferenceCountRequest generates requests for GetReferenceCount +func NewGetReferenceCountRequest(server string, contactCustomFieldSettingId int) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "contactCustomFieldSettingId", runtime.ParamLocationPath, contactCustomFieldSettingId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/ContactCustomFieldSetting/%s/getReferenceCount", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewGetCreditNotesRequest generates requests for GetCreditNotes +func NewGetCreditNotesRequest(server string, params *GetCreditNotesParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/CreditNote") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.Status != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "status", runtime.ParamLocationQuery, *params.Status); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.CreditNoteNumber != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "creditNoteNumber", runtime.ParamLocationQuery, *params.CreditNoteNumber); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.StartDate != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "startDate", runtime.ParamLocationQuery, *params.StartDate); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.EndDate != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "endDate", runtime.ParamLocationQuery, *params.EndDate); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.ContactId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", false, "contact[id]", runtime.ParamLocationQuery, *params.ContactId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.ContactObjectName != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", false, "contact[objectName]", runtime.ParamLocationQuery, *params.ContactObjectName); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewCreateCreditNoteFromInvoiceRequest calls the generic CreateCreditNoteFromInvoice builder with application/json body +func NewCreateCreditNoteFromInvoiceRequest(server string, body CreateCreditNoteFromInvoiceJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewCreateCreditNoteFromInvoiceRequestWithBody(server, "application/json", bodyReader) +} + +// NewCreateCreditNoteFromInvoiceRequestWithBody generates requests for CreateCreditNoteFromInvoice with any type of body +func NewCreateCreditNoteFromInvoiceRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/CreditNote/Factory/createFromInvoice") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewCreateCreditNoteFromVoucherRequest calls the generic CreateCreditNoteFromVoucher builder with application/json body +func NewCreateCreditNoteFromVoucherRequest(server string, body CreateCreditNoteFromVoucherJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewCreateCreditNoteFromVoucherRequestWithBody(server, "application/json", bodyReader) +} + +// NewCreateCreditNoteFromVoucherRequestWithBody generates requests for CreateCreditNoteFromVoucher with any type of body +func NewCreateCreditNoteFromVoucherRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/CreditNote/Factory/createFromVoucher") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewCreatecreditNoteRequest calls the generic CreatecreditNote builder with application/json body +func NewCreatecreditNoteRequest(server string, body CreatecreditNoteJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewCreatecreditNoteRequestWithBody(server, "application/json", bodyReader) +} + +// NewCreatecreditNoteRequestWithBody generates requests for CreatecreditNote with any type of body +func NewCreatecreditNoteRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/CreditNote/Factory/saveCreditNote") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewDeletecreditNoteRequest generates requests for DeletecreditNote +func NewDeletecreditNoteRequest(server string, creditNoteId int) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "creditNoteId", runtime.ParamLocationPath, creditNoteId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/CreditNote/%s", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("DELETE", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewGetcreditNoteByIdRequest generates requests for GetcreditNoteById +func NewGetcreditNoteByIdRequest(server string, creditNoteId int) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "creditNoteId", runtime.ParamLocationPath, creditNoteId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/CreditNote/%s", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewUpdatecreditNoteRequest calls the generic UpdatecreditNote builder with application/json body +func NewUpdatecreditNoteRequest(server string, creditNoteId int, body UpdatecreditNoteJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewUpdatecreditNoteRequestWithBody(server, creditNoteId, "application/json", bodyReader) +} + +// NewUpdatecreditNoteRequestWithBody generates requests for UpdatecreditNote with any type of body +func NewUpdatecreditNoteRequestWithBody(server string, creditNoteId int, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "creditNoteId", runtime.ParamLocationPath, creditNoteId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/CreditNote/%s", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("PUT", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewBookCreditNoteRequest calls the generic BookCreditNote builder with application/json body +func NewBookCreditNoteRequest(server string, creditNoteId int, body BookCreditNoteJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewBookCreditNoteRequestWithBody(server, creditNoteId, "application/json", bodyReader) +} + +// NewBookCreditNoteRequestWithBody generates requests for BookCreditNote with any type of body +func NewBookCreditNoteRequestWithBody(server string, creditNoteId int, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "creditNoteId", runtime.ParamLocationPath, creditNoteId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/CreditNote/%s/bookAmount", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("PUT", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewUpdateCreditNoteTemplateRequest calls the generic UpdateCreditNoteTemplate builder with application/json body +func NewUpdateCreditNoteTemplateRequest(server string, creditNoteId int, body UpdateCreditNoteTemplateJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewUpdateCreditNoteTemplateRequestWithBody(server, creditNoteId, "application/json", bodyReader) +} + +// NewUpdateCreditNoteTemplateRequestWithBody generates requests for UpdateCreditNoteTemplate with any type of body +func NewUpdateCreditNoteTemplateRequestWithBody(server string, creditNoteId int, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "creditNoteId", runtime.ParamLocationPath, creditNoteId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/CreditNote/%s/changeParameter", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("PUT", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewCreditNoteEnshrineRequest generates requests for CreditNoteEnshrine +func NewCreditNoteEnshrineRequest(server string, creditNoteId int) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "creditNoteId", runtime.ParamLocationPath, creditNoteId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/CreditNote/%s/enshrine", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("PUT", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewCreditNoteGetPdfRequest generates requests for CreditNoteGetPdf +func NewCreditNoteGetPdfRequest(server string, creditNoteId int, params *CreditNoteGetPdfParams) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "creditNoteId", runtime.ParamLocationPath, creditNoteId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/CreditNote/%s/getPdf", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.Download != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "download", runtime.ParamLocationQuery, *params.Download); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PreventSendBy != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "preventSendBy", runtime.ParamLocationQuery, *params.PreventSendBy); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewCreditNoteResetToDraftRequest generates requests for CreditNoteResetToDraft +func NewCreditNoteResetToDraftRequest(server string, creditNoteId int) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "creditNoteId", runtime.ParamLocationPath, creditNoteId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/CreditNote/%s/resetToDraft", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("PUT", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewCreditNoteResetToOpenRequest generates requests for CreditNoteResetToOpen +func NewCreditNoteResetToOpenRequest(server string, creditNoteId int) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "creditNoteId", runtime.ParamLocationPath, creditNoteId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/CreditNote/%s/resetToOpen", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("PUT", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewCreditNoteSendByRequest calls the generic CreditNoteSendBy builder with application/json body +func NewCreditNoteSendByRequest(server string, creditNoteId int, body CreditNoteSendByJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewCreditNoteSendByRequestWithBody(server, creditNoteId, "application/json", bodyReader) +} + +// NewCreditNoteSendByRequestWithBody generates requests for CreditNoteSendBy with any type of body +func NewCreditNoteSendByRequestWithBody(server string, creditNoteId int, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "creditNoteId", runtime.ParamLocationPath, creditNoteId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/CreditNote/%s/sendBy", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("PUT", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewSendCreditNoteByPrintingRequest generates requests for SendCreditNoteByPrinting +func NewSendCreditNoteByPrintingRequest(server string, creditNoteId int, params *SendCreditNoteByPrintingParams) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "creditNoteId", runtime.ParamLocationPath, creditNoteId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/CreditNote/%s/sendByWithRender", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "sendType", runtime.ParamLocationQuery, params.SendType); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewSendCreditNoteViaEMailRequest calls the generic SendCreditNoteViaEMail builder with application/json body +func NewSendCreditNoteViaEMailRequest(server string, creditNoteId int, body SendCreditNoteViaEMailJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewSendCreditNoteViaEMailRequestWithBody(server, creditNoteId, "application/json", bodyReader) +} + +// NewSendCreditNoteViaEMailRequestWithBody generates requests for SendCreditNoteViaEMail with any type of body +func NewSendCreditNoteViaEMailRequestWithBody(server string, creditNoteId int, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "creditNoteId", runtime.ParamLocationPath, creditNoteId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/CreditNote/%s/sendViaEmail", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewGetcreditNotePositionsRequest generates requests for GetcreditNotePositions +func NewGetcreditNotePositionsRequest(server string, params *GetcreditNotePositionsParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/CreditNotePos") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.CreditNoteId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", false, "creditNote[id]", runtime.ParamLocationQuery, *params.CreditNoteId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.CreditNoteObjectName != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", false, "creditNote[objectName]", runtime.ParamLocationQuery, *params.CreditNoteObjectName); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewGetLetterpapersWithThumbRequest generates requests for GetLetterpapersWithThumb +func NewGetLetterpapersWithThumbRequest(server string) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/DocServer/getLetterpapersWithThumb") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewGetTemplatesRequest generates requests for GetTemplates +func NewGetTemplatesRequest(server string, params *GetTemplatesParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/DocServer/getTemplatesWithThumb") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.Type != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "type", runtime.ParamLocationQuery, *params.Type); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewExportContactRequest generates requests for ExportContact +func NewExportContactRequest(server string, params *ExportContactParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/Export/contactListCsv") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.Download != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "download", runtime.ParamLocationQuery, *params.Download); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "sevQuery", runtime.ParamLocationQuery, params.SevQuery); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewExportCreditNoteRequest generates requests for ExportCreditNote +func NewExportCreditNoteRequest(server string, params *ExportCreditNoteParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/Export/creditNoteCsv") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.Download != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "download", runtime.ParamLocationQuery, *params.Download); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "sevQuery", runtime.ParamLocationQuery, params.SevQuery); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewExportDatevRequest generates requests for ExportDatev +func NewExportDatevRequest(server string, params *ExportDatevParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/Export/datevCSV") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.Download != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "Download", runtime.ParamLocationQuery, *params.Download); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "startDate", runtime.ParamLocationQuery, params.StartDate); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "endDate", runtime.ParamLocationQuery, params.EndDate); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "scope", runtime.ParamLocationQuery, params.Scope); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + if params.WithUnpaidDocuments != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "withUnpaidDocuments", runtime.ParamLocationQuery, *params.WithUnpaidDocuments); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.WithEnshrinedDocuments != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "withEnshrinedDocuments", runtime.ParamLocationQuery, *params.WithEnshrinedDocuments); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Enshrine != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "enshrine", runtime.ParamLocationQuery, *params.Enshrine); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewExportInvoiceRequest generates requests for ExportInvoice +func NewExportInvoiceRequest(server string, params *ExportInvoiceParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/Export/invoiceCsv") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.Download != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "download", runtime.ParamLocationQuery, *params.Download); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "sevQuery", runtime.ParamLocationQuery, params.SevQuery); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewExportInvoiceZipRequest generates requests for ExportInvoiceZip +func NewExportInvoiceZipRequest(server string, params *ExportInvoiceZipParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/Export/invoiceZip") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.Download != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "download", runtime.ParamLocationQuery, *params.Download); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "sevQuery", runtime.ParamLocationQuery, params.SevQuery); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewExportTransactionsRequest generates requests for ExportTransactions +func NewExportTransactionsRequest(server string, params *ExportTransactionsParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/Export/transactionsCsv") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.Download != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "download", runtime.ParamLocationQuery, *params.Download); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "sevQuery", runtime.ParamLocationQuery, params.SevQuery); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewExportVoucherRequest generates requests for ExportVoucher +func NewExportVoucherRequest(server string, params *ExportVoucherParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/Export/voucherListCsv") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.Download != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "download", runtime.ParamLocationQuery, *params.Download); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "sevQuery", runtime.ParamLocationQuery, params.SevQuery); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewExportVoucherZipRequest generates requests for ExportVoucherZip +func NewExportVoucherZipRequest(server string, params *ExportVoucherZipParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/Export/voucherZip") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.Download != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "download", runtime.ParamLocationQuery, *params.Download); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "sevQuery", runtime.ParamLocationQuery, params.SevQuery); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewGetInvoicesRequest generates requests for GetInvoices +func NewGetInvoicesRequest(server string, params *GetInvoicesParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/Invoice") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.Status != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "status", runtime.ParamLocationQuery, *params.Status); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.InvoiceNumber != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "invoiceNumber", runtime.ParamLocationQuery, *params.InvoiceNumber); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.StartDate != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "startDate", runtime.ParamLocationQuery, *params.StartDate); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.EndDate != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "endDate", runtime.ParamLocationQuery, *params.EndDate); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.ContactId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "contact[id]", runtime.ParamLocationQuery, *params.ContactId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.ContactObjectName != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "contact[objectName]", runtime.ParamLocationQuery, *params.ContactObjectName); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewCreateInvoiceFromOrderRequest calls the generic CreateInvoiceFromOrder builder with application/json body +func NewCreateInvoiceFromOrderRequest(server string, body CreateInvoiceFromOrderJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewCreateInvoiceFromOrderRequestWithBody(server, "application/json", bodyReader) +} + +// NewCreateInvoiceFromOrderRequestWithBody generates requests for CreateInvoiceFromOrder with any type of body +func NewCreateInvoiceFromOrderRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/Invoice/Factory/createInvoiceFromOrder") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewCreateInvoiceReminderRequest calls the generic CreateInvoiceReminder builder with application/json body +func NewCreateInvoiceReminderRequest(server string, params *CreateInvoiceReminderParams, body CreateInvoiceReminderJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewCreateInvoiceReminderRequestWithBody(server, params, "application/json", bodyReader) +} + +// NewCreateInvoiceReminderRequestWithBody generates requests for CreateInvoiceReminder with any type of body +func NewCreateInvoiceReminderRequestWithBody(server string, params *CreateInvoiceReminderParams, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/Invoice/Factory/createInvoiceReminder") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "invoice[id]", runtime.ParamLocationQuery, params.InvoiceId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "invoice[objectName]", runtime.ParamLocationQuery, params.InvoiceObjectName); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewCreateInvoiceByFactoryRequest calls the generic CreateInvoiceByFactory builder with application/json body +func NewCreateInvoiceByFactoryRequest(server string, body CreateInvoiceByFactoryJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewCreateInvoiceByFactoryRequestWithBody(server, "application/json", bodyReader) +} + +// NewCreateInvoiceByFactoryRequestWithBody generates requests for CreateInvoiceByFactory with any type of body +func NewCreateInvoiceByFactoryRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/Invoice/Factory/saveInvoice") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewGetInvoiceByIdRequest generates requests for GetInvoiceById +func NewGetInvoiceByIdRequest(server string, invoiceId int) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "invoiceId", runtime.ParamLocationPath, invoiceId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/Invoice/%s", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewBookInvoiceRequest calls the generic BookInvoice builder with application/json body +func NewBookInvoiceRequest(server string, invoiceId int, body BookInvoiceJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewBookInvoiceRequestWithBody(server, invoiceId, "application/json", bodyReader) +} + +// NewBookInvoiceRequestWithBody generates requests for BookInvoice with any type of body +func NewBookInvoiceRequestWithBody(server string, invoiceId int, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "invoiceId", runtime.ParamLocationPath, invoiceId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/Invoice/%s/bookAmount", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("PUT", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewCancelInvoiceRequest generates requests for CancelInvoice +func NewCancelInvoiceRequest(server string, invoiceId int) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "invoiceId", runtime.ParamLocationPath, invoiceId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/Invoice/%s/cancelInvoice", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewUpdateInvoiceTemplateRequest calls the generic UpdateInvoiceTemplate builder with application/json body +func NewUpdateInvoiceTemplateRequest(server string, invoiceId int, body UpdateInvoiceTemplateJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewUpdateInvoiceTemplateRequestWithBody(server, invoiceId, "application/json", bodyReader) +} + +// NewUpdateInvoiceTemplateRequestWithBody generates requests for UpdateInvoiceTemplate with any type of body +func NewUpdateInvoiceTemplateRequestWithBody(server string, invoiceId int, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "invoiceId", runtime.ParamLocationPath, invoiceId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/Invoice/%s/changeParameter", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("PUT", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewInvoiceEnshrineRequest generates requests for InvoiceEnshrine +func NewInvoiceEnshrineRequest(server string, invoiceId int) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "invoiceId", runtime.ParamLocationPath, invoiceId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/Invoice/%s/enshrine", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("PUT", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewGetIsInvoicePartiallyPaidRequest generates requests for GetIsInvoicePartiallyPaid +func NewGetIsInvoicePartiallyPaidRequest(server string, invoiceId int) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "invoiceId", runtime.ParamLocationPath, invoiceId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/Invoice/%s/getIsPartiallyPaid", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewInvoiceGetPdfRequest generates requests for InvoiceGetPdf +func NewInvoiceGetPdfRequest(server string, invoiceId int, params *InvoiceGetPdfParams) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "invoiceId", runtime.ParamLocationPath, invoiceId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/Invoice/%s/getPdf", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.Download != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "download", runtime.ParamLocationQuery, *params.Download); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PreventSendBy != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "preventSendBy", runtime.ParamLocationQuery, *params.PreventSendBy); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewGetInvoicePositionsByIdRequest generates requests for GetInvoicePositionsById +func NewGetInvoicePositionsByIdRequest(server string, invoiceId int, params *GetInvoicePositionsByIdParams) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "invoiceId", runtime.ParamLocationPath, invoiceId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/Invoice/%s/getPositions", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.Limit != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "limit", runtime.ParamLocationQuery, *params.Limit); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Offset != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "offset", runtime.ParamLocationQuery, *params.Offset); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Embed != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "embed", runtime.ParamLocationQuery, *params.Embed); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewInvoiceGetXmlRequest generates requests for InvoiceGetXml +func NewInvoiceGetXmlRequest(server string, invoiceId int) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "invoiceId", runtime.ParamLocationPath, invoiceId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/Invoice/%s/getXml", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewInvoiceRenderRequest calls the generic InvoiceRender builder with application/json body +func NewInvoiceRenderRequest(server string, invoiceId int, body InvoiceRenderJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewInvoiceRenderRequestWithBody(server, invoiceId, "application/json", bodyReader) +} + +// NewInvoiceRenderRequestWithBody generates requests for InvoiceRender with any type of body +func NewInvoiceRenderRequestWithBody(server string, invoiceId int, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "invoiceId", runtime.ParamLocationPath, invoiceId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/Invoice/%s/render", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewInvoiceResetToDraftRequest generates requests for InvoiceResetToDraft +func NewInvoiceResetToDraftRequest(server string, invoiceId int) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "invoiceId", runtime.ParamLocationPath, invoiceId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/Invoice/%s/resetToDraft", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("PUT", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewInvoiceResetToOpenRequest generates requests for InvoiceResetToOpen +func NewInvoiceResetToOpenRequest(server string, invoiceId int) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "invoiceId", runtime.ParamLocationPath, invoiceId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/Invoice/%s/resetToOpen", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("PUT", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewInvoiceSendByRequest calls the generic InvoiceSendBy builder with application/json body +func NewInvoiceSendByRequest(server string, invoiceId int, body InvoiceSendByJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewInvoiceSendByRequestWithBody(server, invoiceId, "application/json", bodyReader) +} + +// NewInvoiceSendByRequestWithBody generates requests for InvoiceSendBy with any type of body +func NewInvoiceSendByRequestWithBody(server string, invoiceId int, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "invoiceId", runtime.ParamLocationPath, invoiceId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/Invoice/%s/sendBy", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("PUT", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewSendInvoiceViaEMailRequest calls the generic SendInvoiceViaEMail builder with application/json body +func NewSendInvoiceViaEMailRequest(server string, invoiceId int, body SendInvoiceViaEMailJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewSendInvoiceViaEMailRequestWithBody(server, invoiceId, "application/json", bodyReader) +} + +// NewSendInvoiceViaEMailRequestWithBody generates requests for SendInvoiceViaEMail with any type of body +func NewSendInvoiceViaEMailRequestWithBody(server string, invoiceId int, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "invoiceId", runtime.ParamLocationPath, invoiceId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/Invoice/%s/sendViaEmail", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewGetInvoicePosRequest generates requests for GetInvoicePos +func NewGetInvoicePosRequest(server string, params *GetInvoicePosParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/InvoicePos") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.Id != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "id", runtime.ParamLocationQuery, *params.Id); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.InvoiceId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "invoice[id]", runtime.ParamLocationQuery, *params.InvoiceId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.InvoiceObjectName != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "invoice[objectName]", runtime.ParamLocationQuery, *params.InvoiceObjectName); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PartId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "part[id]", runtime.ParamLocationQuery, *params.PartId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PartObjectName != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "part[objectName]", runtime.ParamLocationQuery, *params.PartObjectName); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewGetOrdersRequest generates requests for GetOrders +func NewGetOrdersRequest(server string, params *GetOrdersParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/Order") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.Status != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "status", runtime.ParamLocationQuery, *params.Status); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.OrderNumber != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "orderNumber", runtime.ParamLocationQuery, *params.OrderNumber); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.StartDate != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "startDate", runtime.ParamLocationQuery, *params.StartDate); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.EndDate != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "endDate", runtime.ParamLocationQuery, *params.EndDate); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.ContactId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", false, "contact[id]", runtime.ParamLocationQuery, *params.ContactId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.ContactObjectName != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", false, "contact[objectName]", runtime.ParamLocationQuery, *params.ContactObjectName); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewCreateContractNoteFromOrderRequest calls the generic CreateContractNoteFromOrder builder with application/json body +func NewCreateContractNoteFromOrderRequest(server string, params *CreateContractNoteFromOrderParams, body CreateContractNoteFromOrderJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewCreateContractNoteFromOrderRequestWithBody(server, params, "application/json", bodyReader) +} + +// NewCreateContractNoteFromOrderRequestWithBody generates requests for CreateContractNoteFromOrder with any type of body +func NewCreateContractNoteFromOrderRequestWithBody(server string, params *CreateContractNoteFromOrderParams, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/Order/Factory/createContractNoteFromOrder") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if queryFrag, err := runtime.StyleParamWithLocation("form", false, "order[id]", runtime.ParamLocationQuery, params.OrderId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + if queryFrag, err := runtime.StyleParamWithLocation("form", false, "order[objectName]", runtime.ParamLocationQuery, params.OrderObjectName); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewCreatePackingListFromOrderRequest calls the generic CreatePackingListFromOrder builder with application/json body +func NewCreatePackingListFromOrderRequest(server string, params *CreatePackingListFromOrderParams, body CreatePackingListFromOrderJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewCreatePackingListFromOrderRequestWithBody(server, params, "application/json", bodyReader) +} + +// NewCreatePackingListFromOrderRequestWithBody generates requests for CreatePackingListFromOrder with any type of body +func NewCreatePackingListFromOrderRequestWithBody(server string, params *CreatePackingListFromOrderParams, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/Order/Factory/createPackingListFromOrder") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if queryFrag, err := runtime.StyleParamWithLocation("form", false, "order[id]", runtime.ParamLocationQuery, params.OrderId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + if queryFrag, err := runtime.StyleParamWithLocation("form", false, "order[objectName]", runtime.ParamLocationQuery, params.OrderObjectName); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewCreateOrderRequest calls the generic CreateOrder builder with application/json body +func NewCreateOrderRequest(server string, body CreateOrderJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewCreateOrderRequestWithBody(server, "application/json", bodyReader) +} + +// NewCreateOrderRequestWithBody generates requests for CreateOrder with any type of body +func NewCreateOrderRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/Order/Factory/saveOrder") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewDeleteOrderRequest generates requests for DeleteOrder +func NewDeleteOrderRequest(server string, orderId int) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "orderId", runtime.ParamLocationPath, orderId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/Order/%s", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("DELETE", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewGetOrderByIdRequest generates requests for GetOrderById +func NewGetOrderByIdRequest(server string, orderId int) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "orderId", runtime.ParamLocationPath, orderId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/Order/%s", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewUpdateOrderRequest calls the generic UpdateOrder builder with application/json body +func NewUpdateOrderRequest(server string, orderId int, body UpdateOrderJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewUpdateOrderRequestWithBody(server, orderId, "application/json", bodyReader) +} + +// NewUpdateOrderRequestWithBody generates requests for UpdateOrder with any type of body +func NewUpdateOrderRequestWithBody(server string, orderId int, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "orderId", runtime.ParamLocationPath, orderId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/Order/%s", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("PUT", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewUpdateOrderTemplateRequest calls the generic UpdateOrderTemplate builder with application/json body +func NewUpdateOrderTemplateRequest(server string, orderId int, body UpdateOrderTemplateJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewUpdateOrderTemplateRequestWithBody(server, orderId, "application/json", bodyReader) +} + +// NewUpdateOrderTemplateRequestWithBody generates requests for UpdateOrderTemplate with any type of body +func NewUpdateOrderTemplateRequestWithBody(server string, orderId int, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "orderId", runtime.ParamLocationPath, orderId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/Order/%s/changeParameter", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("PUT", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewGetDiscountsRequest generates requests for GetDiscounts +func NewGetDiscountsRequest(server string, orderId int, params *GetDiscountsParams) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "orderId", runtime.ParamLocationPath, orderId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/Order/%s/getDiscounts", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.Limit != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "limit", runtime.ParamLocationQuery, *params.Limit); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Offset != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "offset", runtime.ParamLocationQuery, *params.Offset); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Embed != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "embed", runtime.ParamLocationQuery, *params.Embed); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewOrderGetPdfRequest generates requests for OrderGetPdf +func NewOrderGetPdfRequest(server string, orderId int, params *OrderGetPdfParams) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "orderId", runtime.ParamLocationPath, orderId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/Order/%s/getPdf", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.Download != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "download", runtime.ParamLocationQuery, *params.Download); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PreventSendBy != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "preventSendBy", runtime.ParamLocationQuery, *params.PreventSendBy); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewGetOrderPositionsByIdRequest generates requests for GetOrderPositionsById +func NewGetOrderPositionsByIdRequest(server string, orderId int, params *GetOrderPositionsByIdParams) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "orderId", runtime.ParamLocationPath, orderId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/Order/%s/getPositions", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.Limit != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "limit", runtime.ParamLocationQuery, *params.Limit); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Offset != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "offset", runtime.ParamLocationQuery, *params.Offset); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Embed != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "embed", runtime.ParamLocationQuery, *params.Embed); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewGetRelatedObjectsRequest generates requests for GetRelatedObjects +func NewGetRelatedObjectsRequest(server string, orderId int, params *GetRelatedObjectsParams) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "orderId", runtime.ParamLocationPath, orderId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/Order/%s/getRelatedObjects", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.IncludeItself != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "includeItself", runtime.ParamLocationQuery, *params.IncludeItself); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.SortByType != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "sortByType", runtime.ParamLocationQuery, *params.SortByType); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Embed != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "embed", runtime.ParamLocationQuery, *params.Embed); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewOrderSendByRequest calls the generic OrderSendBy builder with application/json body +func NewOrderSendByRequest(server string, orderId int, body OrderSendByJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewOrderSendByRequestWithBody(server, orderId, "application/json", bodyReader) +} + +// NewOrderSendByRequestWithBody generates requests for OrderSendBy with any type of body +func NewOrderSendByRequestWithBody(server string, orderId int, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "orderId", runtime.ParamLocationPath, orderId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/Order/%s/sendBy", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("PUT", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewSendorderViaEMailRequest calls the generic SendorderViaEMail builder with application/json body +func NewSendorderViaEMailRequest(server string, orderId int, body SendorderViaEMailJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewSendorderViaEMailRequestWithBody(server, orderId, "application/json", bodyReader) +} + +// NewSendorderViaEMailRequestWithBody generates requests for SendorderViaEMail with any type of body +func NewSendorderViaEMailRequestWithBody(server string, orderId int, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "orderId", runtime.ParamLocationPath, orderId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/Order/%s/sendViaEmail", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewGetOrderPositionsRequest generates requests for GetOrderPositions +func NewGetOrderPositionsRequest(server string, params *GetOrderPositionsParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/OrderPos") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.OrderId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", false, "order[id]", runtime.ParamLocationQuery, *params.OrderId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.OrderObjectName != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", false, "order[objectName]", runtime.ParamLocationQuery, *params.OrderObjectName); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewDeleteOrderPosRequest generates requests for DeleteOrderPos +func NewDeleteOrderPosRequest(server string, orderPosId int) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "orderPosId", runtime.ParamLocationPath, orderPosId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/OrderPos/%s", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("DELETE", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewGetOrderPositionByIdRequest generates requests for GetOrderPositionById +func NewGetOrderPositionByIdRequest(server string, orderPosId int) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "orderPosId", runtime.ParamLocationPath, orderPosId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/OrderPos/%s", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewUpdateOrderPositionRequest calls the generic UpdateOrderPosition builder with application/json body +func NewUpdateOrderPositionRequest(server string, orderPosId int, body UpdateOrderPositionJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewUpdateOrderPositionRequestWithBody(server, orderPosId, "application/json", bodyReader) +} + +// NewUpdateOrderPositionRequestWithBody generates requests for UpdateOrderPosition with any type of body +func NewUpdateOrderPositionRequestWithBody(server string, orderPosId int, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "orderPosId", runtime.ParamLocationPath, orderPosId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/OrderPos/%s", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("PUT", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewGetPartsRequest generates requests for GetParts +func NewGetPartsRequest(server string, params *GetPartsParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/Part") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.PartNumber != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", false, "partNumber", runtime.ParamLocationQuery, *params.PartNumber); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Name != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", false, "name", runtime.ParamLocationQuery, *params.Name); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewCreatePartRequest calls the generic CreatePart builder with application/json body +func NewCreatePartRequest(server string, body CreatePartJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewCreatePartRequestWithBody(server, "application/json", bodyReader) +} + +// NewCreatePartRequestWithBody generates requests for CreatePart with any type of body +func NewCreatePartRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/Part") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewGetPartByIdRequest generates requests for GetPartById +func NewGetPartByIdRequest(server string, partId int) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "partId", runtime.ParamLocationPath, partId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/Part/%s", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewUpdatePartRequest calls the generic UpdatePart builder with application/json body +func NewUpdatePartRequest(server string, partId int, body UpdatePartJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewUpdatePartRequestWithBody(server, partId, "application/json", bodyReader) +} + +// NewUpdatePartRequestWithBody generates requests for UpdatePart with any type of body +func NewUpdatePartRequestWithBody(server string, partId int, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "partId", runtime.ParamLocationPath, partId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/Part/%s", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("PUT", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewPartGetStockRequest generates requests for PartGetStock +func NewPartGetStockRequest(server string, partId int) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "partId", runtime.ParamLocationPath, partId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/Part/%s/getStock", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewForAccountNumberRequest generates requests for ForAccountNumber +func NewForAccountNumberRequest(server string, params *ForAccountNumberParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/ReceiptGuidance/forAccountNumber") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "accountNumber", runtime.ParamLocationQuery, params.AccountNumber); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewForAllAccountsRequest generates requests for ForAllAccounts +func NewForAllAccountsRequest(server string) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/ReceiptGuidance/forAllAccounts") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewForExpenseRequest generates requests for ForExpense +func NewForExpenseRequest(server string) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/ReceiptGuidance/forExpense") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewForRevenueRequest generates requests for ForRevenue +func NewForRevenueRequest(server string) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/ReceiptGuidance/forRevenue") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewForTaxRuleRequest generates requests for ForTaxRule +func NewForTaxRuleRequest(server string, params *ForTaxRuleParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/ReceiptGuidance/forTaxRule") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "taxRule", runtime.ParamLocationQuery, params.TaxRule); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewReportContactRequest generates requests for ReportContact +func NewReportContactRequest(server string, params *ReportContactParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/Report/contactlist") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.Download != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "download", runtime.ParamLocationQuery, *params.Download); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "sevQuery", runtime.ParamLocationQuery, params.SevQuery); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewReportInvoiceRequest generates requests for ReportInvoice +func NewReportInvoiceRequest(server string, params *ReportInvoiceParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/Report/invoicelist") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.Download != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "download", runtime.ParamLocationQuery, *params.Download); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "view", runtime.ParamLocationQuery, params.View); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "sevQuery", runtime.ParamLocationQuery, params.SevQuery); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewReportOrderRequest generates requests for ReportOrder +func NewReportOrderRequest(server string, params *ReportOrderParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/Report/orderlist") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.Download != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "download", runtime.ParamLocationQuery, *params.Download); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "view", runtime.ParamLocationQuery, params.View); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "sevQuery", runtime.ParamLocationQuery, params.SevQuery); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewReportVoucherRequest generates requests for ReportVoucher +func NewReportVoucherRequest(server string, params *ReportVoucherParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/Report/voucherlist") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.Download != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "download", runtime.ParamLocationQuery, *params.Download); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "sevQuery", runtime.ParamLocationQuery, params.SevQuery); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewUpdateExportConfigRequest calls the generic UpdateExportConfig builder with application/json body +func NewUpdateExportConfigRequest(server string, sevClientId float32, body UpdateExportConfigJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewUpdateExportConfigRequestWithBody(server, sevClientId, "application/json", bodyReader) +} + +// NewUpdateExportConfigRequestWithBody generates requests for UpdateExportConfig with any type of body +func NewUpdateExportConfigRequestWithBody(server string, sevClientId float32, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "SevClientId", runtime.ParamLocationPath, sevClientId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/SevClient/%s/updateExportConfig", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("PUT", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewGetTagsRequest generates requests for GetTags +func NewGetTagsRequest(server string, params *GetTagsParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/Tag") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.Id != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "id", runtime.ParamLocationQuery, *params.Id); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Name != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "name", runtime.ParamLocationQuery, *params.Name); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewCreateTagRequest calls the generic CreateTag builder with application/json body +func NewCreateTagRequest(server string, body CreateTagJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewCreateTagRequestWithBody(server, "application/json", bodyReader) +} + +// NewCreateTagRequestWithBody generates requests for CreateTag with any type of body +func NewCreateTagRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/Tag/Factory/create") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewDeleteTagRequest generates requests for DeleteTag +func NewDeleteTagRequest(server string, tagId int) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "tagId", runtime.ParamLocationPath, tagId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/Tag/%s", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("DELETE", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewGetTagByIdRequest generates requests for GetTagById +func NewGetTagByIdRequest(server string, tagId int) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "tagId", runtime.ParamLocationPath, tagId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/Tag/%s", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewUpdateTagRequest calls the generic UpdateTag builder with application/json body +func NewUpdateTagRequest(server string, tagId int, body UpdateTagJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewUpdateTagRequestWithBody(server, tagId, "application/json", bodyReader) +} + +// NewUpdateTagRequestWithBody generates requests for UpdateTag with any type of body +func NewUpdateTagRequestWithBody(server string, tagId int, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "tagId", runtime.ParamLocationPath, tagId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/Tag/%s", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("PUT", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewGetTagRelationsRequest generates requests for GetTagRelations +func NewGetTagRelationsRequest(server string) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/TagRelation") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewGetPlaceholderRequest generates requests for GetPlaceholder +func NewGetPlaceholderRequest(server string, params *GetPlaceholderParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/Textparser/fetchDictionaryEntriesByType") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "objectName", runtime.ParamLocationQuery, params.ObjectName); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + if params.SubObjectName != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "subObjectName", runtime.ParamLocationQuery, *params.SubObjectName); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewBookkeepingSystemVersionRequest generates requests for BookkeepingSystemVersion +func NewBookkeepingSystemVersionRequest(server string) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/Tools/bookkeepingSystemVersion") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewGetVouchersRequest generates requests for GetVouchers +func NewGetVouchersRequest(server string, params *GetVouchersParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/Voucher") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.Status != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "status", runtime.ParamLocationQuery, *params.Status); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.CreditDebit != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "creditDebit", runtime.ParamLocationQuery, *params.CreditDebit); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.DescriptionLike != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "descriptionLike", runtime.ParamLocationQuery, *params.DescriptionLike); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.StartDate != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "startDate", runtime.ParamLocationQuery, *params.StartDate); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.EndDate != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "endDate", runtime.ParamLocationQuery, *params.EndDate); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.ContactId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", false, "contact[id]", runtime.ParamLocationQuery, *params.ContactId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.ContactObjectName != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", false, "contact[objectName]", runtime.ParamLocationQuery, *params.ContactObjectName); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewVoucherFactorySaveVoucherRequest calls the generic VoucherFactorySaveVoucher builder with application/json body +func NewVoucherFactorySaveVoucherRequest(server string, body VoucherFactorySaveVoucherJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewVoucherFactorySaveVoucherRequestWithBody(server, "application/json", bodyReader) +} + +// NewVoucherFactorySaveVoucherRequestWithBody generates requests for VoucherFactorySaveVoucher with any type of body +func NewVoucherFactorySaveVoucherRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/Voucher/Factory/saveVoucher") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewVoucherUploadFileRequestWithBody generates requests for VoucherUploadFile with any type of body +func NewVoucherUploadFileRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/Voucher/Factory/uploadTempFile") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewGetVoucherByIdRequest generates requests for GetVoucherById +func NewGetVoucherByIdRequest(server string, voucherId int) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "voucherId", runtime.ParamLocationPath, voucherId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/Voucher/%s", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewUpdateVoucherRequest calls the generic UpdateVoucher builder with application/json body +func NewUpdateVoucherRequest(server string, voucherId int, body UpdateVoucherJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewUpdateVoucherRequestWithBody(server, voucherId, "application/json", bodyReader) +} + +// NewUpdateVoucherRequestWithBody generates requests for UpdateVoucher with any type of body +func NewUpdateVoucherRequestWithBody(server string, voucherId int, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "voucherId", runtime.ParamLocationPath, voucherId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/Voucher/%s", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("PUT", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewBookVoucherRequest calls the generic BookVoucher builder with application/json body +func NewBookVoucherRequest(server string, voucherId int, body BookVoucherJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewBookVoucherRequestWithBody(server, voucherId, "application/json", bodyReader) +} + +// NewBookVoucherRequestWithBody generates requests for BookVoucher with any type of body +func NewBookVoucherRequestWithBody(server string, voucherId int, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "voucherId", runtime.ParamLocationPath, voucherId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/Voucher/%s/bookAmount", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("PUT", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewVoucherEnshrineRequest generates requests for VoucherEnshrine +func NewVoucherEnshrineRequest(server string, voucherId int) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "voucherId", runtime.ParamLocationPath, voucherId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/Voucher/%s/enshrine", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("PUT", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewVoucherResetToDraftRequest generates requests for VoucherResetToDraft +func NewVoucherResetToDraftRequest(server string, voucherId int) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "voucherId", runtime.ParamLocationPath, voucherId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/Voucher/%s/resetToDraft", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("PUT", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewVoucherResetToOpenRequest generates requests for VoucherResetToOpen +func NewVoucherResetToOpenRequest(server string, voucherId int) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "voucherId", runtime.ParamLocationPath, voucherId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/Voucher/%s/resetToOpen", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("PUT", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewGetVoucherPositionsRequest generates requests for GetVoucherPositions +func NewGetVoucherPositionsRequest(server string, params *GetVoucherPositionsParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/VoucherPos") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.VoucherId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", false, "voucher[id]", runtime.ParamLocationQuery, *params.VoucherId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.VoucherObjectName != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", false, "voucher[objectName]", runtime.ParamLocationQuery, *params.VoucherObjectName); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +func (c *Client) applyEditors(ctx context.Context, req *http.Request, additionalEditors []RequestEditorFn) error { + for _, r := range c.RequestEditors { + if err := r(ctx, req); err != nil { + return err + } + } + for _, r := range additionalEditors { + if err := r(ctx, req); err != nil { + return err + } + } + return nil +} + +// ClientWithResponses builds on ClientInterface to offer response payloads +type ClientWithResponses struct { + ClientInterface +} + +// NewClientWithResponses creates a new ClientWithResponses, which wraps +// Client with return type handling +func NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithResponses, error) { + client, err := NewClient(server, opts...) + if err != nil { + return nil, err + } + return &ClientWithResponses{client}, nil +} + +// WithBaseURL overrides the baseURL. +func WithBaseURL(baseURL string) ClientOption { + return func(c *Client) error { + newBaseURL, err := url.Parse(baseURL) + if err != nil { + return err + } + c.Server = newBaseURL.String() + return nil + } +} + +// ClientWithResponsesInterface is the interface specification for the client with responses above. +type ClientWithResponsesInterface interface { + // GetAccountingContactWithResponse request + GetAccountingContactWithResponse(ctx context.Context, params *GetAccountingContactParams, reqEditors ...RequestEditorFn) (*GetAccountingContactResponse, error) + + // CreateAccountingContactWithBodyWithResponse request with any body + CreateAccountingContactWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateAccountingContactResponse, error) + + CreateAccountingContactWithResponse(ctx context.Context, body CreateAccountingContactJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateAccountingContactResponse, error) + + // DeleteAccountingContactWithResponse request + DeleteAccountingContactWithResponse(ctx context.Context, accountingContactId int, reqEditors ...RequestEditorFn) (*DeleteAccountingContactResponse, error) + + // GetAccountingContactByIdWithResponse request + GetAccountingContactByIdWithResponse(ctx context.Context, accountingContactId int, reqEditors ...RequestEditorFn) (*GetAccountingContactByIdResponse, error) + + // UpdateAccountingContactWithBodyWithResponse request with any body + UpdateAccountingContactWithBodyWithResponse(ctx context.Context, accountingContactId int, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateAccountingContactResponse, error) + + UpdateAccountingContactWithResponse(ctx context.Context, accountingContactId int, body UpdateAccountingContactJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateAccountingContactResponse, error) + + // GetCheckAccountsWithResponse request + GetCheckAccountsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetCheckAccountsResponse, error) + + // CreateCheckAccountWithBodyWithResponse request with any body + CreateCheckAccountWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateCheckAccountResponse, error) + + CreateCheckAccountWithResponse(ctx context.Context, body CreateCheckAccountJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateCheckAccountResponse, error) + + // CreateClearingAccountWithBodyWithResponse request with any body + CreateClearingAccountWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateClearingAccountResponse, error) + + CreateClearingAccountWithResponse(ctx context.Context, body CreateClearingAccountJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateClearingAccountResponse, error) + + // CreateFileImportAccountWithBodyWithResponse request with any body + CreateFileImportAccountWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateFileImportAccountResponse, error) + + CreateFileImportAccountWithResponse(ctx context.Context, body CreateFileImportAccountJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateFileImportAccountResponse, error) + + // DeleteCheckAccountWithResponse request + DeleteCheckAccountWithResponse(ctx context.Context, checkAccountId int, reqEditors ...RequestEditorFn) (*DeleteCheckAccountResponse, error) + + // GetCheckAccountByIdWithResponse request + GetCheckAccountByIdWithResponse(ctx context.Context, checkAccountId int, reqEditors ...RequestEditorFn) (*GetCheckAccountByIdResponse, error) + + // UpdateCheckAccountWithBodyWithResponse request with any body + UpdateCheckAccountWithBodyWithResponse(ctx context.Context, checkAccountId int, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateCheckAccountResponse, error) + + UpdateCheckAccountWithResponse(ctx context.Context, checkAccountId int, body UpdateCheckAccountJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateCheckAccountResponse, error) + + // GetBalanceAtDateWithResponse request + GetBalanceAtDateWithResponse(ctx context.Context, checkAccountId int, params *GetBalanceAtDateParams, reqEditors ...RequestEditorFn) (*GetBalanceAtDateResponse, error) + + // GetTransactionsWithResponse request + GetTransactionsWithResponse(ctx context.Context, params *GetTransactionsParams, reqEditors ...RequestEditorFn) (*GetTransactionsResponse, error) + + // CreateTransactionWithBodyWithResponse request with any body + CreateTransactionWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateTransactionResponse, error) + + CreateTransactionWithResponse(ctx context.Context, body CreateTransactionJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateTransactionResponse, error) + + // DeleteCheckAccountTransactionWithResponse request + DeleteCheckAccountTransactionWithResponse(ctx context.Context, checkAccountTransactionId int, reqEditors ...RequestEditorFn) (*DeleteCheckAccountTransactionResponse, error) + + // GetCheckAccountTransactionByIdWithResponse request + GetCheckAccountTransactionByIdWithResponse(ctx context.Context, checkAccountTransactionId int, reqEditors ...RequestEditorFn) (*GetCheckAccountTransactionByIdResponse, error) + + // UpdateCheckAccountTransactionWithBodyWithResponse request with any body + UpdateCheckAccountTransactionWithBodyWithResponse(ctx context.Context, checkAccountTransactionId int, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateCheckAccountTransactionResponse, error) + + UpdateCheckAccountTransactionWithResponse(ctx context.Context, checkAccountTransactionId int, body UpdateCheckAccountTransactionJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateCheckAccountTransactionResponse, error) + + // CheckAccountTransactionEnshrineWithResponse request + CheckAccountTransactionEnshrineWithResponse(ctx context.Context, checkAccountTransactionId int, reqEditors ...RequestEditorFn) (*CheckAccountTransactionEnshrineResponse, error) + + // GetCommunicationWaysWithResponse request + GetCommunicationWaysWithResponse(ctx context.Context, params *GetCommunicationWaysParams, reqEditors ...RequestEditorFn) (*GetCommunicationWaysResponse, error) + + // CreateCommunicationWayWithBodyWithResponse request with any body + CreateCommunicationWayWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateCommunicationWayResponse, error) + + CreateCommunicationWayWithResponse(ctx context.Context, body CreateCommunicationWayJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateCommunicationWayResponse, error) + + // DeleteCommunicationWayWithResponse request + DeleteCommunicationWayWithResponse(ctx context.Context, communicationWayId int, reqEditors ...RequestEditorFn) (*DeleteCommunicationWayResponse, error) + + // GetCommunicationWayByIdWithResponse request + GetCommunicationWayByIdWithResponse(ctx context.Context, communicationWayId int, reqEditors ...RequestEditorFn) (*GetCommunicationWayByIdResponse, error) + + // UpdateCommunicationWayWithBodyWithResponse request with any body + UpdateCommunicationWayWithBodyWithResponse(ctx context.Context, communicationWayId int, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateCommunicationWayResponse, error) + + UpdateCommunicationWayWithResponse(ctx context.Context, communicationWayId int, body UpdateCommunicationWayJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateCommunicationWayResponse, error) + + // GetCommunicationWayKeysWithResponse request + GetCommunicationWayKeysWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetCommunicationWayKeysResponse, error) + + // GetContactsWithResponse request + GetContactsWithResponse(ctx context.Context, params *GetContactsParams, reqEditors ...RequestEditorFn) (*GetContactsResponse, error) + + // CreateContactWithBodyWithResponse request with any body + CreateContactWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateContactResponse, error) + + CreateContactWithResponse(ctx context.Context, body CreateContactJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateContactResponse, error) + + // FindContactsByCustomFieldValueWithResponse request + FindContactsByCustomFieldValueWithResponse(ctx context.Context, params *FindContactsByCustomFieldValueParams, reqEditors ...RequestEditorFn) (*FindContactsByCustomFieldValueResponse, error) + + // GetNextCustomerNumberWithResponse request + GetNextCustomerNumberWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetNextCustomerNumberResponse, error) + + // ContactCustomerNumberAvailabilityCheckWithResponse request + ContactCustomerNumberAvailabilityCheckWithResponse(ctx context.Context, params *ContactCustomerNumberAvailabilityCheckParams, reqEditors ...RequestEditorFn) (*ContactCustomerNumberAvailabilityCheckResponse, error) + + // DeleteContactWithResponse request + DeleteContactWithResponse(ctx context.Context, contactId int, reqEditors ...RequestEditorFn) (*DeleteContactResponse, error) + + // GetContactByIdWithResponse request + GetContactByIdWithResponse(ctx context.Context, contactId int, reqEditors ...RequestEditorFn) (*GetContactByIdResponse, error) + + // UpdateContactWithBodyWithResponse request with any body + UpdateContactWithBodyWithResponse(ctx context.Context, contactId int, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateContactResponse, error) + + UpdateContactWithResponse(ctx context.Context, contactId int, body UpdateContactJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateContactResponse, error) + + // GetContactTabsItemCountByIdWithResponse request + GetContactTabsItemCountByIdWithResponse(ctx context.Context, contactId int, reqEditors ...RequestEditorFn) (*GetContactTabsItemCountByIdResponse, error) + + // GetContactAddressesWithResponse request + GetContactAddressesWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetContactAddressesResponse, error) + + // CreateContactAddressWithBodyWithResponse request with any body + CreateContactAddressWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateContactAddressResponse, error) + + CreateContactAddressWithResponse(ctx context.Context, body CreateContactAddressJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateContactAddressResponse, error) + + // DeleteContactAddressWithResponse request + DeleteContactAddressWithResponse(ctx context.Context, contactAddressId int, reqEditors ...RequestEditorFn) (*DeleteContactAddressResponse, error) + + // ContactAddressIdWithResponse request + ContactAddressIdWithResponse(ctx context.Context, contactAddressId int, reqEditors ...RequestEditorFn) (*ContactAddressIdResponse, error) + + // UpdateContactAddressWithBodyWithResponse request with any body + UpdateContactAddressWithBodyWithResponse(ctx context.Context, contactAddressId int, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateContactAddressResponse, error) + + UpdateContactAddressWithResponse(ctx context.Context, contactAddressId int, body UpdateContactAddressJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateContactAddressResponse, error) + + // GetContactFieldsWithResponse request + GetContactFieldsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetContactFieldsResponse, error) + + // CreateContactFieldWithBodyWithResponse request with any body + CreateContactFieldWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateContactFieldResponse, error) + + CreateContactFieldWithResponse(ctx context.Context, body CreateContactFieldJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateContactFieldResponse, error) + + // DeleteContactCustomFieldIdWithResponse request + DeleteContactCustomFieldIdWithResponse(ctx context.Context, contactCustomFieldId int, reqEditors ...RequestEditorFn) (*DeleteContactCustomFieldIdResponse, error) + + // GetContactFieldsByIdWithResponse request + GetContactFieldsByIdWithResponse(ctx context.Context, contactCustomFieldId float32, reqEditors ...RequestEditorFn) (*GetContactFieldsByIdResponse, error) + + // UpdateContactfieldWithBodyWithResponse request with any body + UpdateContactfieldWithBodyWithResponse(ctx context.Context, contactCustomFieldId float32, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateContactfieldResponse, error) + + UpdateContactfieldWithResponse(ctx context.Context, contactCustomFieldId float32, body UpdateContactfieldJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateContactfieldResponse, error) + + // GetContactFieldSettingsWithResponse request + GetContactFieldSettingsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetContactFieldSettingsResponse, error) + + // CreateContactFieldSettingWithBodyWithResponse request with any body + CreateContactFieldSettingWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateContactFieldSettingResponse, error) + + CreateContactFieldSettingWithResponse(ctx context.Context, body CreateContactFieldSettingJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateContactFieldSettingResponse, error) + + // DeleteContactFieldSettingWithResponse request + DeleteContactFieldSettingWithResponse(ctx context.Context, contactCustomFieldSettingId int, reqEditors ...RequestEditorFn) (*DeleteContactFieldSettingResponse, error) + + // GetContactFieldSettingByIdWithResponse request + GetContactFieldSettingByIdWithResponse(ctx context.Context, contactCustomFieldSettingId int, reqEditors ...RequestEditorFn) (*GetContactFieldSettingByIdResponse, error) + + // UpdateContactFieldSettingWithBodyWithResponse request with any body + UpdateContactFieldSettingWithBodyWithResponse(ctx context.Context, contactCustomFieldSettingId int, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateContactFieldSettingResponse, error) + + UpdateContactFieldSettingWithResponse(ctx context.Context, contactCustomFieldSettingId int, body UpdateContactFieldSettingJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateContactFieldSettingResponse, error) + + // GetReferenceCountWithResponse request + GetReferenceCountWithResponse(ctx context.Context, contactCustomFieldSettingId int, reqEditors ...RequestEditorFn) (*GetReferenceCountResponse, error) + + // GetCreditNotesWithResponse request + GetCreditNotesWithResponse(ctx context.Context, params *GetCreditNotesParams, reqEditors ...RequestEditorFn) (*GetCreditNotesResponse, error) + + // CreateCreditNoteFromInvoiceWithBodyWithResponse request with any body + CreateCreditNoteFromInvoiceWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateCreditNoteFromInvoiceResponse, error) + + CreateCreditNoteFromInvoiceWithResponse(ctx context.Context, body CreateCreditNoteFromInvoiceJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateCreditNoteFromInvoiceResponse, error) + + // CreateCreditNoteFromVoucherWithBodyWithResponse request with any body + CreateCreditNoteFromVoucherWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateCreditNoteFromVoucherResponse, error) + + CreateCreditNoteFromVoucherWithResponse(ctx context.Context, body CreateCreditNoteFromVoucherJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateCreditNoteFromVoucherResponse, error) + + // CreatecreditNoteWithBodyWithResponse request with any body + CreatecreditNoteWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreatecreditNoteResponse, error) + + CreatecreditNoteWithResponse(ctx context.Context, body CreatecreditNoteJSONRequestBody, reqEditors ...RequestEditorFn) (*CreatecreditNoteResponse, error) + + // DeletecreditNoteWithResponse request + DeletecreditNoteWithResponse(ctx context.Context, creditNoteId int, reqEditors ...RequestEditorFn) (*DeletecreditNoteResponse, error) + + // GetcreditNoteByIdWithResponse request + GetcreditNoteByIdWithResponse(ctx context.Context, creditNoteId int, reqEditors ...RequestEditorFn) (*GetcreditNoteByIdResponse, error) + + // UpdatecreditNoteWithBodyWithResponse request with any body + UpdatecreditNoteWithBodyWithResponse(ctx context.Context, creditNoteId int, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdatecreditNoteResponse, error) + + UpdatecreditNoteWithResponse(ctx context.Context, creditNoteId int, body UpdatecreditNoteJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdatecreditNoteResponse, error) + + // BookCreditNoteWithBodyWithResponse request with any body + BookCreditNoteWithBodyWithResponse(ctx context.Context, creditNoteId int, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*BookCreditNoteResponse, error) + + BookCreditNoteWithResponse(ctx context.Context, creditNoteId int, body BookCreditNoteJSONRequestBody, reqEditors ...RequestEditorFn) (*BookCreditNoteResponse, error) + + // UpdateCreditNoteTemplateWithBodyWithResponse request with any body + UpdateCreditNoteTemplateWithBodyWithResponse(ctx context.Context, creditNoteId int, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateCreditNoteTemplateResponse, error) + + UpdateCreditNoteTemplateWithResponse(ctx context.Context, creditNoteId int, body UpdateCreditNoteTemplateJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateCreditNoteTemplateResponse, error) + + // CreditNoteEnshrineWithResponse request + CreditNoteEnshrineWithResponse(ctx context.Context, creditNoteId int, reqEditors ...RequestEditorFn) (*CreditNoteEnshrineResponse, error) + + // CreditNoteGetPdfWithResponse request + CreditNoteGetPdfWithResponse(ctx context.Context, creditNoteId int, params *CreditNoteGetPdfParams, reqEditors ...RequestEditorFn) (*CreditNoteGetPdfResponse, error) + + // CreditNoteResetToDraftWithResponse request + CreditNoteResetToDraftWithResponse(ctx context.Context, creditNoteId int, reqEditors ...RequestEditorFn) (*CreditNoteResetToDraftResponse, error) + + // CreditNoteResetToOpenWithResponse request + CreditNoteResetToOpenWithResponse(ctx context.Context, creditNoteId int, reqEditors ...RequestEditorFn) (*CreditNoteResetToOpenResponse, error) + + // CreditNoteSendByWithBodyWithResponse request with any body + CreditNoteSendByWithBodyWithResponse(ctx context.Context, creditNoteId int, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreditNoteSendByResponse, error) + + CreditNoteSendByWithResponse(ctx context.Context, creditNoteId int, body CreditNoteSendByJSONRequestBody, reqEditors ...RequestEditorFn) (*CreditNoteSendByResponse, error) + + // SendCreditNoteByPrintingWithResponse request + SendCreditNoteByPrintingWithResponse(ctx context.Context, creditNoteId int, params *SendCreditNoteByPrintingParams, reqEditors ...RequestEditorFn) (*SendCreditNoteByPrintingResponse, error) + + // SendCreditNoteViaEMailWithBodyWithResponse request with any body + SendCreditNoteViaEMailWithBodyWithResponse(ctx context.Context, creditNoteId int, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SendCreditNoteViaEMailResponse, error) + + SendCreditNoteViaEMailWithResponse(ctx context.Context, creditNoteId int, body SendCreditNoteViaEMailJSONRequestBody, reqEditors ...RequestEditorFn) (*SendCreditNoteViaEMailResponse, error) + + // GetcreditNotePositionsWithResponse request + GetcreditNotePositionsWithResponse(ctx context.Context, params *GetcreditNotePositionsParams, reqEditors ...RequestEditorFn) (*GetcreditNotePositionsResponse, error) + + // GetLetterpapersWithThumbWithResponse request + GetLetterpapersWithThumbWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetLetterpapersWithThumbResponse, error) + + // GetTemplatesWithResponse request + GetTemplatesWithResponse(ctx context.Context, params *GetTemplatesParams, reqEditors ...RequestEditorFn) (*GetTemplatesResponse, error) + + // ExportContactWithResponse request + ExportContactWithResponse(ctx context.Context, params *ExportContactParams, reqEditors ...RequestEditorFn) (*ExportContactResponse, error) + + // ExportCreditNoteWithResponse request + ExportCreditNoteWithResponse(ctx context.Context, params *ExportCreditNoteParams, reqEditors ...RequestEditorFn) (*ExportCreditNoteResponse, error) + + // ExportDatevWithResponse request + ExportDatevWithResponse(ctx context.Context, params *ExportDatevParams, reqEditors ...RequestEditorFn) (*ExportDatevResponse, error) + + // ExportInvoiceWithResponse request + ExportInvoiceWithResponse(ctx context.Context, params *ExportInvoiceParams, reqEditors ...RequestEditorFn) (*ExportInvoiceResponse, error) + + // ExportInvoiceZipWithResponse request + ExportInvoiceZipWithResponse(ctx context.Context, params *ExportInvoiceZipParams, reqEditors ...RequestEditorFn) (*ExportInvoiceZipResponse, error) + + // ExportTransactionsWithResponse request + ExportTransactionsWithResponse(ctx context.Context, params *ExportTransactionsParams, reqEditors ...RequestEditorFn) (*ExportTransactionsResponse, error) + + // ExportVoucherWithResponse request + ExportVoucherWithResponse(ctx context.Context, params *ExportVoucherParams, reqEditors ...RequestEditorFn) (*ExportVoucherResponse, error) + + // ExportVoucherZipWithResponse request + ExportVoucherZipWithResponse(ctx context.Context, params *ExportVoucherZipParams, reqEditors ...RequestEditorFn) (*ExportVoucherZipResponse, error) + + // GetInvoicesWithResponse request + GetInvoicesWithResponse(ctx context.Context, params *GetInvoicesParams, reqEditors ...RequestEditorFn) (*GetInvoicesResponse, error) + + // CreateInvoiceFromOrderWithBodyWithResponse request with any body + CreateInvoiceFromOrderWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateInvoiceFromOrderResponse, error) + + CreateInvoiceFromOrderWithResponse(ctx context.Context, body CreateInvoiceFromOrderJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateInvoiceFromOrderResponse, error) + + // CreateInvoiceReminderWithBodyWithResponse request with any body + CreateInvoiceReminderWithBodyWithResponse(ctx context.Context, params *CreateInvoiceReminderParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateInvoiceReminderResponse, error) + + CreateInvoiceReminderWithResponse(ctx context.Context, params *CreateInvoiceReminderParams, body CreateInvoiceReminderJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateInvoiceReminderResponse, error) + + // CreateInvoiceByFactoryWithBodyWithResponse request with any body + CreateInvoiceByFactoryWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateInvoiceByFactoryResponse, error) + + CreateInvoiceByFactoryWithResponse(ctx context.Context, body CreateInvoiceByFactoryJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateInvoiceByFactoryResponse, error) + + // GetInvoiceByIdWithResponse request + GetInvoiceByIdWithResponse(ctx context.Context, invoiceId int, reqEditors ...RequestEditorFn) (*GetInvoiceByIdResponse, error) + + // BookInvoiceWithBodyWithResponse request with any body + BookInvoiceWithBodyWithResponse(ctx context.Context, invoiceId int, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*BookInvoiceResponse, error) + + BookInvoiceWithResponse(ctx context.Context, invoiceId int, body BookInvoiceJSONRequestBody, reqEditors ...RequestEditorFn) (*BookInvoiceResponse, error) + + // CancelInvoiceWithResponse request + CancelInvoiceWithResponse(ctx context.Context, invoiceId int, reqEditors ...RequestEditorFn) (*CancelInvoiceResponse, error) + + // UpdateInvoiceTemplateWithBodyWithResponse request with any body + UpdateInvoiceTemplateWithBodyWithResponse(ctx context.Context, invoiceId int, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateInvoiceTemplateResponse, error) + + UpdateInvoiceTemplateWithResponse(ctx context.Context, invoiceId int, body UpdateInvoiceTemplateJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateInvoiceTemplateResponse, error) + + // InvoiceEnshrineWithResponse request + InvoiceEnshrineWithResponse(ctx context.Context, invoiceId int, reqEditors ...RequestEditorFn) (*InvoiceEnshrineResponse, error) + + // GetIsInvoicePartiallyPaidWithResponse request + GetIsInvoicePartiallyPaidWithResponse(ctx context.Context, invoiceId int, reqEditors ...RequestEditorFn) (*GetIsInvoicePartiallyPaidResponse, error) + + // InvoiceGetPdfWithResponse request + InvoiceGetPdfWithResponse(ctx context.Context, invoiceId int, params *InvoiceGetPdfParams, reqEditors ...RequestEditorFn) (*InvoiceGetPdfResponse, error) + + // GetInvoicePositionsByIdWithResponse request + GetInvoicePositionsByIdWithResponse(ctx context.Context, invoiceId int, params *GetInvoicePositionsByIdParams, reqEditors ...RequestEditorFn) (*GetInvoicePositionsByIdResponse, error) + + // InvoiceGetXmlWithResponse request + InvoiceGetXmlWithResponse(ctx context.Context, invoiceId int, reqEditors ...RequestEditorFn) (*InvoiceGetXmlResponse, error) + + // InvoiceRenderWithBodyWithResponse request with any body + InvoiceRenderWithBodyWithResponse(ctx context.Context, invoiceId int, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*InvoiceRenderResponse, error) + + InvoiceRenderWithResponse(ctx context.Context, invoiceId int, body InvoiceRenderJSONRequestBody, reqEditors ...RequestEditorFn) (*InvoiceRenderResponse, error) + + // InvoiceResetToDraftWithResponse request + InvoiceResetToDraftWithResponse(ctx context.Context, invoiceId int, reqEditors ...RequestEditorFn) (*InvoiceResetToDraftResponse, error) + + // InvoiceResetToOpenWithResponse request + InvoiceResetToOpenWithResponse(ctx context.Context, invoiceId int, reqEditors ...RequestEditorFn) (*InvoiceResetToOpenResponse, error) + + // InvoiceSendByWithBodyWithResponse request with any body + InvoiceSendByWithBodyWithResponse(ctx context.Context, invoiceId int, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*InvoiceSendByResponse, error) + + InvoiceSendByWithResponse(ctx context.Context, invoiceId int, body InvoiceSendByJSONRequestBody, reqEditors ...RequestEditorFn) (*InvoiceSendByResponse, error) + + // SendInvoiceViaEMailWithBodyWithResponse request with any body + SendInvoiceViaEMailWithBodyWithResponse(ctx context.Context, invoiceId int, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SendInvoiceViaEMailResponse, error) + + SendInvoiceViaEMailWithResponse(ctx context.Context, invoiceId int, body SendInvoiceViaEMailJSONRequestBody, reqEditors ...RequestEditorFn) (*SendInvoiceViaEMailResponse, error) + + // GetInvoicePosWithResponse request + GetInvoicePosWithResponse(ctx context.Context, params *GetInvoicePosParams, reqEditors ...RequestEditorFn) (*GetInvoicePosResponse, error) + + // GetOrdersWithResponse request + GetOrdersWithResponse(ctx context.Context, params *GetOrdersParams, reqEditors ...RequestEditorFn) (*GetOrdersResponse, error) + + // CreateContractNoteFromOrderWithBodyWithResponse request with any body + CreateContractNoteFromOrderWithBodyWithResponse(ctx context.Context, params *CreateContractNoteFromOrderParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateContractNoteFromOrderResponse, error) + + CreateContractNoteFromOrderWithResponse(ctx context.Context, params *CreateContractNoteFromOrderParams, body CreateContractNoteFromOrderJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateContractNoteFromOrderResponse, error) + + // CreatePackingListFromOrderWithBodyWithResponse request with any body + CreatePackingListFromOrderWithBodyWithResponse(ctx context.Context, params *CreatePackingListFromOrderParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreatePackingListFromOrderResponse, error) + + CreatePackingListFromOrderWithResponse(ctx context.Context, params *CreatePackingListFromOrderParams, body CreatePackingListFromOrderJSONRequestBody, reqEditors ...RequestEditorFn) (*CreatePackingListFromOrderResponse, error) + + // CreateOrderWithBodyWithResponse request with any body + CreateOrderWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateOrderResponse, error) + + CreateOrderWithResponse(ctx context.Context, body CreateOrderJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateOrderResponse, error) + + // DeleteOrderWithResponse request + DeleteOrderWithResponse(ctx context.Context, orderId int, reqEditors ...RequestEditorFn) (*DeleteOrderResponse, error) + + // GetOrderByIdWithResponse request + GetOrderByIdWithResponse(ctx context.Context, orderId int, reqEditors ...RequestEditorFn) (*GetOrderByIdResponse, error) + + // UpdateOrderWithBodyWithResponse request with any body + UpdateOrderWithBodyWithResponse(ctx context.Context, orderId int, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateOrderResponse, error) + + UpdateOrderWithResponse(ctx context.Context, orderId int, body UpdateOrderJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateOrderResponse, error) + + // UpdateOrderTemplateWithBodyWithResponse request with any body + UpdateOrderTemplateWithBodyWithResponse(ctx context.Context, orderId int, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateOrderTemplateResponse, error) + + UpdateOrderTemplateWithResponse(ctx context.Context, orderId int, body UpdateOrderTemplateJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateOrderTemplateResponse, error) + + // GetDiscountsWithResponse request + GetDiscountsWithResponse(ctx context.Context, orderId int, params *GetDiscountsParams, reqEditors ...RequestEditorFn) (*GetDiscountsResponse, error) + + // OrderGetPdfWithResponse request + OrderGetPdfWithResponse(ctx context.Context, orderId int, params *OrderGetPdfParams, reqEditors ...RequestEditorFn) (*OrderGetPdfResponse, error) + + // GetOrderPositionsByIdWithResponse request + GetOrderPositionsByIdWithResponse(ctx context.Context, orderId int, params *GetOrderPositionsByIdParams, reqEditors ...RequestEditorFn) (*GetOrderPositionsByIdResponse, error) + + // GetRelatedObjectsWithResponse request + GetRelatedObjectsWithResponse(ctx context.Context, orderId int, params *GetRelatedObjectsParams, reqEditors ...RequestEditorFn) (*GetRelatedObjectsResponse, error) + + // OrderSendByWithBodyWithResponse request with any body + OrderSendByWithBodyWithResponse(ctx context.Context, orderId int, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*OrderSendByResponse, error) + + OrderSendByWithResponse(ctx context.Context, orderId int, body OrderSendByJSONRequestBody, reqEditors ...RequestEditorFn) (*OrderSendByResponse, error) + + // SendorderViaEMailWithBodyWithResponse request with any body + SendorderViaEMailWithBodyWithResponse(ctx context.Context, orderId int, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SendorderViaEMailResponse, error) + + SendorderViaEMailWithResponse(ctx context.Context, orderId int, body SendorderViaEMailJSONRequestBody, reqEditors ...RequestEditorFn) (*SendorderViaEMailResponse, error) + + // GetOrderPositionsWithResponse request + GetOrderPositionsWithResponse(ctx context.Context, params *GetOrderPositionsParams, reqEditors ...RequestEditorFn) (*GetOrderPositionsResponse, error) + + // DeleteOrderPosWithResponse request + DeleteOrderPosWithResponse(ctx context.Context, orderPosId int, reqEditors ...RequestEditorFn) (*DeleteOrderPosResponse, error) + + // GetOrderPositionByIdWithResponse request + GetOrderPositionByIdWithResponse(ctx context.Context, orderPosId int, reqEditors ...RequestEditorFn) (*GetOrderPositionByIdResponse, error) + + // UpdateOrderPositionWithBodyWithResponse request with any body + UpdateOrderPositionWithBodyWithResponse(ctx context.Context, orderPosId int, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateOrderPositionResponse, error) + + UpdateOrderPositionWithResponse(ctx context.Context, orderPosId int, body UpdateOrderPositionJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateOrderPositionResponse, error) + + // GetPartsWithResponse request + GetPartsWithResponse(ctx context.Context, params *GetPartsParams, reqEditors ...RequestEditorFn) (*GetPartsResponse, error) + + // CreatePartWithBodyWithResponse request with any body + CreatePartWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreatePartResponse, error) + + CreatePartWithResponse(ctx context.Context, body CreatePartJSONRequestBody, reqEditors ...RequestEditorFn) (*CreatePartResponse, error) + + // GetPartByIdWithResponse request + GetPartByIdWithResponse(ctx context.Context, partId int, reqEditors ...RequestEditorFn) (*GetPartByIdResponse, error) + + // UpdatePartWithBodyWithResponse request with any body + UpdatePartWithBodyWithResponse(ctx context.Context, partId int, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdatePartResponse, error) + + UpdatePartWithResponse(ctx context.Context, partId int, body UpdatePartJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdatePartResponse, error) + + // PartGetStockWithResponse request + PartGetStockWithResponse(ctx context.Context, partId int, reqEditors ...RequestEditorFn) (*PartGetStockResponse, error) + + // ForAccountNumberWithResponse request + ForAccountNumberWithResponse(ctx context.Context, params *ForAccountNumberParams, reqEditors ...RequestEditorFn) (*ForAccountNumberResponse, error) + + // ForAllAccountsWithResponse request + ForAllAccountsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ForAllAccountsResponse, error) + + // ForExpenseWithResponse request + ForExpenseWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ForExpenseResponse, error) + + // ForRevenueWithResponse request + ForRevenueWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ForRevenueResponse, error) + + // ForTaxRuleWithResponse request + ForTaxRuleWithResponse(ctx context.Context, params *ForTaxRuleParams, reqEditors ...RequestEditorFn) (*ForTaxRuleResponse, error) + + // ReportContactWithResponse request + ReportContactWithResponse(ctx context.Context, params *ReportContactParams, reqEditors ...RequestEditorFn) (*ReportContactResponse, error) + + // ReportInvoiceWithResponse request + ReportInvoiceWithResponse(ctx context.Context, params *ReportInvoiceParams, reqEditors ...RequestEditorFn) (*ReportInvoiceResponse, error) + + // ReportOrderWithResponse request + ReportOrderWithResponse(ctx context.Context, params *ReportOrderParams, reqEditors ...RequestEditorFn) (*ReportOrderResponse, error) + + // ReportVoucherWithResponse request + ReportVoucherWithResponse(ctx context.Context, params *ReportVoucherParams, reqEditors ...RequestEditorFn) (*ReportVoucherResponse, error) + + // UpdateExportConfigWithBodyWithResponse request with any body + UpdateExportConfigWithBodyWithResponse(ctx context.Context, sevClientId float32, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateExportConfigResponse, error) + + UpdateExportConfigWithResponse(ctx context.Context, sevClientId float32, body UpdateExportConfigJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateExportConfigResponse, error) + + // GetTagsWithResponse request + GetTagsWithResponse(ctx context.Context, params *GetTagsParams, reqEditors ...RequestEditorFn) (*GetTagsResponse, error) + + // CreateTagWithBodyWithResponse request with any body + CreateTagWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateTagResponse, error) + + CreateTagWithResponse(ctx context.Context, body CreateTagJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateTagResponse, error) + + // DeleteTagWithResponse request + DeleteTagWithResponse(ctx context.Context, tagId int, reqEditors ...RequestEditorFn) (*DeleteTagResponse, error) + + // GetTagByIdWithResponse request + GetTagByIdWithResponse(ctx context.Context, tagId int, reqEditors ...RequestEditorFn) (*GetTagByIdResponse, error) + + // UpdateTagWithBodyWithResponse request with any body + UpdateTagWithBodyWithResponse(ctx context.Context, tagId int, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateTagResponse, error) + + UpdateTagWithResponse(ctx context.Context, tagId int, body UpdateTagJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateTagResponse, error) + + // GetTagRelationsWithResponse request + GetTagRelationsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetTagRelationsResponse, error) + + // GetPlaceholderWithResponse request + GetPlaceholderWithResponse(ctx context.Context, params *GetPlaceholderParams, reqEditors ...RequestEditorFn) (*GetPlaceholderResponse, error) + + // BookkeepingSystemVersionWithResponse request + BookkeepingSystemVersionWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*BookkeepingSystemVersionResponse, error) + + // GetVouchersWithResponse request + GetVouchersWithResponse(ctx context.Context, params *GetVouchersParams, reqEditors ...RequestEditorFn) (*GetVouchersResponse, error) + + // VoucherFactorySaveVoucherWithBodyWithResponse request with any body + VoucherFactorySaveVoucherWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*VoucherFactorySaveVoucherResponse, error) + + VoucherFactorySaveVoucherWithResponse(ctx context.Context, body VoucherFactorySaveVoucherJSONRequestBody, reqEditors ...RequestEditorFn) (*VoucherFactorySaveVoucherResponse, error) + + // VoucherUploadFileWithBodyWithResponse request with any body + VoucherUploadFileWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*VoucherUploadFileResponse, error) + + // GetVoucherByIdWithResponse request + GetVoucherByIdWithResponse(ctx context.Context, voucherId int, reqEditors ...RequestEditorFn) (*GetVoucherByIdResponse, error) + + // UpdateVoucherWithBodyWithResponse request with any body + UpdateVoucherWithBodyWithResponse(ctx context.Context, voucherId int, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateVoucherResponse, error) + + UpdateVoucherWithResponse(ctx context.Context, voucherId int, body UpdateVoucherJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateVoucherResponse, error) + + // BookVoucherWithBodyWithResponse request with any body + BookVoucherWithBodyWithResponse(ctx context.Context, voucherId int, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*BookVoucherResponse, error) + + BookVoucherWithResponse(ctx context.Context, voucherId int, body BookVoucherJSONRequestBody, reqEditors ...RequestEditorFn) (*BookVoucherResponse, error) + + // VoucherEnshrineWithResponse request + VoucherEnshrineWithResponse(ctx context.Context, voucherId int, reqEditors ...RequestEditorFn) (*VoucherEnshrineResponse, error) + + // VoucherResetToDraftWithResponse request + VoucherResetToDraftWithResponse(ctx context.Context, voucherId int, reqEditors ...RequestEditorFn) (*VoucherResetToDraftResponse, error) + + // VoucherResetToOpenWithResponse request + VoucherResetToOpenWithResponse(ctx context.Context, voucherId int, reqEditors ...RequestEditorFn) (*VoucherResetToOpenResponse, error) + + // GetVoucherPositionsWithResponse request + GetVoucherPositionsWithResponse(ctx context.Context, params *GetVoucherPositionsParams, reqEditors ...RequestEditorFn) (*GetVoucherPositionsResponse, error) +} + +type GetAccountingContactResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + Objects *[]ModelAccountingContactResponse `json:"objects,omitempty"` + } +} + +// Status returns HTTPResponse.Status +func (r GetAccountingContactResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetAccountingContactResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type CreateAccountingContactResponse struct { + Body []byte + HTTPResponse *http.Response + JSON201 *ModelAccountingContactResponse +} + +// Status returns HTTPResponse.Status +func (r CreateAccountingContactResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r CreateAccountingContactResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type DeleteAccountingContactResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + Objects *[]interface{} `json:"objects,omitempty"` + } +} + +// Status returns HTTPResponse.Status +func (r DeleteAccountingContactResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r DeleteAccountingContactResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetAccountingContactByIdResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + Objects *[]ModelAccountingContactResponse `json:"objects,omitempty"` + } +} + +// Status returns HTTPResponse.Status +func (r GetAccountingContactByIdResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetAccountingContactByIdResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type UpdateAccountingContactResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *ModelAccountingContactResponse +} + +// Status returns HTTPResponse.Status +func (r UpdateAccountingContactResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r UpdateAccountingContactResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetCheckAccountsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + Objects *[]ModelCheckAccountResponse `json:"objects,omitempty"` + } +} + +// Status returns HTTPResponse.Status +func (r GetCheckAccountsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetCheckAccountsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type CreateCheckAccountResponse struct { + Body []byte + HTTPResponse *http.Response + JSON201 *struct { + Objects *[]ModelCheckAccountResponse `json:"objects,omitempty"` + } +} + +// Status returns HTTPResponse.Status +func (r CreateCheckAccountResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r CreateCheckAccountResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type CreateClearingAccountResponse struct { + Body []byte + HTTPResponse *http.Response + JSON201 *struct { + // Objects CheckAccount model. Showing the properties relevant to clearing accounts. + Objects *CreateClearingAccountResponse `json:"objects,omitempty"` + } +} + +// Status returns HTTPResponse.Status +func (r CreateClearingAccountResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r CreateClearingAccountResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type CreateFileImportAccountResponse struct { + Body []byte + HTTPResponse *http.Response + JSON201 *struct { + // Objects CheckAccount model. Showing the properties relevant to file import accounts. + Objects *CreateFileImportAccountResponse `json:"objects,omitempty"` + } +} + +// Status returns HTTPResponse.Status +func (r CreateFileImportAccountResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r CreateFileImportAccountResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type DeleteCheckAccountResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + Objects *[]interface{} `json:"objects,omitempty"` + } +} + +// Status returns HTTPResponse.Status +func (r DeleteCheckAccountResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r DeleteCheckAccountResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetCheckAccountByIdResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + Objects *[]ModelCheckAccountResponse `json:"objects,omitempty"` + } +} + +// Status returns HTTPResponse.Status +func (r GetCheckAccountByIdResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetCheckAccountByIdResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type UpdateCheckAccountResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *ModelCheckAccountResponse +} + +// Status returns HTTPResponse.Status +func (r UpdateCheckAccountResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r UpdateCheckAccountResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetBalanceAtDateResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + Objects *string `json:"objects,omitempty"` + } +} + +// Status returns HTTPResponse.Status +func (r GetBalanceAtDateResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetBalanceAtDateResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetTransactionsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + Objects *[]ModelCheckAccountTransactionResponse `json:"objects,omitempty"` + } +} + +// Status returns HTTPResponse.Status +func (r GetTransactionsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetTransactionsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type CreateTransactionResponse struct { + Body []byte + HTTPResponse *http.Response + JSON201 *ModelCheckAccountTransactionResponse +} + +// Status returns HTTPResponse.Status +func (r CreateTransactionResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r CreateTransactionResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type DeleteCheckAccountTransactionResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + Objects *[]interface{} `json:"objects,omitempty"` + } +} + +// Status returns HTTPResponse.Status +func (r DeleteCheckAccountTransactionResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r DeleteCheckAccountTransactionResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetCheckAccountTransactionByIdResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + Objects *[]ModelCheckAccountTransactionResponse `json:"objects,omitempty"` + } +} + +// Status returns HTTPResponse.Status +func (r GetCheckAccountTransactionByIdResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetCheckAccountTransactionByIdResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type UpdateCheckAccountTransactionResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *ModelCheckAccountTransactionResponse +} + +// Status returns HTTPResponse.Status +func (r UpdateCheckAccountTransactionResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r UpdateCheckAccountTransactionResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type CheckAccountTransactionEnshrineResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + Objects *interface{} `json:"objects,omitempty"` + } + JSON422 *ValidationError +} + +// Status returns HTTPResponse.Status +func (r CheckAccountTransactionEnshrineResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r CheckAccountTransactionEnshrineResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetCommunicationWaysResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + Objects *[]ModelCommunicationWayResponse `json:"objects,omitempty"` + } +} + +// Status returns HTTPResponse.Status +func (r GetCommunicationWaysResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetCommunicationWaysResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type CreateCommunicationWayResponse struct { + Body []byte + HTTPResponse *http.Response + JSON201 *ModelCommunicationWayResponse +} + +// Status returns HTTPResponse.Status +func (r CreateCommunicationWayResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r CreateCommunicationWayResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type DeleteCommunicationWayResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + Objects *[]interface{} `json:"objects,omitempty"` + } +} + +// Status returns HTTPResponse.Status +func (r DeleteCommunicationWayResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r DeleteCommunicationWayResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetCommunicationWayByIdResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + Objects *[]ModelCommunicationWayResponse `json:"objects,omitempty"` + } +} + +// Status returns HTTPResponse.Status +func (r GetCommunicationWayByIdResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetCommunicationWayByIdResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type UpdateCommunicationWayResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *ModelCommunicationWayResponse +} + +// Status returns HTTPResponse.Status +func (r UpdateCommunicationWayResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r UpdateCommunicationWayResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetCommunicationWayKeysResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + Objects *[]struct { + // Create Date the communication way key was created + Create *time.Time `json:"create,omitempty"` + + // Id The id of the communication way key + // 1. ID: 1 - Privat + // 2. ID: 2 - Arbeit + // 3. ID: 3 - Fax + // 4. ID: 4 - Mobil + // 5. ID: 5 - " " + // 6. ID: 6 - Autobox + // 7. ID: 7 - Newsletter + // 8. ID: 8 - Rechnungsadresse + Id *string `json:"id,omitempty"` + + // Name Name of the communication way key + Name *GetCommunicationWayKeys200ObjectsName `json:"name,omitempty"` + + // ObjectName object name which is 'CommunicationWayKey'. + ObjectName *string `json:"objectName,omitempty"` + TranslationCode *string `json:"translationCode,omitempty"` + + // Upadate Date the communication way key was last updated + Upadate *time.Time `json:"upadate,omitempty"` + } `json:"objects,omitempty"` + } +} +type GetCommunicationWayKeys200ObjectsName string + +// Status returns HTTPResponse.Status +func (r GetCommunicationWayKeysResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetCommunicationWayKeysResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetContactsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + Objects *[]ModelContactResponse `json:"objects,omitempty"` + } +} + +// Status returns HTTPResponse.Status +func (r GetContactsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetContactsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type CreateContactResponse struct { + Body []byte + HTTPResponse *http.Response + JSON201 *ModelContactResponse +} + +// Status returns HTTPResponse.Status +func (r CreateContactResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r CreateContactResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type FindContactsByCustomFieldValueResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + Objects *[]ModelContactResponse `json:"objects,omitempty"` + } +} + +// Status returns HTTPResponse.Status +func (r FindContactsByCustomFieldValueResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r FindContactsByCustomFieldValueResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetNextCustomerNumberResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + // Objects Next available customer number + Objects *string `json:"objects,omitempty"` + } +} + +// Status returns HTTPResponse.Status +func (r GetNextCustomerNumberResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetNextCustomerNumberResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type ContactCustomerNumberAvailabilityCheckResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + Objects *bool `json:"objects,omitempty"` + } +} + +// Status returns HTTPResponse.Status +func (r ContactCustomerNumberAvailabilityCheckResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r ContactCustomerNumberAvailabilityCheckResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type DeleteContactResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + Objects *[]interface{} `json:"objects,omitempty"` + } +} + +// Status returns HTTPResponse.Status +func (r DeleteContactResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r DeleteContactResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetContactByIdResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + Objects *[]ModelContactResponse `json:"objects,omitempty"` + } +} + +// Status returns HTTPResponse.Status +func (r GetContactByIdResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetContactByIdResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type UpdateContactResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *ModelContactResponse +} + +// Status returns HTTPResponse.Status +func (r UpdateContactResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r UpdateContactResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetContactTabsItemCountByIdResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + CreditNotes *float32 `json:"creditNotes,omitempty"` + Documents *float32 `json:"documents,omitempty"` + InvoicePos *float32 `json:"invoicePos,omitempty"` + Invoices *float32 `json:"invoices,omitempty"` + Letters *float32 `json:"letters,omitempty"` + Orders *float32 `json:"orders,omitempty"` + Parts *string `json:"parts,omitempty"` + Persons *float32 `json:"persons,omitempty"` + Vouchers *float32 `json:"vouchers,omitempty"` + } +} + +// Status returns HTTPResponse.Status +func (r GetContactTabsItemCountByIdResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetContactTabsItemCountByIdResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetContactAddressesResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + Objects *[]ModelContactAddressResponse `json:"objects,omitempty"` + } +} + +// Status returns HTTPResponse.Status +func (r GetContactAddressesResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetContactAddressesResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type CreateContactAddressResponse struct { + Body []byte + HTTPResponse *http.Response + JSON201 *ModelContactAddressResponse +} + +// Status returns HTTPResponse.Status +func (r CreateContactAddressResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r CreateContactAddressResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type DeleteContactAddressResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + Objects *[]interface{} `json:"objects,omitempty"` + } +} + +// Status returns HTTPResponse.Status +func (r DeleteContactAddressResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r DeleteContactAddressResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type ContactAddressIdResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + Objects *[]ModelContactAddressResponse `json:"objects,omitempty"` + } +} + +// Status returns HTTPResponse.Status +func (r ContactAddressIdResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r ContactAddressIdResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type UpdateContactAddressResponse struct { + Body []byte + HTTPResponse *http.Response + JSON201 *ModelContactAddressResponse +} + +// Status returns HTTPResponse.Status +func (r UpdateContactAddressResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r UpdateContactAddressResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetContactFieldsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + Objects *[]ModelContactCustomFieldResponse `json:"objects,omitempty"` + } +} + +// Status returns HTTPResponse.Status +func (r GetContactFieldsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetContactFieldsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type CreateContactFieldResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *ModelContactCustomFieldResponse +} + +// Status returns HTTPResponse.Status +func (r CreateContactFieldResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r CreateContactFieldResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type DeleteContactCustomFieldIdResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + Objects *[]interface{} `json:"objects,omitempty"` + } +} + +// Status returns HTTPResponse.Status +func (r DeleteContactCustomFieldIdResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r DeleteContactCustomFieldIdResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetContactFieldsByIdResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + Objects *[]ModelContactCustomFieldResponse `json:"objects,omitempty"` + } +} + +// Status returns HTTPResponse.Status +func (r GetContactFieldsByIdResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetContactFieldsByIdResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type UpdateContactfieldResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *ModelContactCustomFieldResponse +} + +// Status returns HTTPResponse.Status +func (r UpdateContactfieldResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r UpdateContactfieldResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetContactFieldSettingsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + Objects *[]ModelContactCustomFieldSettingResponse `json:"objects,omitempty"` + } +} + +// Status returns HTTPResponse.Status +func (r GetContactFieldSettingsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetContactFieldSettingsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type CreateContactFieldSettingResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + Objects *[]ModelContactCustomFieldSettingResponse `json:"objects,omitempty"` + } +} + +// Status returns HTTPResponse.Status +func (r CreateContactFieldSettingResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r CreateContactFieldSettingResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type DeleteContactFieldSettingResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + Objects *[]interface{} `json:"objects,omitempty"` + } +} + +// Status returns HTTPResponse.Status +func (r DeleteContactFieldSettingResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r DeleteContactFieldSettingResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetContactFieldSettingByIdResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + Objects *[]ModelContactCustomFieldSettingResponse `json:"objects,omitempty"` + } +} + +// Status returns HTTPResponse.Status +func (r GetContactFieldSettingByIdResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetContactFieldSettingByIdResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type UpdateContactFieldSettingResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *ModelContactCustomFieldSettingResponse +} + +// Status returns HTTPResponse.Status +func (r UpdateContactFieldSettingResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r UpdateContactFieldSettingResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetReferenceCountResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + // Objects the count of all references + Objects *int `json:"objects,omitempty"` + } +} + +// Status returns HTTPResponse.Status +func (r GetReferenceCountResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetReferenceCountResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetCreditNotesResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + Objects *[]ModelCreditNoteResponse `json:"objects,omitempty"` + } +} + +// Status returns HTTPResponse.Status +func (r GetCreditNotesResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetCreditNotesResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type CreateCreditNoteFromInvoiceResponse struct { + Body []byte + HTTPResponse *http.Response + JSON201 *struct { + Objects *struct { + // CreditNote creditNote model + CreditNote *ModelCreditNoteResponse `json:"creditNote,omitempty"` + + // CreditNotePos An array of creditNote positions + CreditNotePos *[]ModelCreditNotePosResponse `json:"creditNotePos,omitempty"` + + // Discount An array of discounts (can be empty) + Discount *[]ModelDiscountsResponse `json:"discount,omitempty"` + } `json:"objects,omitempty"` + } +} + +// Status returns HTTPResponse.Status +func (r CreateCreditNoteFromInvoiceResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r CreateCreditNoteFromInvoiceResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type CreateCreditNoteFromVoucherResponse struct { + Body []byte + HTTPResponse *http.Response + JSON201 *struct { + Objects *struct { + // CreditNote creditNote model + CreditNote *ModelCreditNoteResponse `json:"creditNote,omitempty"` + + // CreditNotePos An array of creditNote positions + CreditNotePos *[]ModelCreditNotePosResponse `json:"creditNotePos,omitempty"` + + // Discount An array of discounts (can be empty) + Discount *[]ModelDiscountsResponse `json:"discount,omitempty"` + } `json:"objects,omitempty"` + } +} + +// Status returns HTTPResponse.Status +func (r CreateCreditNoteFromVoucherResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r CreateCreditNoteFromVoucherResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type CreatecreditNoteResponse struct { + Body []byte + HTTPResponse *http.Response + JSON201 *SaveCreditNoteResponse +} + +// Status returns HTTPResponse.Status +func (r CreatecreditNoteResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r CreatecreditNoteResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type DeletecreditNoteResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + Objects *[]interface{} `json:"objects,omitempty"` + } +} + +// Status returns HTTPResponse.Status +func (r DeletecreditNoteResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r DeletecreditNoteResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetcreditNoteByIdResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + Objects *[]ModelCreditNoteResponse `json:"objects,omitempty"` + } +} + +// Status returns HTTPResponse.Status +func (r GetcreditNoteByIdResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetcreditNoteByIdResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type UpdatecreditNoteResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *ModelCreditNoteResponse +} + +// Status returns HTTPResponse.Status +func (r UpdatecreditNoteResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r UpdatecreditNoteResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type BookCreditNoteResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + AdditionalInformation *string `json:"additionalInformation,omitempty"` + AmmountPayed *string `json:"ammountPayed,omitempty"` + BookingDate *time.Time `json:"bookingDate,omitempty"` + + // Create Date of email creation + Create *time.Time `json:"create,omitempty"` + CreditNote *struct { + // Id The id of the credit note + Id int `json:"id"` + + // ObjectName Internal object name which is 'CreditNote'. + ObjectName string `json:"objectName"` + } `json:"creditNote,omitempty"` + FromStatus *string `json:"fromStatus,omitempty"` + Id *string `json:"id,omitempty"` + ObjectName *string `json:"objectName,omitempty"` + + // SevClient Client to which creditNote belongs. Will be filled automatically + SevClient *struct { + // Id Unique identifier of the client + Id int `json:"id"` + + // ObjectName Model name, which is 'SevClient' + ObjectName string `json:"objectName"` + } `json:"sevClient,omitempty"` + ToStatus *string `json:"toStatus,omitempty"` + } +} + +// Status returns HTTPResponse.Status +func (r BookCreditNoteResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r BookCreditNoteResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type UpdateCreditNoteTemplateResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *ModelChangeLayoutResponse +} + +// Status returns HTTPResponse.Status +func (r UpdateCreditNoteTemplateResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r UpdateCreditNoteTemplateResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type CreditNoteEnshrineResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + Objects *interface{} `json:"objects,omitempty"` + } + JSON422 *ValidationError +} + +// Status returns HTTPResponse.Status +func (r CreditNoteEnshrineResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r CreditNoteEnshrineResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type CreditNoteGetPdfResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + Base64encoded *bool `json:"base64encoded,omitempty"` + Content *openapi_types.File `json:"content,omitempty"` + Filename *string `json:"filename,omitempty"` + MimeType *string `json:"mimeType,omitempty"` + } +} + +// Status returns HTTPResponse.Status +func (r CreditNoteGetPdfResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r CreditNoteGetPdfResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type CreditNoteResetToDraftResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + Objects *struct { + // Address Complete address of the recipient including name, street, city, zip and country.
+ // Line breaks can be used and will be displayed on the invoice pdf. + Address *string `json:"address"` + + // AddressCountry Can be omitted as complete address is defined in address attribute + AddressCountry *struct { + // Id Unique identifier of the country + Id string `json:"id"` + + // ObjectName Model name, which is 'StaticCountry' + ObjectName string `json:"objectName"` + } `json:"addressCountry"` + + // Contact The contact used in the creditNote + Contact *struct { + // Id Unique identifier of the contact + Id string `json:"id"` + + // ObjectName Model name, which is 'Contact' + ObjectName string `json:"objectName"` + } `json:"contact"` + + // ContactPerson The user who acts as a contact person for the creditNote + ContactPerson *struct { + // Id Unique identifier of the user + Id string `json:"id"` + + // ObjectName Model name, which is 'SevUser' + ObjectName string `json:"objectName"` + } `json:"contactPerson"` + + // Create Date of creditNote creation + Create *time.Time `json:"create,omitempty"` + + // CreateUser Will be filled automatically by our system and can't be changed + CreateUser *struct { + // Id Unique identifier of the user + Id string `json:"id"` + + // ObjectName Model name, which is 'SevUser' + ObjectName string `json:"objectName"` + } `json:"createUser,omitempty"` + + // CreditNoteDate The credit note date + CreditNoteDate *time.Time `json:"creditNoteDate,omitempty"` + + // CreditNoteNumber The creditNote number + CreditNoteNumber *string `json:"creditNoteNumber"` + + // Currency Currency used in the creditNote. Needs to be currency code according to ISO-4217 + Currency *string `json:"currency"` + CustomerInternalNote *interface{} `json:"customerInternalNote,omitempty"` + + // DeliveryDate Timestamp. This can also be a date range if you also use the attribute deliveryDateUntil + DeliveryDate *time.Time `json:"deliveryDate,omitempty"` + + // FootText Certain html tags can be used here to format your text + FootText *string `json:"footText"` + + // HeadText Certain html tags can be used here to format your text + HeadText *string `json:"headText"` + + // Header Normally consist of prefix plus the creditNote number + Header *string `json:"header"` + + // Id The creditNote id + Id *string `json:"id,omitempty"` + + // ObjectName The creditNote object name + ObjectName *string `json:"objectName,omitempty"` + + // SendDate The date the creditNote was sent to the customer + SendDate *time.Time `json:"sendDate"` + + // SendType Type which was used to send the creditNote. IMPORTANT: Please refer to the creditNote section of the + // * API-Overview to understand how this attribute can be used before using it! + SendType *CreditNoteResetToDraft200ObjectsSendType `json:"sendType"` + + // SevClient Client to which creditNote belongs. Will be filled automatically + SevClient *struct { + // Id Unique identifier of the client + Id string `json:"id"` + + // ObjectName Model name, which is 'SevClient' + ObjectName string `json:"objectName"` + } `json:"sevClient,omitempty"` + + // ShowNet If true, the net amount of each position will be shown on the creditNote. Otherwise gross amount + ShowNet *bool `json:"showNet,omitempty"` + + // SmallSettlement Defines if the client uses the small settlement scheme. + // If yes, the creditNote must not contain any vat + SmallSettlement *bool `json:"smallSettlement"` + + // Status Please have a look in + // status of credit note + // to see what the different status codes mean + Status *CreditNoteResetToDraft200ObjectsStatus `json:"status,omitempty"` + + // SumDiscounts Sum of all discounts in the creditNote + SumDiscounts *string `json:"sumDiscounts,omitempty"` + + // SumDiscountsForeignCurrency Discounts sum of the creditNote in the foreign currency + SumDiscountsForeignCurrency *string `json:"sumDiscountsForeignCurrency,omitempty"` + + // SumGross Gross sum of the creditNote + SumGross *string `json:"sumGross,omitempty"` + + // SumGrossForeignCurrency Gross sum of the creditNote in the foreign currency + SumGrossForeignCurrency *string `json:"sumGrossForeignCurrency,omitempty"` + + // SumNet Net sum of the creditNote + SumNet *string `json:"sumNet,omitempty"` + + // SumNetForeignCurrency Net sum of the creditNote in the foreign currency + SumNetForeignCurrency *string `json:"sumNetForeignCurrency,omitempty"` + + // SumTax Tax sum of the creditNote + SumTax *string `json:"sumTax,omitempty"` + + // SumTaxForeignCurrency Tax sum of the creditNote in the foreign currency + SumTaxForeignCurrency *string `json:"sumTaxForeignCurrency,omitempty"` + + // TaxRate This is not used anymore. Use the taxRate of the individual positions instead. + TaxRate *string `json:"taxRate"` + + // TaxRule **Use this in sevdesk-Update 2.0 (replaces taxType / taxSet).** + TaxRule *struct { + // Id **Use this in sevdesk-Update 2.0 (replaces taxType / taxSet).** + // + // Defines the vat-regulation. + // For "Regelbesteuerung" it can be one of: + // - `1` - Umsatzsteuerpflichtige Umsätze - tax rates: 0.0, 7.0, 19.0 - replaces `"taxType": "default"` + // - `2` - Ausfuhren - allowedTaxRates: 0.0 + // - `3` - Innergemeinschaftliche Lieferungen - tax rates: 0.0, 7.0, 19.0 - replaces `"taxType": "eu"` + // - `4` - Steuerfreie Umsätze §4 UStG - tax rates: 0.0 + // - `5` - Reverse Charge gem. §13b UStG - tax rates: 0.0 + // - `17` - Nicht im Inland steuerbare Leistung - tax rates: 0.0 - replaces `"taxType": "noteu"` + // + // For small business owner ("Kleinunternehmer") it can be: + // - `11` - Steuer nicht erhoben nach §19UStG - tax rates: 0.0 - replaces `"taxType": "ss"` + Id CreditNoteResetToDraft200ObjectsTaxRuleId `json:"id"` + + // ObjectName Name of the object. Must always be TaxRule + ObjectName CreditNoteResetToDraft200ObjectsTaxRuleObjectName `json:"objectName"` + } `json:"taxRule,omitempty"` + + // TaxSet **Use this in sevdesk-Update 1.0 (instead of taxRule).** + // + // Tax set of the creditNote. Needs to be added if you chose the tax type custom + TaxSet *struct { + // Id Unique identifier of the object + Id string `json:"id"` + + // ObjectName Model name, which is 'TaxSet' + ObjectName string `json:"objectName"` + } `json:"taxSet"` + TaxText *interface{} `json:"taxText,omitempty"` + + // TaxType **Use this in sevdesk-Update 1.0 (instead of taxRule).** + // + // Tax type of the creditNote. + // There are four tax types: + // 1. default - Umsatzsteuer ausweisen + // 2. eu - Steuerfreie innergemeinschaftliche Lieferung (Europäische Union) + // 3. noteu - Steuerschuldnerschaft des Leistungsempfängers (außerhalb EU, z. B. Schweiz) + // 4. custom - Using custom tax set + // 5. ss - Not subject to VAT according to §19 1 UStG + // Tax rates are heavily connected to the tax type used. + TaxType *string `json:"taxType"` + + // Update Date of last creditNote update + Update *time.Time `json:"update,omitempty"` + } `json:"objects,omitempty"` + } + JSON422 *ValidationError +} +type CreditNoteResetToDraft200ObjectsSendType string +type CreditNoteResetToDraft200ObjectsStatus string +type CreditNoteResetToDraft200ObjectsTaxRuleId string +type CreditNoteResetToDraft200ObjectsTaxRuleObjectName string + +// Status returns HTTPResponse.Status +func (r CreditNoteResetToDraftResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r CreditNoteResetToDraftResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type CreditNoteResetToOpenResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + Objects *struct { + // Address Complete address of the recipient including name, street, city, zip and country.
+ // Line breaks can be used and will be displayed on the invoice pdf. + Address *string `json:"address"` + + // AddressCountry Can be omitted as complete address is defined in address attribute + AddressCountry *struct { + // Id Unique identifier of the country + Id string `json:"id"` + + // ObjectName Model name, which is 'StaticCountry' + ObjectName string `json:"objectName"` + } `json:"addressCountry"` + + // Contact The contact used in the creditNote + Contact *struct { + // Id Unique identifier of the contact + Id string `json:"id"` + + // ObjectName Model name, which is 'Contact' + ObjectName string `json:"objectName"` + } `json:"contact"` + + // ContactPerson The user who acts as a contact person for the creditNote + ContactPerson *struct { + // Id Unique identifier of the user + Id string `json:"id"` + + // ObjectName Model name, which is 'SevUser' + ObjectName string `json:"objectName"` + } `json:"contactPerson"` + + // Create Date of creditNote creation + Create *time.Time `json:"create,omitempty"` + + // CreateUser Will be filled automatically by our system and can't be changed + CreateUser *struct { + // Id Unique identifier of the user + Id string `json:"id"` + + // ObjectName Model name, which is 'SevUser' + ObjectName string `json:"objectName"` + } `json:"createUser,omitempty"` + + // CreditNoteDate The credit note date + CreditNoteDate *time.Time `json:"creditNoteDate,omitempty"` + + // CreditNoteNumber The creditNote number + CreditNoteNumber *string `json:"creditNoteNumber"` + + // Currency Currency used in the creditNote. Needs to be currency code according to ISO-4217 + Currency *string `json:"currency"` + + // CustomerInternalNote Internal note of the customer. Contains data entered into field 'Referenz/Bestellnummer' + CustomerInternalNote *string `json:"customerInternalNote"` + + // DeliveryDate Timestamp. This can also be a date range if you also use the attribute deliveryDateUntil + DeliveryDate *time.Time `json:"deliveryDate,omitempty"` + + // FootText Certain html tags can be used here to format your text + FootText *string `json:"footText"` + + // HeadText Certain html tags can be used here to format your text + HeadText *string `json:"headText"` + + // Header Normally consist of prefix plus the creditNote number + Header *string `json:"header"` + + // Id The creditNote id + Id *string `json:"id,omitempty"` + + // ObjectName The creditNote object name + ObjectName *string `json:"objectName,omitempty"` + + // SendDate The date the creditNote was sent to the customer + SendDate *time.Time `json:"sendDate"` + + // SendType Type which was used to send the creditNote. IMPORTANT: Please refer to the creditNote section of the + // * API-Overview to understand how this attribute can be used before using it! + SendType *CreditNoteResetToOpen200ObjectsSendType `json:"sendType"` + + // SevClient Client to which creditNote belongs. Will be filled automatically + SevClient *struct { + // Id Unique identifier of the client + Id string `json:"id"` + + // ObjectName Model name, which is 'SevClient' + ObjectName string `json:"objectName"` + } `json:"sevClient,omitempty"` + + // ShowNet If true, the net amount of each position will be shown on the creditNote. Otherwise gross amount + ShowNet *bool `json:"showNet,omitempty"` + + // SmallSettlement Defines if the client uses the small settlement scheme. + // If yes, the creditNote must not contain any vat + SmallSettlement *bool `json:"smallSettlement"` + Status *interface{} `json:"status,omitempty"` + + // SumDiscounts Sum of all discounts in the creditNote + SumDiscounts *string `json:"sumDiscounts,omitempty"` + + // SumDiscountsForeignCurrency Discounts sum of the creditNote in the foreign currency + SumDiscountsForeignCurrency *string `json:"sumDiscountsForeignCurrency,omitempty"` + + // SumGross Gross sum of the creditNote + SumGross *string `json:"sumGross,omitempty"` + + // SumGrossForeignCurrency Gross sum of the creditNote in the foreign currency + SumGrossForeignCurrency *string `json:"sumGrossForeignCurrency,omitempty"` + + // SumNet Net sum of the creditNote + SumNet *string `json:"sumNet,omitempty"` + + // SumNetForeignCurrency Net sum of the creditNote in the foreign currency + SumNetForeignCurrency *string `json:"sumNetForeignCurrency,omitempty"` + + // SumTax Tax sum of the creditNote + SumTax *string `json:"sumTax,omitempty"` + + // SumTaxForeignCurrency Tax sum of the creditNote in the foreign currency + SumTaxForeignCurrency *string `json:"sumTaxForeignCurrency,omitempty"` + + // TaxRate This is not used anymore. Use the taxRate of the individual positions instead. + TaxRate *string `json:"taxRate"` + + // TaxRule **Use this in sevdesk-Update 2.0 (replaces taxType / taxSet).** + TaxRule *struct { + // Id **Use this in sevdesk-Update 2.0 (replaces taxType / taxSet).** + // + // Defines the vat-regulation. + // For "Regelbesteuerung" it can be one of: + // - `1` - Umsatzsteuerpflichtige Umsätze - tax rates: 0.0, 7.0, 19.0 - replaces `"taxType": "default"` + // - `2` - Ausfuhren - allowedTaxRates: 0.0 + // - `3` - Innergemeinschaftliche Lieferungen - tax rates: 0.0, 7.0, 19.0 - replaces `"taxType": "eu"` + // - `4` - Steuerfreie Umsätze §4 UStG - tax rates: 0.0 + // - `5` - Reverse Charge gem. §13b UStG - tax rates: 0.0 + // - `17` - Nicht im Inland steuerbare Leistung - tax rates: 0.0 - replaces `"taxType": "noteu"` + // + // For small business owner ("Kleinunternehmer") it can be: + // - `11` - Steuer nicht erhoben nach §19UStG - tax rates: 0.0 - replaces `"taxType": "ss"` + Id CreditNoteResetToOpen200ObjectsTaxRuleId `json:"id"` + + // ObjectName Name of the object. Must always be TaxRule + ObjectName CreditNoteResetToOpen200ObjectsTaxRuleObjectName `json:"objectName"` + } `json:"taxRule,omitempty"` + + // TaxSet **Use this in sevdesk-Update 1.0 (instead of taxRule).** + // + // Tax set of the creditNote. Needs to be added if you chose the tax type custom + TaxSet *struct { + // Id Unique identifier of the object + Id string `json:"id"` + + // ObjectName Model name, which is 'TaxSet' + ObjectName string `json:"objectName"` + } `json:"taxSet"` + + // TaxText A common tax text would be 'Umsatzsteuer 19%' + TaxText *string `json:"taxText"` + + // TaxType **Use this in sevdesk-Update 1.0 (instead of taxRule).** + // + // Tax type of the creditNote. + // There are four tax types: + // 1. default - Umsatzsteuer ausweisen + // 2. eu - Steuerfreie innergemeinschaftliche Lieferung (Europäische Union) + // 3. noteu - Steuerschuldnerschaft des Leistungsempfängers (außerhalb EU, z. B. Schweiz) + // 4. custom - Using custom tax set + // 5. ss - Not subject to VAT according to §19 1 UStG + // Tax rates are heavily connected to the tax type used. + TaxType *string `json:"taxType"` + + // Update Date of last creditNote update + Update *time.Time `json:"update,omitempty"` + } `json:"objects,omitempty"` + } + JSON422 *ValidationError +} +type CreditNoteResetToOpen200ObjectsSendType string +type CreditNoteResetToOpen200ObjectsTaxRuleId string +type CreditNoteResetToOpen200ObjectsTaxRuleObjectName string + +// Status returns HTTPResponse.Status +func (r CreditNoteResetToOpenResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r CreditNoteResetToOpenResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type CreditNoteSendByResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *ModelCreditNoteResponse +} + +// Status returns HTTPResponse.Status +func (r CreditNoteSendByResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r CreditNoteSendByResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type SendCreditNoteByPrintingResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *ModelCreditNoteSendByWithRender +} + +// Status returns HTTPResponse.Status +func (r SendCreditNoteByPrintingResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r SendCreditNoteByPrintingResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type SendCreditNoteViaEMailResponse struct { + Body []byte + HTTPResponse *http.Response + JSON201 *struct { + Objects *[]ModelCreditNoteMailResponse `json:"objects,omitempty"` + } +} + +// Status returns HTTPResponse.Status +func (r SendCreditNoteViaEMailResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r SendCreditNoteViaEMailResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetcreditNotePositionsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + Objects *[]ModelCreditNotePosResponse `json:"objects,omitempty"` + } +} + +// Status returns HTTPResponse.Status +func (r GetcreditNotePositionsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetcreditNotePositionsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetLetterpapersWithThumbResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + Letterpapers *[]struct { + Default *int `json:"default,omitempty"` + Id *string `json:"id,omitempty"` + Img *string `json:"img,omitempty"` + Name *string `json:"name,omitempty"` + Pdf *string `json:"pdf,omitempty"` + SevClient *string `json:"sevClient,omitempty"` + } `json:"letterpapers,omitempty"` + Result *string `json:"result,omitempty"` + } +} + +// Status returns HTTPResponse.Status +func (r GetLetterpapersWithThumbResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetLetterpapersWithThumbResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetTemplatesResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + Result *string `json:"result,omitempty"` + Templates *[]struct { + Default *int `json:"default,omitempty"` + Html *string `json:"html,omitempty"` + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Premium *bool `json:"premium,omitempty"` + SevClient *string `json:"sevClient,omitempty"` + TranslationCode *string `json:"translationCode,omitempty"` + Type *string `json:"type,omitempty"` + } `json:"templates,omitempty"` + } +} + +// Status returns HTTPResponse.Status +func (r GetTemplatesResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetTemplatesResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type ExportContactResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + Objects *struct { + Base64Encoded *bool `json:"base64Encoded,omitempty"` + Content *string `json:"content,omitempty"` + Filename *string `json:"filename,omitempty"` + Mimetype *string `json:"mimetype,omitempty"` + } `json:"objects,omitempty"` + } +} + +// Status returns HTTPResponse.Status +func (r ExportContactResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r ExportContactResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type ExportCreditNoteResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + Objects *struct { + Base64Encoded *bool `json:"base64Encoded,omitempty"` + Content *string `json:"content,omitempty"` + Filename *string `json:"filename,omitempty"` + Mimetype *string `json:"mimetype,omitempty"` + } `json:"objects,omitempty"` + } +} + +// Status returns HTTPResponse.Status +func (r ExportCreditNoteResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r ExportCreditNoteResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type ExportDatevResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *map[string]interface{} +} + +// Status returns HTTPResponse.Status +func (r ExportDatevResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r ExportDatevResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type ExportInvoiceResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + Objects *struct { + Base64Encoded *bool `json:"base64Encoded,omitempty"` + Content *string `json:"content,omitempty"` + Filename *string `json:"filename,omitempty"` + Mimetype *string `json:"mimetype,omitempty"` + } `json:"objects,omitempty"` + } +} + +// Status returns HTTPResponse.Status +func (r ExportInvoiceResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r ExportInvoiceResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type ExportInvoiceZipResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + Objects *struct { + Base64Encoded *bool `json:"base64Encoded,omitempty"` + Content *string `json:"content,omitempty"` + Filename *string `json:"filename,omitempty"` + Mimetype *string `json:"mimetype,omitempty"` + } `json:"objects,omitempty"` + } +} + +// Status returns HTTPResponse.Status +func (r ExportInvoiceZipResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r ExportInvoiceZipResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type ExportTransactionsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + Objects *struct { + Base64Encoded *bool `json:"base64Encoded,omitempty"` + Content *string `json:"content,omitempty"` + Filename *string `json:"filename,omitempty"` + Mimetype *string `json:"mimetype,omitempty"` + } `json:"objects,omitempty"` + } +} + +// Status returns HTTPResponse.Status +func (r ExportTransactionsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r ExportTransactionsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type ExportVoucherResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + Base64Encoded *bool `json:"base64Encoded,omitempty"` + Content *string `json:"content,omitempty"` + Filename *string `json:"filename,omitempty"` + Mimetype *string `json:"mimetype,omitempty"` + } +} + +// Status returns HTTPResponse.Status +func (r ExportVoucherResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r ExportVoucherResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type ExportVoucherZipResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + Objects *struct { + Base64Encoded *bool `json:"base64Encoded,omitempty"` + Content *string `json:"content,omitempty"` + Filename *string `json:"filename,omitempty"` + Mimetype *string `json:"mimetype,omitempty"` + } `json:"objects,omitempty"` + } +} + +// Status returns HTTPResponse.Status +func (r ExportVoucherZipResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r ExportVoucherZipResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetInvoicesResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + Objects *[]ModelInvoiceResponse `json:"objects,omitempty"` + } +} + +// Status returns HTTPResponse.Status +func (r GetInvoicesResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetInvoicesResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type CreateInvoiceFromOrderResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *ModelInvoiceResponse +} + +// Status returns HTTPResponse.Status +func (r CreateInvoiceFromOrderResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r CreateInvoiceFromOrderResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type CreateInvoiceReminderResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *ModelInvoiceResponse +} + +// Status returns HTTPResponse.Status +func (r CreateInvoiceReminderResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r CreateInvoiceReminderResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type CreateInvoiceByFactoryResponse struct { + Body []byte + HTTPResponse *http.Response + JSON201 *SaveInvoiceResponse +} + +// Status returns HTTPResponse.Status +func (r CreateInvoiceByFactoryResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r CreateInvoiceByFactoryResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetInvoiceByIdResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + Objects *[]ModelInvoiceResponse `json:"objects,omitempty"` + } +} + +// Status returns HTTPResponse.Status +func (r GetInvoiceByIdResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetInvoiceByIdResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type BookInvoiceResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + AdditionalInformation *string `json:"additionalInformation,omitempty"` + AmmountPayed *string `json:"ammountPayed,omitempty"` + BookingDate *time.Time `json:"bookingDate,omitempty"` + + // Create Date of email creation + Create *time.Time `json:"create,omitempty"` + CreditNote *struct { + // Id The id of the invoice + Id int `json:"id"` + + // ObjectName Internal object name which is 'Invoice'. + ObjectName string `json:"objectName"` + } `json:"creditNote,omitempty"` + FromStatus *string `json:"fromStatus,omitempty"` + Id *string `json:"id,omitempty"` + ObjectName *string `json:"objectName,omitempty"` + + // SevClient Client to which invoice belongs. Will be filled automatically + SevClient *struct { + // Id Unique identifier of the client + Id int `json:"id"` + + // ObjectName Model name, which is 'SevClient' + ObjectName string `json:"objectName"` + } `json:"sevClient,omitempty"` + ToStatus *string `json:"toStatus,omitempty"` + } +} + +// Status returns HTTPResponse.Status +func (r BookInvoiceResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r BookInvoiceResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type CancelInvoiceResponse struct { + Body []byte + HTTPResponse *http.Response + JSON201 *ModelInvoiceResponse +} + +// Status returns HTTPResponse.Status +func (r CancelInvoiceResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r CancelInvoiceResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type UpdateInvoiceTemplateResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *ModelChangeLayoutResponse +} + +// Status returns HTTPResponse.Status +func (r UpdateInvoiceTemplateResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r UpdateInvoiceTemplateResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type InvoiceEnshrineResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + Objects *interface{} `json:"objects,omitempty"` + } + JSON422 *ValidationError +} + +// Status returns HTTPResponse.Status +func (r InvoiceEnshrineResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r InvoiceEnshrineResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetIsInvoicePartiallyPaidResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + Objects *bool `json:"objects,omitempty"` + } +} + +// Status returns HTTPResponse.Status +func (r GetIsInvoicePartiallyPaidResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetIsInvoicePartiallyPaidResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type InvoiceGetPdfResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + Base64encoded *bool `json:"base64encoded,omitempty"` + Content *openapi_types.File `json:"content,omitempty"` + Filename *string `json:"filename,omitempty"` + MimeType *string `json:"mimeType,omitempty"` + } +} + +// Status returns HTTPResponse.Status +func (r InvoiceGetPdfResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r InvoiceGetPdfResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetInvoicePositionsByIdResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + Objects *[]ModelInvoicePosResponse `json:"objects,omitempty"` + } +} + +// Status returns HTTPResponse.Status +func (r GetInvoicePositionsByIdResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetInvoicePositionsByIdResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type InvoiceGetXmlResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + Object *string `json:"object,omitempty"` + } +} + +// Status returns HTTPResponse.Status +func (r InvoiceGetXmlResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r InvoiceGetXmlResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type InvoiceRenderResponse struct { + Body []byte + HTTPResponse *http.Response + JSON201 *struct { + DocId *string `json:"docId,omitempty"` + Pages *int `json:"pages,omitempty"` + Parameters *[]struct { + Key *string `json:"key,omitempty"` + Name *string `json:"name,omitempty"` + Value *string `json:"value,omitempty"` + Values *[]struct { + Name *string `json:"name,omitempty"` + TranslationCade *string `json:"translationCade,omitempty"` + Value *string `json:"value,omitempty"` + } `json:"values,omitempty"` + Visible *bool `json:"visible,omitempty"` + } `json:"parameters,omitempty"` + Thumbs *[]interface{} `json:"thumbs,omitempty"` + } +} + +// Status returns HTTPResponse.Status +func (r InvoiceRenderResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r InvoiceRenderResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type InvoiceResetToDraftResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + Objects *struct { + AccountIntervall *interface{} `json:"accountIntervall,omitempty"` + AccountNextInvoice *interface{} `json:"accountNextInvoice,omitempty"` + + // Address Complete address of the recipient including name, street, city, zip and country. + // * Line breaks can be used and will be displayed on the invoice pdf. + Address *string `json:"address,omitempty"` + + // AddressCountry Can be omitted as complete address is defined in address attribute + AddressCountry *struct { + // Id Unique identifier of the country + Id string `json:"id"` + + // ObjectName Model name, which is 'StaticCountry' + ObjectName string `json:"objectName"` + } `json:"addressCountry,omitempty"` + + // Contact The contact used in the invoice + Contact *struct { + // Id Unique identifier of the contact + Id string `json:"id"` + + // ObjectName Model name, which is 'Contact' + ObjectName string `json:"objectName"` + } `json:"contact,omitempty"` + + // ContactPerson The user who acts as a contact person for the invoice + ContactPerson *struct { + // Id Unique identifier of the user + Id string `json:"id"` + + // ObjectName Model name, which is 'SevUser' + ObjectName string `json:"objectName"` + } `json:"contactPerson,omitempty"` + + // CostCentre Cost centre for the invoice + CostCentre *struct { + // Id Unique identifier of the cost centre + Id string `json:"id"` + + // ObjectName Model name, which is 'CostCentre' + ObjectName string `json:"objectName"` + } `json:"costCentre,omitempty"` + + // Create Date of invoice creation + Create *time.Time `json:"create,omitempty"` + + // CreateUser Will be filled automatically by our system and can't be changed + CreateUser *struct { + // Id Unique identifier of the user + Id string `json:"id"` + + // ObjectName Model name, which is 'SevUser' + ObjectName string `json:"objectName"` + } `json:"createUser,omitempty"` + + // Currency Currency used in the invoice. Needs to be currency code according to ISO-4217 + Currency *string `json:"currency,omitempty"` + + // CustomerInternalNote Internal note of the customer. Contains data entered into field 'Referenz/Bestellnummer' + CustomerInternalNote *string `json:"customerInternalNote,omitempty"` + + // DatevConnectOnline Internal attribute + DatevConnectOnline *map[string]interface{} `json:"datevConnectOnline,omitempty"` + + // DeliveryDate Timestamp. This can also be a date range if you also use the attribute deliveryDateUntil + DeliveryDate *time.Time `json:"deliveryDate,omitempty"` + + // DeliveryDateUntil If the delivery date should be a time range, another timestamp can be provided in this attribute + // * to define a range from timestamp used in deliveryDate attribute to the timestamp used here. + DeliveryDateUntil *string `json:"deliveryDateUntil,omitempty"` + + // Discount If you want to give a discount, define the percentage here. Otherwise provide zero as value + Discount *string `json:"discount,omitempty"` + + // DiscountTime If a value other than zero is used for the discount attribute, + // you need to specify the amount of days for which the discount is granted. + DiscountTime *string `json:"discountTime,omitempty"` + + // DunningLevel Defines how many reminders have already been sent for the invoice. + // Starts with 1 (Payment reminder) and should be incremented by one every time another reminder is sent. + DunningLevel *string `json:"dunningLevel,omitempty"` + Enshrined *interface{} `json:"enshrined,omitempty"` + + // FootText Certain html tags can be used here to format your text + FootText *string `json:"footText,omitempty"` + + // HeadText Certain html tags can be used here to format your text + HeadText *string `json:"headText,omitempty"` + + // Header Normally consist of prefix plus the invoice number + Header *string `json:"header,omitempty"` + + // Id The invoice id + Id *string `json:"id,omitempty"` + + // InvoiceDate The invoice date. + InvoiceDate *string `json:"invoiceDate,omitempty"` + + // InvoiceNumber The invoice number + InvoiceNumber *string `json:"invoiceNumber,omitempty"` + + // InvoiceType Type of the invoice. For more information on the different types, check + // this section + InvoiceType *InvoiceResetToDraft200ObjectsInvoiceType `json:"invoiceType,omitempty"` + + // ObjectName The invoice object name + ObjectName *string `json:"objectName,omitempty"` + + // Origin Origin of the invoice. Could f.e. be an order + Origin *struct { + // Id Unique identifier of the object + Id string `json:"id"` + + // ObjectName Model name. Could f.e. be 'Order'' + ObjectName string `json:"objectName"` + } `json:"origin,omitempty"` + + // PaidAmount Amount which has already been paid for this invoice by the customer + PaidAmount *float32 `json:"paidAmount,omitempty"` + PayDate *interface{} `json:"payDate,omitempty"` + + // PaymentMethod Payment method used for the invoice + PaymentMethod *struct { + // Id Unique identifier of the payment method + Id string `json:"id"` + + // ObjectName Model name, which is 'PaymentMethod' + ObjectName string `json:"objectName"` + } `json:"paymentMethod,omitempty"` + + // ReminderCharge The additional reminder charge + ReminderCharge *string `json:"reminderCharge,omitempty"` + + // ReminderDeadline Deadline of the reminder as timestamp + ReminderDeadline *time.Time `json:"reminderDeadline,omitempty"` + + // ReminderDebit Debit of the reminder + ReminderDebit *string `json:"reminderDebit,omitempty"` + + // ReminderTotal Total reminder amount + ReminderTotal *string `json:"reminderTotal,omitempty"` + + // SendDate The date the invoice was sent to the customer + SendDate *time.Time `json:"sendDate,omitempty"` + + // SendPaymentReceivedNotificationDate Internal attribute + SendPaymentReceivedNotificationDate *string `json:"sendPaymentReceivedNotificationDate,omitempty"` + + // SendType Type which was used to send the invoice. IMPORTANT: Please refer to the invoice section of the + // * API-Overview to understand how this attribute can be used before using it! + SendType *InvoiceResetToDraft200ObjectsSendType `json:"sendType,omitempty"` + + // SevClient Client to which invoice belongs. Will be filled automatically + SevClient *struct { + // Id Unique identifier of the client + Id string `json:"id"` + + // ObjectName Model name, which is 'SevClient' + ObjectName string `json:"objectName"` + } `json:"sevClient,omitempty"` + + // ShowNet If true, the net amount of each position will be shown on the invoice. Otherwise gross amount + ShowNet *bool `json:"showNet,omitempty"` + + // SmallSettlement Defines if the client uses the small settlement scheme. + // If yes, the invoice must not contain any vat + SmallSettlement *bool `json:"smallSettlement,omitempty"` + + // Status Please have a look in our + // Types and status of invoices + // to see what the different status codes mean + Status *InvoiceResetToDraft200ObjectsStatus `json:"status,omitempty"` + + // SumDiscounts Sum of all discounts in the invoice + SumDiscounts *string `json:"sumDiscounts,omitempty"` + + // SumDiscountsForeignCurrency Discounts sum of the invoice in the foreign currency + SumDiscountsForeignCurrency *string `json:"sumDiscountsForeignCurrency,omitempty"` + + // SumGross Gross sum of the invoice + SumGross *string `json:"sumGross,omitempty"` + + // SumGrossAccounting Gross accounting sum of the invoice. Is usually the same as sumGross + SumGrossAccounting *string `json:"sumGrossAccounting,omitempty"` + + // SumGrossForeignCurrency Gross sum of the invoice in the foreign currency + SumGrossForeignCurrency *string `json:"sumGrossForeignCurrency,omitempty"` + + // SumNet Net sum of the invoice + SumNet *string `json:"sumNet,omitempty"` + + // SumNetAccounting Net accounting sum of the invoice. Is usually the same as sumNet + SumNetAccounting *string `json:"sumNetAccounting,omitempty"` + + // SumNetForeignCurrency Net sum of the invoice in the foreign currency + SumNetForeignCurrency *string `json:"sumNetForeignCurrency,omitempty"` + + // SumTax Tax sum of the invoice + SumTax *string `json:"sumTax,omitempty"` + + // SumTaxAccounting Tax accounting sum of the invoice. Is usually the same as sumTax + SumTaxAccounting *string `json:"sumTaxAccounting,omitempty"` + + // SumTaxForeignCurrency Tax sum of the invoice in the foreign currency + SumTaxForeignCurrency *string `json:"sumTaxForeignCurrency,omitempty"` + + // TaxRate This is not used anymore. Use the taxRate of the individual positions instead. + TaxRate *string `json:"taxRate,omitempty"` + + // TaxRule **Use this in sevdesk-Update 2.0 (replaces taxType / taxSet).** + TaxRule *struct { + // Id **Use this in sevdesk-Update 2.0 (replaces taxType / taxSet).** + // + // Defines the vat-regulation. + // For "Regelbesteuerung" it can be one of: + // - `1` - Umsatzsteuerpflichtige Umsätze - tax rates: 0.0, 7.0, 19.0 - replaces `"taxType": "default"` + // - `2` - Ausfuhren - allowedTaxRates: 0.0 + // - `3` - Innergemeinschaftliche Lieferungen - tax rates: 0.0, 7.0, 19.0 - replaces `"taxType": "eu"` + // - `4` - Steuerfreie Umsätze §4 UStG - tax rates: 0.0 + // - `5` - Reverse Charge gem. §13b UStG - tax rates: 0.0 + // - `17` - Nicht im Inland steuerbare Leistung - tax rates: 0.0 - replaces `"taxType": "noteu"` + // - "Nicht im Inland steuerbare Leistung" is not available for: + // - advance invoice (`"invoiceType": "AR"`) + // - partial invoice (`"invoiceType": "TR"`) + // - final invoice (`"invoiceType": "ER"`) + // + // For small business owner ("Kleinunternehmer") it can be: + // - `11` - Steuer nicht erhoben nach §19UStG - tax rates: 0.0 - replaces `"taxType": "ss"` + Id InvoiceResetToDraft200ObjectsTaxRuleId `json:"id"` + + // ObjectName Name of the object. Must always be TaxRule + ObjectName InvoiceResetToDraft200ObjectsTaxRuleObjectName `json:"objectName"` + } `json:"taxRule,omitempty"` + + // TaxSet **Use this in sevdesk-Update 1.0 (instead of taxRule).** + // + // Tax set of the invoice. Needs to be added if you chose the tax type custom + TaxSet *struct { + // Id Unique identifier of the object + Id string `json:"id"` + + // ObjectName Model name, which is 'TaxSet' + ObjectName string `json:"objectName"` + } `json:"taxSet,omitempty"` + + // TaxText A common tax text would be 'Umsatzsteuer 19%' + TaxText *string `json:"taxText,omitempty"` + + // TaxType **Use this in sevdesk-Update 1.0 (instead of taxRule).** + // + // Tax type of the invoice. + // There are four tax types: + // 1. default - Umsatzsteuer ausweisen + // 2. eu - Steuerfreie innergemeinschaftliche Lieferung (Europäische Union) + // 3. noteu - Steuerschuldnerschaft des Leistungsempfängers (außerhalb EU, z. B. Schweiz) + // 4. custom - Using custom tax set + // 5. ss - Not subject to VAT according to §19 1 UStG + // Tax rates are heavily connected to the tax type used. + TaxType *InvoiceResetToDraft200ObjectsTaxType `json:"taxType,omitempty"` + + // TimeToPay The time the customer has to pay the invoice in days + TimeToPay *string `json:"timeToPay,omitempty"` + + // Update Date of last invoice update + Update *time.Time `json:"update,omitempty"` + } `json:"objects,omitempty"` + } + JSON422 *ValidationError +} +type InvoiceResetToDraft200ObjectsInvoiceType string +type InvoiceResetToDraft200ObjectsSendType string +type InvoiceResetToDraft200ObjectsStatus string +type InvoiceResetToDraft200ObjectsTaxRuleId string +type InvoiceResetToDraft200ObjectsTaxRuleObjectName string +type InvoiceResetToDraft200ObjectsTaxType string + +// Status returns HTTPResponse.Status +func (r InvoiceResetToDraftResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r InvoiceResetToDraftResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type InvoiceResetToOpenResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + Objects *struct { + AccountIntervall *interface{} `json:"accountIntervall,omitempty"` + AccountNextInvoice *interface{} `json:"accountNextInvoice,omitempty"` + + // Address Complete address of the recipient including name, street, city, zip and country. + // * Line breaks can be used and will be displayed on the invoice pdf. + Address *string `json:"address,omitempty"` + + // AddressCountry Can be omitted as complete address is defined in address attribute + AddressCountry *struct { + // Id Unique identifier of the country + Id string `json:"id"` + + // ObjectName Model name, which is 'StaticCountry' + ObjectName string `json:"objectName"` + } `json:"addressCountry,omitempty"` + + // Contact The contact used in the invoice + Contact *struct { + // Id Unique identifier of the contact + Id string `json:"id"` + + // ObjectName Model name, which is 'Contact' + ObjectName string `json:"objectName"` + } `json:"contact,omitempty"` + + // ContactPerson The user who acts as a contact person for the invoice + ContactPerson *struct { + // Id Unique identifier of the user + Id string `json:"id"` + + // ObjectName Model name, which is 'SevUser' + ObjectName string `json:"objectName"` + } `json:"contactPerson,omitempty"` + + // CostCentre Cost centre for the invoice + CostCentre *struct { + // Id Unique identifier of the cost centre + Id string `json:"id"` + + // ObjectName Model name, which is 'CostCentre' + ObjectName string `json:"objectName"` + } `json:"costCentre,omitempty"` + + // Create Date of invoice creation + Create *time.Time `json:"create,omitempty"` + + // CreateUser Will be filled automatically by our system and can't be changed + CreateUser *struct { + // Id Unique identifier of the user + Id string `json:"id"` + + // ObjectName Model name, which is 'SevUser' + ObjectName string `json:"objectName"` + } `json:"createUser,omitempty"` + + // Currency Currency used in the invoice. Needs to be currency code according to ISO-4217 + Currency *string `json:"currency,omitempty"` + + // CustomerInternalNote Internal note of the customer. Contains data entered into field 'Referenz/Bestellnummer' + CustomerInternalNote *string `json:"customerInternalNote,omitempty"` + + // DatevConnectOnline Internal attribute + DatevConnectOnline *map[string]interface{} `json:"datevConnectOnline,omitempty"` + + // DeliveryDate Timestamp. This can also be a date range if you also use the attribute deliveryDateUntil + DeliveryDate *time.Time `json:"deliveryDate,omitempty"` + + // DeliveryDateUntil If the delivery date should be a time range, another timestamp can be provided in this attribute + // * to define a range from timestamp used in deliveryDate attribute to the timestamp used here. + DeliveryDateUntil *string `json:"deliveryDateUntil,omitempty"` + + // Discount If you want to give a discount, define the percentage here. Otherwise provide zero as value + Discount *string `json:"discount,omitempty"` + + // DiscountTime If a value other than zero is used for the discount attribute, + // you need to specify the amount of days for which the discount is granted. + DiscountTime *string `json:"discountTime,omitempty"` + + // DunningLevel Defines how many reminders have already been sent for the invoice. + // Starts with 1 (Payment reminder) and should be incremented by one every time another reminder is sent. + DunningLevel *string `json:"dunningLevel,omitempty"` + Enshrined *interface{} `json:"enshrined,omitempty"` + + // FootText Certain html tags can be used here to format your text + FootText *string `json:"footText,omitempty"` + + // HeadText Certain html tags can be used here to format your text + HeadText *string `json:"headText,omitempty"` + + // Header Normally consist of prefix plus the invoice number + Header *string `json:"header,omitempty"` + + // Id The invoice id + Id *string `json:"id,omitempty"` + + // InvoiceDate The invoice date. + InvoiceDate *string `json:"invoiceDate,omitempty"` + + // InvoiceNumber The invoice number + InvoiceNumber *string `json:"invoiceNumber,omitempty"` + + // InvoiceType Type of the invoice. For more information on the different types, check + // this section + InvoiceType *InvoiceResetToOpen200ObjectsInvoiceType `json:"invoiceType,omitempty"` + + // ObjectName The invoice object name + ObjectName *string `json:"objectName,omitempty"` + + // Origin Origin of the invoice. Could f.e. be an order + Origin *struct { + // Id Unique identifier of the object + Id string `json:"id"` + + // ObjectName Model name. Could f.e. be 'Order'' + ObjectName string `json:"objectName"` + } `json:"origin,omitempty"` + + // PaidAmount Amount which has already been paid for this invoice by the customer + PaidAmount *float32 `json:"paidAmount,omitempty"` + PayDate *interface{} `json:"payDate,omitempty"` + + // PaymentMethod Payment method used for the invoice + PaymentMethod *struct { + // Id Unique identifier of the payment method + Id string `json:"id"` + + // ObjectName Model name, which is 'PaymentMethod' + ObjectName string `json:"objectName"` + } `json:"paymentMethod,omitempty"` + + // ReminderCharge The additional reminder charge + ReminderCharge *string `json:"reminderCharge,omitempty"` + + // ReminderDeadline Deadline of the reminder as timestamp + ReminderDeadline *time.Time `json:"reminderDeadline,omitempty"` + + // ReminderDebit Debit of the reminder + ReminderDebit *string `json:"reminderDebit,omitempty"` + + // ReminderTotal Total reminder amount + ReminderTotal *string `json:"reminderTotal,omitempty"` + + // SendDate The date the invoice was sent to the customer + SendDate *time.Time `json:"sendDate,omitempty"` + + // SendPaymentReceivedNotificationDate Internal attribute + SendPaymentReceivedNotificationDate *string `json:"sendPaymentReceivedNotificationDate,omitempty"` + + // SendType Type which was used to send the invoice. IMPORTANT: Please refer to the invoice section of the + // * API-Overview to understand how this attribute can be used before using it! + SendType *InvoiceResetToOpen200ObjectsSendType `json:"sendType,omitempty"` + + // SevClient Client to which invoice belongs. Will be filled automatically + SevClient *struct { + // Id Unique identifier of the client + Id string `json:"id"` + + // ObjectName Model name, which is 'SevClient' + ObjectName string `json:"objectName"` + } `json:"sevClient,omitempty"` + + // ShowNet If true, the net amount of each position will be shown on the invoice. Otherwise gross amount + ShowNet *bool `json:"showNet,omitempty"` + + // SmallSettlement Defines if the client uses the small settlement scheme. + // If yes, the invoice must not contain any vat + SmallSettlement *bool `json:"smallSettlement,omitempty"` + Status *interface{} `json:"status,omitempty"` + + // SumDiscounts Sum of all discounts in the invoice + SumDiscounts *string `json:"sumDiscounts,omitempty"` + + // SumDiscountsForeignCurrency Discounts sum of the invoice in the foreign currency + SumDiscountsForeignCurrency *string `json:"sumDiscountsForeignCurrency,omitempty"` + + // SumGross Gross sum of the invoice + SumGross *string `json:"sumGross,omitempty"` + + // SumGrossAccounting Gross accounting sum of the invoice. Is usually the same as sumGross + SumGrossAccounting *string `json:"sumGrossAccounting,omitempty"` + + // SumGrossForeignCurrency Gross sum of the invoice in the foreign currency + SumGrossForeignCurrency *string `json:"sumGrossForeignCurrency,omitempty"` + + // SumNet Net sum of the invoice + SumNet *string `json:"sumNet,omitempty"` + + // SumNetAccounting Net accounting sum of the invoice. Is usually the same as sumNet + SumNetAccounting *string `json:"sumNetAccounting,omitempty"` + + // SumNetForeignCurrency Net sum of the invoice in the foreign currency + SumNetForeignCurrency *string `json:"sumNetForeignCurrency,omitempty"` + + // SumTax Tax sum of the invoice + SumTax *string `json:"sumTax,omitempty"` + + // SumTaxAccounting Tax accounting sum of the invoice. Is usually the same as sumTax + SumTaxAccounting *string `json:"sumTaxAccounting,omitempty"` + + // SumTaxForeignCurrency Tax sum of the invoice in the foreign currency + SumTaxForeignCurrency *string `json:"sumTaxForeignCurrency,omitempty"` + + // TaxRate This is not used anymore. Use the taxRate of the individual positions instead. + TaxRate *string `json:"taxRate,omitempty"` + + // TaxRule **Use this in sevdesk-Update 2.0 (replaces taxType / taxSet).** + TaxRule *struct { + // Id **Use this in sevdesk-Update 2.0 (replaces taxType / taxSet).** + // + // Defines the vat-regulation. + // For "Regelbesteuerung" it can be one of: + // - `1` - Umsatzsteuerpflichtige Umsätze - tax rates: 0.0, 7.0, 19.0 - replaces `"taxType": "default"` + // - `2` - Ausfuhren - allowedTaxRates: 0.0 + // - `3` - Innergemeinschaftliche Lieferungen - tax rates: 0.0, 7.0, 19.0 - replaces `"taxType": "eu"` + // - `4` - Steuerfreie Umsätze §4 UStG - tax rates: 0.0 + // - `5` - Reverse Charge gem. §13b UStG - tax rates: 0.0 + // - `17` - Nicht im Inland steuerbare Leistung - tax rates: 0.0 - replaces `"taxType": "noteu"` + // - "Nicht im Inland steuerbare Leistung" is not available for: + // - advance invoice (`"invoiceType": "AR"`) + // - partial invoice (`"invoiceType": "TR"`) + // - final invoice (`"invoiceType": "ER"`) + // + // For small business owner ("Kleinunternehmer") it can be: + // - `11` - Steuer nicht erhoben nach §19UStG - tax rates: 0.0 - replaces `"taxType": "ss"` + Id InvoiceResetToOpen200ObjectsTaxRuleId `json:"id"` + + // ObjectName Name of the object. Must always be TaxRule + ObjectName InvoiceResetToOpen200ObjectsTaxRuleObjectName `json:"objectName"` + } `json:"taxRule,omitempty"` + + // TaxSet **Use this in sevdesk-Update 1.0 (instead of taxRule).** + // + // Tax set of the invoice. Needs to be added if you chose the tax type custom + TaxSet *struct { + // Id Unique identifier of the object + Id string `json:"id"` + + // ObjectName Model name, which is 'TaxSet' + ObjectName string `json:"objectName"` + } `json:"taxSet,omitempty"` + + // TaxText A common tax text would be 'Umsatzsteuer 19%' + TaxText *string `json:"taxText,omitempty"` + + // TaxType **Use this in sevdesk-Update 1.0 (instead of taxRule).** + // + // Tax type of the invoice. + // There are four tax types: + // 1. default - Umsatzsteuer ausweisen + // 2. eu - Steuerfreie innergemeinschaftliche Lieferung (Europäische Union) + // 3. noteu - Steuerschuldnerschaft des Leistungsempfängers (außerhalb EU, z. B. Schweiz) + // 4. custom - Using custom tax set + // 5. ss - Not subject to VAT according to §19 1 UStG + // Tax rates are heavily connected to the tax type used. + TaxType *InvoiceResetToOpen200ObjectsTaxType `json:"taxType,omitempty"` + + // TimeToPay The time the customer has to pay the invoice in days + TimeToPay *string `json:"timeToPay,omitempty"` + + // Update Date of last invoice update + Update *time.Time `json:"update,omitempty"` + } `json:"objects,omitempty"` + } + JSON422 *ValidationError +} +type InvoiceResetToOpen200ObjectsInvoiceType string +type InvoiceResetToOpen200ObjectsSendType string +type InvoiceResetToOpen200ObjectsTaxRuleId string +type InvoiceResetToOpen200ObjectsTaxRuleObjectName string +type InvoiceResetToOpen200ObjectsTaxType string + +// Status returns HTTPResponse.Status +func (r InvoiceResetToOpenResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r InvoiceResetToOpenResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type InvoiceSendByResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *ModelInvoiceResponse +} + +// Status returns HTTPResponse.Status +func (r InvoiceSendByResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r InvoiceSendByResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type SendInvoiceViaEMailResponse struct { + Body []byte + HTTPResponse *http.Response + JSON201 *ModelEmail +} + +// Status returns HTTPResponse.Status +func (r SendInvoiceViaEMailResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r SendInvoiceViaEMailResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetInvoicePosResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + Objects *[]ModelInvoicePosResponse `json:"objects,omitempty"` + } +} + +// Status returns HTTPResponse.Status +func (r GetInvoicePosResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetInvoicePosResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetOrdersResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + Objects *[]ModelOrderResponse `json:"objects,omitempty"` + } +} + +// Status returns HTTPResponse.Status +func (r GetOrdersResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetOrdersResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type CreateContractNoteFromOrderResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *ModelOrderResponse +} + +// Status returns HTTPResponse.Status +func (r CreateContractNoteFromOrderResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r CreateContractNoteFromOrderResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type CreatePackingListFromOrderResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *ModelOrderResponse +} + +// Status returns HTTPResponse.Status +func (r CreatePackingListFromOrderResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r CreatePackingListFromOrderResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type CreateOrderResponse struct { + Body []byte + HTTPResponse *http.Response + JSON201 *SaveOrderResponse +} + +// Status returns HTTPResponse.Status +func (r CreateOrderResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r CreateOrderResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type DeleteOrderResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + Objects *[]interface{} `json:"objects,omitempty"` + } +} + +// Status returns HTTPResponse.Status +func (r DeleteOrderResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r DeleteOrderResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetOrderByIdResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + Objects *[]ModelOrderResponse `json:"objects,omitempty"` + } +} + +// Status returns HTTPResponse.Status +func (r GetOrderByIdResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetOrderByIdResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type UpdateOrderResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *ModelOrderResponse +} + +// Status returns HTTPResponse.Status +func (r UpdateOrderResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r UpdateOrderResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type UpdateOrderTemplateResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *ModelChangeLayoutResponse +} + +// Status returns HTTPResponse.Status +func (r UpdateOrderTemplateResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r UpdateOrderTemplateResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetDiscountsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + Objects *[]ModelDiscount `json:"objects,omitempty"` + } +} + +// Status returns HTTPResponse.Status +func (r GetDiscountsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetDiscountsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type OrderGetPdfResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + Base64encoded *bool `json:"base64encoded,omitempty"` + Content *openapi_types.File `json:"content,omitempty"` + Filename *string `json:"filename,omitempty"` + MimeType *string `json:"mimeType,omitempty"` + } +} + +// Status returns HTTPResponse.Status +func (r OrderGetPdfResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r OrderGetPdfResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetOrderPositionsByIdResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + Objects *[]ModelOrderPosResponse `json:"objects,omitempty"` + } +} + +// Status returns HTTPResponse.Status +func (r GetOrderPositionsByIdResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetOrderPositionsByIdResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetRelatedObjectsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + Objects *[]ModelOrderPosResponse `json:"objects,omitempty"` + } +} + +// Status returns HTTPResponse.Status +func (r GetRelatedObjectsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetRelatedObjectsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type OrderSendByResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *ModelOrderResponse +} + +// Status returns HTTPResponse.Status +func (r OrderSendByResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r OrderSendByResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type SendorderViaEMailResponse struct { + Body []byte + HTTPResponse *http.Response + JSON201 *struct { + Objects *[]ModelEmailOrder `json:"objects,omitempty"` + } +} + +// Status returns HTTPResponse.Status +func (r SendorderViaEMailResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r SendorderViaEMailResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetOrderPositionsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + Objects *[]ModelOrderPosResponse `json:"objects,omitempty"` + } +} + +// Status returns HTTPResponse.Status +func (r GetOrderPositionsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetOrderPositionsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type DeleteOrderPosResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + Objects *[]interface{} `json:"objects,omitempty"` + } +} + +// Status returns HTTPResponse.Status +func (r DeleteOrderPosResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r DeleteOrderPosResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetOrderPositionByIdResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + Objects *[]ModelOrderPosResponse `json:"objects,omitempty"` + } +} + +// Status returns HTTPResponse.Status +func (r GetOrderPositionByIdResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetOrderPositionByIdResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type UpdateOrderPositionResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *ModelOrderPosResponse +} + +// Status returns HTTPResponse.Status +func (r UpdateOrderPositionResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r UpdateOrderPositionResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetPartsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + Objects *[]ModelPart `json:"objects,omitempty"` + } +} + +// Status returns HTTPResponse.Status +func (r GetPartsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetPartsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type CreatePartResponse struct { + Body []byte + HTTPResponse *http.Response + JSON201 *ModelPart +} + +// Status returns HTTPResponse.Status +func (r CreatePartResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r CreatePartResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetPartByIdResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + Objects *[]ModelPart `json:"objects,omitempty"` + } +} + +// Status returns HTTPResponse.Status +func (r GetPartByIdResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetPartByIdResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type UpdatePartResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *ModelPart +} + +// Status returns HTTPResponse.Status +func (r UpdatePartResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r UpdatePartResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PartGetStockResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + // Objects Stock amount + Objects *int `json:"objects,omitempty"` + } +} + +// Status returns HTTPResponse.Status +func (r PartGetStockResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PartGetStockResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type ForAccountNumberResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + Objects *[]ReceiptGuideDto `json:"objects,omitempty"` + } +} + +// Status returns HTTPResponse.Status +func (r ForAccountNumberResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r ForAccountNumberResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type ForAllAccountsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + Objects *[]ReceiptGuideDto `json:"objects,omitempty"` + } +} + +// Status returns HTTPResponse.Status +func (r ForAllAccountsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r ForAllAccountsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type ForExpenseResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + Objects *[]ReceiptGuideDto `json:"objects,omitempty"` + } +} + +// Status returns HTTPResponse.Status +func (r ForExpenseResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r ForExpenseResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type ForRevenueResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + Objects *[]ReceiptGuideDto `json:"objects,omitempty"` + } +} + +// Status returns HTTPResponse.Status +func (r ForRevenueResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r ForRevenueResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type ForTaxRuleResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + Objects *[]ReceiptGuideDto `json:"objects,omitempty"` + } +} + +// Status returns HTTPResponse.Status +func (r ForTaxRuleResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r ForTaxRuleResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type ReportContactResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + Objects *struct { + Base64Encoded *bool `json:"base64Encoded,omitempty"` + Content *string `json:"content,omitempty"` + Filename *string `json:"filename,omitempty"` + Mimetype *string `json:"mimetype,omitempty"` + } `json:"objects,omitempty"` + } +} + +// Status returns HTTPResponse.Status +func (r ReportContactResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r ReportContactResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type ReportInvoiceResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + Objects *struct { + Base64Encoded *bool `json:"base64Encoded,omitempty"` + Content *string `json:"content,omitempty"` + Filename *string `json:"filename,omitempty"` + Mimetype *string `json:"mimetype,omitempty"` + } `json:"objects,omitempty"` + } +} + +// Status returns HTTPResponse.Status +func (r ReportInvoiceResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r ReportInvoiceResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type ReportOrderResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + Objects *struct { + Base64Encoded *bool `json:"base64Encoded,omitempty"` + Content *string `json:"content,omitempty"` + Filename *string `json:"filename,omitempty"` + Mimetype *string `json:"mimetype,omitempty"` + } `json:"objects,omitempty"` + } +} + +// Status returns HTTPResponse.Status +func (r ReportOrderResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r ReportOrderResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type ReportVoucherResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + Objects *struct { + Base64Encoded *bool `json:"base64Encoded,omitempty"` + Content *string `json:"content,omitempty"` + Filename *string `json:"filename,omitempty"` + Mimetype *string `json:"mimetype,omitempty"` + } `json:"objects,omitempty"` + } +} + +// Status returns HTTPResponse.Status +func (r ReportVoucherResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r ReportVoucherResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type UpdateExportConfigResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + Objects *interface{} `json:"objects,omitempty"` + } +} + +// Status returns HTTPResponse.Status +func (r UpdateExportConfigResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r UpdateExportConfigResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetTagsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + Objects *[]ModelTagResponse `json:"objects,omitempty"` + } +} + +// Status returns HTTPResponse.Status +func (r GetTagsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetTagsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type CreateTagResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *ModelTagCreateResponse +} + +// Status returns HTTPResponse.Status +func (r CreateTagResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r CreateTagResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type DeleteTagResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + Objects *[]interface{} `json:"objects,omitempty"` + } +} + +// Status returns HTTPResponse.Status +func (r DeleteTagResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r DeleteTagResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetTagByIdResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + Objects *[]ModelTagResponse `json:"objects,omitempty"` + } +} + +// Status returns HTTPResponse.Status +func (r GetTagByIdResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetTagByIdResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type UpdateTagResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *ModelTagResponse +} + +// Status returns HTTPResponse.Status +func (r UpdateTagResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r UpdateTagResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetTagRelationsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + Objects *[]ModelTagCreateResponse `json:"objects,omitempty"` + } +} + +// Status returns HTTPResponse.Status +func (r GetTagRelationsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetTagRelationsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetPlaceholderResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + Objects *[]ModelTextparserFetchDictionaryEntriesByTypeResponse `json:"objects,omitempty"` + } +} + +// Status returns HTTPResponse.Status +func (r GetPlaceholderResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetPlaceholderResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type BookkeepingSystemVersionResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + Objects *struct { + Version *BookkeepingSystemVersion200ObjectsVersion `json:"version,omitempty"` + } `json:"objects,omitempty"` + } +} +type BookkeepingSystemVersion200ObjectsVersion string + +// Status returns HTTPResponse.Status +func (r BookkeepingSystemVersionResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r BookkeepingSystemVersionResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetVouchersResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + Objects *[]ModelVoucherResponse `json:"objects,omitempty"` + } +} + +// Status returns HTTPResponse.Status +func (r GetVouchersResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetVouchersResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type VoucherFactorySaveVoucherResponse struct { + Body []byte + HTTPResponse *http.Response + JSON201 *SaveVoucherResponse + JSON422 *ValidationError +} + +// Status returns HTTPResponse.Status +func (r VoucherFactorySaveVoucherResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r VoucherFactorySaveVoucherResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type VoucherUploadFileResponse struct { + Body []byte + HTTPResponse *http.Response + JSON201 *struct { + Objects *struct { + Content *[]interface{} `json:"content,omitempty"` + ContentHash *string `json:"contentHash,omitempty"` + Filename *string `json:"filename,omitempty"` + MimeType *string `json:"mimeType,omitempty"` + OriginMimeType *string `json:"originMimeType,omitempty"` + Pages *float32 `json:"pages,omitempty"` + } `json:"objects,omitempty"` + } +} + +// Status returns HTTPResponse.Status +func (r VoucherUploadFileResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r VoucherUploadFileResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetVoucherByIdResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + Objects *[]ModelVoucherResponse `json:"objects,omitempty"` + } +} + +// Status returns HTTPResponse.Status +func (r GetVoucherByIdResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetVoucherByIdResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type UpdateVoucherResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *ModelVoucherResponse +} + +// Status returns HTTPResponse.Status +func (r UpdateVoucherResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r UpdateVoucherResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type BookVoucherResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + AdditionalInformation *string `json:"additionalInformation,omitempty"` + AmmountPayed *string `json:"ammountPayed,omitempty"` + BookingDate *time.Time `json:"bookingDate,omitempty"` + + // Create Date of email creation + Create *time.Time `json:"create,omitempty"` + CreditNote *struct { + // Id The id of the voucher + Id int `json:"id"` + + // ObjectName Internal object name which is 'Voucher'. + ObjectName string `json:"objectName"` + } `json:"creditNote,omitempty"` + FromStatus *string `json:"fromStatus,omitempty"` + Id *string `json:"id,omitempty"` + ObjectName *string `json:"objectName,omitempty"` + + // SevClient Client to which invoice belongs. Will be filled automatically + SevClient *struct { + // Id Unique identifier of the client + Id int `json:"id"` + + // ObjectName Model name, which is 'SevClient' + ObjectName string `json:"objectName"` + } `json:"sevClient,omitempty"` + ToStatus *string `json:"toStatus,omitempty"` + } +} + +// Status returns HTTPResponse.Status +func (r BookVoucherResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r BookVoucherResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type VoucherEnshrineResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + Objects *interface{} `json:"objects,omitempty"` + } + JSON422 *ValidationError +} + +// Status returns HTTPResponse.Status +func (r VoucherEnshrineResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r VoucherEnshrineResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type VoucherResetToDraftResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + Objects *struct { + // CostCentre Cost centre for the voucher + CostCentre *struct { + // Id Unique identifier of the cost centre + Id string `json:"id"` + + // ObjectName Model name, which is 'CostCentre' + ObjectName string `json:"objectName"` + } `json:"costCentre,omitempty"` + + // Create Date of voucher creation + Create *time.Time `json:"create,omitempty"` + + // CreateUser User who created the voucher. Will be filled automatically. + CreateUser *struct { + // Id Unique identifier of the user + Id string `json:"id"` + + // ObjectName Model name, which is 'SevUser' + ObjectName string `json:"objectName"` + } `json:"createUser,omitempty"` + + // CreditDebit Defines if your voucher is a credit (C) or debit (D) + CreditDebit *VoucherResetToDraft200ObjectsCreditDebit `json:"creditDebit"` + + // Currency specifies which currency the voucher should have. Attention: If the currency differs from the default currency stored in the account, then either the "propertyForeignCurrencyDeadline" or "propertyExchangeRate" parameter must be specified. If both parameters are specified, then the "propertyForeignCurrencyDeadline" parameter is preferred + Currency *string `json:"currency"` + + // DeliveryDate Needs to be provided as timestamp or dd.mm.yyyy + DeliveryDate *time.Time `json:"deliveryDate,omitempty"` + + // DeliveryDateUntil Needs to be provided as timestamp or dd.mm.yyyy + DeliveryDateUntil *time.Time `json:"deliveryDateUntil"` + + // Description The description of the voucher. Essentially the voucher number. + Description *string `json:"description"` + + // Document The document of the voucher. + Document *struct { + // Id Unique identifier of the document + Id string `json:"id"` + + // ObjectName Model name, which is 'Document' + ObjectName string `json:"objectName"` + } `json:"document"` + + // Enshrined Enshrined vouchers cannot be changed. Can only be set via [Voucher/{voucherId}/enshrine](#tag/Voucher/operation/voucherEnshrine). This operation cannot be undone. + Enshrined *time.Time `json:"enshrined,omitempty"` + + // Id The voucher id + Id *string `json:"id,omitempty"` + MapAll *bool `json:"mapAll,omitempty"` + + // ObjectName The voucher object name + ObjectName *string `json:"objectName,omitempty"` + + // PaidAmount Amount which has already been paid for this voucher by the customer + PaidAmount *float32 `json:"paidAmount"` + + // PayDate Needs to be timestamp or dd.mm.yyyy + PayDate *time.Time `json:"payDate"` + + // PaymentDeadline Payment deadline of the voucher. + PaymentDeadline *time.Time `json:"paymentDeadline"` + + // PropertyExchangeRate Defines the exchange rate + PropertyExchangeRate *string `json:"propertyExchangeRate"` + + // PropertyForeignCurrencyDeadline Defines the exchange rate day and and then the exchange rate is set from sevdesk. Needs to be provided as timestamp or dd.mm.yyyy + PropertyForeignCurrencyDeadline *time.Time `json:"propertyForeignCurrencyDeadline"` + + // RecurringEndDate The date when the recurring vouchers end being generated.
+ // Necessary attribute for all recurring vouchers. + RecurringEndDate *time.Time `json:"recurringEndDate"` + + // RecurringInterval The DateInterval in which recurring vouchers are generated.
+ // Necessary attribute for all recurring vouchers. + RecurringInterval *VoucherResetToDraft200ObjectsRecurringInterval `json:"recurringInterval"` + + // RecurringLastVoucher The date when the last voucher was generated. + RecurringLastVoucher *time.Time `json:"recurringLastVoucher"` + + // RecurringNextVoucher The date when the next voucher should be generated.
+ // Necessary attribute for all recurring vouchers. + RecurringNextVoucher *time.Time `json:"recurringNextVoucher"` + + // RecurringStartDate The date when the recurring vouchers start being generated.
+ // Necessary attribute for all recurring vouchers. + RecurringStartDate *time.Time `json:"recurringStartDate"` + + // SevClient Client to which voucher belongs. Will be filled automatically + SevClient *struct { + // Id Unique identifier of the client + Id string `json:"id"` + + // ObjectName Model name, which is 'SevClient' + ObjectName string `json:"objectName"` + } `json:"sevClient,omitempty"` + Status *interface{} `json:"status,omitempty"` + + // SumDiscounts Sum of all discounts in the voucher + SumDiscounts *string `json:"sumDiscounts,omitempty"` + + // SumDiscountsForeignCurrency Discounts sum of the voucher in the foreign currency + SumDiscountsForeignCurrency *string `json:"sumDiscountsForeignCurrency,omitempty"` + + // SumGross Gross sum of the voucher + SumGross *string `json:"sumGross,omitempty"` + + // SumGrossAccounting Gross accounting sum of the voucher. Is usually the same as sumGross + SumGrossAccounting *string `json:"sumGrossAccounting,omitempty"` + + // SumNet Net sum of the voucher + SumNet *string `json:"sumNet,omitempty"` + + // SumNetAccounting Net accounting sum of the voucher. Is usually the same as sumNet + SumNetAccounting *string `json:"sumNetAccounting,omitempty"` + + // SumTax Tax sum of the voucher + SumTax *string `json:"sumTax,omitempty"` + + // SumTaxAccounting Tax accounting sum of the voucher. Is usually the same as sumTax + SumTaxAccounting *string `json:"sumTaxAccounting,omitempty"` + + // Supplier The contact used in the voucher as a supplier.
+ // If you don't have a contact as a supplier, you can set this object to null. + Supplier *struct { + // Id Unique identifier of the contact + Id string `json:"id"` + + // ObjectName Model name, which is 'Contact' + ObjectName string `json:"objectName"` + } `json:"supplier"` + + // SupplierName The supplier name.
+ // The value you provide here will determine what supplier name is shown for the voucher in case you did not provide a supplier. + SupplierName *string `json:"supplierName"` + + // TaxRule **Use this in sevdesk-Update 2.0 (replaces taxType / taxSet).** + TaxRule *struct { + // Id **Use this in sevdesk-Update 2.0 (replaces taxType / taxSet).** + // + // Defines the vat-regulation. + // For "Regelbesteuerung" it can be one of: + // - `1` - Umsatzsteuerpflichtige Umsätze (tax rates: 0.0, 7.0, 19.0) - replaces `"taxType": "default"` + // - `2` - Ausfuhren (tax rates: 0.0) + // - `3` - Innergemeinschaftliche Lieferungen (tax rates: 0.0, 7.0, 19.0) - replaces `"taxType": "eu"` + // - `4` - Steuerfreie Umsätze §4 UStG (tax rates: 0.0) + // - `5` - Reverse Charge gem. §13b UStG (tax rates: 0.0) + // + // For small business owner ("Kleinunternehmer") it can be: + // - `11` - Steuer nicht erhoben nach §19UStG (tax rates: 0.0) - replaces `"taxType": "ss"` + Id VoucherResetToDraft200ObjectsTaxRuleId `json:"id"` + + // ObjectName Name of the object. Must always be TaxRule + ObjectName VoucherResetToDraft200ObjectsTaxRuleObjectName `json:"objectName"` + } `json:"taxRule,omitempty"` + + // TaxSet **Use this in sevdesk-Update 2.0 (replaces taxType / taxSet).** + // + // Tax set of the voucher. Needs to be added if you chose the taxType=custom. + TaxSet *struct { + // Id Unique identifier of the object + Id string `json:"id"` + + // ObjectName Model name, which is 'TaxSet' + ObjectName string `json:"objectName"` + } `json:"taxSet"` + + // TaxType **Use this in sevdesk-Update 1.0 (instead of taxRule).** + // + // Tax type of the voucher. + // There are four tax types: + // 1. default - Umsatzsteuer ausweisen + // 2. eu - Steuerfreie innergemeinschaftliche Lieferung (Europäische Union) + // 3. noteu - Steuerschuldnerschaft des Leistungsempfängers (außerhalb EU, z. B. Schweiz) + // 4. custom - Using custom tax set + // 5. ss - Not subject to VAT according to §19 1 UStG + // Tax rates are heavily connected to the tax type used. + TaxType *string `json:"taxType"` + + // Update Date of last voucher update + Update *time.Time `json:"update,omitempty"` + + // VoucherDate Needs to be provided as timestamp or dd.mm.yyyy + VoucherDate *time.Time `json:"voucherDate"` + + // VoucherType Type of the voucher. For more information on the different types, check + // this + VoucherType *VoucherResetToDraft200ObjectsVoucherType `json:"voucherType"` + } `json:"objects,omitempty"` + } + JSON422 *ValidationError +} +type VoucherResetToDraft200ObjectsCreditDebit string +type VoucherResetToDraft200ObjectsRecurringInterval string +type VoucherResetToDraft200ObjectsTaxRuleId string +type VoucherResetToDraft200ObjectsTaxRuleObjectName string +type VoucherResetToDraft200ObjectsVoucherType string + +// Status returns HTTPResponse.Status +func (r VoucherResetToDraftResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r VoucherResetToDraftResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type VoucherResetToOpenResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + Objects *struct { + // CostCentre Cost centre for the voucher + CostCentre *struct { + // Id Unique identifier of the cost centre + Id string `json:"id"` + + // ObjectName Model name, which is 'CostCentre' + ObjectName string `json:"objectName"` + } `json:"costCentre,omitempty"` + + // Create Date of voucher creation + Create *time.Time `json:"create,omitempty"` + + // CreateUser User who created the voucher. Will be filled automatically. + CreateUser *struct { + // Id Unique identifier of the user + Id string `json:"id"` + + // ObjectName Model name, which is 'SevUser' + ObjectName string `json:"objectName"` + } `json:"createUser,omitempty"` + + // CreditDebit Defines if your voucher is a credit (C) or debit (D) + CreditDebit *VoucherResetToOpen200ObjectsCreditDebit `json:"creditDebit"` + + // Currency specifies which currency the voucher should have. Attention: If the currency differs from the default currency stored in the account, then either the "propertyForeignCurrencyDeadline" or "propertyExchangeRate" parameter must be specified. If both parameters are specified, then the "propertyForeignCurrencyDeadline" parameter is preferred + Currency *string `json:"currency"` + + // DeliveryDate Needs to be provided as timestamp or dd.mm.yyyy + DeliveryDate *time.Time `json:"deliveryDate,omitempty"` + + // DeliveryDateUntil Needs to be provided as timestamp or dd.mm.yyyy + DeliveryDateUntil *time.Time `json:"deliveryDateUntil"` + + // Description The description of the voucher. Essentially the voucher number. + Description *string `json:"description"` + + // Document The document of the voucher. + Document *struct { + // Id Unique identifier of the document + Id string `json:"id"` + + // ObjectName Model name, which is 'Document' + ObjectName string `json:"objectName"` + } `json:"document"` + + // Enshrined Enshrined vouchers cannot be changed. Can only be set via [Voucher/{voucherId}/enshrine](#tag/Voucher/operation/voucherEnshrine). This operation cannot be undone. + Enshrined *time.Time `json:"enshrined,omitempty"` + + // Id The voucher id + Id *string `json:"id,omitempty"` + MapAll *bool `json:"mapAll,omitempty"` + + // ObjectName The voucher object name + ObjectName *string `json:"objectName,omitempty"` + + // PaidAmount Amount which has already been paid for this voucher by the customer + PaidAmount *float32 `json:"paidAmount"` + + // PayDate Needs to be timestamp or dd.mm.yyyy + PayDate *time.Time `json:"payDate"` + + // PaymentDeadline Payment deadline of the voucher. + PaymentDeadline *time.Time `json:"paymentDeadline"` + + // PropertyExchangeRate Defines the exchange rate + PropertyExchangeRate *string `json:"propertyExchangeRate"` + + // PropertyForeignCurrencyDeadline Defines the exchange rate day and and then the exchange rate is set from sevdesk. Needs to be provided as timestamp or dd.mm.yyyy + PropertyForeignCurrencyDeadline *time.Time `json:"propertyForeignCurrencyDeadline"` + + // RecurringEndDate The date when the recurring vouchers end being generated.
+ // Necessary attribute for all recurring vouchers. + RecurringEndDate *time.Time `json:"recurringEndDate"` + + // RecurringInterval The DateInterval in which recurring vouchers are generated.
+ // Necessary attribute for all recurring vouchers. + RecurringInterval *VoucherResetToOpen200ObjectsRecurringInterval `json:"recurringInterval"` + + // RecurringLastVoucher The date when the last voucher was generated. + RecurringLastVoucher *time.Time `json:"recurringLastVoucher"` + + // RecurringNextVoucher The date when the next voucher should be generated.
+ // Necessary attribute for all recurring vouchers. + RecurringNextVoucher *time.Time `json:"recurringNextVoucher"` + + // RecurringStartDate The date when the recurring vouchers start being generated.
+ // Necessary attribute for all recurring vouchers. + RecurringStartDate *time.Time `json:"recurringStartDate"` + + // SevClient Client to which voucher belongs. Will be filled automatically + SevClient *struct { + // Id Unique identifier of the client + Id string `json:"id"` + + // ObjectName Model name, which is 'SevClient' + ObjectName string `json:"objectName"` + } `json:"sevClient,omitempty"` + Status *interface{} `json:"status,omitempty"` + + // SumDiscounts Sum of all discounts in the voucher + SumDiscounts *string `json:"sumDiscounts,omitempty"` + + // SumDiscountsForeignCurrency Discounts sum of the voucher in the foreign currency + SumDiscountsForeignCurrency *string `json:"sumDiscountsForeignCurrency,omitempty"` + + // SumGross Gross sum of the voucher + SumGross *string `json:"sumGross,omitempty"` + + // SumGrossAccounting Gross accounting sum of the voucher. Is usually the same as sumGross + SumGrossAccounting *string `json:"sumGrossAccounting,omitempty"` + + // SumNet Net sum of the voucher + SumNet *string `json:"sumNet,omitempty"` + + // SumNetAccounting Net accounting sum of the voucher. Is usually the same as sumNet + SumNetAccounting *string `json:"sumNetAccounting,omitempty"` + + // SumTax Tax sum of the voucher + SumTax *string `json:"sumTax,omitempty"` + + // SumTaxAccounting Tax accounting sum of the voucher. Is usually the same as sumTax + SumTaxAccounting *string `json:"sumTaxAccounting,omitempty"` + + // Supplier The contact used in the voucher as a supplier.
+ // If you don't have a contact as a supplier, you can set this object to null. + Supplier *struct { + // Id Unique identifier of the contact + Id string `json:"id"` + + // ObjectName Model name, which is 'Contact' + ObjectName string `json:"objectName"` + } `json:"supplier"` + + // SupplierName The supplier name.
+ // The value you provide here will determine what supplier name is shown for the voucher in case you did not provide a supplier. + SupplierName *string `json:"supplierName"` + + // TaxRule **Use this in sevdesk-Update 2.0 (replaces taxType / taxSet).** + TaxRule *struct { + // Id **Use this in sevdesk-Update 2.0 (replaces taxType / taxSet).** + // + // Defines the vat-regulation. + // For "Regelbesteuerung" it can be one of: + // - `1` - Umsatzsteuerpflichtige Umsätze (tax rates: 0.0, 7.0, 19.0) - replaces `"taxType": "default"` + // - `2` - Ausfuhren (tax rates: 0.0) + // - `3` - Innergemeinschaftliche Lieferungen (tax rates: 0.0, 7.0, 19.0) - replaces `"taxType": "eu"` + // - `4` - Steuerfreie Umsätze §4 UStG (tax rates: 0.0) + // - `5` - Reverse Charge gem. §13b UStG (tax rates: 0.0) + // + // For small business owner ("Kleinunternehmer") it can be: + // - `11` - Steuer nicht erhoben nach §19UStG (tax rates: 0.0) - replaces `"taxType": "ss"` + Id VoucherResetToOpen200ObjectsTaxRuleId `json:"id"` + + // ObjectName Name of the object. Must always be TaxRule + ObjectName VoucherResetToOpen200ObjectsTaxRuleObjectName `json:"objectName"` + } `json:"taxRule,omitempty"` + + // TaxSet **Use this in sevdesk-Update 2.0 (replaces taxType / taxSet).** + // + // Tax set of the voucher. Needs to be added if you chose the taxType=custom. + TaxSet *struct { + // Id Unique identifier of the object + Id string `json:"id"` + + // ObjectName Model name, which is 'TaxSet' + ObjectName string `json:"objectName"` + } `json:"taxSet"` + + // TaxType **Use this in sevdesk-Update 1.0 (instead of taxRule).** + // + // Tax type of the voucher. + // There are four tax types: + // 1. default - Umsatzsteuer ausweisen + // 2. eu - Steuerfreie innergemeinschaftliche Lieferung (Europäische Union) + // 3. noteu - Steuerschuldnerschaft des Leistungsempfängers (außerhalb EU, z. B. Schweiz) + // 4. custom - Using custom tax set + // 5. ss - Not subject to VAT according to §19 1 UStG + // Tax rates are heavily connected to the tax type used. + TaxType *string `json:"taxType"` + + // Update Date of last voucher update + Update *time.Time `json:"update,omitempty"` + + // VoucherDate Needs to be provided as timestamp or dd.mm.yyyy + VoucherDate *time.Time `json:"voucherDate"` + + // VoucherType Type of the voucher. For more information on the different types, check + // this + VoucherType *VoucherResetToOpen200ObjectsVoucherType `json:"voucherType"` + } `json:"objects,omitempty"` + } + JSON422 *ValidationError +} +type VoucherResetToOpen200ObjectsCreditDebit string +type VoucherResetToOpen200ObjectsRecurringInterval string +type VoucherResetToOpen200ObjectsTaxRuleId string +type VoucherResetToOpen200ObjectsTaxRuleObjectName string +type VoucherResetToOpen200ObjectsVoucherType string + +// Status returns HTTPResponse.Status +func (r VoucherResetToOpenResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r VoucherResetToOpenResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetVoucherPositionsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + Objects *[]ModelVoucherPosResponse `json:"objects,omitempty"` + } +} + +// Status returns HTTPResponse.Status +func (r GetVoucherPositionsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetVoucherPositionsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +// GetAccountingContactWithResponse request returning *GetAccountingContactResponse +func (c *ClientWithResponses) GetAccountingContactWithResponse(ctx context.Context, params *GetAccountingContactParams, reqEditors ...RequestEditorFn) (*GetAccountingContactResponse, error) { + rsp, err := c.GetAccountingContact(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetAccountingContactResponse(rsp) +} + +// CreateAccountingContactWithBodyWithResponse request with arbitrary body returning *CreateAccountingContactResponse +func (c *ClientWithResponses) CreateAccountingContactWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateAccountingContactResponse, error) { + rsp, err := c.CreateAccountingContactWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreateAccountingContactResponse(rsp) +} + +func (c *ClientWithResponses) CreateAccountingContactWithResponse(ctx context.Context, body CreateAccountingContactJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateAccountingContactResponse, error) { + rsp, err := c.CreateAccountingContact(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreateAccountingContactResponse(rsp) +} + +// DeleteAccountingContactWithResponse request returning *DeleteAccountingContactResponse +func (c *ClientWithResponses) DeleteAccountingContactWithResponse(ctx context.Context, accountingContactId int, reqEditors ...RequestEditorFn) (*DeleteAccountingContactResponse, error) { + rsp, err := c.DeleteAccountingContact(ctx, accountingContactId, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeleteAccountingContactResponse(rsp) +} + +// GetAccountingContactByIdWithResponse request returning *GetAccountingContactByIdResponse +func (c *ClientWithResponses) GetAccountingContactByIdWithResponse(ctx context.Context, accountingContactId int, reqEditors ...RequestEditorFn) (*GetAccountingContactByIdResponse, error) { + rsp, err := c.GetAccountingContactById(ctx, accountingContactId, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetAccountingContactByIdResponse(rsp) +} + +// UpdateAccountingContactWithBodyWithResponse request with arbitrary body returning *UpdateAccountingContactResponse +func (c *ClientWithResponses) UpdateAccountingContactWithBodyWithResponse(ctx context.Context, accountingContactId int, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateAccountingContactResponse, error) { + rsp, err := c.UpdateAccountingContactWithBody(ctx, accountingContactId, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseUpdateAccountingContactResponse(rsp) +} + +func (c *ClientWithResponses) UpdateAccountingContactWithResponse(ctx context.Context, accountingContactId int, body UpdateAccountingContactJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateAccountingContactResponse, error) { + rsp, err := c.UpdateAccountingContact(ctx, accountingContactId, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseUpdateAccountingContactResponse(rsp) +} + +// GetCheckAccountsWithResponse request returning *GetCheckAccountsResponse +func (c *ClientWithResponses) GetCheckAccountsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetCheckAccountsResponse, error) { + rsp, err := c.GetCheckAccounts(ctx, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetCheckAccountsResponse(rsp) +} + +// CreateCheckAccountWithBodyWithResponse request with arbitrary body returning *CreateCheckAccountResponse +func (c *ClientWithResponses) CreateCheckAccountWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateCheckAccountResponse, error) { + rsp, err := c.CreateCheckAccountWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreateCheckAccountResponse(rsp) +} + +func (c *ClientWithResponses) CreateCheckAccountWithResponse(ctx context.Context, body CreateCheckAccountJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateCheckAccountResponse, error) { + rsp, err := c.CreateCheckAccount(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreateCheckAccountResponse(rsp) +} + +// CreateClearingAccountWithBodyWithResponse request with arbitrary body returning *CreateClearingAccountResponse +func (c *ClientWithResponses) CreateClearingAccountWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateClearingAccountResponse, error) { + rsp, err := c.CreateClearingAccountWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreateClearingAccountResponse(rsp) +} + +func (c *ClientWithResponses) CreateClearingAccountWithResponse(ctx context.Context, body CreateClearingAccountJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateClearingAccountResponse, error) { + rsp, err := c.CreateClearingAccount(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreateClearingAccountResponse(rsp) +} + +// CreateFileImportAccountWithBodyWithResponse request with arbitrary body returning *CreateFileImportAccountResponse +func (c *ClientWithResponses) CreateFileImportAccountWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateFileImportAccountResponse, error) { + rsp, err := c.CreateFileImportAccountWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreateFileImportAccountResponse(rsp) +} + +func (c *ClientWithResponses) CreateFileImportAccountWithResponse(ctx context.Context, body CreateFileImportAccountJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateFileImportAccountResponse, error) { + rsp, err := c.CreateFileImportAccount(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreateFileImportAccountResponse(rsp) +} + +// DeleteCheckAccountWithResponse request returning *DeleteCheckAccountResponse +func (c *ClientWithResponses) DeleteCheckAccountWithResponse(ctx context.Context, checkAccountId int, reqEditors ...RequestEditorFn) (*DeleteCheckAccountResponse, error) { + rsp, err := c.DeleteCheckAccount(ctx, checkAccountId, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeleteCheckAccountResponse(rsp) +} + +// GetCheckAccountByIdWithResponse request returning *GetCheckAccountByIdResponse +func (c *ClientWithResponses) GetCheckAccountByIdWithResponse(ctx context.Context, checkAccountId int, reqEditors ...RequestEditorFn) (*GetCheckAccountByIdResponse, error) { + rsp, err := c.GetCheckAccountById(ctx, checkAccountId, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetCheckAccountByIdResponse(rsp) +} + +// UpdateCheckAccountWithBodyWithResponse request with arbitrary body returning *UpdateCheckAccountResponse +func (c *ClientWithResponses) UpdateCheckAccountWithBodyWithResponse(ctx context.Context, checkAccountId int, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateCheckAccountResponse, error) { + rsp, err := c.UpdateCheckAccountWithBody(ctx, checkAccountId, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseUpdateCheckAccountResponse(rsp) +} + +func (c *ClientWithResponses) UpdateCheckAccountWithResponse(ctx context.Context, checkAccountId int, body UpdateCheckAccountJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateCheckAccountResponse, error) { + rsp, err := c.UpdateCheckAccount(ctx, checkAccountId, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseUpdateCheckAccountResponse(rsp) +} + +// GetBalanceAtDateWithResponse request returning *GetBalanceAtDateResponse +func (c *ClientWithResponses) GetBalanceAtDateWithResponse(ctx context.Context, checkAccountId int, params *GetBalanceAtDateParams, reqEditors ...RequestEditorFn) (*GetBalanceAtDateResponse, error) { + rsp, err := c.GetBalanceAtDate(ctx, checkAccountId, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetBalanceAtDateResponse(rsp) +} + +// GetTransactionsWithResponse request returning *GetTransactionsResponse +func (c *ClientWithResponses) GetTransactionsWithResponse(ctx context.Context, params *GetTransactionsParams, reqEditors ...RequestEditorFn) (*GetTransactionsResponse, error) { + rsp, err := c.GetTransactions(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetTransactionsResponse(rsp) +} + +// CreateTransactionWithBodyWithResponse request with arbitrary body returning *CreateTransactionResponse +func (c *ClientWithResponses) CreateTransactionWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateTransactionResponse, error) { + rsp, err := c.CreateTransactionWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreateTransactionResponse(rsp) +} + +func (c *ClientWithResponses) CreateTransactionWithResponse(ctx context.Context, body CreateTransactionJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateTransactionResponse, error) { + rsp, err := c.CreateTransaction(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreateTransactionResponse(rsp) +} + +// DeleteCheckAccountTransactionWithResponse request returning *DeleteCheckAccountTransactionResponse +func (c *ClientWithResponses) DeleteCheckAccountTransactionWithResponse(ctx context.Context, checkAccountTransactionId int, reqEditors ...RequestEditorFn) (*DeleteCheckAccountTransactionResponse, error) { + rsp, err := c.DeleteCheckAccountTransaction(ctx, checkAccountTransactionId, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeleteCheckAccountTransactionResponse(rsp) +} + +// GetCheckAccountTransactionByIdWithResponse request returning *GetCheckAccountTransactionByIdResponse +func (c *ClientWithResponses) GetCheckAccountTransactionByIdWithResponse(ctx context.Context, checkAccountTransactionId int, reqEditors ...RequestEditorFn) (*GetCheckAccountTransactionByIdResponse, error) { + rsp, err := c.GetCheckAccountTransactionById(ctx, checkAccountTransactionId, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetCheckAccountTransactionByIdResponse(rsp) +} + +// UpdateCheckAccountTransactionWithBodyWithResponse request with arbitrary body returning *UpdateCheckAccountTransactionResponse +func (c *ClientWithResponses) UpdateCheckAccountTransactionWithBodyWithResponse(ctx context.Context, checkAccountTransactionId int, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateCheckAccountTransactionResponse, error) { + rsp, err := c.UpdateCheckAccountTransactionWithBody(ctx, checkAccountTransactionId, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseUpdateCheckAccountTransactionResponse(rsp) +} + +func (c *ClientWithResponses) UpdateCheckAccountTransactionWithResponse(ctx context.Context, checkAccountTransactionId int, body UpdateCheckAccountTransactionJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateCheckAccountTransactionResponse, error) { + rsp, err := c.UpdateCheckAccountTransaction(ctx, checkAccountTransactionId, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseUpdateCheckAccountTransactionResponse(rsp) +} + +// CheckAccountTransactionEnshrineWithResponse request returning *CheckAccountTransactionEnshrineResponse +func (c *ClientWithResponses) CheckAccountTransactionEnshrineWithResponse(ctx context.Context, checkAccountTransactionId int, reqEditors ...RequestEditorFn) (*CheckAccountTransactionEnshrineResponse, error) { + rsp, err := c.CheckAccountTransactionEnshrine(ctx, checkAccountTransactionId, reqEditors...) + if err != nil { + return nil, err + } + return ParseCheckAccountTransactionEnshrineResponse(rsp) +} + +// GetCommunicationWaysWithResponse request returning *GetCommunicationWaysResponse +func (c *ClientWithResponses) GetCommunicationWaysWithResponse(ctx context.Context, params *GetCommunicationWaysParams, reqEditors ...RequestEditorFn) (*GetCommunicationWaysResponse, error) { + rsp, err := c.GetCommunicationWays(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetCommunicationWaysResponse(rsp) +} + +// CreateCommunicationWayWithBodyWithResponse request with arbitrary body returning *CreateCommunicationWayResponse +func (c *ClientWithResponses) CreateCommunicationWayWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateCommunicationWayResponse, error) { + rsp, err := c.CreateCommunicationWayWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreateCommunicationWayResponse(rsp) +} + +func (c *ClientWithResponses) CreateCommunicationWayWithResponse(ctx context.Context, body CreateCommunicationWayJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateCommunicationWayResponse, error) { + rsp, err := c.CreateCommunicationWay(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreateCommunicationWayResponse(rsp) +} + +// DeleteCommunicationWayWithResponse request returning *DeleteCommunicationWayResponse +func (c *ClientWithResponses) DeleteCommunicationWayWithResponse(ctx context.Context, communicationWayId int, reqEditors ...RequestEditorFn) (*DeleteCommunicationWayResponse, error) { + rsp, err := c.DeleteCommunicationWay(ctx, communicationWayId, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeleteCommunicationWayResponse(rsp) +} + +// GetCommunicationWayByIdWithResponse request returning *GetCommunicationWayByIdResponse +func (c *ClientWithResponses) GetCommunicationWayByIdWithResponse(ctx context.Context, communicationWayId int, reqEditors ...RequestEditorFn) (*GetCommunicationWayByIdResponse, error) { + rsp, err := c.GetCommunicationWayById(ctx, communicationWayId, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetCommunicationWayByIdResponse(rsp) +} + +// UpdateCommunicationWayWithBodyWithResponse request with arbitrary body returning *UpdateCommunicationWayResponse +func (c *ClientWithResponses) UpdateCommunicationWayWithBodyWithResponse(ctx context.Context, communicationWayId int, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateCommunicationWayResponse, error) { + rsp, err := c.UpdateCommunicationWayWithBody(ctx, communicationWayId, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseUpdateCommunicationWayResponse(rsp) +} + +func (c *ClientWithResponses) UpdateCommunicationWayWithResponse(ctx context.Context, communicationWayId int, body UpdateCommunicationWayJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateCommunicationWayResponse, error) { + rsp, err := c.UpdateCommunicationWay(ctx, communicationWayId, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseUpdateCommunicationWayResponse(rsp) +} + +// GetCommunicationWayKeysWithResponse request returning *GetCommunicationWayKeysResponse +func (c *ClientWithResponses) GetCommunicationWayKeysWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetCommunicationWayKeysResponse, error) { + rsp, err := c.GetCommunicationWayKeys(ctx, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetCommunicationWayKeysResponse(rsp) +} + +// GetContactsWithResponse request returning *GetContactsResponse +func (c *ClientWithResponses) GetContactsWithResponse(ctx context.Context, params *GetContactsParams, reqEditors ...RequestEditorFn) (*GetContactsResponse, error) { + rsp, err := c.GetContacts(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetContactsResponse(rsp) +} + +// CreateContactWithBodyWithResponse request with arbitrary body returning *CreateContactResponse +func (c *ClientWithResponses) CreateContactWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateContactResponse, error) { + rsp, err := c.CreateContactWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreateContactResponse(rsp) +} + +func (c *ClientWithResponses) CreateContactWithResponse(ctx context.Context, body CreateContactJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateContactResponse, error) { + rsp, err := c.CreateContact(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreateContactResponse(rsp) +} + +// FindContactsByCustomFieldValueWithResponse request returning *FindContactsByCustomFieldValueResponse +func (c *ClientWithResponses) FindContactsByCustomFieldValueWithResponse(ctx context.Context, params *FindContactsByCustomFieldValueParams, reqEditors ...RequestEditorFn) (*FindContactsByCustomFieldValueResponse, error) { + rsp, err := c.FindContactsByCustomFieldValue(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseFindContactsByCustomFieldValueResponse(rsp) +} + +// GetNextCustomerNumberWithResponse request returning *GetNextCustomerNumberResponse +func (c *ClientWithResponses) GetNextCustomerNumberWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetNextCustomerNumberResponse, error) { + rsp, err := c.GetNextCustomerNumber(ctx, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetNextCustomerNumberResponse(rsp) +} + +// ContactCustomerNumberAvailabilityCheckWithResponse request returning *ContactCustomerNumberAvailabilityCheckResponse +func (c *ClientWithResponses) ContactCustomerNumberAvailabilityCheckWithResponse(ctx context.Context, params *ContactCustomerNumberAvailabilityCheckParams, reqEditors ...RequestEditorFn) (*ContactCustomerNumberAvailabilityCheckResponse, error) { + rsp, err := c.ContactCustomerNumberAvailabilityCheck(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseContactCustomerNumberAvailabilityCheckResponse(rsp) +} + +// DeleteContactWithResponse request returning *DeleteContactResponse +func (c *ClientWithResponses) DeleteContactWithResponse(ctx context.Context, contactId int, reqEditors ...RequestEditorFn) (*DeleteContactResponse, error) { + rsp, err := c.DeleteContact(ctx, contactId, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeleteContactResponse(rsp) +} + +// GetContactByIdWithResponse request returning *GetContactByIdResponse +func (c *ClientWithResponses) GetContactByIdWithResponse(ctx context.Context, contactId int, reqEditors ...RequestEditorFn) (*GetContactByIdResponse, error) { + rsp, err := c.GetContactById(ctx, contactId, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetContactByIdResponse(rsp) +} + +// UpdateContactWithBodyWithResponse request with arbitrary body returning *UpdateContactResponse +func (c *ClientWithResponses) UpdateContactWithBodyWithResponse(ctx context.Context, contactId int, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateContactResponse, error) { + rsp, err := c.UpdateContactWithBody(ctx, contactId, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseUpdateContactResponse(rsp) +} + +func (c *ClientWithResponses) UpdateContactWithResponse(ctx context.Context, contactId int, body UpdateContactJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateContactResponse, error) { + rsp, err := c.UpdateContact(ctx, contactId, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseUpdateContactResponse(rsp) +} + +// GetContactTabsItemCountByIdWithResponse request returning *GetContactTabsItemCountByIdResponse +func (c *ClientWithResponses) GetContactTabsItemCountByIdWithResponse(ctx context.Context, contactId int, reqEditors ...RequestEditorFn) (*GetContactTabsItemCountByIdResponse, error) { + rsp, err := c.GetContactTabsItemCountById(ctx, contactId, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetContactTabsItemCountByIdResponse(rsp) +} + +// GetContactAddressesWithResponse request returning *GetContactAddressesResponse +func (c *ClientWithResponses) GetContactAddressesWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetContactAddressesResponse, error) { + rsp, err := c.GetContactAddresses(ctx, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetContactAddressesResponse(rsp) +} + +// CreateContactAddressWithBodyWithResponse request with arbitrary body returning *CreateContactAddressResponse +func (c *ClientWithResponses) CreateContactAddressWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateContactAddressResponse, error) { + rsp, err := c.CreateContactAddressWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreateContactAddressResponse(rsp) +} + +func (c *ClientWithResponses) CreateContactAddressWithResponse(ctx context.Context, body CreateContactAddressJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateContactAddressResponse, error) { + rsp, err := c.CreateContactAddress(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreateContactAddressResponse(rsp) +} + +// DeleteContactAddressWithResponse request returning *DeleteContactAddressResponse +func (c *ClientWithResponses) DeleteContactAddressWithResponse(ctx context.Context, contactAddressId int, reqEditors ...RequestEditorFn) (*DeleteContactAddressResponse, error) { + rsp, err := c.DeleteContactAddress(ctx, contactAddressId, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeleteContactAddressResponse(rsp) +} + +// ContactAddressIdWithResponse request returning *ContactAddressIdResponse +func (c *ClientWithResponses) ContactAddressIdWithResponse(ctx context.Context, contactAddressId int, reqEditors ...RequestEditorFn) (*ContactAddressIdResponse, error) { + rsp, err := c.ContactAddressId(ctx, contactAddressId, reqEditors...) + if err != nil { + return nil, err + } + return ParseContactAddressIdResponse(rsp) +} + +// UpdateContactAddressWithBodyWithResponse request with arbitrary body returning *UpdateContactAddressResponse +func (c *ClientWithResponses) UpdateContactAddressWithBodyWithResponse(ctx context.Context, contactAddressId int, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateContactAddressResponse, error) { + rsp, err := c.UpdateContactAddressWithBody(ctx, contactAddressId, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseUpdateContactAddressResponse(rsp) +} + +func (c *ClientWithResponses) UpdateContactAddressWithResponse(ctx context.Context, contactAddressId int, body UpdateContactAddressJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateContactAddressResponse, error) { + rsp, err := c.UpdateContactAddress(ctx, contactAddressId, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseUpdateContactAddressResponse(rsp) +} + +// GetContactFieldsWithResponse request returning *GetContactFieldsResponse +func (c *ClientWithResponses) GetContactFieldsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetContactFieldsResponse, error) { + rsp, err := c.GetContactFields(ctx, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetContactFieldsResponse(rsp) +} + +// CreateContactFieldWithBodyWithResponse request with arbitrary body returning *CreateContactFieldResponse +func (c *ClientWithResponses) CreateContactFieldWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateContactFieldResponse, error) { + rsp, err := c.CreateContactFieldWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreateContactFieldResponse(rsp) +} + +func (c *ClientWithResponses) CreateContactFieldWithResponse(ctx context.Context, body CreateContactFieldJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateContactFieldResponse, error) { + rsp, err := c.CreateContactField(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreateContactFieldResponse(rsp) +} + +// DeleteContactCustomFieldIdWithResponse request returning *DeleteContactCustomFieldIdResponse +func (c *ClientWithResponses) DeleteContactCustomFieldIdWithResponse(ctx context.Context, contactCustomFieldId int, reqEditors ...RequestEditorFn) (*DeleteContactCustomFieldIdResponse, error) { + rsp, err := c.DeleteContactCustomFieldId(ctx, contactCustomFieldId, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeleteContactCustomFieldIdResponse(rsp) +} + +// GetContactFieldsByIdWithResponse request returning *GetContactFieldsByIdResponse +func (c *ClientWithResponses) GetContactFieldsByIdWithResponse(ctx context.Context, contactCustomFieldId float32, reqEditors ...RequestEditorFn) (*GetContactFieldsByIdResponse, error) { + rsp, err := c.GetContactFieldsById(ctx, contactCustomFieldId, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetContactFieldsByIdResponse(rsp) +} + +// UpdateContactfieldWithBodyWithResponse request with arbitrary body returning *UpdateContactfieldResponse +func (c *ClientWithResponses) UpdateContactfieldWithBodyWithResponse(ctx context.Context, contactCustomFieldId float32, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateContactfieldResponse, error) { + rsp, err := c.UpdateContactfieldWithBody(ctx, contactCustomFieldId, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseUpdateContactfieldResponse(rsp) +} + +func (c *ClientWithResponses) UpdateContactfieldWithResponse(ctx context.Context, contactCustomFieldId float32, body UpdateContactfieldJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateContactfieldResponse, error) { + rsp, err := c.UpdateContactfield(ctx, contactCustomFieldId, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseUpdateContactfieldResponse(rsp) +} + +// GetContactFieldSettingsWithResponse request returning *GetContactFieldSettingsResponse +func (c *ClientWithResponses) GetContactFieldSettingsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetContactFieldSettingsResponse, error) { + rsp, err := c.GetContactFieldSettings(ctx, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetContactFieldSettingsResponse(rsp) +} + +// CreateContactFieldSettingWithBodyWithResponse request with arbitrary body returning *CreateContactFieldSettingResponse +func (c *ClientWithResponses) CreateContactFieldSettingWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateContactFieldSettingResponse, error) { + rsp, err := c.CreateContactFieldSettingWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreateContactFieldSettingResponse(rsp) +} + +func (c *ClientWithResponses) CreateContactFieldSettingWithResponse(ctx context.Context, body CreateContactFieldSettingJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateContactFieldSettingResponse, error) { + rsp, err := c.CreateContactFieldSetting(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreateContactFieldSettingResponse(rsp) +} + +// DeleteContactFieldSettingWithResponse request returning *DeleteContactFieldSettingResponse +func (c *ClientWithResponses) DeleteContactFieldSettingWithResponse(ctx context.Context, contactCustomFieldSettingId int, reqEditors ...RequestEditorFn) (*DeleteContactFieldSettingResponse, error) { + rsp, err := c.DeleteContactFieldSetting(ctx, contactCustomFieldSettingId, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeleteContactFieldSettingResponse(rsp) +} + +// GetContactFieldSettingByIdWithResponse request returning *GetContactFieldSettingByIdResponse +func (c *ClientWithResponses) GetContactFieldSettingByIdWithResponse(ctx context.Context, contactCustomFieldSettingId int, reqEditors ...RequestEditorFn) (*GetContactFieldSettingByIdResponse, error) { + rsp, err := c.GetContactFieldSettingById(ctx, contactCustomFieldSettingId, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetContactFieldSettingByIdResponse(rsp) +} + +// UpdateContactFieldSettingWithBodyWithResponse request with arbitrary body returning *UpdateContactFieldSettingResponse +func (c *ClientWithResponses) UpdateContactFieldSettingWithBodyWithResponse(ctx context.Context, contactCustomFieldSettingId int, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateContactFieldSettingResponse, error) { + rsp, err := c.UpdateContactFieldSettingWithBody(ctx, contactCustomFieldSettingId, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseUpdateContactFieldSettingResponse(rsp) +} + +func (c *ClientWithResponses) UpdateContactFieldSettingWithResponse(ctx context.Context, contactCustomFieldSettingId int, body UpdateContactFieldSettingJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateContactFieldSettingResponse, error) { + rsp, err := c.UpdateContactFieldSetting(ctx, contactCustomFieldSettingId, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseUpdateContactFieldSettingResponse(rsp) +} + +// GetReferenceCountWithResponse request returning *GetReferenceCountResponse +func (c *ClientWithResponses) GetReferenceCountWithResponse(ctx context.Context, contactCustomFieldSettingId int, reqEditors ...RequestEditorFn) (*GetReferenceCountResponse, error) { + rsp, err := c.GetReferenceCount(ctx, contactCustomFieldSettingId, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetReferenceCountResponse(rsp) +} + +// GetCreditNotesWithResponse request returning *GetCreditNotesResponse +func (c *ClientWithResponses) GetCreditNotesWithResponse(ctx context.Context, params *GetCreditNotesParams, reqEditors ...RequestEditorFn) (*GetCreditNotesResponse, error) { + rsp, err := c.GetCreditNotes(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetCreditNotesResponse(rsp) +} + +// CreateCreditNoteFromInvoiceWithBodyWithResponse request with arbitrary body returning *CreateCreditNoteFromInvoiceResponse +func (c *ClientWithResponses) CreateCreditNoteFromInvoiceWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateCreditNoteFromInvoiceResponse, error) { + rsp, err := c.CreateCreditNoteFromInvoiceWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreateCreditNoteFromInvoiceResponse(rsp) +} + +func (c *ClientWithResponses) CreateCreditNoteFromInvoiceWithResponse(ctx context.Context, body CreateCreditNoteFromInvoiceJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateCreditNoteFromInvoiceResponse, error) { + rsp, err := c.CreateCreditNoteFromInvoice(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreateCreditNoteFromInvoiceResponse(rsp) +} + +// CreateCreditNoteFromVoucherWithBodyWithResponse request with arbitrary body returning *CreateCreditNoteFromVoucherResponse +func (c *ClientWithResponses) CreateCreditNoteFromVoucherWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateCreditNoteFromVoucherResponse, error) { + rsp, err := c.CreateCreditNoteFromVoucherWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreateCreditNoteFromVoucherResponse(rsp) +} + +func (c *ClientWithResponses) CreateCreditNoteFromVoucherWithResponse(ctx context.Context, body CreateCreditNoteFromVoucherJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateCreditNoteFromVoucherResponse, error) { + rsp, err := c.CreateCreditNoteFromVoucher(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreateCreditNoteFromVoucherResponse(rsp) +} + +// CreatecreditNoteWithBodyWithResponse request with arbitrary body returning *CreatecreditNoteResponse +func (c *ClientWithResponses) CreatecreditNoteWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreatecreditNoteResponse, error) { + rsp, err := c.CreatecreditNoteWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreatecreditNoteResponse(rsp) +} + +func (c *ClientWithResponses) CreatecreditNoteWithResponse(ctx context.Context, body CreatecreditNoteJSONRequestBody, reqEditors ...RequestEditorFn) (*CreatecreditNoteResponse, error) { + rsp, err := c.CreatecreditNote(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreatecreditNoteResponse(rsp) +} + +// DeletecreditNoteWithResponse request returning *DeletecreditNoteResponse +func (c *ClientWithResponses) DeletecreditNoteWithResponse(ctx context.Context, creditNoteId int, reqEditors ...RequestEditorFn) (*DeletecreditNoteResponse, error) { + rsp, err := c.DeletecreditNote(ctx, creditNoteId, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeletecreditNoteResponse(rsp) +} + +// GetcreditNoteByIdWithResponse request returning *GetcreditNoteByIdResponse +func (c *ClientWithResponses) GetcreditNoteByIdWithResponse(ctx context.Context, creditNoteId int, reqEditors ...RequestEditorFn) (*GetcreditNoteByIdResponse, error) { + rsp, err := c.GetcreditNoteById(ctx, creditNoteId, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetcreditNoteByIdResponse(rsp) +} + +// UpdatecreditNoteWithBodyWithResponse request with arbitrary body returning *UpdatecreditNoteResponse +func (c *ClientWithResponses) UpdatecreditNoteWithBodyWithResponse(ctx context.Context, creditNoteId int, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdatecreditNoteResponse, error) { + rsp, err := c.UpdatecreditNoteWithBody(ctx, creditNoteId, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseUpdatecreditNoteResponse(rsp) +} + +func (c *ClientWithResponses) UpdatecreditNoteWithResponse(ctx context.Context, creditNoteId int, body UpdatecreditNoteJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdatecreditNoteResponse, error) { + rsp, err := c.UpdatecreditNote(ctx, creditNoteId, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseUpdatecreditNoteResponse(rsp) +} + +// BookCreditNoteWithBodyWithResponse request with arbitrary body returning *BookCreditNoteResponse +func (c *ClientWithResponses) BookCreditNoteWithBodyWithResponse(ctx context.Context, creditNoteId int, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*BookCreditNoteResponse, error) { + rsp, err := c.BookCreditNoteWithBody(ctx, creditNoteId, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseBookCreditNoteResponse(rsp) +} + +func (c *ClientWithResponses) BookCreditNoteWithResponse(ctx context.Context, creditNoteId int, body BookCreditNoteJSONRequestBody, reqEditors ...RequestEditorFn) (*BookCreditNoteResponse, error) { + rsp, err := c.BookCreditNote(ctx, creditNoteId, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseBookCreditNoteResponse(rsp) +} + +// UpdateCreditNoteTemplateWithBodyWithResponse request with arbitrary body returning *UpdateCreditNoteTemplateResponse +func (c *ClientWithResponses) UpdateCreditNoteTemplateWithBodyWithResponse(ctx context.Context, creditNoteId int, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateCreditNoteTemplateResponse, error) { + rsp, err := c.UpdateCreditNoteTemplateWithBody(ctx, creditNoteId, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseUpdateCreditNoteTemplateResponse(rsp) +} + +func (c *ClientWithResponses) UpdateCreditNoteTemplateWithResponse(ctx context.Context, creditNoteId int, body UpdateCreditNoteTemplateJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateCreditNoteTemplateResponse, error) { + rsp, err := c.UpdateCreditNoteTemplate(ctx, creditNoteId, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseUpdateCreditNoteTemplateResponse(rsp) +} + +// CreditNoteEnshrineWithResponse request returning *CreditNoteEnshrineResponse +func (c *ClientWithResponses) CreditNoteEnshrineWithResponse(ctx context.Context, creditNoteId int, reqEditors ...RequestEditorFn) (*CreditNoteEnshrineResponse, error) { + rsp, err := c.CreditNoteEnshrine(ctx, creditNoteId, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreditNoteEnshrineResponse(rsp) +} + +// CreditNoteGetPdfWithResponse request returning *CreditNoteGetPdfResponse +func (c *ClientWithResponses) CreditNoteGetPdfWithResponse(ctx context.Context, creditNoteId int, params *CreditNoteGetPdfParams, reqEditors ...RequestEditorFn) (*CreditNoteGetPdfResponse, error) { + rsp, err := c.CreditNoteGetPdf(ctx, creditNoteId, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreditNoteGetPdfResponse(rsp) +} + +// CreditNoteResetToDraftWithResponse request returning *CreditNoteResetToDraftResponse +func (c *ClientWithResponses) CreditNoteResetToDraftWithResponse(ctx context.Context, creditNoteId int, reqEditors ...RequestEditorFn) (*CreditNoteResetToDraftResponse, error) { + rsp, err := c.CreditNoteResetToDraft(ctx, creditNoteId, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreditNoteResetToDraftResponse(rsp) +} + +// CreditNoteResetToOpenWithResponse request returning *CreditNoteResetToOpenResponse +func (c *ClientWithResponses) CreditNoteResetToOpenWithResponse(ctx context.Context, creditNoteId int, reqEditors ...RequestEditorFn) (*CreditNoteResetToOpenResponse, error) { + rsp, err := c.CreditNoteResetToOpen(ctx, creditNoteId, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreditNoteResetToOpenResponse(rsp) +} + +// CreditNoteSendByWithBodyWithResponse request with arbitrary body returning *CreditNoteSendByResponse +func (c *ClientWithResponses) CreditNoteSendByWithBodyWithResponse(ctx context.Context, creditNoteId int, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreditNoteSendByResponse, error) { + rsp, err := c.CreditNoteSendByWithBody(ctx, creditNoteId, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreditNoteSendByResponse(rsp) +} + +func (c *ClientWithResponses) CreditNoteSendByWithResponse(ctx context.Context, creditNoteId int, body CreditNoteSendByJSONRequestBody, reqEditors ...RequestEditorFn) (*CreditNoteSendByResponse, error) { + rsp, err := c.CreditNoteSendBy(ctx, creditNoteId, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreditNoteSendByResponse(rsp) +} + +// SendCreditNoteByPrintingWithResponse request returning *SendCreditNoteByPrintingResponse +func (c *ClientWithResponses) SendCreditNoteByPrintingWithResponse(ctx context.Context, creditNoteId int, params *SendCreditNoteByPrintingParams, reqEditors ...RequestEditorFn) (*SendCreditNoteByPrintingResponse, error) { + rsp, err := c.SendCreditNoteByPrinting(ctx, creditNoteId, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseSendCreditNoteByPrintingResponse(rsp) +} + +// SendCreditNoteViaEMailWithBodyWithResponse request with arbitrary body returning *SendCreditNoteViaEMailResponse +func (c *ClientWithResponses) SendCreditNoteViaEMailWithBodyWithResponse(ctx context.Context, creditNoteId int, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SendCreditNoteViaEMailResponse, error) { + rsp, err := c.SendCreditNoteViaEMailWithBody(ctx, creditNoteId, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseSendCreditNoteViaEMailResponse(rsp) +} + +func (c *ClientWithResponses) SendCreditNoteViaEMailWithResponse(ctx context.Context, creditNoteId int, body SendCreditNoteViaEMailJSONRequestBody, reqEditors ...RequestEditorFn) (*SendCreditNoteViaEMailResponse, error) { + rsp, err := c.SendCreditNoteViaEMail(ctx, creditNoteId, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseSendCreditNoteViaEMailResponse(rsp) +} + +// GetcreditNotePositionsWithResponse request returning *GetcreditNotePositionsResponse +func (c *ClientWithResponses) GetcreditNotePositionsWithResponse(ctx context.Context, params *GetcreditNotePositionsParams, reqEditors ...RequestEditorFn) (*GetcreditNotePositionsResponse, error) { + rsp, err := c.GetcreditNotePositions(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetcreditNotePositionsResponse(rsp) +} + +// GetLetterpapersWithThumbWithResponse request returning *GetLetterpapersWithThumbResponse +func (c *ClientWithResponses) GetLetterpapersWithThumbWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetLetterpapersWithThumbResponse, error) { + rsp, err := c.GetLetterpapersWithThumb(ctx, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetLetterpapersWithThumbResponse(rsp) +} + +// GetTemplatesWithResponse request returning *GetTemplatesResponse +func (c *ClientWithResponses) GetTemplatesWithResponse(ctx context.Context, params *GetTemplatesParams, reqEditors ...RequestEditorFn) (*GetTemplatesResponse, error) { + rsp, err := c.GetTemplates(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetTemplatesResponse(rsp) +} + +// ExportContactWithResponse request returning *ExportContactResponse +func (c *ClientWithResponses) ExportContactWithResponse(ctx context.Context, params *ExportContactParams, reqEditors ...RequestEditorFn) (*ExportContactResponse, error) { + rsp, err := c.ExportContact(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseExportContactResponse(rsp) +} + +// ExportCreditNoteWithResponse request returning *ExportCreditNoteResponse +func (c *ClientWithResponses) ExportCreditNoteWithResponse(ctx context.Context, params *ExportCreditNoteParams, reqEditors ...RequestEditorFn) (*ExportCreditNoteResponse, error) { + rsp, err := c.ExportCreditNote(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseExportCreditNoteResponse(rsp) +} + +// ExportDatevWithResponse request returning *ExportDatevResponse +func (c *ClientWithResponses) ExportDatevWithResponse(ctx context.Context, params *ExportDatevParams, reqEditors ...RequestEditorFn) (*ExportDatevResponse, error) { + rsp, err := c.ExportDatev(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseExportDatevResponse(rsp) +} + +// ExportInvoiceWithResponse request returning *ExportInvoiceResponse +func (c *ClientWithResponses) ExportInvoiceWithResponse(ctx context.Context, params *ExportInvoiceParams, reqEditors ...RequestEditorFn) (*ExportInvoiceResponse, error) { + rsp, err := c.ExportInvoice(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseExportInvoiceResponse(rsp) +} + +// ExportInvoiceZipWithResponse request returning *ExportInvoiceZipResponse +func (c *ClientWithResponses) ExportInvoiceZipWithResponse(ctx context.Context, params *ExportInvoiceZipParams, reqEditors ...RequestEditorFn) (*ExportInvoiceZipResponse, error) { + rsp, err := c.ExportInvoiceZip(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseExportInvoiceZipResponse(rsp) +} + +// ExportTransactionsWithResponse request returning *ExportTransactionsResponse +func (c *ClientWithResponses) ExportTransactionsWithResponse(ctx context.Context, params *ExportTransactionsParams, reqEditors ...RequestEditorFn) (*ExportTransactionsResponse, error) { + rsp, err := c.ExportTransactions(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseExportTransactionsResponse(rsp) +} + +// ExportVoucherWithResponse request returning *ExportVoucherResponse +func (c *ClientWithResponses) ExportVoucherWithResponse(ctx context.Context, params *ExportVoucherParams, reqEditors ...RequestEditorFn) (*ExportVoucherResponse, error) { + rsp, err := c.ExportVoucher(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseExportVoucherResponse(rsp) +} + +// ExportVoucherZipWithResponse request returning *ExportVoucherZipResponse +func (c *ClientWithResponses) ExportVoucherZipWithResponse(ctx context.Context, params *ExportVoucherZipParams, reqEditors ...RequestEditorFn) (*ExportVoucherZipResponse, error) { + rsp, err := c.ExportVoucherZip(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseExportVoucherZipResponse(rsp) +} + +// GetInvoicesWithResponse request returning *GetInvoicesResponse +func (c *ClientWithResponses) GetInvoicesWithResponse(ctx context.Context, params *GetInvoicesParams, reqEditors ...RequestEditorFn) (*GetInvoicesResponse, error) { + rsp, err := c.GetInvoices(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetInvoicesResponse(rsp) +} + +// CreateInvoiceFromOrderWithBodyWithResponse request with arbitrary body returning *CreateInvoiceFromOrderResponse +func (c *ClientWithResponses) CreateInvoiceFromOrderWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateInvoiceFromOrderResponse, error) { + rsp, err := c.CreateInvoiceFromOrderWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreateInvoiceFromOrderResponse(rsp) +} + +func (c *ClientWithResponses) CreateInvoiceFromOrderWithResponse(ctx context.Context, body CreateInvoiceFromOrderJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateInvoiceFromOrderResponse, error) { + rsp, err := c.CreateInvoiceFromOrder(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreateInvoiceFromOrderResponse(rsp) +} + +// CreateInvoiceReminderWithBodyWithResponse request with arbitrary body returning *CreateInvoiceReminderResponse +func (c *ClientWithResponses) CreateInvoiceReminderWithBodyWithResponse(ctx context.Context, params *CreateInvoiceReminderParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateInvoiceReminderResponse, error) { + rsp, err := c.CreateInvoiceReminderWithBody(ctx, params, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreateInvoiceReminderResponse(rsp) +} + +func (c *ClientWithResponses) CreateInvoiceReminderWithResponse(ctx context.Context, params *CreateInvoiceReminderParams, body CreateInvoiceReminderJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateInvoiceReminderResponse, error) { + rsp, err := c.CreateInvoiceReminder(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreateInvoiceReminderResponse(rsp) +} + +// CreateInvoiceByFactoryWithBodyWithResponse request with arbitrary body returning *CreateInvoiceByFactoryResponse +func (c *ClientWithResponses) CreateInvoiceByFactoryWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateInvoiceByFactoryResponse, error) { + rsp, err := c.CreateInvoiceByFactoryWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreateInvoiceByFactoryResponse(rsp) +} + +func (c *ClientWithResponses) CreateInvoiceByFactoryWithResponse(ctx context.Context, body CreateInvoiceByFactoryJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateInvoiceByFactoryResponse, error) { + rsp, err := c.CreateInvoiceByFactory(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreateInvoiceByFactoryResponse(rsp) +} + +// GetInvoiceByIdWithResponse request returning *GetInvoiceByIdResponse +func (c *ClientWithResponses) GetInvoiceByIdWithResponse(ctx context.Context, invoiceId int, reqEditors ...RequestEditorFn) (*GetInvoiceByIdResponse, error) { + rsp, err := c.GetInvoiceById(ctx, invoiceId, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetInvoiceByIdResponse(rsp) +} + +// BookInvoiceWithBodyWithResponse request with arbitrary body returning *BookInvoiceResponse +func (c *ClientWithResponses) BookInvoiceWithBodyWithResponse(ctx context.Context, invoiceId int, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*BookInvoiceResponse, error) { + rsp, err := c.BookInvoiceWithBody(ctx, invoiceId, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseBookInvoiceResponse(rsp) +} + +func (c *ClientWithResponses) BookInvoiceWithResponse(ctx context.Context, invoiceId int, body BookInvoiceJSONRequestBody, reqEditors ...RequestEditorFn) (*BookInvoiceResponse, error) { + rsp, err := c.BookInvoice(ctx, invoiceId, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseBookInvoiceResponse(rsp) +} + +// CancelInvoiceWithResponse request returning *CancelInvoiceResponse +func (c *ClientWithResponses) CancelInvoiceWithResponse(ctx context.Context, invoiceId int, reqEditors ...RequestEditorFn) (*CancelInvoiceResponse, error) { + rsp, err := c.CancelInvoice(ctx, invoiceId, reqEditors...) + if err != nil { + return nil, err + } + return ParseCancelInvoiceResponse(rsp) +} + +// UpdateInvoiceTemplateWithBodyWithResponse request with arbitrary body returning *UpdateInvoiceTemplateResponse +func (c *ClientWithResponses) UpdateInvoiceTemplateWithBodyWithResponse(ctx context.Context, invoiceId int, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateInvoiceTemplateResponse, error) { + rsp, err := c.UpdateInvoiceTemplateWithBody(ctx, invoiceId, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseUpdateInvoiceTemplateResponse(rsp) +} + +func (c *ClientWithResponses) UpdateInvoiceTemplateWithResponse(ctx context.Context, invoiceId int, body UpdateInvoiceTemplateJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateInvoiceTemplateResponse, error) { + rsp, err := c.UpdateInvoiceTemplate(ctx, invoiceId, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseUpdateInvoiceTemplateResponse(rsp) +} + +// InvoiceEnshrineWithResponse request returning *InvoiceEnshrineResponse +func (c *ClientWithResponses) InvoiceEnshrineWithResponse(ctx context.Context, invoiceId int, reqEditors ...RequestEditorFn) (*InvoiceEnshrineResponse, error) { + rsp, err := c.InvoiceEnshrine(ctx, invoiceId, reqEditors...) + if err != nil { + return nil, err + } + return ParseInvoiceEnshrineResponse(rsp) +} + +// GetIsInvoicePartiallyPaidWithResponse request returning *GetIsInvoicePartiallyPaidResponse +func (c *ClientWithResponses) GetIsInvoicePartiallyPaidWithResponse(ctx context.Context, invoiceId int, reqEditors ...RequestEditorFn) (*GetIsInvoicePartiallyPaidResponse, error) { + rsp, err := c.GetIsInvoicePartiallyPaid(ctx, invoiceId, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetIsInvoicePartiallyPaidResponse(rsp) +} + +// InvoiceGetPdfWithResponse request returning *InvoiceGetPdfResponse +func (c *ClientWithResponses) InvoiceGetPdfWithResponse(ctx context.Context, invoiceId int, params *InvoiceGetPdfParams, reqEditors ...RequestEditorFn) (*InvoiceGetPdfResponse, error) { + rsp, err := c.InvoiceGetPdf(ctx, invoiceId, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseInvoiceGetPdfResponse(rsp) +} + +// GetInvoicePositionsByIdWithResponse request returning *GetInvoicePositionsByIdResponse +func (c *ClientWithResponses) GetInvoicePositionsByIdWithResponse(ctx context.Context, invoiceId int, params *GetInvoicePositionsByIdParams, reqEditors ...RequestEditorFn) (*GetInvoicePositionsByIdResponse, error) { + rsp, err := c.GetInvoicePositionsById(ctx, invoiceId, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetInvoicePositionsByIdResponse(rsp) +} + +// InvoiceGetXmlWithResponse request returning *InvoiceGetXmlResponse +func (c *ClientWithResponses) InvoiceGetXmlWithResponse(ctx context.Context, invoiceId int, reqEditors ...RequestEditorFn) (*InvoiceGetXmlResponse, error) { + rsp, err := c.InvoiceGetXml(ctx, invoiceId, reqEditors...) + if err != nil { + return nil, err + } + return ParseInvoiceGetXmlResponse(rsp) +} + +// InvoiceRenderWithBodyWithResponse request with arbitrary body returning *InvoiceRenderResponse +func (c *ClientWithResponses) InvoiceRenderWithBodyWithResponse(ctx context.Context, invoiceId int, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*InvoiceRenderResponse, error) { + rsp, err := c.InvoiceRenderWithBody(ctx, invoiceId, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseInvoiceRenderResponse(rsp) +} + +func (c *ClientWithResponses) InvoiceRenderWithResponse(ctx context.Context, invoiceId int, body InvoiceRenderJSONRequestBody, reqEditors ...RequestEditorFn) (*InvoiceRenderResponse, error) { + rsp, err := c.InvoiceRender(ctx, invoiceId, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseInvoiceRenderResponse(rsp) +} + +// InvoiceResetToDraftWithResponse request returning *InvoiceResetToDraftResponse +func (c *ClientWithResponses) InvoiceResetToDraftWithResponse(ctx context.Context, invoiceId int, reqEditors ...RequestEditorFn) (*InvoiceResetToDraftResponse, error) { + rsp, err := c.InvoiceResetToDraft(ctx, invoiceId, reqEditors...) + if err != nil { + return nil, err + } + return ParseInvoiceResetToDraftResponse(rsp) +} + +// InvoiceResetToOpenWithResponse request returning *InvoiceResetToOpenResponse +func (c *ClientWithResponses) InvoiceResetToOpenWithResponse(ctx context.Context, invoiceId int, reqEditors ...RequestEditorFn) (*InvoiceResetToOpenResponse, error) { + rsp, err := c.InvoiceResetToOpen(ctx, invoiceId, reqEditors...) + if err != nil { + return nil, err + } + return ParseInvoiceResetToOpenResponse(rsp) +} + +// InvoiceSendByWithBodyWithResponse request with arbitrary body returning *InvoiceSendByResponse +func (c *ClientWithResponses) InvoiceSendByWithBodyWithResponse(ctx context.Context, invoiceId int, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*InvoiceSendByResponse, error) { + rsp, err := c.InvoiceSendByWithBody(ctx, invoiceId, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseInvoiceSendByResponse(rsp) +} + +func (c *ClientWithResponses) InvoiceSendByWithResponse(ctx context.Context, invoiceId int, body InvoiceSendByJSONRequestBody, reqEditors ...RequestEditorFn) (*InvoiceSendByResponse, error) { + rsp, err := c.InvoiceSendBy(ctx, invoiceId, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseInvoiceSendByResponse(rsp) +} + +// SendInvoiceViaEMailWithBodyWithResponse request with arbitrary body returning *SendInvoiceViaEMailResponse +func (c *ClientWithResponses) SendInvoiceViaEMailWithBodyWithResponse(ctx context.Context, invoiceId int, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SendInvoiceViaEMailResponse, error) { + rsp, err := c.SendInvoiceViaEMailWithBody(ctx, invoiceId, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseSendInvoiceViaEMailResponse(rsp) +} + +func (c *ClientWithResponses) SendInvoiceViaEMailWithResponse(ctx context.Context, invoiceId int, body SendInvoiceViaEMailJSONRequestBody, reqEditors ...RequestEditorFn) (*SendInvoiceViaEMailResponse, error) { + rsp, err := c.SendInvoiceViaEMail(ctx, invoiceId, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseSendInvoiceViaEMailResponse(rsp) +} + +// GetInvoicePosWithResponse request returning *GetInvoicePosResponse +func (c *ClientWithResponses) GetInvoicePosWithResponse(ctx context.Context, params *GetInvoicePosParams, reqEditors ...RequestEditorFn) (*GetInvoicePosResponse, error) { + rsp, err := c.GetInvoicePos(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetInvoicePosResponse(rsp) +} + +// GetOrdersWithResponse request returning *GetOrdersResponse +func (c *ClientWithResponses) GetOrdersWithResponse(ctx context.Context, params *GetOrdersParams, reqEditors ...RequestEditorFn) (*GetOrdersResponse, error) { + rsp, err := c.GetOrders(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetOrdersResponse(rsp) +} + +// CreateContractNoteFromOrderWithBodyWithResponse request with arbitrary body returning *CreateContractNoteFromOrderResponse +func (c *ClientWithResponses) CreateContractNoteFromOrderWithBodyWithResponse(ctx context.Context, params *CreateContractNoteFromOrderParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateContractNoteFromOrderResponse, error) { + rsp, err := c.CreateContractNoteFromOrderWithBody(ctx, params, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreateContractNoteFromOrderResponse(rsp) +} + +func (c *ClientWithResponses) CreateContractNoteFromOrderWithResponse(ctx context.Context, params *CreateContractNoteFromOrderParams, body CreateContractNoteFromOrderJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateContractNoteFromOrderResponse, error) { + rsp, err := c.CreateContractNoteFromOrder(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreateContractNoteFromOrderResponse(rsp) +} + +// CreatePackingListFromOrderWithBodyWithResponse request with arbitrary body returning *CreatePackingListFromOrderResponse +func (c *ClientWithResponses) CreatePackingListFromOrderWithBodyWithResponse(ctx context.Context, params *CreatePackingListFromOrderParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreatePackingListFromOrderResponse, error) { + rsp, err := c.CreatePackingListFromOrderWithBody(ctx, params, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreatePackingListFromOrderResponse(rsp) +} + +func (c *ClientWithResponses) CreatePackingListFromOrderWithResponse(ctx context.Context, params *CreatePackingListFromOrderParams, body CreatePackingListFromOrderJSONRequestBody, reqEditors ...RequestEditorFn) (*CreatePackingListFromOrderResponse, error) { + rsp, err := c.CreatePackingListFromOrder(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreatePackingListFromOrderResponse(rsp) +} + +// CreateOrderWithBodyWithResponse request with arbitrary body returning *CreateOrderResponse +func (c *ClientWithResponses) CreateOrderWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateOrderResponse, error) { + rsp, err := c.CreateOrderWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreateOrderResponse(rsp) +} + +func (c *ClientWithResponses) CreateOrderWithResponse(ctx context.Context, body CreateOrderJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateOrderResponse, error) { + rsp, err := c.CreateOrder(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreateOrderResponse(rsp) +} + +// DeleteOrderWithResponse request returning *DeleteOrderResponse +func (c *ClientWithResponses) DeleteOrderWithResponse(ctx context.Context, orderId int, reqEditors ...RequestEditorFn) (*DeleteOrderResponse, error) { + rsp, err := c.DeleteOrder(ctx, orderId, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeleteOrderResponse(rsp) +} + +// GetOrderByIdWithResponse request returning *GetOrderByIdResponse +func (c *ClientWithResponses) GetOrderByIdWithResponse(ctx context.Context, orderId int, reqEditors ...RequestEditorFn) (*GetOrderByIdResponse, error) { + rsp, err := c.GetOrderById(ctx, orderId, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetOrderByIdResponse(rsp) +} + +// UpdateOrderWithBodyWithResponse request with arbitrary body returning *UpdateOrderResponse +func (c *ClientWithResponses) UpdateOrderWithBodyWithResponse(ctx context.Context, orderId int, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateOrderResponse, error) { + rsp, err := c.UpdateOrderWithBody(ctx, orderId, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseUpdateOrderResponse(rsp) +} + +func (c *ClientWithResponses) UpdateOrderWithResponse(ctx context.Context, orderId int, body UpdateOrderJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateOrderResponse, error) { + rsp, err := c.UpdateOrder(ctx, orderId, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseUpdateOrderResponse(rsp) +} + +// UpdateOrderTemplateWithBodyWithResponse request with arbitrary body returning *UpdateOrderTemplateResponse +func (c *ClientWithResponses) UpdateOrderTemplateWithBodyWithResponse(ctx context.Context, orderId int, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateOrderTemplateResponse, error) { + rsp, err := c.UpdateOrderTemplateWithBody(ctx, orderId, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseUpdateOrderTemplateResponse(rsp) +} + +func (c *ClientWithResponses) UpdateOrderTemplateWithResponse(ctx context.Context, orderId int, body UpdateOrderTemplateJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateOrderTemplateResponse, error) { + rsp, err := c.UpdateOrderTemplate(ctx, orderId, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseUpdateOrderTemplateResponse(rsp) +} + +// GetDiscountsWithResponse request returning *GetDiscountsResponse +func (c *ClientWithResponses) GetDiscountsWithResponse(ctx context.Context, orderId int, params *GetDiscountsParams, reqEditors ...RequestEditorFn) (*GetDiscountsResponse, error) { + rsp, err := c.GetDiscounts(ctx, orderId, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetDiscountsResponse(rsp) +} + +// OrderGetPdfWithResponse request returning *OrderGetPdfResponse +func (c *ClientWithResponses) OrderGetPdfWithResponse(ctx context.Context, orderId int, params *OrderGetPdfParams, reqEditors ...RequestEditorFn) (*OrderGetPdfResponse, error) { + rsp, err := c.OrderGetPdf(ctx, orderId, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseOrderGetPdfResponse(rsp) +} + +// GetOrderPositionsByIdWithResponse request returning *GetOrderPositionsByIdResponse +func (c *ClientWithResponses) GetOrderPositionsByIdWithResponse(ctx context.Context, orderId int, params *GetOrderPositionsByIdParams, reqEditors ...RequestEditorFn) (*GetOrderPositionsByIdResponse, error) { + rsp, err := c.GetOrderPositionsById(ctx, orderId, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetOrderPositionsByIdResponse(rsp) +} + +// GetRelatedObjectsWithResponse request returning *GetRelatedObjectsResponse +func (c *ClientWithResponses) GetRelatedObjectsWithResponse(ctx context.Context, orderId int, params *GetRelatedObjectsParams, reqEditors ...RequestEditorFn) (*GetRelatedObjectsResponse, error) { + rsp, err := c.GetRelatedObjects(ctx, orderId, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetRelatedObjectsResponse(rsp) +} + +// OrderSendByWithBodyWithResponse request with arbitrary body returning *OrderSendByResponse +func (c *ClientWithResponses) OrderSendByWithBodyWithResponse(ctx context.Context, orderId int, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*OrderSendByResponse, error) { + rsp, err := c.OrderSendByWithBody(ctx, orderId, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseOrderSendByResponse(rsp) +} + +func (c *ClientWithResponses) OrderSendByWithResponse(ctx context.Context, orderId int, body OrderSendByJSONRequestBody, reqEditors ...RequestEditorFn) (*OrderSendByResponse, error) { + rsp, err := c.OrderSendBy(ctx, orderId, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseOrderSendByResponse(rsp) +} + +// SendorderViaEMailWithBodyWithResponse request with arbitrary body returning *SendorderViaEMailResponse +func (c *ClientWithResponses) SendorderViaEMailWithBodyWithResponse(ctx context.Context, orderId int, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SendorderViaEMailResponse, error) { + rsp, err := c.SendorderViaEMailWithBody(ctx, orderId, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseSendorderViaEMailResponse(rsp) +} + +func (c *ClientWithResponses) SendorderViaEMailWithResponse(ctx context.Context, orderId int, body SendorderViaEMailJSONRequestBody, reqEditors ...RequestEditorFn) (*SendorderViaEMailResponse, error) { + rsp, err := c.SendorderViaEMail(ctx, orderId, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseSendorderViaEMailResponse(rsp) +} + +// GetOrderPositionsWithResponse request returning *GetOrderPositionsResponse +func (c *ClientWithResponses) GetOrderPositionsWithResponse(ctx context.Context, params *GetOrderPositionsParams, reqEditors ...RequestEditorFn) (*GetOrderPositionsResponse, error) { + rsp, err := c.GetOrderPositions(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetOrderPositionsResponse(rsp) +} + +// DeleteOrderPosWithResponse request returning *DeleteOrderPosResponse +func (c *ClientWithResponses) DeleteOrderPosWithResponse(ctx context.Context, orderPosId int, reqEditors ...RequestEditorFn) (*DeleteOrderPosResponse, error) { + rsp, err := c.DeleteOrderPos(ctx, orderPosId, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeleteOrderPosResponse(rsp) +} + +// GetOrderPositionByIdWithResponse request returning *GetOrderPositionByIdResponse +func (c *ClientWithResponses) GetOrderPositionByIdWithResponse(ctx context.Context, orderPosId int, reqEditors ...RequestEditorFn) (*GetOrderPositionByIdResponse, error) { + rsp, err := c.GetOrderPositionById(ctx, orderPosId, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetOrderPositionByIdResponse(rsp) +} + +// UpdateOrderPositionWithBodyWithResponse request with arbitrary body returning *UpdateOrderPositionResponse +func (c *ClientWithResponses) UpdateOrderPositionWithBodyWithResponse(ctx context.Context, orderPosId int, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateOrderPositionResponse, error) { + rsp, err := c.UpdateOrderPositionWithBody(ctx, orderPosId, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseUpdateOrderPositionResponse(rsp) +} + +func (c *ClientWithResponses) UpdateOrderPositionWithResponse(ctx context.Context, orderPosId int, body UpdateOrderPositionJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateOrderPositionResponse, error) { + rsp, err := c.UpdateOrderPosition(ctx, orderPosId, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseUpdateOrderPositionResponse(rsp) +} + +// GetPartsWithResponse request returning *GetPartsResponse +func (c *ClientWithResponses) GetPartsWithResponse(ctx context.Context, params *GetPartsParams, reqEditors ...RequestEditorFn) (*GetPartsResponse, error) { + rsp, err := c.GetParts(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetPartsResponse(rsp) +} + +// CreatePartWithBodyWithResponse request with arbitrary body returning *CreatePartResponse +func (c *ClientWithResponses) CreatePartWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreatePartResponse, error) { + rsp, err := c.CreatePartWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreatePartResponse(rsp) +} + +func (c *ClientWithResponses) CreatePartWithResponse(ctx context.Context, body CreatePartJSONRequestBody, reqEditors ...RequestEditorFn) (*CreatePartResponse, error) { + rsp, err := c.CreatePart(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreatePartResponse(rsp) +} + +// GetPartByIdWithResponse request returning *GetPartByIdResponse +func (c *ClientWithResponses) GetPartByIdWithResponse(ctx context.Context, partId int, reqEditors ...RequestEditorFn) (*GetPartByIdResponse, error) { + rsp, err := c.GetPartById(ctx, partId, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetPartByIdResponse(rsp) +} + +// UpdatePartWithBodyWithResponse request with arbitrary body returning *UpdatePartResponse +func (c *ClientWithResponses) UpdatePartWithBodyWithResponse(ctx context.Context, partId int, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdatePartResponse, error) { + rsp, err := c.UpdatePartWithBody(ctx, partId, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseUpdatePartResponse(rsp) +} + +func (c *ClientWithResponses) UpdatePartWithResponse(ctx context.Context, partId int, body UpdatePartJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdatePartResponse, error) { + rsp, err := c.UpdatePart(ctx, partId, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseUpdatePartResponse(rsp) +} + +// PartGetStockWithResponse request returning *PartGetStockResponse +func (c *ClientWithResponses) PartGetStockWithResponse(ctx context.Context, partId int, reqEditors ...RequestEditorFn) (*PartGetStockResponse, error) { + rsp, err := c.PartGetStock(ctx, partId, reqEditors...) + if err != nil { + return nil, err + } + return ParsePartGetStockResponse(rsp) +} + +// ForAccountNumberWithResponse request returning *ForAccountNumberResponse +func (c *ClientWithResponses) ForAccountNumberWithResponse(ctx context.Context, params *ForAccountNumberParams, reqEditors ...RequestEditorFn) (*ForAccountNumberResponse, error) { + rsp, err := c.ForAccountNumber(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseForAccountNumberResponse(rsp) +} + +// ForAllAccountsWithResponse request returning *ForAllAccountsResponse +func (c *ClientWithResponses) ForAllAccountsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ForAllAccountsResponse, error) { + rsp, err := c.ForAllAccounts(ctx, reqEditors...) + if err != nil { + return nil, err + } + return ParseForAllAccountsResponse(rsp) +} + +// ForExpenseWithResponse request returning *ForExpenseResponse +func (c *ClientWithResponses) ForExpenseWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ForExpenseResponse, error) { + rsp, err := c.ForExpense(ctx, reqEditors...) + if err != nil { + return nil, err + } + return ParseForExpenseResponse(rsp) +} + +// ForRevenueWithResponse request returning *ForRevenueResponse +func (c *ClientWithResponses) ForRevenueWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ForRevenueResponse, error) { + rsp, err := c.ForRevenue(ctx, reqEditors...) + if err != nil { + return nil, err + } + return ParseForRevenueResponse(rsp) +} + +// ForTaxRuleWithResponse request returning *ForTaxRuleResponse +func (c *ClientWithResponses) ForTaxRuleWithResponse(ctx context.Context, params *ForTaxRuleParams, reqEditors ...RequestEditorFn) (*ForTaxRuleResponse, error) { + rsp, err := c.ForTaxRule(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseForTaxRuleResponse(rsp) +} + +// ReportContactWithResponse request returning *ReportContactResponse +func (c *ClientWithResponses) ReportContactWithResponse(ctx context.Context, params *ReportContactParams, reqEditors ...RequestEditorFn) (*ReportContactResponse, error) { + rsp, err := c.ReportContact(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseReportContactResponse(rsp) +} + +// ReportInvoiceWithResponse request returning *ReportInvoiceResponse +func (c *ClientWithResponses) ReportInvoiceWithResponse(ctx context.Context, params *ReportInvoiceParams, reqEditors ...RequestEditorFn) (*ReportInvoiceResponse, error) { + rsp, err := c.ReportInvoice(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseReportInvoiceResponse(rsp) +} + +// ReportOrderWithResponse request returning *ReportOrderResponse +func (c *ClientWithResponses) ReportOrderWithResponse(ctx context.Context, params *ReportOrderParams, reqEditors ...RequestEditorFn) (*ReportOrderResponse, error) { + rsp, err := c.ReportOrder(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseReportOrderResponse(rsp) +} + +// ReportVoucherWithResponse request returning *ReportVoucherResponse +func (c *ClientWithResponses) ReportVoucherWithResponse(ctx context.Context, params *ReportVoucherParams, reqEditors ...RequestEditorFn) (*ReportVoucherResponse, error) { + rsp, err := c.ReportVoucher(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseReportVoucherResponse(rsp) +} + +// UpdateExportConfigWithBodyWithResponse request with arbitrary body returning *UpdateExportConfigResponse +func (c *ClientWithResponses) UpdateExportConfigWithBodyWithResponse(ctx context.Context, sevClientId float32, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateExportConfigResponse, error) { + rsp, err := c.UpdateExportConfigWithBody(ctx, sevClientId, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseUpdateExportConfigResponse(rsp) +} + +func (c *ClientWithResponses) UpdateExportConfigWithResponse(ctx context.Context, sevClientId float32, body UpdateExportConfigJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateExportConfigResponse, error) { + rsp, err := c.UpdateExportConfig(ctx, sevClientId, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseUpdateExportConfigResponse(rsp) +} + +// GetTagsWithResponse request returning *GetTagsResponse +func (c *ClientWithResponses) GetTagsWithResponse(ctx context.Context, params *GetTagsParams, reqEditors ...RequestEditorFn) (*GetTagsResponse, error) { + rsp, err := c.GetTags(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetTagsResponse(rsp) +} + +// CreateTagWithBodyWithResponse request with arbitrary body returning *CreateTagResponse +func (c *ClientWithResponses) CreateTagWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateTagResponse, error) { + rsp, err := c.CreateTagWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreateTagResponse(rsp) +} + +func (c *ClientWithResponses) CreateTagWithResponse(ctx context.Context, body CreateTagJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateTagResponse, error) { + rsp, err := c.CreateTag(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreateTagResponse(rsp) +} + +// DeleteTagWithResponse request returning *DeleteTagResponse +func (c *ClientWithResponses) DeleteTagWithResponse(ctx context.Context, tagId int, reqEditors ...RequestEditorFn) (*DeleteTagResponse, error) { + rsp, err := c.DeleteTag(ctx, tagId, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeleteTagResponse(rsp) +} + +// GetTagByIdWithResponse request returning *GetTagByIdResponse +func (c *ClientWithResponses) GetTagByIdWithResponse(ctx context.Context, tagId int, reqEditors ...RequestEditorFn) (*GetTagByIdResponse, error) { + rsp, err := c.GetTagById(ctx, tagId, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetTagByIdResponse(rsp) +} + +// UpdateTagWithBodyWithResponse request with arbitrary body returning *UpdateTagResponse +func (c *ClientWithResponses) UpdateTagWithBodyWithResponse(ctx context.Context, tagId int, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateTagResponse, error) { + rsp, err := c.UpdateTagWithBody(ctx, tagId, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseUpdateTagResponse(rsp) +} + +func (c *ClientWithResponses) UpdateTagWithResponse(ctx context.Context, tagId int, body UpdateTagJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateTagResponse, error) { + rsp, err := c.UpdateTag(ctx, tagId, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseUpdateTagResponse(rsp) +} + +// GetTagRelationsWithResponse request returning *GetTagRelationsResponse +func (c *ClientWithResponses) GetTagRelationsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetTagRelationsResponse, error) { + rsp, err := c.GetTagRelations(ctx, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetTagRelationsResponse(rsp) +} + +// GetPlaceholderWithResponse request returning *GetPlaceholderResponse +func (c *ClientWithResponses) GetPlaceholderWithResponse(ctx context.Context, params *GetPlaceholderParams, reqEditors ...RequestEditorFn) (*GetPlaceholderResponse, error) { + rsp, err := c.GetPlaceholder(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetPlaceholderResponse(rsp) +} + +// BookkeepingSystemVersionWithResponse request returning *BookkeepingSystemVersionResponse +func (c *ClientWithResponses) BookkeepingSystemVersionWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*BookkeepingSystemVersionResponse, error) { + rsp, err := c.BookkeepingSystemVersion(ctx, reqEditors...) + if err != nil { + return nil, err + } + return ParseBookkeepingSystemVersionResponse(rsp) +} + +// GetVouchersWithResponse request returning *GetVouchersResponse +func (c *ClientWithResponses) GetVouchersWithResponse(ctx context.Context, params *GetVouchersParams, reqEditors ...RequestEditorFn) (*GetVouchersResponse, error) { + rsp, err := c.GetVouchers(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetVouchersResponse(rsp) +} + +// VoucherFactorySaveVoucherWithBodyWithResponse request with arbitrary body returning *VoucherFactorySaveVoucherResponse +func (c *ClientWithResponses) VoucherFactorySaveVoucherWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*VoucherFactorySaveVoucherResponse, error) { + rsp, err := c.VoucherFactorySaveVoucherWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseVoucherFactorySaveVoucherResponse(rsp) +} + +func (c *ClientWithResponses) VoucherFactorySaveVoucherWithResponse(ctx context.Context, body VoucherFactorySaveVoucherJSONRequestBody, reqEditors ...RequestEditorFn) (*VoucherFactorySaveVoucherResponse, error) { + rsp, err := c.VoucherFactorySaveVoucher(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseVoucherFactorySaveVoucherResponse(rsp) +} + +// VoucherUploadFileWithBodyWithResponse request with arbitrary body returning *VoucherUploadFileResponse +func (c *ClientWithResponses) VoucherUploadFileWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*VoucherUploadFileResponse, error) { + rsp, err := c.VoucherUploadFileWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseVoucherUploadFileResponse(rsp) +} + +// GetVoucherByIdWithResponse request returning *GetVoucherByIdResponse +func (c *ClientWithResponses) GetVoucherByIdWithResponse(ctx context.Context, voucherId int, reqEditors ...RequestEditorFn) (*GetVoucherByIdResponse, error) { + rsp, err := c.GetVoucherById(ctx, voucherId, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetVoucherByIdResponse(rsp) +} + +// UpdateVoucherWithBodyWithResponse request with arbitrary body returning *UpdateVoucherResponse +func (c *ClientWithResponses) UpdateVoucherWithBodyWithResponse(ctx context.Context, voucherId int, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateVoucherResponse, error) { + rsp, err := c.UpdateVoucherWithBody(ctx, voucherId, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseUpdateVoucherResponse(rsp) +} + +func (c *ClientWithResponses) UpdateVoucherWithResponse(ctx context.Context, voucherId int, body UpdateVoucherJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateVoucherResponse, error) { + rsp, err := c.UpdateVoucher(ctx, voucherId, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseUpdateVoucherResponse(rsp) +} + +// BookVoucherWithBodyWithResponse request with arbitrary body returning *BookVoucherResponse +func (c *ClientWithResponses) BookVoucherWithBodyWithResponse(ctx context.Context, voucherId int, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*BookVoucherResponse, error) { + rsp, err := c.BookVoucherWithBody(ctx, voucherId, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseBookVoucherResponse(rsp) +} + +func (c *ClientWithResponses) BookVoucherWithResponse(ctx context.Context, voucherId int, body BookVoucherJSONRequestBody, reqEditors ...RequestEditorFn) (*BookVoucherResponse, error) { + rsp, err := c.BookVoucher(ctx, voucherId, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseBookVoucherResponse(rsp) +} + +// VoucherEnshrineWithResponse request returning *VoucherEnshrineResponse +func (c *ClientWithResponses) VoucherEnshrineWithResponse(ctx context.Context, voucherId int, reqEditors ...RequestEditorFn) (*VoucherEnshrineResponse, error) { + rsp, err := c.VoucherEnshrine(ctx, voucherId, reqEditors...) + if err != nil { + return nil, err + } + return ParseVoucherEnshrineResponse(rsp) +} + +// VoucherResetToDraftWithResponse request returning *VoucherResetToDraftResponse +func (c *ClientWithResponses) VoucherResetToDraftWithResponse(ctx context.Context, voucherId int, reqEditors ...RequestEditorFn) (*VoucherResetToDraftResponse, error) { + rsp, err := c.VoucherResetToDraft(ctx, voucherId, reqEditors...) + if err != nil { + return nil, err + } + return ParseVoucherResetToDraftResponse(rsp) +} + +// VoucherResetToOpenWithResponse request returning *VoucherResetToOpenResponse +func (c *ClientWithResponses) VoucherResetToOpenWithResponse(ctx context.Context, voucherId int, reqEditors ...RequestEditorFn) (*VoucherResetToOpenResponse, error) { + rsp, err := c.VoucherResetToOpen(ctx, voucherId, reqEditors...) + if err != nil { + return nil, err + } + return ParseVoucherResetToOpenResponse(rsp) +} + +// GetVoucherPositionsWithResponse request returning *GetVoucherPositionsResponse +func (c *ClientWithResponses) GetVoucherPositionsWithResponse(ctx context.Context, params *GetVoucherPositionsParams, reqEditors ...RequestEditorFn) (*GetVoucherPositionsResponse, error) { + rsp, err := c.GetVoucherPositions(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetVoucherPositionsResponse(rsp) +} + +// ParseGetAccountingContactResponse parses an HTTP response from a GetAccountingContactWithResponse call +func ParseGetAccountingContactResponse(rsp *http.Response) (*GetAccountingContactResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetAccountingContactResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + Objects *[]ModelAccountingContactResponse `json:"objects,omitempty"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + + return response, nil +} + +// ParseCreateAccountingContactResponse parses an HTTP response from a CreateAccountingContactWithResponse call +func ParseCreateAccountingContactResponse(rsp *http.Response) (*CreateAccountingContactResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &CreateAccountingContactResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest ModelAccountingContactResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON201 = &dest + + } + + return response, nil +} + +// ParseDeleteAccountingContactResponse parses an HTTP response from a DeleteAccountingContactWithResponse call +func ParseDeleteAccountingContactResponse(rsp *http.Response) (*DeleteAccountingContactResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &DeleteAccountingContactResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + Objects *[]interface{} `json:"objects,omitempty"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + + return response, nil +} + +// ParseGetAccountingContactByIdResponse parses an HTTP response from a GetAccountingContactByIdWithResponse call +func ParseGetAccountingContactByIdResponse(rsp *http.Response) (*GetAccountingContactByIdResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetAccountingContactByIdResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + Objects *[]ModelAccountingContactResponse `json:"objects,omitempty"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + + return response, nil +} + +// ParseUpdateAccountingContactResponse parses an HTTP response from a UpdateAccountingContactWithResponse call +func ParseUpdateAccountingContactResponse(rsp *http.Response) (*UpdateAccountingContactResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &UpdateAccountingContactResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest ModelAccountingContactResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + + return response, nil +} + +// ParseGetCheckAccountsResponse parses an HTTP response from a GetCheckAccountsWithResponse call +func ParseGetCheckAccountsResponse(rsp *http.Response) (*GetCheckAccountsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetCheckAccountsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + Objects *[]ModelCheckAccountResponse `json:"objects,omitempty"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + + return response, nil +} + +// ParseCreateCheckAccountResponse parses an HTTP response from a CreateCheckAccountWithResponse call +func ParseCreateCheckAccountResponse(rsp *http.Response) (*CreateCheckAccountResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &CreateCheckAccountResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest struct { + Objects *[]ModelCheckAccountResponse `json:"objects,omitempty"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON201 = &dest + + } + + return response, nil +} + +// ParseCreateClearingAccountResponse parses an HTTP response from a CreateClearingAccountWithResponse call +func ParseCreateClearingAccountResponse(rsp *http.Response) (*CreateClearingAccountResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &CreateClearingAccountResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest struct { + // Objects CheckAccount model. Showing the properties relevant to clearing accounts. + Objects *CreateClearingAccountResponse `json:"objects,omitempty"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON201 = &dest + + } + + return response, nil +} + +// ParseCreateFileImportAccountResponse parses an HTTP response from a CreateFileImportAccountWithResponse call +func ParseCreateFileImportAccountResponse(rsp *http.Response) (*CreateFileImportAccountResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &CreateFileImportAccountResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest struct { + // Objects CheckAccount model. Showing the properties relevant to file import accounts. + Objects *CreateFileImportAccountResponse `json:"objects,omitempty"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON201 = &dest + + } + + return response, nil +} + +// ParseDeleteCheckAccountResponse parses an HTTP response from a DeleteCheckAccountWithResponse call +func ParseDeleteCheckAccountResponse(rsp *http.Response) (*DeleteCheckAccountResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &DeleteCheckAccountResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + Objects *[]interface{} `json:"objects,omitempty"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + + return response, nil +} + +// ParseGetCheckAccountByIdResponse parses an HTTP response from a GetCheckAccountByIdWithResponse call +func ParseGetCheckAccountByIdResponse(rsp *http.Response) (*GetCheckAccountByIdResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetCheckAccountByIdResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + Objects *[]ModelCheckAccountResponse `json:"objects,omitempty"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + + return response, nil +} + +// ParseUpdateCheckAccountResponse parses an HTTP response from a UpdateCheckAccountWithResponse call +func ParseUpdateCheckAccountResponse(rsp *http.Response) (*UpdateCheckAccountResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &UpdateCheckAccountResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest ModelCheckAccountResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + + return response, nil +} + +// ParseGetBalanceAtDateResponse parses an HTTP response from a GetBalanceAtDateWithResponse call +func ParseGetBalanceAtDateResponse(rsp *http.Response) (*GetBalanceAtDateResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetBalanceAtDateResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + Objects *string `json:"objects,omitempty"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + + return response, nil +} + +// ParseGetTransactionsResponse parses an HTTP response from a GetTransactionsWithResponse call +func ParseGetTransactionsResponse(rsp *http.Response) (*GetTransactionsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetTransactionsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + Objects *[]ModelCheckAccountTransactionResponse `json:"objects,omitempty"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + + return response, nil +} + +// ParseCreateTransactionResponse parses an HTTP response from a CreateTransactionWithResponse call +func ParseCreateTransactionResponse(rsp *http.Response) (*CreateTransactionResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &CreateTransactionResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest ModelCheckAccountTransactionResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON201 = &dest + + } + + return response, nil +} + +// ParseDeleteCheckAccountTransactionResponse parses an HTTP response from a DeleteCheckAccountTransactionWithResponse call +func ParseDeleteCheckAccountTransactionResponse(rsp *http.Response) (*DeleteCheckAccountTransactionResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &DeleteCheckAccountTransactionResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + Objects *[]interface{} `json:"objects,omitempty"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + + return response, nil +} + +// ParseGetCheckAccountTransactionByIdResponse parses an HTTP response from a GetCheckAccountTransactionByIdWithResponse call +func ParseGetCheckAccountTransactionByIdResponse(rsp *http.Response) (*GetCheckAccountTransactionByIdResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetCheckAccountTransactionByIdResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + Objects *[]ModelCheckAccountTransactionResponse `json:"objects,omitempty"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + + return response, nil +} + +// ParseUpdateCheckAccountTransactionResponse parses an HTTP response from a UpdateCheckAccountTransactionWithResponse call +func ParseUpdateCheckAccountTransactionResponse(rsp *http.Response) (*UpdateCheckAccountTransactionResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &UpdateCheckAccountTransactionResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest ModelCheckAccountTransactionResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + + return response, nil +} + +// ParseCheckAccountTransactionEnshrineResponse parses an HTTP response from a CheckAccountTransactionEnshrineWithResponse call +func ParseCheckAccountTransactionEnshrineResponse(rsp *http.Response) (*CheckAccountTransactionEnshrineResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &CheckAccountTransactionEnshrineResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + Objects *interface{} `json:"objects,omitempty"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest ValidationError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + + } + + return response, nil +} + +// ParseGetCommunicationWaysResponse parses an HTTP response from a GetCommunicationWaysWithResponse call +func ParseGetCommunicationWaysResponse(rsp *http.Response) (*GetCommunicationWaysResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetCommunicationWaysResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + Objects *[]ModelCommunicationWayResponse `json:"objects,omitempty"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + + return response, nil +} + +// ParseCreateCommunicationWayResponse parses an HTTP response from a CreateCommunicationWayWithResponse call +func ParseCreateCommunicationWayResponse(rsp *http.Response) (*CreateCommunicationWayResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &CreateCommunicationWayResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest ModelCommunicationWayResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON201 = &dest + + } + + return response, nil +} + +// ParseDeleteCommunicationWayResponse parses an HTTP response from a DeleteCommunicationWayWithResponse call +func ParseDeleteCommunicationWayResponse(rsp *http.Response) (*DeleteCommunicationWayResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &DeleteCommunicationWayResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + Objects *[]interface{} `json:"objects,omitempty"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + + return response, nil +} + +// ParseGetCommunicationWayByIdResponse parses an HTTP response from a GetCommunicationWayByIdWithResponse call +func ParseGetCommunicationWayByIdResponse(rsp *http.Response) (*GetCommunicationWayByIdResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetCommunicationWayByIdResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + Objects *[]ModelCommunicationWayResponse `json:"objects,omitempty"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + + return response, nil +} + +// ParseUpdateCommunicationWayResponse parses an HTTP response from a UpdateCommunicationWayWithResponse call +func ParseUpdateCommunicationWayResponse(rsp *http.Response) (*UpdateCommunicationWayResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &UpdateCommunicationWayResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest ModelCommunicationWayResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + + return response, nil +} + +// ParseGetCommunicationWayKeysResponse parses an HTTP response from a GetCommunicationWayKeysWithResponse call +func ParseGetCommunicationWayKeysResponse(rsp *http.Response) (*GetCommunicationWayKeysResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetCommunicationWayKeysResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + Objects *[]struct { + // Create Date the communication way key was created + Create *time.Time `json:"create,omitempty"` + + // Id The id of the communication way key + // 1. ID: 1 - Privat + // 2. ID: 2 - Arbeit + // 3. ID: 3 - Fax + // 4. ID: 4 - Mobil + // 5. ID: 5 - " " + // 6. ID: 6 - Autobox + // 7. ID: 7 - Newsletter + // 8. ID: 8 - Rechnungsadresse + Id *string `json:"id,omitempty"` + + // Name Name of the communication way key + Name *GetCommunicationWayKeys200ObjectsName `json:"name,omitempty"` + + // ObjectName object name which is 'CommunicationWayKey'. + ObjectName *string `json:"objectName,omitempty"` + TranslationCode *string `json:"translationCode,omitempty"` + + // Upadate Date the communication way key was last updated + Upadate *time.Time `json:"upadate,omitempty"` + } `json:"objects,omitempty"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + + return response, nil +} + +// ParseGetContactsResponse parses an HTTP response from a GetContactsWithResponse call +func ParseGetContactsResponse(rsp *http.Response) (*GetContactsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetContactsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + Objects *[]ModelContactResponse `json:"objects,omitempty"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + + return response, nil +} + +// ParseCreateContactResponse parses an HTTP response from a CreateContactWithResponse call +func ParseCreateContactResponse(rsp *http.Response) (*CreateContactResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &CreateContactResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest ModelContactResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON201 = &dest + + } + + return response, nil +} + +// ParseFindContactsByCustomFieldValueResponse parses an HTTP response from a FindContactsByCustomFieldValueWithResponse call +func ParseFindContactsByCustomFieldValueResponse(rsp *http.Response) (*FindContactsByCustomFieldValueResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &FindContactsByCustomFieldValueResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + Objects *[]ModelContactResponse `json:"objects,omitempty"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + + return response, nil +} + +// ParseGetNextCustomerNumberResponse parses an HTTP response from a GetNextCustomerNumberWithResponse call +func ParseGetNextCustomerNumberResponse(rsp *http.Response) (*GetNextCustomerNumberResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetNextCustomerNumberResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + // Objects Next available customer number + Objects *string `json:"objects,omitempty"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + + return response, nil +} + +// ParseContactCustomerNumberAvailabilityCheckResponse parses an HTTP response from a ContactCustomerNumberAvailabilityCheckWithResponse call +func ParseContactCustomerNumberAvailabilityCheckResponse(rsp *http.Response) (*ContactCustomerNumberAvailabilityCheckResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &ContactCustomerNumberAvailabilityCheckResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + Objects *bool `json:"objects,omitempty"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + + return response, nil +} + +// ParseDeleteContactResponse parses an HTTP response from a DeleteContactWithResponse call +func ParseDeleteContactResponse(rsp *http.Response) (*DeleteContactResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &DeleteContactResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + Objects *[]interface{} `json:"objects,omitempty"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + + return response, nil +} + +// ParseGetContactByIdResponse parses an HTTP response from a GetContactByIdWithResponse call +func ParseGetContactByIdResponse(rsp *http.Response) (*GetContactByIdResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetContactByIdResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + Objects *[]ModelContactResponse `json:"objects,omitempty"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + + return response, nil +} + +// ParseUpdateContactResponse parses an HTTP response from a UpdateContactWithResponse call +func ParseUpdateContactResponse(rsp *http.Response) (*UpdateContactResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &UpdateContactResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest ModelContactResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + + return response, nil +} + +// ParseGetContactTabsItemCountByIdResponse parses an HTTP response from a GetContactTabsItemCountByIdWithResponse call +func ParseGetContactTabsItemCountByIdResponse(rsp *http.Response) (*GetContactTabsItemCountByIdResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetContactTabsItemCountByIdResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + CreditNotes *float32 `json:"creditNotes,omitempty"` + Documents *float32 `json:"documents,omitempty"` + InvoicePos *float32 `json:"invoicePos,omitempty"` + Invoices *float32 `json:"invoices,omitempty"` + Letters *float32 `json:"letters,omitempty"` + Orders *float32 `json:"orders,omitempty"` + Parts *string `json:"parts,omitempty"` + Persons *float32 `json:"persons,omitempty"` + Vouchers *float32 `json:"vouchers,omitempty"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + + return response, nil +} + +// ParseGetContactAddressesResponse parses an HTTP response from a GetContactAddressesWithResponse call +func ParseGetContactAddressesResponse(rsp *http.Response) (*GetContactAddressesResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetContactAddressesResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + Objects *[]ModelContactAddressResponse `json:"objects,omitempty"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + + return response, nil +} + +// ParseCreateContactAddressResponse parses an HTTP response from a CreateContactAddressWithResponse call +func ParseCreateContactAddressResponse(rsp *http.Response) (*CreateContactAddressResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &CreateContactAddressResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest ModelContactAddressResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON201 = &dest + + } + + return response, nil +} + +// ParseDeleteContactAddressResponse parses an HTTP response from a DeleteContactAddressWithResponse call +func ParseDeleteContactAddressResponse(rsp *http.Response) (*DeleteContactAddressResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &DeleteContactAddressResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + Objects *[]interface{} `json:"objects,omitempty"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + + return response, nil +} + +// ParseContactAddressIdResponse parses an HTTP response from a ContactAddressIdWithResponse call +func ParseContactAddressIdResponse(rsp *http.Response) (*ContactAddressIdResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &ContactAddressIdResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + Objects *[]ModelContactAddressResponse `json:"objects,omitempty"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + + return response, nil +} + +// ParseUpdateContactAddressResponse parses an HTTP response from a UpdateContactAddressWithResponse call +func ParseUpdateContactAddressResponse(rsp *http.Response) (*UpdateContactAddressResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &UpdateContactAddressResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest ModelContactAddressResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON201 = &dest + + } + + return response, nil +} + +// ParseGetContactFieldsResponse parses an HTTP response from a GetContactFieldsWithResponse call +func ParseGetContactFieldsResponse(rsp *http.Response) (*GetContactFieldsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetContactFieldsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + Objects *[]ModelContactCustomFieldResponse `json:"objects,omitempty"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + + return response, nil +} + +// ParseCreateContactFieldResponse parses an HTTP response from a CreateContactFieldWithResponse call +func ParseCreateContactFieldResponse(rsp *http.Response) (*CreateContactFieldResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &CreateContactFieldResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest ModelContactCustomFieldResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + + return response, nil +} + +// ParseDeleteContactCustomFieldIdResponse parses an HTTP response from a DeleteContactCustomFieldIdWithResponse call +func ParseDeleteContactCustomFieldIdResponse(rsp *http.Response) (*DeleteContactCustomFieldIdResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &DeleteContactCustomFieldIdResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + Objects *[]interface{} `json:"objects,omitempty"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + + return response, nil +} + +// ParseGetContactFieldsByIdResponse parses an HTTP response from a GetContactFieldsByIdWithResponse call +func ParseGetContactFieldsByIdResponse(rsp *http.Response) (*GetContactFieldsByIdResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetContactFieldsByIdResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + Objects *[]ModelContactCustomFieldResponse `json:"objects,omitempty"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + + return response, nil +} + +// ParseUpdateContactfieldResponse parses an HTTP response from a UpdateContactfieldWithResponse call +func ParseUpdateContactfieldResponse(rsp *http.Response) (*UpdateContactfieldResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &UpdateContactfieldResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest ModelContactCustomFieldResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + + return response, nil +} + +// ParseGetContactFieldSettingsResponse parses an HTTP response from a GetContactFieldSettingsWithResponse call +func ParseGetContactFieldSettingsResponse(rsp *http.Response) (*GetContactFieldSettingsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetContactFieldSettingsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + Objects *[]ModelContactCustomFieldSettingResponse `json:"objects,omitempty"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + + return response, nil +} + +// ParseCreateContactFieldSettingResponse parses an HTTP response from a CreateContactFieldSettingWithResponse call +func ParseCreateContactFieldSettingResponse(rsp *http.Response) (*CreateContactFieldSettingResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &CreateContactFieldSettingResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + Objects *[]ModelContactCustomFieldSettingResponse `json:"objects,omitempty"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + + return response, nil +} + +// ParseDeleteContactFieldSettingResponse parses an HTTP response from a DeleteContactFieldSettingWithResponse call +func ParseDeleteContactFieldSettingResponse(rsp *http.Response) (*DeleteContactFieldSettingResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &DeleteContactFieldSettingResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + Objects *[]interface{} `json:"objects,omitempty"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + + return response, nil +} + +// ParseGetContactFieldSettingByIdResponse parses an HTTP response from a GetContactFieldSettingByIdWithResponse call +func ParseGetContactFieldSettingByIdResponse(rsp *http.Response) (*GetContactFieldSettingByIdResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetContactFieldSettingByIdResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + Objects *[]ModelContactCustomFieldSettingResponse `json:"objects,omitempty"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + + return response, nil +} + +// ParseUpdateContactFieldSettingResponse parses an HTTP response from a UpdateContactFieldSettingWithResponse call +func ParseUpdateContactFieldSettingResponse(rsp *http.Response) (*UpdateContactFieldSettingResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &UpdateContactFieldSettingResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest ModelContactCustomFieldSettingResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + + return response, nil +} + +// ParseGetReferenceCountResponse parses an HTTP response from a GetReferenceCountWithResponse call +func ParseGetReferenceCountResponse(rsp *http.Response) (*GetReferenceCountResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetReferenceCountResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + // Objects the count of all references + Objects *int `json:"objects,omitempty"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + + return response, nil +} + +// ParseGetCreditNotesResponse parses an HTTP response from a GetCreditNotesWithResponse call +func ParseGetCreditNotesResponse(rsp *http.Response) (*GetCreditNotesResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetCreditNotesResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + Objects *[]ModelCreditNoteResponse `json:"objects,omitempty"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + + return response, nil +} + +// ParseCreateCreditNoteFromInvoiceResponse parses an HTTP response from a CreateCreditNoteFromInvoiceWithResponse call +func ParseCreateCreditNoteFromInvoiceResponse(rsp *http.Response) (*CreateCreditNoteFromInvoiceResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &CreateCreditNoteFromInvoiceResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest struct { + Objects *struct { + // CreditNote creditNote model + CreditNote *ModelCreditNoteResponse `json:"creditNote,omitempty"` + + // CreditNotePos An array of creditNote positions + CreditNotePos *[]ModelCreditNotePosResponse `json:"creditNotePos,omitempty"` + + // Discount An array of discounts (can be empty) + Discount *[]ModelDiscountsResponse `json:"discount,omitempty"` + } `json:"objects,omitempty"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON201 = &dest + + } + + return response, nil +} + +// ParseCreateCreditNoteFromVoucherResponse parses an HTTP response from a CreateCreditNoteFromVoucherWithResponse call +func ParseCreateCreditNoteFromVoucherResponse(rsp *http.Response) (*CreateCreditNoteFromVoucherResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &CreateCreditNoteFromVoucherResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest struct { + Objects *struct { + // CreditNote creditNote model + CreditNote *ModelCreditNoteResponse `json:"creditNote,omitempty"` + + // CreditNotePos An array of creditNote positions + CreditNotePos *[]ModelCreditNotePosResponse `json:"creditNotePos,omitempty"` + + // Discount An array of discounts (can be empty) + Discount *[]ModelDiscountsResponse `json:"discount,omitempty"` + } `json:"objects,omitempty"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON201 = &dest + + } + + return response, nil +} + +// ParseCreatecreditNoteResponse parses an HTTP response from a CreatecreditNoteWithResponse call +func ParseCreatecreditNoteResponse(rsp *http.Response) (*CreatecreditNoteResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &CreatecreditNoteResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest SaveCreditNoteResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON201 = &dest + + } + + return response, nil +} + +// ParseDeletecreditNoteResponse parses an HTTP response from a DeletecreditNoteWithResponse call +func ParseDeletecreditNoteResponse(rsp *http.Response) (*DeletecreditNoteResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &DeletecreditNoteResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + Objects *[]interface{} `json:"objects,omitempty"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + + return response, nil +} + +// ParseGetcreditNoteByIdResponse parses an HTTP response from a GetcreditNoteByIdWithResponse call +func ParseGetcreditNoteByIdResponse(rsp *http.Response) (*GetcreditNoteByIdResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetcreditNoteByIdResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + Objects *[]ModelCreditNoteResponse `json:"objects,omitempty"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + + return response, nil +} + +// ParseUpdatecreditNoteResponse parses an HTTP response from a UpdatecreditNoteWithResponse call +func ParseUpdatecreditNoteResponse(rsp *http.Response) (*UpdatecreditNoteResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &UpdatecreditNoteResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest ModelCreditNoteResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + + return response, nil +} + +// ParseBookCreditNoteResponse parses an HTTP response from a BookCreditNoteWithResponse call +func ParseBookCreditNoteResponse(rsp *http.Response) (*BookCreditNoteResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &BookCreditNoteResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + AdditionalInformation *string `json:"additionalInformation,omitempty"` + AmmountPayed *string `json:"ammountPayed,omitempty"` + BookingDate *time.Time `json:"bookingDate,omitempty"` + + // Create Date of email creation + Create *time.Time `json:"create,omitempty"` + CreditNote *struct { + // Id The id of the credit note + Id int `json:"id"` + + // ObjectName Internal object name which is 'CreditNote'. + ObjectName string `json:"objectName"` + } `json:"creditNote,omitempty"` + FromStatus *string `json:"fromStatus,omitempty"` + Id *string `json:"id,omitempty"` + ObjectName *string `json:"objectName,omitempty"` + + // SevClient Client to which creditNote belongs. Will be filled automatically + SevClient *struct { + // Id Unique identifier of the client + Id int `json:"id"` + + // ObjectName Model name, which is 'SevClient' + ObjectName string `json:"objectName"` + } `json:"sevClient,omitempty"` + ToStatus *string `json:"toStatus,omitempty"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + + return response, nil +} + +// ParseUpdateCreditNoteTemplateResponse parses an HTTP response from a UpdateCreditNoteTemplateWithResponse call +func ParseUpdateCreditNoteTemplateResponse(rsp *http.Response) (*UpdateCreditNoteTemplateResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &UpdateCreditNoteTemplateResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest ModelChangeLayoutResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + + return response, nil +} + +// ParseCreditNoteEnshrineResponse parses an HTTP response from a CreditNoteEnshrineWithResponse call +func ParseCreditNoteEnshrineResponse(rsp *http.Response) (*CreditNoteEnshrineResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &CreditNoteEnshrineResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + Objects *interface{} `json:"objects,omitempty"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest ValidationError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + + } + + return response, nil +} + +// ParseCreditNoteGetPdfResponse parses an HTTP response from a CreditNoteGetPdfWithResponse call +func ParseCreditNoteGetPdfResponse(rsp *http.Response) (*CreditNoteGetPdfResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &CreditNoteGetPdfResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + Base64encoded *bool `json:"base64encoded,omitempty"` + Content *openapi_types.File `json:"content,omitempty"` + Filename *string `json:"filename,omitempty"` + MimeType *string `json:"mimeType,omitempty"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + + return response, nil +} + +// ParseCreditNoteResetToDraftResponse parses an HTTP response from a CreditNoteResetToDraftWithResponse call +func ParseCreditNoteResetToDraftResponse(rsp *http.Response) (*CreditNoteResetToDraftResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &CreditNoteResetToDraftResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + Objects *struct { + // Address Complete address of the recipient including name, street, city, zip and country.
+ // Line breaks can be used and will be displayed on the invoice pdf. + Address *string `json:"address"` + + // AddressCountry Can be omitted as complete address is defined in address attribute + AddressCountry *struct { + // Id Unique identifier of the country + Id string `json:"id"` + + // ObjectName Model name, which is 'StaticCountry' + ObjectName string `json:"objectName"` + } `json:"addressCountry"` + + // Contact The contact used in the creditNote + Contact *struct { + // Id Unique identifier of the contact + Id string `json:"id"` + + // ObjectName Model name, which is 'Contact' + ObjectName string `json:"objectName"` + } `json:"contact"` + + // ContactPerson The user who acts as a contact person for the creditNote + ContactPerson *struct { + // Id Unique identifier of the user + Id string `json:"id"` + + // ObjectName Model name, which is 'SevUser' + ObjectName string `json:"objectName"` + } `json:"contactPerson"` + + // Create Date of creditNote creation + Create *time.Time `json:"create,omitempty"` + + // CreateUser Will be filled automatically by our system and can't be changed + CreateUser *struct { + // Id Unique identifier of the user + Id string `json:"id"` + + // ObjectName Model name, which is 'SevUser' + ObjectName string `json:"objectName"` + } `json:"createUser,omitempty"` + + // CreditNoteDate The credit note date + CreditNoteDate *time.Time `json:"creditNoteDate,omitempty"` + + // CreditNoteNumber The creditNote number + CreditNoteNumber *string `json:"creditNoteNumber"` + + // Currency Currency used in the creditNote. Needs to be currency code according to ISO-4217 + Currency *string `json:"currency"` + CustomerInternalNote *interface{} `json:"customerInternalNote,omitempty"` + + // DeliveryDate Timestamp. This can also be a date range if you also use the attribute deliveryDateUntil + DeliveryDate *time.Time `json:"deliveryDate,omitempty"` + + // FootText Certain html tags can be used here to format your text + FootText *string `json:"footText"` + + // HeadText Certain html tags can be used here to format your text + HeadText *string `json:"headText"` + + // Header Normally consist of prefix plus the creditNote number + Header *string `json:"header"` + + // Id The creditNote id + Id *string `json:"id,omitempty"` + + // ObjectName The creditNote object name + ObjectName *string `json:"objectName,omitempty"` + + // SendDate The date the creditNote was sent to the customer + SendDate *time.Time `json:"sendDate"` + + // SendType Type which was used to send the creditNote. IMPORTANT: Please refer to the creditNote section of the + // * API-Overview to understand how this attribute can be used before using it! + SendType *CreditNoteResetToDraft200ObjectsSendType `json:"sendType"` + + // SevClient Client to which creditNote belongs. Will be filled automatically + SevClient *struct { + // Id Unique identifier of the client + Id string `json:"id"` + + // ObjectName Model name, which is 'SevClient' + ObjectName string `json:"objectName"` + } `json:"sevClient,omitempty"` + + // ShowNet If true, the net amount of each position will be shown on the creditNote. Otherwise gross amount + ShowNet *bool `json:"showNet,omitempty"` + + // SmallSettlement Defines if the client uses the small settlement scheme. + // If yes, the creditNote must not contain any vat + SmallSettlement *bool `json:"smallSettlement"` + + // Status Please have a look in + // status of credit note + // to see what the different status codes mean + Status *CreditNoteResetToDraft200ObjectsStatus `json:"status,omitempty"` + + // SumDiscounts Sum of all discounts in the creditNote + SumDiscounts *string `json:"sumDiscounts,omitempty"` + + // SumDiscountsForeignCurrency Discounts sum of the creditNote in the foreign currency + SumDiscountsForeignCurrency *string `json:"sumDiscountsForeignCurrency,omitempty"` + + // SumGross Gross sum of the creditNote + SumGross *string `json:"sumGross,omitempty"` + + // SumGrossForeignCurrency Gross sum of the creditNote in the foreign currency + SumGrossForeignCurrency *string `json:"sumGrossForeignCurrency,omitempty"` + + // SumNet Net sum of the creditNote + SumNet *string `json:"sumNet,omitempty"` + + // SumNetForeignCurrency Net sum of the creditNote in the foreign currency + SumNetForeignCurrency *string `json:"sumNetForeignCurrency,omitempty"` + + // SumTax Tax sum of the creditNote + SumTax *string `json:"sumTax,omitempty"` + + // SumTaxForeignCurrency Tax sum of the creditNote in the foreign currency + SumTaxForeignCurrency *string `json:"sumTaxForeignCurrency,omitempty"` + + // TaxRate This is not used anymore. Use the taxRate of the individual positions instead. + TaxRate *string `json:"taxRate"` + + // TaxRule **Use this in sevdesk-Update 2.0 (replaces taxType / taxSet).** + TaxRule *struct { + // Id **Use this in sevdesk-Update 2.0 (replaces taxType / taxSet).** + // + // Defines the vat-regulation. + // For "Regelbesteuerung" it can be one of: + // - `1` - Umsatzsteuerpflichtige Umsätze - tax rates: 0.0, 7.0, 19.0 - replaces `"taxType": "default"` + // - `2` - Ausfuhren - allowedTaxRates: 0.0 + // - `3` - Innergemeinschaftliche Lieferungen - tax rates: 0.0, 7.0, 19.0 - replaces `"taxType": "eu"` + // - `4` - Steuerfreie Umsätze §4 UStG - tax rates: 0.0 + // - `5` - Reverse Charge gem. §13b UStG - tax rates: 0.0 + // - `17` - Nicht im Inland steuerbare Leistung - tax rates: 0.0 - replaces `"taxType": "noteu"` + // + // For small business owner ("Kleinunternehmer") it can be: + // - `11` - Steuer nicht erhoben nach §19UStG - tax rates: 0.0 - replaces `"taxType": "ss"` + Id CreditNoteResetToDraft200ObjectsTaxRuleId `json:"id"` + + // ObjectName Name of the object. Must always be TaxRule + ObjectName CreditNoteResetToDraft200ObjectsTaxRuleObjectName `json:"objectName"` + } `json:"taxRule,omitempty"` + + // TaxSet **Use this in sevdesk-Update 1.0 (instead of taxRule).** + // + // Tax set of the creditNote. Needs to be added if you chose the tax type custom + TaxSet *struct { + // Id Unique identifier of the object + Id string `json:"id"` + + // ObjectName Model name, which is 'TaxSet' + ObjectName string `json:"objectName"` + } `json:"taxSet"` + TaxText *interface{} `json:"taxText,omitempty"` + + // TaxType **Use this in sevdesk-Update 1.0 (instead of taxRule).** + // + // Tax type of the creditNote. + // There are four tax types: + // 1. default - Umsatzsteuer ausweisen + // 2. eu - Steuerfreie innergemeinschaftliche Lieferung (Europäische Union) + // 3. noteu - Steuerschuldnerschaft des Leistungsempfängers (außerhalb EU, z. B. Schweiz) + // 4. custom - Using custom tax set + // 5. ss - Not subject to VAT according to §19 1 UStG + // Tax rates are heavily connected to the tax type used. + TaxType *string `json:"taxType"` + + // Update Date of last creditNote update + Update *time.Time `json:"update,omitempty"` + } `json:"objects,omitempty"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest ValidationError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + + } + + return response, nil +} + +// ParseCreditNoteResetToOpenResponse parses an HTTP response from a CreditNoteResetToOpenWithResponse call +func ParseCreditNoteResetToOpenResponse(rsp *http.Response) (*CreditNoteResetToOpenResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &CreditNoteResetToOpenResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + Objects *struct { + // Address Complete address of the recipient including name, street, city, zip and country.
+ // Line breaks can be used and will be displayed on the invoice pdf. + Address *string `json:"address"` + + // AddressCountry Can be omitted as complete address is defined in address attribute + AddressCountry *struct { + // Id Unique identifier of the country + Id string `json:"id"` + + // ObjectName Model name, which is 'StaticCountry' + ObjectName string `json:"objectName"` + } `json:"addressCountry"` + + // Contact The contact used in the creditNote + Contact *struct { + // Id Unique identifier of the contact + Id string `json:"id"` + + // ObjectName Model name, which is 'Contact' + ObjectName string `json:"objectName"` + } `json:"contact"` + + // ContactPerson The user who acts as a contact person for the creditNote + ContactPerson *struct { + // Id Unique identifier of the user + Id string `json:"id"` + + // ObjectName Model name, which is 'SevUser' + ObjectName string `json:"objectName"` + } `json:"contactPerson"` + + // Create Date of creditNote creation + Create *time.Time `json:"create,omitempty"` + + // CreateUser Will be filled automatically by our system and can't be changed + CreateUser *struct { + // Id Unique identifier of the user + Id string `json:"id"` + + // ObjectName Model name, which is 'SevUser' + ObjectName string `json:"objectName"` + } `json:"createUser,omitempty"` + + // CreditNoteDate The credit note date + CreditNoteDate *time.Time `json:"creditNoteDate,omitempty"` + + // CreditNoteNumber The creditNote number + CreditNoteNumber *string `json:"creditNoteNumber"` + + // Currency Currency used in the creditNote. Needs to be currency code according to ISO-4217 + Currency *string `json:"currency"` + + // CustomerInternalNote Internal note of the customer. Contains data entered into field 'Referenz/Bestellnummer' + CustomerInternalNote *string `json:"customerInternalNote"` + + // DeliveryDate Timestamp. This can also be a date range if you also use the attribute deliveryDateUntil + DeliveryDate *time.Time `json:"deliveryDate,omitempty"` + + // FootText Certain html tags can be used here to format your text + FootText *string `json:"footText"` + + // HeadText Certain html tags can be used here to format your text + HeadText *string `json:"headText"` + + // Header Normally consist of prefix plus the creditNote number + Header *string `json:"header"` + + // Id The creditNote id + Id *string `json:"id,omitempty"` + + // ObjectName The creditNote object name + ObjectName *string `json:"objectName,omitempty"` + + // SendDate The date the creditNote was sent to the customer + SendDate *time.Time `json:"sendDate"` + + // SendType Type which was used to send the creditNote. IMPORTANT: Please refer to the creditNote section of the + // * API-Overview to understand how this attribute can be used before using it! + SendType *CreditNoteResetToOpen200ObjectsSendType `json:"sendType"` + + // SevClient Client to which creditNote belongs. Will be filled automatically + SevClient *struct { + // Id Unique identifier of the client + Id string `json:"id"` + + // ObjectName Model name, which is 'SevClient' + ObjectName string `json:"objectName"` + } `json:"sevClient,omitempty"` + + // ShowNet If true, the net amount of each position will be shown on the creditNote. Otherwise gross amount + ShowNet *bool `json:"showNet,omitempty"` + + // SmallSettlement Defines if the client uses the small settlement scheme. + // If yes, the creditNote must not contain any vat + SmallSettlement *bool `json:"smallSettlement"` + Status *interface{} `json:"status,omitempty"` + + // SumDiscounts Sum of all discounts in the creditNote + SumDiscounts *string `json:"sumDiscounts,omitempty"` + + // SumDiscountsForeignCurrency Discounts sum of the creditNote in the foreign currency + SumDiscountsForeignCurrency *string `json:"sumDiscountsForeignCurrency,omitempty"` + + // SumGross Gross sum of the creditNote + SumGross *string `json:"sumGross,omitempty"` + + // SumGrossForeignCurrency Gross sum of the creditNote in the foreign currency + SumGrossForeignCurrency *string `json:"sumGrossForeignCurrency,omitempty"` + + // SumNet Net sum of the creditNote + SumNet *string `json:"sumNet,omitempty"` + + // SumNetForeignCurrency Net sum of the creditNote in the foreign currency + SumNetForeignCurrency *string `json:"sumNetForeignCurrency,omitempty"` + + // SumTax Tax sum of the creditNote + SumTax *string `json:"sumTax,omitempty"` + + // SumTaxForeignCurrency Tax sum of the creditNote in the foreign currency + SumTaxForeignCurrency *string `json:"sumTaxForeignCurrency,omitempty"` + + // TaxRate This is not used anymore. Use the taxRate of the individual positions instead. + TaxRate *string `json:"taxRate"` + + // TaxRule **Use this in sevdesk-Update 2.0 (replaces taxType / taxSet).** + TaxRule *struct { + // Id **Use this in sevdesk-Update 2.0 (replaces taxType / taxSet).** + // + // Defines the vat-regulation. + // For "Regelbesteuerung" it can be one of: + // - `1` - Umsatzsteuerpflichtige Umsätze - tax rates: 0.0, 7.0, 19.0 - replaces `"taxType": "default"` + // - `2` - Ausfuhren - allowedTaxRates: 0.0 + // - `3` - Innergemeinschaftliche Lieferungen - tax rates: 0.0, 7.0, 19.0 - replaces `"taxType": "eu"` + // - `4` - Steuerfreie Umsätze §4 UStG - tax rates: 0.0 + // - `5` - Reverse Charge gem. §13b UStG - tax rates: 0.0 + // - `17` - Nicht im Inland steuerbare Leistung - tax rates: 0.0 - replaces `"taxType": "noteu"` + // + // For small business owner ("Kleinunternehmer") it can be: + // - `11` - Steuer nicht erhoben nach §19UStG - tax rates: 0.0 - replaces `"taxType": "ss"` + Id CreditNoteResetToOpen200ObjectsTaxRuleId `json:"id"` + + // ObjectName Name of the object. Must always be TaxRule + ObjectName CreditNoteResetToOpen200ObjectsTaxRuleObjectName `json:"objectName"` + } `json:"taxRule,omitempty"` + + // TaxSet **Use this in sevdesk-Update 1.0 (instead of taxRule).** + // + // Tax set of the creditNote. Needs to be added if you chose the tax type custom + TaxSet *struct { + // Id Unique identifier of the object + Id string `json:"id"` + + // ObjectName Model name, which is 'TaxSet' + ObjectName string `json:"objectName"` + } `json:"taxSet"` + + // TaxText A common tax text would be 'Umsatzsteuer 19%' + TaxText *string `json:"taxText"` + + // TaxType **Use this in sevdesk-Update 1.0 (instead of taxRule).** + // + // Tax type of the creditNote. + // There are four tax types: + // 1. default - Umsatzsteuer ausweisen + // 2. eu - Steuerfreie innergemeinschaftliche Lieferung (Europäische Union) + // 3. noteu - Steuerschuldnerschaft des Leistungsempfängers (außerhalb EU, z. B. Schweiz) + // 4. custom - Using custom tax set + // 5. ss - Not subject to VAT according to §19 1 UStG + // Tax rates are heavily connected to the tax type used. + TaxType *string `json:"taxType"` + + // Update Date of last creditNote update + Update *time.Time `json:"update,omitempty"` + } `json:"objects,omitempty"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest ValidationError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + + } + + return response, nil +} + +// ParseCreditNoteSendByResponse parses an HTTP response from a CreditNoteSendByWithResponse call +func ParseCreditNoteSendByResponse(rsp *http.Response) (*CreditNoteSendByResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &CreditNoteSendByResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest ModelCreditNoteResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + + return response, nil +} + +// ParseSendCreditNoteByPrintingResponse parses an HTTP response from a SendCreditNoteByPrintingWithResponse call +func ParseSendCreditNoteByPrintingResponse(rsp *http.Response) (*SendCreditNoteByPrintingResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &SendCreditNoteByPrintingResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest ModelCreditNoteSendByWithRender + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + + return response, nil +} + +// ParseSendCreditNoteViaEMailResponse parses an HTTP response from a SendCreditNoteViaEMailWithResponse call +func ParseSendCreditNoteViaEMailResponse(rsp *http.Response) (*SendCreditNoteViaEMailResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &SendCreditNoteViaEMailResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest struct { + Objects *[]ModelCreditNoteMailResponse `json:"objects,omitempty"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON201 = &dest + + } + + return response, nil +} + +// ParseGetcreditNotePositionsResponse parses an HTTP response from a GetcreditNotePositionsWithResponse call +func ParseGetcreditNotePositionsResponse(rsp *http.Response) (*GetcreditNotePositionsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetcreditNotePositionsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + Objects *[]ModelCreditNotePosResponse `json:"objects,omitempty"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + + return response, nil +} + +// ParseGetLetterpapersWithThumbResponse parses an HTTP response from a GetLetterpapersWithThumbWithResponse call +func ParseGetLetterpapersWithThumbResponse(rsp *http.Response) (*GetLetterpapersWithThumbResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetLetterpapersWithThumbResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + Letterpapers *[]struct { + Default *int `json:"default,omitempty"` + Id *string `json:"id,omitempty"` + Img *string `json:"img,omitempty"` + Name *string `json:"name,omitempty"` + Pdf *string `json:"pdf,omitempty"` + SevClient *string `json:"sevClient,omitempty"` + } `json:"letterpapers,omitempty"` + Result *string `json:"result,omitempty"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + + return response, nil +} + +// ParseGetTemplatesResponse parses an HTTP response from a GetTemplatesWithResponse call +func ParseGetTemplatesResponse(rsp *http.Response) (*GetTemplatesResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetTemplatesResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + Result *string `json:"result,omitempty"` + Templates *[]struct { + Default *int `json:"default,omitempty"` + Html *string `json:"html,omitempty"` + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Premium *bool `json:"premium,omitempty"` + SevClient *string `json:"sevClient,omitempty"` + TranslationCode *string `json:"translationCode,omitempty"` + Type *string `json:"type,omitempty"` + } `json:"templates,omitempty"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + + return response, nil +} + +// ParseExportContactResponse parses an HTTP response from a ExportContactWithResponse call +func ParseExportContactResponse(rsp *http.Response) (*ExportContactResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &ExportContactResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + Objects *struct { + Base64Encoded *bool `json:"base64Encoded,omitempty"` + Content *string `json:"content,omitempty"` + Filename *string `json:"filename,omitempty"` + Mimetype *string `json:"mimetype,omitempty"` + } `json:"objects,omitempty"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + + return response, nil +} + +// ParseExportCreditNoteResponse parses an HTTP response from a ExportCreditNoteWithResponse call +func ParseExportCreditNoteResponse(rsp *http.Response) (*ExportCreditNoteResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &ExportCreditNoteResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + Objects *struct { + Base64Encoded *bool `json:"base64Encoded,omitempty"` + Content *string `json:"content,omitempty"` + Filename *string `json:"filename,omitempty"` + Mimetype *string `json:"mimetype,omitempty"` + } `json:"objects,omitempty"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + + return response, nil +} + +// ParseExportDatevResponse parses an HTTP response from a ExportDatevWithResponse call +func ParseExportDatevResponse(rsp *http.Response) (*ExportDatevResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &ExportDatevResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest map[string]interface{} + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + + return response, nil +} + +// ParseExportInvoiceResponse parses an HTTP response from a ExportInvoiceWithResponse call +func ParseExportInvoiceResponse(rsp *http.Response) (*ExportInvoiceResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &ExportInvoiceResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + Objects *struct { + Base64Encoded *bool `json:"base64Encoded,omitempty"` + Content *string `json:"content,omitempty"` + Filename *string `json:"filename,omitempty"` + Mimetype *string `json:"mimetype,omitempty"` + } `json:"objects,omitempty"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + + return response, nil +} + +// ParseExportInvoiceZipResponse parses an HTTP response from a ExportInvoiceZipWithResponse call +func ParseExportInvoiceZipResponse(rsp *http.Response) (*ExportInvoiceZipResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &ExportInvoiceZipResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + Objects *struct { + Base64Encoded *bool `json:"base64Encoded,omitempty"` + Content *string `json:"content,omitempty"` + Filename *string `json:"filename,omitempty"` + Mimetype *string `json:"mimetype,omitempty"` + } `json:"objects,omitempty"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + + return response, nil +} + +// ParseExportTransactionsResponse parses an HTTP response from a ExportTransactionsWithResponse call +func ParseExportTransactionsResponse(rsp *http.Response) (*ExportTransactionsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &ExportTransactionsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + Objects *struct { + Base64Encoded *bool `json:"base64Encoded,omitempty"` + Content *string `json:"content,omitempty"` + Filename *string `json:"filename,omitempty"` + Mimetype *string `json:"mimetype,omitempty"` + } `json:"objects,omitempty"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + + return response, nil +} + +// ParseExportVoucherResponse parses an HTTP response from a ExportVoucherWithResponse call +func ParseExportVoucherResponse(rsp *http.Response) (*ExportVoucherResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &ExportVoucherResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + Base64Encoded *bool `json:"base64Encoded,omitempty"` + Content *string `json:"content,omitempty"` + Filename *string `json:"filename,omitempty"` + Mimetype *string `json:"mimetype,omitempty"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + + return response, nil +} + +// ParseExportVoucherZipResponse parses an HTTP response from a ExportVoucherZipWithResponse call +func ParseExportVoucherZipResponse(rsp *http.Response) (*ExportVoucherZipResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &ExportVoucherZipResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + Objects *struct { + Base64Encoded *bool `json:"base64Encoded,omitempty"` + Content *string `json:"content,omitempty"` + Filename *string `json:"filename,omitempty"` + Mimetype *string `json:"mimetype,omitempty"` + } `json:"objects,omitempty"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + + return response, nil +} + +// ParseGetInvoicesResponse parses an HTTP response from a GetInvoicesWithResponse call +func ParseGetInvoicesResponse(rsp *http.Response) (*GetInvoicesResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetInvoicesResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + Objects *[]ModelInvoiceResponse `json:"objects,omitempty"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + + return response, nil +} + +// ParseCreateInvoiceFromOrderResponse parses an HTTP response from a CreateInvoiceFromOrderWithResponse call +func ParseCreateInvoiceFromOrderResponse(rsp *http.Response) (*CreateInvoiceFromOrderResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &CreateInvoiceFromOrderResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest ModelInvoiceResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + + return response, nil +} + +// ParseCreateInvoiceReminderResponse parses an HTTP response from a CreateInvoiceReminderWithResponse call +func ParseCreateInvoiceReminderResponse(rsp *http.Response) (*CreateInvoiceReminderResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &CreateInvoiceReminderResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest ModelInvoiceResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + + return response, nil +} + +// ParseCreateInvoiceByFactoryResponse parses an HTTP response from a CreateInvoiceByFactoryWithResponse call +func ParseCreateInvoiceByFactoryResponse(rsp *http.Response) (*CreateInvoiceByFactoryResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &CreateInvoiceByFactoryResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest SaveInvoiceResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON201 = &dest + + } + + return response, nil +} + +// ParseGetInvoiceByIdResponse parses an HTTP response from a GetInvoiceByIdWithResponse call +func ParseGetInvoiceByIdResponse(rsp *http.Response) (*GetInvoiceByIdResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetInvoiceByIdResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + Objects *[]ModelInvoiceResponse `json:"objects,omitempty"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + + return response, nil +} + +// ParseBookInvoiceResponse parses an HTTP response from a BookInvoiceWithResponse call +func ParseBookInvoiceResponse(rsp *http.Response) (*BookInvoiceResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &BookInvoiceResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + AdditionalInformation *string `json:"additionalInformation,omitempty"` + AmmountPayed *string `json:"ammountPayed,omitempty"` + BookingDate *time.Time `json:"bookingDate,omitempty"` + + // Create Date of email creation + Create *time.Time `json:"create,omitempty"` + CreditNote *struct { + // Id The id of the invoice + Id int `json:"id"` + + // ObjectName Internal object name which is 'Invoice'. + ObjectName string `json:"objectName"` + } `json:"creditNote,omitempty"` + FromStatus *string `json:"fromStatus,omitempty"` + Id *string `json:"id,omitempty"` + ObjectName *string `json:"objectName,omitempty"` + + // SevClient Client to which invoice belongs. Will be filled automatically + SevClient *struct { + // Id Unique identifier of the client + Id int `json:"id"` + + // ObjectName Model name, which is 'SevClient' + ObjectName string `json:"objectName"` + } `json:"sevClient,omitempty"` + ToStatus *string `json:"toStatus,omitempty"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + + return response, nil +} + +// ParseCancelInvoiceResponse parses an HTTP response from a CancelInvoiceWithResponse call +func ParseCancelInvoiceResponse(rsp *http.Response) (*CancelInvoiceResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &CancelInvoiceResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest ModelInvoiceResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON201 = &dest + + } + + return response, nil +} + +// ParseUpdateInvoiceTemplateResponse parses an HTTP response from a UpdateInvoiceTemplateWithResponse call +func ParseUpdateInvoiceTemplateResponse(rsp *http.Response) (*UpdateInvoiceTemplateResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &UpdateInvoiceTemplateResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest ModelChangeLayoutResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + + return response, nil +} + +// ParseInvoiceEnshrineResponse parses an HTTP response from a InvoiceEnshrineWithResponse call +func ParseInvoiceEnshrineResponse(rsp *http.Response) (*InvoiceEnshrineResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &InvoiceEnshrineResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + Objects *interface{} `json:"objects,omitempty"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest ValidationError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + + } + + return response, nil +} + +// ParseGetIsInvoicePartiallyPaidResponse parses an HTTP response from a GetIsInvoicePartiallyPaidWithResponse call +func ParseGetIsInvoicePartiallyPaidResponse(rsp *http.Response) (*GetIsInvoicePartiallyPaidResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetIsInvoicePartiallyPaidResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + Objects *bool `json:"objects,omitempty"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + + return response, nil +} + +// ParseInvoiceGetPdfResponse parses an HTTP response from a InvoiceGetPdfWithResponse call +func ParseInvoiceGetPdfResponse(rsp *http.Response) (*InvoiceGetPdfResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &InvoiceGetPdfResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + Base64encoded *bool `json:"base64encoded,omitempty"` + Content *openapi_types.File `json:"content,omitempty"` + Filename *string `json:"filename,omitempty"` + MimeType *string `json:"mimeType,omitempty"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + + return response, nil +} + +// ParseGetInvoicePositionsByIdResponse parses an HTTP response from a GetInvoicePositionsByIdWithResponse call +func ParseGetInvoicePositionsByIdResponse(rsp *http.Response) (*GetInvoicePositionsByIdResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetInvoicePositionsByIdResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + Objects *[]ModelInvoicePosResponse `json:"objects,omitempty"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + + return response, nil +} + +// ParseInvoiceGetXmlResponse parses an HTTP response from a InvoiceGetXmlWithResponse call +func ParseInvoiceGetXmlResponse(rsp *http.Response) (*InvoiceGetXmlResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &InvoiceGetXmlResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + Object *string `json:"object,omitempty"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + + return response, nil +} + +// ParseInvoiceRenderResponse parses an HTTP response from a InvoiceRenderWithResponse call +func ParseInvoiceRenderResponse(rsp *http.Response) (*InvoiceRenderResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &InvoiceRenderResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest struct { + DocId *string `json:"docId,omitempty"` + Pages *int `json:"pages,omitempty"` + Parameters *[]struct { + Key *string `json:"key,omitempty"` + Name *string `json:"name,omitempty"` + Value *string `json:"value,omitempty"` + Values *[]struct { + Name *string `json:"name,omitempty"` + TranslationCade *string `json:"translationCade,omitempty"` + Value *string `json:"value,omitempty"` + } `json:"values,omitempty"` + Visible *bool `json:"visible,omitempty"` + } `json:"parameters,omitempty"` + Thumbs *[]interface{} `json:"thumbs,omitempty"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON201 = &dest + + } + + return response, nil +} + +// ParseInvoiceResetToDraftResponse parses an HTTP response from a InvoiceResetToDraftWithResponse call +func ParseInvoiceResetToDraftResponse(rsp *http.Response) (*InvoiceResetToDraftResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &InvoiceResetToDraftResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + Objects *struct { + AccountIntervall *interface{} `json:"accountIntervall,omitempty"` + AccountNextInvoice *interface{} `json:"accountNextInvoice,omitempty"` + + // Address Complete address of the recipient including name, street, city, zip and country. + // * Line breaks can be used and will be displayed on the invoice pdf. + Address *string `json:"address,omitempty"` + + // AddressCountry Can be omitted as complete address is defined in address attribute + AddressCountry *struct { + // Id Unique identifier of the country + Id string `json:"id"` + + // ObjectName Model name, which is 'StaticCountry' + ObjectName string `json:"objectName"` + } `json:"addressCountry,omitempty"` + + // Contact The contact used in the invoice + Contact *struct { + // Id Unique identifier of the contact + Id string `json:"id"` + + // ObjectName Model name, which is 'Contact' + ObjectName string `json:"objectName"` + } `json:"contact,omitempty"` + + // ContactPerson The user who acts as a contact person for the invoice + ContactPerson *struct { + // Id Unique identifier of the user + Id string `json:"id"` + + // ObjectName Model name, which is 'SevUser' + ObjectName string `json:"objectName"` + } `json:"contactPerson,omitempty"` + + // CostCentre Cost centre for the invoice + CostCentre *struct { + // Id Unique identifier of the cost centre + Id string `json:"id"` + + // ObjectName Model name, which is 'CostCentre' + ObjectName string `json:"objectName"` + } `json:"costCentre,omitempty"` + + // Create Date of invoice creation + Create *time.Time `json:"create,omitempty"` + + // CreateUser Will be filled automatically by our system and can't be changed + CreateUser *struct { + // Id Unique identifier of the user + Id string `json:"id"` + + // ObjectName Model name, which is 'SevUser' + ObjectName string `json:"objectName"` + } `json:"createUser,omitempty"` + + // Currency Currency used in the invoice. Needs to be currency code according to ISO-4217 + Currency *string `json:"currency,omitempty"` + + // CustomerInternalNote Internal note of the customer. Contains data entered into field 'Referenz/Bestellnummer' + CustomerInternalNote *string `json:"customerInternalNote,omitempty"` + + // DatevConnectOnline Internal attribute + DatevConnectOnline *map[string]interface{} `json:"datevConnectOnline,omitempty"` + + // DeliveryDate Timestamp. This can also be a date range if you also use the attribute deliveryDateUntil + DeliveryDate *time.Time `json:"deliveryDate,omitempty"` + + // DeliveryDateUntil If the delivery date should be a time range, another timestamp can be provided in this attribute + // * to define a range from timestamp used in deliveryDate attribute to the timestamp used here. + DeliveryDateUntil *string `json:"deliveryDateUntil,omitempty"` + + // Discount If you want to give a discount, define the percentage here. Otherwise provide zero as value + Discount *string `json:"discount,omitempty"` + + // DiscountTime If a value other than zero is used for the discount attribute, + // you need to specify the amount of days for which the discount is granted. + DiscountTime *string `json:"discountTime,omitempty"` + + // DunningLevel Defines how many reminders have already been sent for the invoice. + // Starts with 1 (Payment reminder) and should be incremented by one every time another reminder is sent. + DunningLevel *string `json:"dunningLevel,omitempty"` + Enshrined *interface{} `json:"enshrined,omitempty"` + + // FootText Certain html tags can be used here to format your text + FootText *string `json:"footText,omitempty"` + + // HeadText Certain html tags can be used here to format your text + HeadText *string `json:"headText,omitempty"` + + // Header Normally consist of prefix plus the invoice number + Header *string `json:"header,omitempty"` + + // Id The invoice id + Id *string `json:"id,omitempty"` + + // InvoiceDate The invoice date. + InvoiceDate *string `json:"invoiceDate,omitempty"` + + // InvoiceNumber The invoice number + InvoiceNumber *string `json:"invoiceNumber,omitempty"` + + // InvoiceType Type of the invoice. For more information on the different types, check + // this section + InvoiceType *InvoiceResetToDraft200ObjectsInvoiceType `json:"invoiceType,omitempty"` + + // ObjectName The invoice object name + ObjectName *string `json:"objectName,omitempty"` + + // Origin Origin of the invoice. Could f.e. be an order + Origin *struct { + // Id Unique identifier of the object + Id string `json:"id"` + + // ObjectName Model name. Could f.e. be 'Order'' + ObjectName string `json:"objectName"` + } `json:"origin,omitempty"` + + // PaidAmount Amount which has already been paid for this invoice by the customer + PaidAmount *float32 `json:"paidAmount,omitempty"` + PayDate *interface{} `json:"payDate,omitempty"` + + // PaymentMethod Payment method used for the invoice + PaymentMethod *struct { + // Id Unique identifier of the payment method + Id string `json:"id"` + + // ObjectName Model name, which is 'PaymentMethod' + ObjectName string `json:"objectName"` + } `json:"paymentMethod,omitempty"` + + // ReminderCharge The additional reminder charge + ReminderCharge *string `json:"reminderCharge,omitempty"` + + // ReminderDeadline Deadline of the reminder as timestamp + ReminderDeadline *time.Time `json:"reminderDeadline,omitempty"` + + // ReminderDebit Debit of the reminder + ReminderDebit *string `json:"reminderDebit,omitempty"` + + // ReminderTotal Total reminder amount + ReminderTotal *string `json:"reminderTotal,omitempty"` + + // SendDate The date the invoice was sent to the customer + SendDate *time.Time `json:"sendDate,omitempty"` + + // SendPaymentReceivedNotificationDate Internal attribute + SendPaymentReceivedNotificationDate *string `json:"sendPaymentReceivedNotificationDate,omitempty"` + + // SendType Type which was used to send the invoice. IMPORTANT: Please refer to the invoice section of the + // * API-Overview to understand how this attribute can be used before using it! + SendType *InvoiceResetToDraft200ObjectsSendType `json:"sendType,omitempty"` + + // SevClient Client to which invoice belongs. Will be filled automatically + SevClient *struct { + // Id Unique identifier of the client + Id string `json:"id"` + + // ObjectName Model name, which is 'SevClient' + ObjectName string `json:"objectName"` + } `json:"sevClient,omitempty"` + + // ShowNet If true, the net amount of each position will be shown on the invoice. Otherwise gross amount + ShowNet *bool `json:"showNet,omitempty"` + + // SmallSettlement Defines if the client uses the small settlement scheme. + // If yes, the invoice must not contain any vat + SmallSettlement *bool `json:"smallSettlement,omitempty"` + + // Status Please have a look in our + // Types and status of invoices + // to see what the different status codes mean + Status *InvoiceResetToDraft200ObjectsStatus `json:"status,omitempty"` + + // SumDiscounts Sum of all discounts in the invoice + SumDiscounts *string `json:"sumDiscounts,omitempty"` + + // SumDiscountsForeignCurrency Discounts sum of the invoice in the foreign currency + SumDiscountsForeignCurrency *string `json:"sumDiscountsForeignCurrency,omitempty"` + + // SumGross Gross sum of the invoice + SumGross *string `json:"sumGross,omitempty"` + + // SumGrossAccounting Gross accounting sum of the invoice. Is usually the same as sumGross + SumGrossAccounting *string `json:"sumGrossAccounting,omitempty"` + + // SumGrossForeignCurrency Gross sum of the invoice in the foreign currency + SumGrossForeignCurrency *string `json:"sumGrossForeignCurrency,omitempty"` + + // SumNet Net sum of the invoice + SumNet *string `json:"sumNet,omitempty"` + + // SumNetAccounting Net accounting sum of the invoice. Is usually the same as sumNet + SumNetAccounting *string `json:"sumNetAccounting,omitempty"` + + // SumNetForeignCurrency Net sum of the invoice in the foreign currency + SumNetForeignCurrency *string `json:"sumNetForeignCurrency,omitempty"` + + // SumTax Tax sum of the invoice + SumTax *string `json:"sumTax,omitempty"` + + // SumTaxAccounting Tax accounting sum of the invoice. Is usually the same as sumTax + SumTaxAccounting *string `json:"sumTaxAccounting,omitempty"` + + // SumTaxForeignCurrency Tax sum of the invoice in the foreign currency + SumTaxForeignCurrency *string `json:"sumTaxForeignCurrency,omitempty"` + + // TaxRate This is not used anymore. Use the taxRate of the individual positions instead. + TaxRate *string `json:"taxRate,omitempty"` + + // TaxRule **Use this in sevdesk-Update 2.0 (replaces taxType / taxSet).** + TaxRule *struct { + // Id **Use this in sevdesk-Update 2.0 (replaces taxType / taxSet).** + // + // Defines the vat-regulation. + // For "Regelbesteuerung" it can be one of: + // - `1` - Umsatzsteuerpflichtige Umsätze - tax rates: 0.0, 7.0, 19.0 - replaces `"taxType": "default"` + // - `2` - Ausfuhren - allowedTaxRates: 0.0 + // - `3` - Innergemeinschaftliche Lieferungen - tax rates: 0.0, 7.0, 19.0 - replaces `"taxType": "eu"` + // - `4` - Steuerfreie Umsätze §4 UStG - tax rates: 0.0 + // - `5` - Reverse Charge gem. §13b UStG - tax rates: 0.0 + // - `17` - Nicht im Inland steuerbare Leistung - tax rates: 0.0 - replaces `"taxType": "noteu"` + // - "Nicht im Inland steuerbare Leistung" is not available for: + // - advance invoice (`"invoiceType": "AR"`) + // - partial invoice (`"invoiceType": "TR"`) + // - final invoice (`"invoiceType": "ER"`) + // + // For small business owner ("Kleinunternehmer") it can be: + // - `11` - Steuer nicht erhoben nach §19UStG - tax rates: 0.0 - replaces `"taxType": "ss"` + Id InvoiceResetToDraft200ObjectsTaxRuleId `json:"id"` + + // ObjectName Name of the object. Must always be TaxRule + ObjectName InvoiceResetToDraft200ObjectsTaxRuleObjectName `json:"objectName"` + } `json:"taxRule,omitempty"` + + // TaxSet **Use this in sevdesk-Update 1.0 (instead of taxRule).** + // + // Tax set of the invoice. Needs to be added if you chose the tax type custom + TaxSet *struct { + // Id Unique identifier of the object + Id string `json:"id"` + + // ObjectName Model name, which is 'TaxSet' + ObjectName string `json:"objectName"` + } `json:"taxSet,omitempty"` + + // TaxText A common tax text would be 'Umsatzsteuer 19%' + TaxText *string `json:"taxText,omitempty"` + + // TaxType **Use this in sevdesk-Update 1.0 (instead of taxRule).** + // + // Tax type of the invoice. + // There are four tax types: + // 1. default - Umsatzsteuer ausweisen + // 2. eu - Steuerfreie innergemeinschaftliche Lieferung (Europäische Union) + // 3. noteu - Steuerschuldnerschaft des Leistungsempfängers (außerhalb EU, z. B. Schweiz) + // 4. custom - Using custom tax set + // 5. ss - Not subject to VAT according to §19 1 UStG + // Tax rates are heavily connected to the tax type used. + TaxType *InvoiceResetToDraft200ObjectsTaxType `json:"taxType,omitempty"` + + // TimeToPay The time the customer has to pay the invoice in days + TimeToPay *string `json:"timeToPay,omitempty"` + + // Update Date of last invoice update + Update *time.Time `json:"update,omitempty"` + } `json:"objects,omitempty"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest ValidationError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + + } + + return response, nil +} + +// ParseInvoiceResetToOpenResponse parses an HTTP response from a InvoiceResetToOpenWithResponse call +func ParseInvoiceResetToOpenResponse(rsp *http.Response) (*InvoiceResetToOpenResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &InvoiceResetToOpenResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + Objects *struct { + AccountIntervall *interface{} `json:"accountIntervall,omitempty"` + AccountNextInvoice *interface{} `json:"accountNextInvoice,omitempty"` + + // Address Complete address of the recipient including name, street, city, zip and country. + // * Line breaks can be used and will be displayed on the invoice pdf. + Address *string `json:"address,omitempty"` + + // AddressCountry Can be omitted as complete address is defined in address attribute + AddressCountry *struct { + // Id Unique identifier of the country + Id string `json:"id"` + + // ObjectName Model name, which is 'StaticCountry' + ObjectName string `json:"objectName"` + } `json:"addressCountry,omitempty"` + + // Contact The contact used in the invoice + Contact *struct { + // Id Unique identifier of the contact + Id string `json:"id"` + + // ObjectName Model name, which is 'Contact' + ObjectName string `json:"objectName"` + } `json:"contact,omitempty"` + + // ContactPerson The user who acts as a contact person for the invoice + ContactPerson *struct { + // Id Unique identifier of the user + Id string `json:"id"` + + // ObjectName Model name, which is 'SevUser' + ObjectName string `json:"objectName"` + } `json:"contactPerson,omitempty"` + + // CostCentre Cost centre for the invoice + CostCentre *struct { + // Id Unique identifier of the cost centre + Id string `json:"id"` + + // ObjectName Model name, which is 'CostCentre' + ObjectName string `json:"objectName"` + } `json:"costCentre,omitempty"` + + // Create Date of invoice creation + Create *time.Time `json:"create,omitempty"` + + // CreateUser Will be filled automatically by our system and can't be changed + CreateUser *struct { + // Id Unique identifier of the user + Id string `json:"id"` + + // ObjectName Model name, which is 'SevUser' + ObjectName string `json:"objectName"` + } `json:"createUser,omitempty"` + + // Currency Currency used in the invoice. Needs to be currency code according to ISO-4217 + Currency *string `json:"currency,omitempty"` + + // CustomerInternalNote Internal note of the customer. Contains data entered into field 'Referenz/Bestellnummer' + CustomerInternalNote *string `json:"customerInternalNote,omitempty"` + + // DatevConnectOnline Internal attribute + DatevConnectOnline *map[string]interface{} `json:"datevConnectOnline,omitempty"` + + // DeliveryDate Timestamp. This can also be a date range if you also use the attribute deliveryDateUntil + DeliveryDate *time.Time `json:"deliveryDate,omitempty"` + + // DeliveryDateUntil If the delivery date should be a time range, another timestamp can be provided in this attribute + // * to define a range from timestamp used in deliveryDate attribute to the timestamp used here. + DeliveryDateUntil *string `json:"deliveryDateUntil,omitempty"` + + // Discount If you want to give a discount, define the percentage here. Otherwise provide zero as value + Discount *string `json:"discount,omitempty"` + + // DiscountTime If a value other than zero is used for the discount attribute, + // you need to specify the amount of days for which the discount is granted. + DiscountTime *string `json:"discountTime,omitempty"` + + // DunningLevel Defines how many reminders have already been sent for the invoice. + // Starts with 1 (Payment reminder) and should be incremented by one every time another reminder is sent. + DunningLevel *string `json:"dunningLevel,omitempty"` + Enshrined *interface{} `json:"enshrined,omitempty"` + + // FootText Certain html tags can be used here to format your text + FootText *string `json:"footText,omitempty"` + + // HeadText Certain html tags can be used here to format your text + HeadText *string `json:"headText,omitempty"` + + // Header Normally consist of prefix plus the invoice number + Header *string `json:"header,omitempty"` + + // Id The invoice id + Id *string `json:"id,omitempty"` + + // InvoiceDate The invoice date. + InvoiceDate *string `json:"invoiceDate,omitempty"` + + // InvoiceNumber The invoice number + InvoiceNumber *string `json:"invoiceNumber,omitempty"` + + // InvoiceType Type of the invoice. For more information on the different types, check + // this section + InvoiceType *InvoiceResetToOpen200ObjectsInvoiceType `json:"invoiceType,omitempty"` + + // ObjectName The invoice object name + ObjectName *string `json:"objectName,omitempty"` + + // Origin Origin of the invoice. Could f.e. be an order + Origin *struct { + // Id Unique identifier of the object + Id string `json:"id"` + + // ObjectName Model name. Could f.e. be 'Order'' + ObjectName string `json:"objectName"` + } `json:"origin,omitempty"` + + // PaidAmount Amount which has already been paid for this invoice by the customer + PaidAmount *float32 `json:"paidAmount,omitempty"` + PayDate *interface{} `json:"payDate,omitempty"` + + // PaymentMethod Payment method used for the invoice + PaymentMethod *struct { + // Id Unique identifier of the payment method + Id string `json:"id"` + + // ObjectName Model name, which is 'PaymentMethod' + ObjectName string `json:"objectName"` + } `json:"paymentMethod,omitempty"` + + // ReminderCharge The additional reminder charge + ReminderCharge *string `json:"reminderCharge,omitempty"` + + // ReminderDeadline Deadline of the reminder as timestamp + ReminderDeadline *time.Time `json:"reminderDeadline,omitempty"` + + // ReminderDebit Debit of the reminder + ReminderDebit *string `json:"reminderDebit,omitempty"` + + // ReminderTotal Total reminder amount + ReminderTotal *string `json:"reminderTotal,omitempty"` + + // SendDate The date the invoice was sent to the customer + SendDate *time.Time `json:"sendDate,omitempty"` + + // SendPaymentReceivedNotificationDate Internal attribute + SendPaymentReceivedNotificationDate *string `json:"sendPaymentReceivedNotificationDate,omitempty"` + + // SendType Type which was used to send the invoice. IMPORTANT: Please refer to the invoice section of the + // * API-Overview to understand how this attribute can be used before using it! + SendType *InvoiceResetToOpen200ObjectsSendType `json:"sendType,omitempty"` + + // SevClient Client to which invoice belongs. Will be filled automatically + SevClient *struct { + // Id Unique identifier of the client + Id string `json:"id"` + + // ObjectName Model name, which is 'SevClient' + ObjectName string `json:"objectName"` + } `json:"sevClient,omitempty"` + + // ShowNet If true, the net amount of each position will be shown on the invoice. Otherwise gross amount + ShowNet *bool `json:"showNet,omitempty"` + + // SmallSettlement Defines if the client uses the small settlement scheme. + // If yes, the invoice must not contain any vat + SmallSettlement *bool `json:"smallSettlement,omitempty"` + Status *interface{} `json:"status,omitempty"` + + // SumDiscounts Sum of all discounts in the invoice + SumDiscounts *string `json:"sumDiscounts,omitempty"` + + // SumDiscountsForeignCurrency Discounts sum of the invoice in the foreign currency + SumDiscountsForeignCurrency *string `json:"sumDiscountsForeignCurrency,omitempty"` + + // SumGross Gross sum of the invoice + SumGross *string `json:"sumGross,omitempty"` + + // SumGrossAccounting Gross accounting sum of the invoice. Is usually the same as sumGross + SumGrossAccounting *string `json:"sumGrossAccounting,omitempty"` + + // SumGrossForeignCurrency Gross sum of the invoice in the foreign currency + SumGrossForeignCurrency *string `json:"sumGrossForeignCurrency,omitempty"` + + // SumNet Net sum of the invoice + SumNet *string `json:"sumNet,omitempty"` + + // SumNetAccounting Net accounting sum of the invoice. Is usually the same as sumNet + SumNetAccounting *string `json:"sumNetAccounting,omitempty"` + + // SumNetForeignCurrency Net sum of the invoice in the foreign currency + SumNetForeignCurrency *string `json:"sumNetForeignCurrency,omitempty"` + + // SumTax Tax sum of the invoice + SumTax *string `json:"sumTax,omitempty"` + + // SumTaxAccounting Tax accounting sum of the invoice. Is usually the same as sumTax + SumTaxAccounting *string `json:"sumTaxAccounting,omitempty"` + + // SumTaxForeignCurrency Tax sum of the invoice in the foreign currency + SumTaxForeignCurrency *string `json:"sumTaxForeignCurrency,omitempty"` + + // TaxRate This is not used anymore. Use the taxRate of the individual positions instead. + TaxRate *string `json:"taxRate,omitempty"` + + // TaxRule **Use this in sevdesk-Update 2.0 (replaces taxType / taxSet).** + TaxRule *struct { + // Id **Use this in sevdesk-Update 2.0 (replaces taxType / taxSet).** + // + // Defines the vat-regulation. + // For "Regelbesteuerung" it can be one of: + // - `1` - Umsatzsteuerpflichtige Umsätze - tax rates: 0.0, 7.0, 19.0 - replaces `"taxType": "default"` + // - `2` - Ausfuhren - allowedTaxRates: 0.0 + // - `3` - Innergemeinschaftliche Lieferungen - tax rates: 0.0, 7.0, 19.0 - replaces `"taxType": "eu"` + // - `4` - Steuerfreie Umsätze §4 UStG - tax rates: 0.0 + // - `5` - Reverse Charge gem. §13b UStG - tax rates: 0.0 + // - `17` - Nicht im Inland steuerbare Leistung - tax rates: 0.0 - replaces `"taxType": "noteu"` + // - "Nicht im Inland steuerbare Leistung" is not available for: + // - advance invoice (`"invoiceType": "AR"`) + // - partial invoice (`"invoiceType": "TR"`) + // - final invoice (`"invoiceType": "ER"`) + // + // For small business owner ("Kleinunternehmer") it can be: + // - `11` - Steuer nicht erhoben nach §19UStG - tax rates: 0.0 - replaces `"taxType": "ss"` + Id InvoiceResetToOpen200ObjectsTaxRuleId `json:"id"` + + // ObjectName Name of the object. Must always be TaxRule + ObjectName InvoiceResetToOpen200ObjectsTaxRuleObjectName `json:"objectName"` + } `json:"taxRule,omitempty"` + + // TaxSet **Use this in sevdesk-Update 1.0 (instead of taxRule).** + // + // Tax set of the invoice. Needs to be added if you chose the tax type custom + TaxSet *struct { + // Id Unique identifier of the object + Id string `json:"id"` + + // ObjectName Model name, which is 'TaxSet' + ObjectName string `json:"objectName"` + } `json:"taxSet,omitempty"` + + // TaxText A common tax text would be 'Umsatzsteuer 19%' + TaxText *string `json:"taxText,omitempty"` + + // TaxType **Use this in sevdesk-Update 1.0 (instead of taxRule).** + // + // Tax type of the invoice. + // There are four tax types: + // 1. default - Umsatzsteuer ausweisen + // 2. eu - Steuerfreie innergemeinschaftliche Lieferung (Europäische Union) + // 3. noteu - Steuerschuldnerschaft des Leistungsempfängers (außerhalb EU, z. B. Schweiz) + // 4. custom - Using custom tax set + // 5. ss - Not subject to VAT according to §19 1 UStG + // Tax rates are heavily connected to the tax type used. + TaxType *InvoiceResetToOpen200ObjectsTaxType `json:"taxType,omitempty"` + + // TimeToPay The time the customer has to pay the invoice in days + TimeToPay *string `json:"timeToPay,omitempty"` + + // Update Date of last invoice update + Update *time.Time `json:"update,omitempty"` + } `json:"objects,omitempty"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest ValidationError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + + } + + return response, nil +} + +// ParseInvoiceSendByResponse parses an HTTP response from a InvoiceSendByWithResponse call +func ParseInvoiceSendByResponse(rsp *http.Response) (*InvoiceSendByResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &InvoiceSendByResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest ModelInvoiceResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + + return response, nil +} + +// ParseSendInvoiceViaEMailResponse parses an HTTP response from a SendInvoiceViaEMailWithResponse call +func ParseSendInvoiceViaEMailResponse(rsp *http.Response) (*SendInvoiceViaEMailResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &SendInvoiceViaEMailResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest ModelEmail + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON201 = &dest + + } + + return response, nil +} + +// ParseGetInvoicePosResponse parses an HTTP response from a GetInvoicePosWithResponse call +func ParseGetInvoicePosResponse(rsp *http.Response) (*GetInvoicePosResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetInvoicePosResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + Objects *[]ModelInvoicePosResponse `json:"objects,omitempty"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + + return response, nil +} + +// ParseGetOrdersResponse parses an HTTP response from a GetOrdersWithResponse call +func ParseGetOrdersResponse(rsp *http.Response) (*GetOrdersResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetOrdersResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + Objects *[]ModelOrderResponse `json:"objects,omitempty"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + + return response, nil +} + +// ParseCreateContractNoteFromOrderResponse parses an HTTP response from a CreateContractNoteFromOrderWithResponse call +func ParseCreateContractNoteFromOrderResponse(rsp *http.Response) (*CreateContractNoteFromOrderResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &CreateContractNoteFromOrderResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest ModelOrderResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + + return response, nil +} + +// ParseCreatePackingListFromOrderResponse parses an HTTP response from a CreatePackingListFromOrderWithResponse call +func ParseCreatePackingListFromOrderResponse(rsp *http.Response) (*CreatePackingListFromOrderResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &CreatePackingListFromOrderResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest ModelOrderResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + + return response, nil +} + +// ParseCreateOrderResponse parses an HTTP response from a CreateOrderWithResponse call +func ParseCreateOrderResponse(rsp *http.Response) (*CreateOrderResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &CreateOrderResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest SaveOrderResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON201 = &dest + + } + + return response, nil +} + +// ParseDeleteOrderResponse parses an HTTP response from a DeleteOrderWithResponse call +func ParseDeleteOrderResponse(rsp *http.Response) (*DeleteOrderResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &DeleteOrderResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + Objects *[]interface{} `json:"objects,omitempty"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + + return response, nil +} + +// ParseGetOrderByIdResponse parses an HTTP response from a GetOrderByIdWithResponse call +func ParseGetOrderByIdResponse(rsp *http.Response) (*GetOrderByIdResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetOrderByIdResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + Objects *[]ModelOrderResponse `json:"objects,omitempty"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + + return response, nil +} + +// ParseUpdateOrderResponse parses an HTTP response from a UpdateOrderWithResponse call +func ParseUpdateOrderResponse(rsp *http.Response) (*UpdateOrderResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &UpdateOrderResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest ModelOrderResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + + return response, nil +} + +// ParseUpdateOrderTemplateResponse parses an HTTP response from a UpdateOrderTemplateWithResponse call +func ParseUpdateOrderTemplateResponse(rsp *http.Response) (*UpdateOrderTemplateResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &UpdateOrderTemplateResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest ModelChangeLayoutResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + + return response, nil +} + +// ParseGetDiscountsResponse parses an HTTP response from a GetDiscountsWithResponse call +func ParseGetDiscountsResponse(rsp *http.Response) (*GetDiscountsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetDiscountsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + Objects *[]ModelDiscount `json:"objects,omitempty"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + + return response, nil +} + +// ParseOrderGetPdfResponse parses an HTTP response from a OrderGetPdfWithResponse call +func ParseOrderGetPdfResponse(rsp *http.Response) (*OrderGetPdfResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &OrderGetPdfResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + Base64encoded *bool `json:"base64encoded,omitempty"` + Content *openapi_types.File `json:"content,omitempty"` + Filename *string `json:"filename,omitempty"` + MimeType *string `json:"mimeType,omitempty"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + + return response, nil +} + +// ParseGetOrderPositionsByIdResponse parses an HTTP response from a GetOrderPositionsByIdWithResponse call +func ParseGetOrderPositionsByIdResponse(rsp *http.Response) (*GetOrderPositionsByIdResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetOrderPositionsByIdResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + Objects *[]ModelOrderPosResponse `json:"objects,omitempty"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + + return response, nil +} + +// ParseGetRelatedObjectsResponse parses an HTTP response from a GetRelatedObjectsWithResponse call +func ParseGetRelatedObjectsResponse(rsp *http.Response) (*GetRelatedObjectsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetRelatedObjectsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + Objects *[]ModelOrderPosResponse `json:"objects,omitempty"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + + return response, nil +} + +// ParseOrderSendByResponse parses an HTTP response from a OrderSendByWithResponse call +func ParseOrderSendByResponse(rsp *http.Response) (*OrderSendByResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &OrderSendByResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest ModelOrderResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + + return response, nil +} + +// ParseSendorderViaEMailResponse parses an HTTP response from a SendorderViaEMailWithResponse call +func ParseSendorderViaEMailResponse(rsp *http.Response) (*SendorderViaEMailResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &SendorderViaEMailResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest struct { + Objects *[]ModelEmailOrder `json:"objects,omitempty"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON201 = &dest + + } + + return response, nil +} + +// ParseGetOrderPositionsResponse parses an HTTP response from a GetOrderPositionsWithResponse call +func ParseGetOrderPositionsResponse(rsp *http.Response) (*GetOrderPositionsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetOrderPositionsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + Objects *[]ModelOrderPosResponse `json:"objects,omitempty"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + + return response, nil +} + +// ParseDeleteOrderPosResponse parses an HTTP response from a DeleteOrderPosWithResponse call +func ParseDeleteOrderPosResponse(rsp *http.Response) (*DeleteOrderPosResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &DeleteOrderPosResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + Objects *[]interface{} `json:"objects,omitempty"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + + return response, nil +} + +// ParseGetOrderPositionByIdResponse parses an HTTP response from a GetOrderPositionByIdWithResponse call +func ParseGetOrderPositionByIdResponse(rsp *http.Response) (*GetOrderPositionByIdResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetOrderPositionByIdResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + Objects *[]ModelOrderPosResponse `json:"objects,omitempty"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + + return response, nil +} + +// ParseUpdateOrderPositionResponse parses an HTTP response from a UpdateOrderPositionWithResponse call +func ParseUpdateOrderPositionResponse(rsp *http.Response) (*UpdateOrderPositionResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &UpdateOrderPositionResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest ModelOrderPosResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + + return response, nil +} + +// ParseGetPartsResponse parses an HTTP response from a GetPartsWithResponse call +func ParseGetPartsResponse(rsp *http.Response) (*GetPartsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetPartsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + Objects *[]ModelPart `json:"objects,omitempty"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + + return response, nil +} + +// ParseCreatePartResponse parses an HTTP response from a CreatePartWithResponse call +func ParseCreatePartResponse(rsp *http.Response) (*CreatePartResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &CreatePartResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest ModelPart + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON201 = &dest + + } + + return response, nil +} + +// ParseGetPartByIdResponse parses an HTTP response from a GetPartByIdWithResponse call +func ParseGetPartByIdResponse(rsp *http.Response) (*GetPartByIdResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetPartByIdResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + Objects *[]ModelPart `json:"objects,omitempty"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + + return response, nil +} + +// ParseUpdatePartResponse parses an HTTP response from a UpdatePartWithResponse call +func ParseUpdatePartResponse(rsp *http.Response) (*UpdatePartResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &UpdatePartResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest ModelPart + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + + return response, nil +} + +// ParsePartGetStockResponse parses an HTTP response from a PartGetStockWithResponse call +func ParsePartGetStockResponse(rsp *http.Response) (*PartGetStockResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PartGetStockResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + // Objects Stock amount + Objects *int `json:"objects,omitempty"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + + return response, nil +} + +// ParseForAccountNumberResponse parses an HTTP response from a ForAccountNumberWithResponse call +func ParseForAccountNumberResponse(rsp *http.Response) (*ForAccountNumberResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &ForAccountNumberResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + Objects *[]ReceiptGuideDto `json:"objects,omitempty"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + + return response, nil +} + +// ParseForAllAccountsResponse parses an HTTP response from a ForAllAccountsWithResponse call +func ParseForAllAccountsResponse(rsp *http.Response) (*ForAllAccountsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &ForAllAccountsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + Objects *[]ReceiptGuideDto `json:"objects,omitempty"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + + return response, nil +} + +// ParseForExpenseResponse parses an HTTP response from a ForExpenseWithResponse call +func ParseForExpenseResponse(rsp *http.Response) (*ForExpenseResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &ForExpenseResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + Objects *[]ReceiptGuideDto `json:"objects,omitempty"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + + return response, nil +} + +// ParseForRevenueResponse parses an HTTP response from a ForRevenueWithResponse call +func ParseForRevenueResponse(rsp *http.Response) (*ForRevenueResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &ForRevenueResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + Objects *[]ReceiptGuideDto `json:"objects,omitempty"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + + return response, nil +} + +// ParseForTaxRuleResponse parses an HTTP response from a ForTaxRuleWithResponse call +func ParseForTaxRuleResponse(rsp *http.Response) (*ForTaxRuleResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &ForTaxRuleResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + Objects *[]ReceiptGuideDto `json:"objects,omitempty"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + + return response, nil +} + +// ParseReportContactResponse parses an HTTP response from a ReportContactWithResponse call +func ParseReportContactResponse(rsp *http.Response) (*ReportContactResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &ReportContactResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + Objects *struct { + Base64Encoded *bool `json:"base64Encoded,omitempty"` + Content *string `json:"content,omitempty"` + Filename *string `json:"filename,omitempty"` + Mimetype *string `json:"mimetype,omitempty"` + } `json:"objects,omitempty"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + + return response, nil +} + +// ParseReportInvoiceResponse parses an HTTP response from a ReportInvoiceWithResponse call +func ParseReportInvoiceResponse(rsp *http.Response) (*ReportInvoiceResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &ReportInvoiceResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + Objects *struct { + Base64Encoded *bool `json:"base64Encoded,omitempty"` + Content *string `json:"content,omitempty"` + Filename *string `json:"filename,omitempty"` + Mimetype *string `json:"mimetype,omitempty"` + } `json:"objects,omitempty"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + + return response, nil +} + +// ParseReportOrderResponse parses an HTTP response from a ReportOrderWithResponse call +func ParseReportOrderResponse(rsp *http.Response) (*ReportOrderResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &ReportOrderResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + Objects *struct { + Base64Encoded *bool `json:"base64Encoded,omitempty"` + Content *string `json:"content,omitempty"` + Filename *string `json:"filename,omitempty"` + Mimetype *string `json:"mimetype,omitempty"` + } `json:"objects,omitempty"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + + return response, nil +} + +// ParseReportVoucherResponse parses an HTTP response from a ReportVoucherWithResponse call +func ParseReportVoucherResponse(rsp *http.Response) (*ReportVoucherResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &ReportVoucherResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + Objects *struct { + Base64Encoded *bool `json:"base64Encoded,omitempty"` + Content *string `json:"content,omitempty"` + Filename *string `json:"filename,omitempty"` + Mimetype *string `json:"mimetype,omitempty"` + } `json:"objects,omitempty"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + + return response, nil +} + +// ParseUpdateExportConfigResponse parses an HTTP response from a UpdateExportConfigWithResponse call +func ParseUpdateExportConfigResponse(rsp *http.Response) (*UpdateExportConfigResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &UpdateExportConfigResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + Objects *interface{} `json:"objects,omitempty"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + + return response, nil +} + +// ParseGetTagsResponse parses an HTTP response from a GetTagsWithResponse call +func ParseGetTagsResponse(rsp *http.Response) (*GetTagsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetTagsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + Objects *[]ModelTagResponse `json:"objects,omitempty"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + + return response, nil +} + +// ParseCreateTagResponse parses an HTTP response from a CreateTagWithResponse call +func ParseCreateTagResponse(rsp *http.Response) (*CreateTagResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &CreateTagResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest ModelTagCreateResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + + return response, nil +} + +// ParseDeleteTagResponse parses an HTTP response from a DeleteTagWithResponse call +func ParseDeleteTagResponse(rsp *http.Response) (*DeleteTagResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &DeleteTagResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + Objects *[]interface{} `json:"objects,omitempty"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + + return response, nil +} + +// ParseGetTagByIdResponse parses an HTTP response from a GetTagByIdWithResponse call +func ParseGetTagByIdResponse(rsp *http.Response) (*GetTagByIdResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetTagByIdResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + Objects *[]ModelTagResponse `json:"objects,omitempty"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + + return response, nil +} + +// ParseUpdateTagResponse parses an HTTP response from a UpdateTagWithResponse call +func ParseUpdateTagResponse(rsp *http.Response) (*UpdateTagResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &UpdateTagResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest ModelTagResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + + return response, nil +} + +// ParseGetTagRelationsResponse parses an HTTP response from a GetTagRelationsWithResponse call +func ParseGetTagRelationsResponse(rsp *http.Response) (*GetTagRelationsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetTagRelationsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + Objects *[]ModelTagCreateResponse `json:"objects,omitempty"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + + return response, nil +} + +// ParseGetPlaceholderResponse parses an HTTP response from a GetPlaceholderWithResponse call +func ParseGetPlaceholderResponse(rsp *http.Response) (*GetPlaceholderResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetPlaceholderResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + Objects *[]ModelTextparserFetchDictionaryEntriesByTypeResponse `json:"objects,omitempty"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + + return response, nil +} + +// ParseBookkeepingSystemVersionResponse parses an HTTP response from a BookkeepingSystemVersionWithResponse call +func ParseBookkeepingSystemVersionResponse(rsp *http.Response) (*BookkeepingSystemVersionResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &BookkeepingSystemVersionResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + Objects *struct { + Version *BookkeepingSystemVersion200ObjectsVersion `json:"version,omitempty"` + } `json:"objects,omitempty"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + + return response, nil +} + +// ParseGetVouchersResponse parses an HTTP response from a GetVouchersWithResponse call +func ParseGetVouchersResponse(rsp *http.Response) (*GetVouchersResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetVouchersResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + Objects *[]ModelVoucherResponse `json:"objects,omitempty"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + + return response, nil +} + +// ParseVoucherFactorySaveVoucherResponse parses an HTTP response from a VoucherFactorySaveVoucherWithResponse call +func ParseVoucherFactorySaveVoucherResponse(rsp *http.Response) (*VoucherFactorySaveVoucherResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &VoucherFactorySaveVoucherResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest SaveVoucherResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON201 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest ValidationError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + + } + + return response, nil +} + +// ParseVoucherUploadFileResponse parses an HTTP response from a VoucherUploadFileWithResponse call +func ParseVoucherUploadFileResponse(rsp *http.Response) (*VoucherUploadFileResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &VoucherUploadFileResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest struct { + Objects *struct { + Content *[]interface{} `json:"content,omitempty"` + ContentHash *string `json:"contentHash,omitempty"` + Filename *string `json:"filename,omitempty"` + MimeType *string `json:"mimeType,omitempty"` + OriginMimeType *string `json:"originMimeType,omitempty"` + Pages *float32 `json:"pages,omitempty"` + } `json:"objects,omitempty"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON201 = &dest + + } + + return response, nil +} + +// ParseGetVoucherByIdResponse parses an HTTP response from a GetVoucherByIdWithResponse call +func ParseGetVoucherByIdResponse(rsp *http.Response) (*GetVoucherByIdResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetVoucherByIdResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + Objects *[]ModelVoucherResponse `json:"objects,omitempty"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + + return response, nil +} + +// ParseUpdateVoucherResponse parses an HTTP response from a UpdateVoucherWithResponse call +func ParseUpdateVoucherResponse(rsp *http.Response) (*UpdateVoucherResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &UpdateVoucherResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest ModelVoucherResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + + return response, nil +} + +// ParseBookVoucherResponse parses an HTTP response from a BookVoucherWithResponse call +func ParseBookVoucherResponse(rsp *http.Response) (*BookVoucherResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &BookVoucherResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + AdditionalInformation *string `json:"additionalInformation,omitempty"` + AmmountPayed *string `json:"ammountPayed,omitempty"` + BookingDate *time.Time `json:"bookingDate,omitempty"` + + // Create Date of email creation + Create *time.Time `json:"create,omitempty"` + CreditNote *struct { + // Id The id of the voucher + Id int `json:"id"` + + // ObjectName Internal object name which is 'Voucher'. + ObjectName string `json:"objectName"` + } `json:"creditNote,omitempty"` + FromStatus *string `json:"fromStatus,omitempty"` + Id *string `json:"id,omitempty"` + ObjectName *string `json:"objectName,omitempty"` + + // SevClient Client to which invoice belongs. Will be filled automatically + SevClient *struct { + // Id Unique identifier of the client + Id int `json:"id"` + + // ObjectName Model name, which is 'SevClient' + ObjectName string `json:"objectName"` + } `json:"sevClient,omitempty"` + ToStatus *string `json:"toStatus,omitempty"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + + return response, nil +} + +// ParseVoucherEnshrineResponse parses an HTTP response from a VoucherEnshrineWithResponse call +func ParseVoucherEnshrineResponse(rsp *http.Response) (*VoucherEnshrineResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &VoucherEnshrineResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + Objects *interface{} `json:"objects,omitempty"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest ValidationError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + + } + + return response, nil +} + +// ParseVoucherResetToDraftResponse parses an HTTP response from a VoucherResetToDraftWithResponse call +func ParseVoucherResetToDraftResponse(rsp *http.Response) (*VoucherResetToDraftResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &VoucherResetToDraftResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + Objects *struct { + // CostCentre Cost centre for the voucher + CostCentre *struct { + // Id Unique identifier of the cost centre + Id string `json:"id"` + + // ObjectName Model name, which is 'CostCentre' + ObjectName string `json:"objectName"` + } `json:"costCentre,omitempty"` + + // Create Date of voucher creation + Create *time.Time `json:"create,omitempty"` + + // CreateUser User who created the voucher. Will be filled automatically. + CreateUser *struct { + // Id Unique identifier of the user + Id string `json:"id"` + + // ObjectName Model name, which is 'SevUser' + ObjectName string `json:"objectName"` + } `json:"createUser,omitempty"` + + // CreditDebit Defines if your voucher is a credit (C) or debit (D) + CreditDebit *VoucherResetToDraft200ObjectsCreditDebit `json:"creditDebit"` + + // Currency specifies which currency the voucher should have. Attention: If the currency differs from the default currency stored in the account, then either the "propertyForeignCurrencyDeadline" or "propertyExchangeRate" parameter must be specified. If both parameters are specified, then the "propertyForeignCurrencyDeadline" parameter is preferred + Currency *string `json:"currency"` + + // DeliveryDate Needs to be provided as timestamp or dd.mm.yyyy + DeliveryDate *time.Time `json:"deliveryDate,omitempty"` + + // DeliveryDateUntil Needs to be provided as timestamp or dd.mm.yyyy + DeliveryDateUntil *time.Time `json:"deliveryDateUntil"` + + // Description The description of the voucher. Essentially the voucher number. + Description *string `json:"description"` + + // Document The document of the voucher. + Document *struct { + // Id Unique identifier of the document + Id string `json:"id"` + + // ObjectName Model name, which is 'Document' + ObjectName string `json:"objectName"` + } `json:"document"` + + // Enshrined Enshrined vouchers cannot be changed. Can only be set via [Voucher/{voucherId}/enshrine](#tag/Voucher/operation/voucherEnshrine). This operation cannot be undone. + Enshrined *time.Time `json:"enshrined,omitempty"` + + // Id The voucher id + Id *string `json:"id,omitempty"` + MapAll *bool `json:"mapAll,omitempty"` + + // ObjectName The voucher object name + ObjectName *string `json:"objectName,omitempty"` + + // PaidAmount Amount which has already been paid for this voucher by the customer + PaidAmount *float32 `json:"paidAmount"` + + // PayDate Needs to be timestamp or dd.mm.yyyy + PayDate *time.Time `json:"payDate"` + + // PaymentDeadline Payment deadline of the voucher. + PaymentDeadline *time.Time `json:"paymentDeadline"` + + // PropertyExchangeRate Defines the exchange rate + PropertyExchangeRate *string `json:"propertyExchangeRate"` + + // PropertyForeignCurrencyDeadline Defines the exchange rate day and and then the exchange rate is set from sevdesk. Needs to be provided as timestamp or dd.mm.yyyy + PropertyForeignCurrencyDeadline *time.Time `json:"propertyForeignCurrencyDeadline"` + + // RecurringEndDate The date when the recurring vouchers end being generated.
+ // Necessary attribute for all recurring vouchers. + RecurringEndDate *time.Time `json:"recurringEndDate"` + + // RecurringInterval The DateInterval in which recurring vouchers are generated.
+ // Necessary attribute for all recurring vouchers. + RecurringInterval *VoucherResetToDraft200ObjectsRecurringInterval `json:"recurringInterval"` + + // RecurringLastVoucher The date when the last voucher was generated. + RecurringLastVoucher *time.Time `json:"recurringLastVoucher"` + + // RecurringNextVoucher The date when the next voucher should be generated.
+ // Necessary attribute for all recurring vouchers. + RecurringNextVoucher *time.Time `json:"recurringNextVoucher"` + + // RecurringStartDate The date when the recurring vouchers start being generated.
+ // Necessary attribute for all recurring vouchers. + RecurringStartDate *time.Time `json:"recurringStartDate"` + + // SevClient Client to which voucher belongs. Will be filled automatically + SevClient *struct { + // Id Unique identifier of the client + Id string `json:"id"` + + // ObjectName Model name, which is 'SevClient' + ObjectName string `json:"objectName"` + } `json:"sevClient,omitempty"` + Status *interface{} `json:"status,omitempty"` + + // SumDiscounts Sum of all discounts in the voucher + SumDiscounts *string `json:"sumDiscounts,omitempty"` + + // SumDiscountsForeignCurrency Discounts sum of the voucher in the foreign currency + SumDiscountsForeignCurrency *string `json:"sumDiscountsForeignCurrency,omitempty"` + + // SumGross Gross sum of the voucher + SumGross *string `json:"sumGross,omitempty"` + + // SumGrossAccounting Gross accounting sum of the voucher. Is usually the same as sumGross + SumGrossAccounting *string `json:"sumGrossAccounting,omitempty"` + + // SumNet Net sum of the voucher + SumNet *string `json:"sumNet,omitempty"` + + // SumNetAccounting Net accounting sum of the voucher. Is usually the same as sumNet + SumNetAccounting *string `json:"sumNetAccounting,omitempty"` + + // SumTax Tax sum of the voucher + SumTax *string `json:"sumTax,omitempty"` + + // SumTaxAccounting Tax accounting sum of the voucher. Is usually the same as sumTax + SumTaxAccounting *string `json:"sumTaxAccounting,omitempty"` + + // Supplier The contact used in the voucher as a supplier.
+ // If you don't have a contact as a supplier, you can set this object to null. + Supplier *struct { + // Id Unique identifier of the contact + Id string `json:"id"` + + // ObjectName Model name, which is 'Contact' + ObjectName string `json:"objectName"` + } `json:"supplier"` + + // SupplierName The supplier name.
+ // The value you provide here will determine what supplier name is shown for the voucher in case you did not provide a supplier. + SupplierName *string `json:"supplierName"` + + // TaxRule **Use this in sevdesk-Update 2.0 (replaces taxType / taxSet).** + TaxRule *struct { + // Id **Use this in sevdesk-Update 2.0 (replaces taxType / taxSet).** + // + // Defines the vat-regulation. + // For "Regelbesteuerung" it can be one of: + // - `1` - Umsatzsteuerpflichtige Umsätze (tax rates: 0.0, 7.0, 19.0) - replaces `"taxType": "default"` + // - `2` - Ausfuhren (tax rates: 0.0) + // - `3` - Innergemeinschaftliche Lieferungen (tax rates: 0.0, 7.0, 19.0) - replaces `"taxType": "eu"` + // - `4` - Steuerfreie Umsätze §4 UStG (tax rates: 0.0) + // - `5` - Reverse Charge gem. §13b UStG (tax rates: 0.0) + // + // For small business owner ("Kleinunternehmer") it can be: + // - `11` - Steuer nicht erhoben nach §19UStG (tax rates: 0.0) - replaces `"taxType": "ss"` + Id VoucherResetToDraft200ObjectsTaxRuleId `json:"id"` + + // ObjectName Name of the object. Must always be TaxRule + ObjectName VoucherResetToDraft200ObjectsTaxRuleObjectName `json:"objectName"` + } `json:"taxRule,omitempty"` + + // TaxSet **Use this in sevdesk-Update 2.0 (replaces taxType / taxSet).** + // + // Tax set of the voucher. Needs to be added if you chose the taxType=custom. + TaxSet *struct { + // Id Unique identifier of the object + Id string `json:"id"` + + // ObjectName Model name, which is 'TaxSet' + ObjectName string `json:"objectName"` + } `json:"taxSet"` + + // TaxType **Use this in sevdesk-Update 1.0 (instead of taxRule).** + // + // Tax type of the voucher. + // There are four tax types: + // 1. default - Umsatzsteuer ausweisen + // 2. eu - Steuerfreie innergemeinschaftliche Lieferung (Europäische Union) + // 3. noteu - Steuerschuldnerschaft des Leistungsempfängers (außerhalb EU, z. B. Schweiz) + // 4. custom - Using custom tax set + // 5. ss - Not subject to VAT according to §19 1 UStG + // Tax rates are heavily connected to the tax type used. + TaxType *string `json:"taxType"` + + // Update Date of last voucher update + Update *time.Time `json:"update,omitempty"` + + // VoucherDate Needs to be provided as timestamp or dd.mm.yyyy + VoucherDate *time.Time `json:"voucherDate"` + + // VoucherType Type of the voucher. For more information on the different types, check + // this + VoucherType *VoucherResetToDraft200ObjectsVoucherType `json:"voucherType"` + } `json:"objects,omitempty"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest ValidationError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + + } + + return response, nil +} + +// ParseVoucherResetToOpenResponse parses an HTTP response from a VoucherResetToOpenWithResponse call +func ParseVoucherResetToOpenResponse(rsp *http.Response) (*VoucherResetToOpenResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &VoucherResetToOpenResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + Objects *struct { + // CostCentre Cost centre for the voucher + CostCentre *struct { + // Id Unique identifier of the cost centre + Id string `json:"id"` + + // ObjectName Model name, which is 'CostCentre' + ObjectName string `json:"objectName"` + } `json:"costCentre,omitempty"` + + // Create Date of voucher creation + Create *time.Time `json:"create,omitempty"` + + // CreateUser User who created the voucher. Will be filled automatically. + CreateUser *struct { + // Id Unique identifier of the user + Id string `json:"id"` + + // ObjectName Model name, which is 'SevUser' + ObjectName string `json:"objectName"` + } `json:"createUser,omitempty"` + + // CreditDebit Defines if your voucher is a credit (C) or debit (D) + CreditDebit *VoucherResetToOpen200ObjectsCreditDebit `json:"creditDebit"` + + // Currency specifies which currency the voucher should have. Attention: If the currency differs from the default currency stored in the account, then either the "propertyForeignCurrencyDeadline" or "propertyExchangeRate" parameter must be specified. If both parameters are specified, then the "propertyForeignCurrencyDeadline" parameter is preferred + Currency *string `json:"currency"` + + // DeliveryDate Needs to be provided as timestamp or dd.mm.yyyy + DeliveryDate *time.Time `json:"deliveryDate,omitempty"` + + // DeliveryDateUntil Needs to be provided as timestamp or dd.mm.yyyy + DeliveryDateUntil *time.Time `json:"deliveryDateUntil"` + + // Description The description of the voucher. Essentially the voucher number. + Description *string `json:"description"` + + // Document The document of the voucher. + Document *struct { + // Id Unique identifier of the document + Id string `json:"id"` + + // ObjectName Model name, which is 'Document' + ObjectName string `json:"objectName"` + } `json:"document"` + + // Enshrined Enshrined vouchers cannot be changed. Can only be set via [Voucher/{voucherId}/enshrine](#tag/Voucher/operation/voucherEnshrine). This operation cannot be undone. + Enshrined *time.Time `json:"enshrined,omitempty"` + + // Id The voucher id + Id *string `json:"id,omitempty"` + MapAll *bool `json:"mapAll,omitempty"` + + // ObjectName The voucher object name + ObjectName *string `json:"objectName,omitempty"` + + // PaidAmount Amount which has already been paid for this voucher by the customer + PaidAmount *float32 `json:"paidAmount"` + + // PayDate Needs to be timestamp or dd.mm.yyyy + PayDate *time.Time `json:"payDate"` + + // PaymentDeadline Payment deadline of the voucher. + PaymentDeadline *time.Time `json:"paymentDeadline"` + + // PropertyExchangeRate Defines the exchange rate + PropertyExchangeRate *string `json:"propertyExchangeRate"` + + // PropertyForeignCurrencyDeadline Defines the exchange rate day and and then the exchange rate is set from sevdesk. Needs to be provided as timestamp or dd.mm.yyyy + PropertyForeignCurrencyDeadline *time.Time `json:"propertyForeignCurrencyDeadline"` + + // RecurringEndDate The date when the recurring vouchers end being generated.
+ // Necessary attribute for all recurring vouchers. + RecurringEndDate *time.Time `json:"recurringEndDate"` + + // RecurringInterval The DateInterval in which recurring vouchers are generated.
+ // Necessary attribute for all recurring vouchers. + RecurringInterval *VoucherResetToOpen200ObjectsRecurringInterval `json:"recurringInterval"` + + // RecurringLastVoucher The date when the last voucher was generated. + RecurringLastVoucher *time.Time `json:"recurringLastVoucher"` + + // RecurringNextVoucher The date when the next voucher should be generated.
+ // Necessary attribute for all recurring vouchers. + RecurringNextVoucher *time.Time `json:"recurringNextVoucher"` + + // RecurringStartDate The date when the recurring vouchers start being generated.
+ // Necessary attribute for all recurring vouchers. + RecurringStartDate *time.Time `json:"recurringStartDate"` + + // SevClient Client to which voucher belongs. Will be filled automatically + SevClient *struct { + // Id Unique identifier of the client + Id string `json:"id"` + + // ObjectName Model name, which is 'SevClient' + ObjectName string `json:"objectName"` + } `json:"sevClient,omitempty"` + Status *interface{} `json:"status,omitempty"` + + // SumDiscounts Sum of all discounts in the voucher + SumDiscounts *string `json:"sumDiscounts,omitempty"` + + // SumDiscountsForeignCurrency Discounts sum of the voucher in the foreign currency + SumDiscountsForeignCurrency *string `json:"sumDiscountsForeignCurrency,omitempty"` + + // SumGross Gross sum of the voucher + SumGross *string `json:"sumGross,omitempty"` + + // SumGrossAccounting Gross accounting sum of the voucher. Is usually the same as sumGross + SumGrossAccounting *string `json:"sumGrossAccounting,omitempty"` + + // SumNet Net sum of the voucher + SumNet *string `json:"sumNet,omitempty"` + + // SumNetAccounting Net accounting sum of the voucher. Is usually the same as sumNet + SumNetAccounting *string `json:"sumNetAccounting,omitempty"` + + // SumTax Tax sum of the voucher + SumTax *string `json:"sumTax,omitempty"` + + // SumTaxAccounting Tax accounting sum of the voucher. Is usually the same as sumTax + SumTaxAccounting *string `json:"sumTaxAccounting,omitempty"` + + // Supplier The contact used in the voucher as a supplier.
+ // If you don't have a contact as a supplier, you can set this object to null. + Supplier *struct { + // Id Unique identifier of the contact + Id string `json:"id"` + + // ObjectName Model name, which is 'Contact' + ObjectName string `json:"objectName"` + } `json:"supplier"` + + // SupplierName The supplier name.
+ // The value you provide here will determine what supplier name is shown for the voucher in case you did not provide a supplier. + SupplierName *string `json:"supplierName"` + + // TaxRule **Use this in sevdesk-Update 2.0 (replaces taxType / taxSet).** + TaxRule *struct { + // Id **Use this in sevdesk-Update 2.0 (replaces taxType / taxSet).** + // + // Defines the vat-regulation. + // For "Regelbesteuerung" it can be one of: + // - `1` - Umsatzsteuerpflichtige Umsätze (tax rates: 0.0, 7.0, 19.0) - replaces `"taxType": "default"` + // - `2` - Ausfuhren (tax rates: 0.0) + // - `3` - Innergemeinschaftliche Lieferungen (tax rates: 0.0, 7.0, 19.0) - replaces `"taxType": "eu"` + // - `4` - Steuerfreie Umsätze §4 UStG (tax rates: 0.0) + // - `5` - Reverse Charge gem. §13b UStG (tax rates: 0.0) + // + // For small business owner ("Kleinunternehmer") it can be: + // - `11` - Steuer nicht erhoben nach §19UStG (tax rates: 0.0) - replaces `"taxType": "ss"` + Id VoucherResetToOpen200ObjectsTaxRuleId `json:"id"` + + // ObjectName Name of the object. Must always be TaxRule + ObjectName VoucherResetToOpen200ObjectsTaxRuleObjectName `json:"objectName"` + } `json:"taxRule,omitempty"` + + // TaxSet **Use this in sevdesk-Update 2.0 (replaces taxType / taxSet).** + // + // Tax set of the voucher. Needs to be added if you chose the taxType=custom. + TaxSet *struct { + // Id Unique identifier of the object + Id string `json:"id"` + + // ObjectName Model name, which is 'TaxSet' + ObjectName string `json:"objectName"` + } `json:"taxSet"` + + // TaxType **Use this in sevdesk-Update 1.0 (instead of taxRule).** + // + // Tax type of the voucher. + // There are four tax types: + // 1. default - Umsatzsteuer ausweisen + // 2. eu - Steuerfreie innergemeinschaftliche Lieferung (Europäische Union) + // 3. noteu - Steuerschuldnerschaft des Leistungsempfängers (außerhalb EU, z. B. Schweiz) + // 4. custom - Using custom tax set + // 5. ss - Not subject to VAT according to §19 1 UStG + // Tax rates are heavily connected to the tax type used. + TaxType *string `json:"taxType"` + + // Update Date of last voucher update + Update *time.Time `json:"update,omitempty"` + + // VoucherDate Needs to be provided as timestamp or dd.mm.yyyy + VoucherDate *time.Time `json:"voucherDate"` + + // VoucherType Type of the voucher. For more information on the different types, check + // this + VoucherType *VoucherResetToOpen200ObjectsVoucherType `json:"voucherType"` + } `json:"objects,omitempty"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest ValidationError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + + } + + return response, nil +} + +// ParseGetVoucherPositionsResponse parses an HTTP response from a GetVoucherPositionsWithResponse call +func ParseGetVoucherPositionsResponse(rsp *http.Response) (*GetVoucherPositionsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetVoucherPositionsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + Objects *[]ModelVoucherPosResponse `json:"objects,omitempty"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + + return response, nil +} diff --git a/go.mod b/go.mod index e3b2976..6fc0ef2 100644 --- a/go.mod +++ b/go.mod @@ -1,3 +1,22 @@ module github.com/plaenkler/sevdesk go 1.22.10 + +require ( + github.com/labstack/echo/v4 v4.11.4 + github.com/oapi-codegen/runtime v1.1.1 +) + +require ( + github.com/apapsch/go-jsonmerge/v2 v2.0.0 // indirect + github.com/google/uuid v1.6.0 // indirect + github.com/labstack/gommon v0.4.2 // indirect + github.com/mattn/go-colorable v0.1.13 // indirect + github.com/mattn/go-isatty v0.0.20 // indirect + github.com/valyala/bytebufferpool v1.0.0 // indirect + github.com/valyala/fasttemplate v1.2.2 // indirect + golang.org/x/crypto v0.17.0 // indirect + golang.org/x/net v0.19.0 // indirect + golang.org/x/sys v0.15.0 // indirect + golang.org/x/text v0.14.0 // indirect +) diff --git a/go.sum b/go.sum new file mode 100644 index 0000000..418521e --- /dev/null +++ b/go.sum @@ -0,0 +1,44 @@ +github.com/RaveNoX/go-jsoncommentstrip v1.0.0/go.mod h1:78ihd09MekBnJnxpICcwzCMzGrKSKYe4AqU6PDYYpjk= +github.com/apapsch/go-jsonmerge/v2 v2.0.0 h1:axGnT1gRIfimI7gJifB699GoE/oq+F2MU7Dml6nw9rQ= +github.com/apapsch/go-jsonmerge/v2 v2.0.0/go.mod h1:lvDnEdqiQrp0O42VQGgmlKpxL1AP2+08jFMw88y4klk= +github.com/bmatcuk/doublestar v1.1.1/go.mod h1:UD6OnuiIn0yFxxA2le/rnRU1G4RaI4UvFv1sNto9p6w= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/juju/gnuflag v0.0.0-20171113085948-2ce1bb71843d/go.mod h1:2PavIy+JPciBPrBUjwbNvtwB6RQlve+hkpll6QSNmOE= +github.com/labstack/echo/v4 v4.11.4 h1:vDZmA+qNeh1pd/cCkEicDMrjtrnMGQ1QFI9gWN1zGq8= +github.com/labstack/echo/v4 v4.11.4/go.mod h1:noh7EvLwqDsmh/X/HWKPUl1AjzJrhyptRyEbQJfxen8= +github.com/labstack/gommon v0.4.2 h1:F8qTUNXgG1+6WQmqoUWnz8WiEU60mXVVw0P4ht1WRA0= +github.com/labstack/gommon v0.4.2/go.mod h1:QlUFxVM+SNXhDL/Z7YhocGIBYOiwB0mXm1+1bAPHPyU= +github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= +github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= +github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= +github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= +github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= +github.com/oapi-codegen/runtime v1.1.1 h1:EXLHh0DXIJnWhdRPN2w4MXAzFyE4CskzhNLUmtpMYro= +github.com/oapi-codegen/runtime v1.1.1/go.mod h1:SK9X900oXmPWilYR5/WKPzt3Kqxn/uS/+lbpREv+eCg= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/spkg/bom v0.0.0-20160624110644-59b7046e48ad/go.mod h1:qLr4V1qq6nMqFKkMo8ZTx3f+BZEkzsRUY10Xsm2mwU0= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= +github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw= +github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= +github.com/valyala/fasttemplate v1.2.2 h1:lxLXG0uE3Qnshl9QyaK6XJxMXlQZELvChBOCmQD0Loo= +github.com/valyala/fasttemplate v1.2.2/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ= +golang.org/x/crypto v0.17.0 h1:r8bRNjWL3GshPW3gkd+RpvzWrZAwPS49OmTGZ/uhM4k= +golang.org/x/crypto v0.17.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= +golang.org/x/net v0.19.0 h1:zTwKpTd2XuCqf8huc7Fo2iSy+4RHPd10s4KzeTnVr1c= +golang.org/x/net v0.19.0/go.mod h1:CfAk/cbD4CthTvqiEl8NpboMuiuOYsAr/7NOjZJtv1U= +golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.15.0 h1:h48lPFYpsTvQJZF4EKyI4aLHaev3CxivZmv7yZig9pc= +golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= +golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/server/server.go b/server/server.go new file mode 100644 index 0000000..d5498bf --- /dev/null +++ b/server/server.go @@ -0,0 +1,3773 @@ +// Package server provides primitives to interact with the openapi HTTP API. +// +// Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.4.1 DO NOT EDIT. +package server + +import ( + "fmt" + "net/http" + + "github.com/labstack/echo/v4" + "github.com/oapi-codegen/runtime" +) + +// ServerInterface represents all server handlers. +type ServerInterface interface { + // Retrieve accounting contact + // (GET /AccountingContact) + GetAccountingContact(ctx echo.Context, params GetAccountingContactParams) error + // Create a new accounting contact + // (POST /AccountingContact) + CreateAccountingContact(ctx echo.Context) error + // Deletes an accounting contact + // (DELETE /AccountingContact/{accountingContactId}) + DeleteAccountingContact(ctx echo.Context, accountingContactId int) error + // Find accounting contact by ID + // (GET /AccountingContact/{accountingContactId}) + GetAccountingContactById(ctx echo.Context, accountingContactId int) error + // Update an existing accounting contact + // (PUT /AccountingContact/{accountingContactId}) + UpdateAccountingContact(ctx echo.Context, accountingContactId int) error + // Retrieve check accounts + // (GET /CheckAccount) + GetCheckAccounts(ctx echo.Context) error + // Create a new check account + // (POST /CheckAccount) + CreateCheckAccount(ctx echo.Context) error + // Create a new clearing account + // (POST /CheckAccount/Factory/clearingAccount) + CreateClearingAccount(ctx echo.Context) error + // Create a new file import account + // (POST /CheckAccount/Factory/fileImportAccount) + CreateFileImportAccount(ctx echo.Context) error + // Deletes a check account + // (DELETE /CheckAccount/{checkAccountId}) + DeleteCheckAccount(ctx echo.Context, checkAccountId int) error + // Find check account by ID + // (GET /CheckAccount/{checkAccountId}) + GetCheckAccountById(ctx echo.Context, checkAccountId int) error + // Update an existing check account + // (PUT /CheckAccount/{checkAccountId}) + UpdateCheckAccount(ctx echo.Context, checkAccountId int) error + // Get the balance at a given date + // (GET /CheckAccount/{checkAccountId}/getBalanceAtDate) + GetBalanceAtDate(ctx echo.Context, checkAccountId int, params GetBalanceAtDateParams) error + // Retrieve transactions + // (GET /CheckAccountTransaction) + GetTransactions(ctx echo.Context, params GetTransactionsParams) error + // Create a new transaction + // (POST /CheckAccountTransaction) + CreateTransaction(ctx echo.Context) error + // Deletes a check account transaction + // (DELETE /CheckAccountTransaction/{checkAccountTransactionId}) + DeleteCheckAccountTransaction(ctx echo.Context, checkAccountTransactionId int) error + // Find check account transaction by ID + // (GET /CheckAccountTransaction/{checkAccountTransactionId}) + GetCheckAccountTransactionById(ctx echo.Context, checkAccountTransactionId int) error + // Update an existing check account transaction + // (PUT /CheckAccountTransaction/{checkAccountTransactionId}) + UpdateCheckAccountTransaction(ctx echo.Context, checkAccountTransactionId int) error + // Enshrine + // (PUT /CheckAccountTransaction/{checkAccountTransactionId}/enshrine) + CheckAccountTransactionEnshrine(ctx echo.Context, checkAccountTransactionId int) error + // Retrieve communication ways + // (GET /CommunicationWay) + GetCommunicationWays(ctx echo.Context, params GetCommunicationWaysParams) error + // Create a new contact communication way + // (POST /CommunicationWay) + CreateCommunicationWay(ctx echo.Context) error + // Deletes a communication way + // (DELETE /CommunicationWay/{communicationWayId}) + DeleteCommunicationWay(ctx echo.Context, communicationWayId int) error + // Find communication way by ID + // (GET /CommunicationWay/{communicationWayId}) + GetCommunicationWayById(ctx echo.Context, communicationWayId int) error + // Update a existing communication way + // (PUT /CommunicationWay/{communicationWayId}) + UpdateCommunicationWay(ctx echo.Context, communicationWayId int) error + // Retrieve communication way keys + // (GET /CommunicationWayKey) + GetCommunicationWayKeys(ctx echo.Context) error + // Retrieve contacts + // (GET /Contact) + GetContacts(ctx echo.Context, params GetContactsParams) error + // Create a new contact + // (POST /Contact) + CreateContact(ctx echo.Context) error + // Find contacts by custom field value + // (GET /Contact/Factory/findContactsByCustomFieldValue) + FindContactsByCustomFieldValue(ctx echo.Context, params FindContactsByCustomFieldValueParams) error + // Get next free customer number + // (GET /Contact/Factory/getNextCustomerNumber) + GetNextCustomerNumber(ctx echo.Context) error + // Check if a customer number is available + // (GET /Contact/Mapper/checkCustomerNumberAvailability) + ContactCustomerNumberAvailabilityCheck(ctx echo.Context, params ContactCustomerNumberAvailabilityCheckParams) error + // Deletes a contact + // (DELETE /Contact/{contactId}) + DeleteContact(ctx echo.Context, contactId int) error + // Find contact by ID + // (GET /Contact/{contactId}) + GetContactById(ctx echo.Context, contactId int) error + // Update a existing contact + // (PUT /Contact/{contactId}) + UpdateContact(ctx echo.Context, contactId int) error + // Get number of all items + // (GET /Contact/{contactId}/getTabsItemCount) + GetContactTabsItemCountById(ctx echo.Context, contactId int) error + // Retrieve contact addresses + // (GET /ContactAddress) + GetContactAddresses(ctx echo.Context) error + // Create a new contact address + // (POST /ContactAddress) + CreateContactAddress(ctx echo.Context) error + // Deletes a contact address + // (DELETE /ContactAddress/{contactAddressId}) + DeleteContactAddress(ctx echo.Context, contactAddressId int) error + // Find contact address by ID + // (GET /ContactAddress/{contactAddressId}) + ContactAddressId(ctx echo.Context, contactAddressId int) error + // update a existing contact address + // (PUT /ContactAddress/{contactAddressId}) + UpdateContactAddress(ctx echo.Context, contactAddressId int) error + // Retrieve contact fields + // (GET /ContactCustomField) + GetContactFields(ctx echo.Context) error + // Create contact field + // (POST /ContactCustomField) + CreateContactField(ctx echo.Context) error + // delete a contact field + // (DELETE /ContactCustomField/{contactCustomFieldId}) + DeleteContactCustomFieldId(ctx echo.Context, contactCustomFieldId int) error + // Retrieve contact fields + // (GET /ContactCustomField/{contactCustomFieldId}) + GetContactFieldsById(ctx echo.Context, contactCustomFieldId float32) error + // Update a contact field + // (PUT /ContactCustomField/{contactCustomFieldId}) + UpdateContactfield(ctx echo.Context, contactCustomFieldId float32) error + // Retrieve contact field settings + // (GET /ContactCustomFieldSetting) + GetContactFieldSettings(ctx echo.Context) error + // Create contact field setting + // (POST /ContactCustomFieldSetting) + CreateContactFieldSetting(ctx echo.Context) error + // Deletes a contact field setting + // (DELETE /ContactCustomFieldSetting/{contactCustomFieldSettingId}) + DeleteContactFieldSetting(ctx echo.Context, contactCustomFieldSettingId int) error + // Find contact field setting by ID + // (GET /ContactCustomFieldSetting/{contactCustomFieldSettingId}) + GetContactFieldSettingById(ctx echo.Context, contactCustomFieldSettingId int) error + // Update contact field setting + // (PUT /ContactCustomFieldSetting/{contactCustomFieldSettingId}) + UpdateContactFieldSetting(ctx echo.Context, contactCustomFieldSettingId int) error + // Receive count reference + // (GET /ContactCustomFieldSetting/{contactCustomFieldSettingId}/getReferenceCount) + GetReferenceCount(ctx echo.Context, contactCustomFieldSettingId int) error + // Retrieve CreditNote + // (GET /CreditNote) + GetCreditNotes(ctx echo.Context, params GetCreditNotesParams) error + // Creates a new creditNote from an invoice + // (POST /CreditNote/Factory/createFromInvoice) + CreateCreditNoteFromInvoice(ctx echo.Context) error + // Creates a new creditNote from a voucher + // (POST /CreditNote/Factory/createFromVoucher) + CreateCreditNoteFromVoucher(ctx echo.Context) error + // Create a new creditNote + // (POST /CreditNote/Factory/saveCreditNote) + CreatecreditNote(ctx echo.Context) error + // Deletes an creditNote + // (DELETE /CreditNote/{creditNoteId}) + DeletecreditNote(ctx echo.Context, creditNoteId int) error + // Find creditNote by ID + // (GET /CreditNote/{creditNoteId}) + GetcreditNoteById(ctx echo.Context, creditNoteId int) error + // Update an existing creditNote + // (PUT /CreditNote/{creditNoteId}) + UpdatecreditNote(ctx echo.Context, creditNoteId int) error + // Book a credit note + // (PUT /CreditNote/{creditNoteId}/bookAmount) + BookCreditNote(ctx echo.Context, creditNoteId int) error + // Update an of credit note template + // (PUT /CreditNote/{creditNoteId}/changeParameter) + UpdateCreditNoteTemplate(ctx echo.Context, creditNoteId int) error + // Enshrine + // (PUT /CreditNote/{creditNoteId}/enshrine) + CreditNoteEnshrine(ctx echo.Context, creditNoteId int) error + // Retrieve pdf document of a credit note + // (GET /CreditNote/{creditNoteId}/getPdf) + CreditNoteGetPdf(ctx echo.Context, creditNoteId int, params CreditNoteGetPdfParams) error + // Reset status to draft + // (PUT /CreditNote/{creditNoteId}/resetToDraft) + CreditNoteResetToDraft(ctx echo.Context, creditNoteId int) error + // Reset status to open + // (PUT /CreditNote/{creditNoteId}/resetToOpen) + CreditNoteResetToOpen(ctx echo.Context, creditNoteId int) error + // Mark credit note as sent + // (PUT /CreditNote/{creditNoteId}/sendBy) + CreditNoteSendBy(ctx echo.Context, creditNoteId int) error + // Send credit note by printing + // (GET /CreditNote/{creditNoteId}/sendByWithRender) + SendCreditNoteByPrinting(ctx echo.Context, creditNoteId int, params SendCreditNoteByPrintingParams) error + // Send credit note via email + // (POST /CreditNote/{creditNoteId}/sendViaEmail) + SendCreditNoteViaEMail(ctx echo.Context, creditNoteId int) error + // Retrieve creditNote positions + // (GET /CreditNotePos) + GetcreditNotePositions(ctx echo.Context, params GetcreditNotePositionsParams) error + // Retrieve letterpapers + // (GET /DocServer/getLetterpapersWithThumb) + GetLetterpapersWithThumb(ctx echo.Context) error + // Retrieve templates + // (GET /DocServer/getTemplatesWithThumb) + GetTemplates(ctx echo.Context, params GetTemplatesParams) error + // Export contact + // (GET /Export/contactListCsv) + ExportContact(ctx echo.Context, params ExportContactParams) error + // Export creditNote + // (GET /Export/creditNoteCsv) + ExportCreditNote(ctx echo.Context, params ExportCreditNoteParams) error + // Export datev + // (GET /Export/datevCSV) + ExportDatev(ctx echo.Context, params ExportDatevParams) error + // Export invoice + // (GET /Export/invoiceCsv) + ExportInvoice(ctx echo.Context, params ExportInvoiceParams) error + // Export Invoice as zip + // (GET /Export/invoiceZip) + ExportInvoiceZip(ctx echo.Context, params ExportInvoiceZipParams) error + // Export transaction + // (GET /Export/transactionsCsv) + ExportTransactions(ctx echo.Context, params ExportTransactionsParams) error + // Export voucher as zip + // (GET /Export/voucherListCsv) + ExportVoucher(ctx echo.Context, params ExportVoucherParams) error + // Export voucher zip + // (GET /Export/voucherZip) + ExportVoucherZip(ctx echo.Context, params ExportVoucherZipParams) error + // Retrieve invoices + // (GET /Invoice) + GetInvoices(ctx echo.Context, params GetInvoicesParams) error + // Create invoice from order + // (POST /Invoice/Factory/createInvoiceFromOrder) + CreateInvoiceFromOrder(ctx echo.Context) error + // Create invoice reminder + // (POST /Invoice/Factory/createInvoiceReminder) + CreateInvoiceReminder(ctx echo.Context, params CreateInvoiceReminderParams) error + // Create a new invoice + // (POST /Invoice/Factory/saveInvoice) + CreateInvoiceByFactory(ctx echo.Context) error + // Find invoice by ID + // (GET /Invoice/{invoiceId}) + GetInvoiceById(ctx echo.Context, invoiceId int) error + // Book an invoice + // (PUT /Invoice/{invoiceId}/bookAmount) + BookInvoice(ctx echo.Context, invoiceId int) error + // Cancel an invoice / Create cancellation invoice + // (POST /Invoice/{invoiceId}/cancelInvoice) + CancelInvoice(ctx echo.Context, invoiceId int) error + // Update an invoice template + // (PUT /Invoice/{invoiceId}/changeParameter) + UpdateInvoiceTemplate(ctx echo.Context, invoiceId int) error + // Enshrine + // (PUT /Invoice/{invoiceId}/enshrine) + InvoiceEnshrine(ctx echo.Context, invoiceId int) error + // Check if an invoice is already partially paid + // (GET /Invoice/{invoiceId}/getIsPartiallyPaid) + GetIsInvoicePartiallyPaid(ctx echo.Context, invoiceId int) error + // Retrieve pdf document of an invoice + // (GET /Invoice/{invoiceId}/getPdf) + InvoiceGetPdf(ctx echo.Context, invoiceId int, params InvoiceGetPdfParams) error + // Find invoice positions + // (GET /Invoice/{invoiceId}/getPositions) + GetInvoicePositionsById(ctx echo.Context, invoiceId int, params GetInvoicePositionsByIdParams) error + // Retrieve XML of an e-invoice + // (GET /Invoice/{invoiceId}/getXml) + InvoiceGetXml(ctx echo.Context, invoiceId int) error + // Render the pdf document of an invoice + // (POST /Invoice/{invoiceId}/render) + InvoiceRender(ctx echo.Context, invoiceId int) error + // Reset status to draft + // (PUT /Invoice/{invoiceId}/resetToDraft) + InvoiceResetToDraft(ctx echo.Context, invoiceId int) error + // Reset status to open + // (PUT /Invoice/{invoiceId}/resetToOpen) + InvoiceResetToOpen(ctx echo.Context, invoiceId int) error + // Mark invoice as sent + // (PUT /Invoice/{invoiceId}/sendBy) + InvoiceSendBy(ctx echo.Context, invoiceId int) error + // Send invoice via email + // (POST /Invoice/{invoiceId}/sendViaEmail) + SendInvoiceViaEMail(ctx echo.Context, invoiceId int) error + // Retrieve InvoicePos + // (GET /InvoicePos) + GetInvoicePos(ctx echo.Context, params GetInvoicePosParams) error + // Retrieve orders + // (GET /Order) + GetOrders(ctx echo.Context, params GetOrdersParams) error + // Create contract note from order + // (POST /Order/Factory/createContractNoteFromOrder) + CreateContractNoteFromOrder(ctx echo.Context, params CreateContractNoteFromOrderParams) error + // Create packing list from order + // (POST /Order/Factory/createPackingListFromOrder) + CreatePackingListFromOrder(ctx echo.Context, params CreatePackingListFromOrderParams) error + // Create a new order + // (POST /Order/Factory/saveOrder) + CreateOrder(ctx echo.Context) error + // Deletes an order + // (DELETE /Order/{orderId}) + DeleteOrder(ctx echo.Context, orderId int) error + // Find order by ID + // (GET /Order/{orderId}) + GetOrderById(ctx echo.Context, orderId int) error + // Update an existing order + // (PUT /Order/{orderId}) + UpdateOrder(ctx echo.Context, orderId int) error + // Update an order template + // (PUT /Order/{orderId}/changeParameter) + UpdateOrderTemplate(ctx echo.Context, orderId int) error + // Find order discounts + // (GET /Order/{orderId}/getDiscounts) + GetDiscounts(ctx echo.Context, orderId int, params GetDiscountsParams) error + // Retrieve pdf document of an order + // (GET /Order/{orderId}/getPdf) + OrderGetPdf(ctx echo.Context, orderId int, params OrderGetPdfParams) error + // Find order positions + // (GET /Order/{orderId}/getPositions) + GetOrderPositionsById(ctx echo.Context, orderId int, params GetOrderPositionsByIdParams) error + // Find related objects + // (GET /Order/{orderId}/getRelatedObjects) + GetRelatedObjects(ctx echo.Context, orderId int, params GetRelatedObjectsParams) error + // Mark order as sent + // (PUT /Order/{orderId}/sendBy) + OrderSendBy(ctx echo.Context, orderId int) error + // Send order via email + // (POST /Order/{orderId}/sendViaEmail) + SendorderViaEMail(ctx echo.Context, orderId int) error + // Retrieve order positions + // (GET /OrderPos) + GetOrderPositions(ctx echo.Context, params GetOrderPositionsParams) error + // Deletes an order Position + // (DELETE /OrderPos/{orderPosId}) + DeleteOrderPos(ctx echo.Context, orderPosId int) error + // Find order position by ID + // (GET /OrderPos/{orderPosId}) + GetOrderPositionById(ctx echo.Context, orderPosId int) error + // Update an existing order position + // (PUT /OrderPos/{orderPosId}) + UpdateOrderPosition(ctx echo.Context, orderPosId int) error + // Retrieve parts + // (GET /Part) + GetParts(ctx echo.Context, params GetPartsParams) error + // Create a new part + // (POST /Part) + CreatePart(ctx echo.Context) error + // Find part by ID + // (GET /Part/{partId}) + GetPartById(ctx echo.Context, partId int) error + // Update an existing part + // (PUT /Part/{partId}) + UpdatePart(ctx echo.Context, partId int) error + // Get stock of a part + // (GET /Part/{partId}/getStock) + PartGetStock(ctx echo.Context, partId int) error + // Get guidance by account number + // (GET /ReceiptGuidance/forAccountNumber) + ForAccountNumber(ctx echo.Context, params ForAccountNumberParams) error + // Get all account guides + // (GET /ReceiptGuidance/forAllAccounts) + ForAllAccounts(ctx echo.Context) error + // Get guidance for expense accounts + // (GET /ReceiptGuidance/forExpense) + ForExpense(ctx echo.Context) error + // Get guidance for revenue accounts + // (GET /ReceiptGuidance/forRevenue) + ForRevenue(ctx echo.Context) error + // Get guidance by Tax Rule + // (GET /ReceiptGuidance/forTaxRule) + ForTaxRule(ctx echo.Context, params ForTaxRuleParams) error + // Export contact list + // (GET /Report/contactlist) + ReportContact(ctx echo.Context, params ReportContactParams) error + // Export invoice list + // (GET /Report/invoicelist) + ReportInvoice(ctx echo.Context, params ReportInvoiceParams) error + // Export order list + // (GET /Report/orderlist) + ReportOrder(ctx echo.Context, params ReportOrderParams) error + // Export voucher list + // (GET /Report/voucherlist) + ReportVoucher(ctx echo.Context, params ReportVoucherParams) error + // Update export config + // (PUT /SevClient/{SevClientId}/updateExportConfig) + UpdateExportConfig(ctx echo.Context, sevClientId float32) error + // Retrieve tags + // (GET /Tag) + GetTags(ctx echo.Context, params GetTagsParams) error + // Create a new tag + // (POST /Tag/Factory/create) + CreateTag(ctx echo.Context) error + // Deletes a tag + // (DELETE /Tag/{tagId}) + DeleteTag(ctx echo.Context, tagId int) error + // Find tag by ID + // (GET /Tag/{tagId}) + GetTagById(ctx echo.Context, tagId int) error + // Update tag + // (PUT /Tag/{tagId}) + UpdateTag(ctx echo.Context, tagId int) error + // Retrieve tag relations + // (GET /TagRelation) + GetTagRelations(ctx echo.Context) error + // Retrieve Placeholders + // (GET /Textparser/fetchDictionaryEntriesByType) + GetPlaceholder(ctx echo.Context, params GetPlaceholderParams) error + // Retrieve bookkeeping system version + // (GET /Tools/bookkeepingSystemVersion) + BookkeepingSystemVersion(ctx echo.Context) error + // Retrieve vouchers + // (GET /Voucher) + GetVouchers(ctx echo.Context, params GetVouchersParams) error + // Create a new voucher + // (POST /Voucher/Factory/saveVoucher) + VoucherFactorySaveVoucher(ctx echo.Context) error + // Upload voucher file + // (POST /Voucher/Factory/uploadTempFile) + VoucherUploadFile(ctx echo.Context) error + // Find voucher by ID + // (GET /Voucher/{voucherId}) + GetVoucherById(ctx echo.Context, voucherId int) error + // Update an existing voucher + // (PUT /Voucher/{voucherId}) + UpdateVoucher(ctx echo.Context, voucherId int) error + // Book a voucher + // (PUT /Voucher/{voucherId}/bookAmount) + BookVoucher(ctx echo.Context, voucherId int) error + // Enshrine + // (PUT /Voucher/{voucherId}/enshrine) + VoucherEnshrine(ctx echo.Context, voucherId int) error + // Reset status to draft + // (PUT /Voucher/{voucherId}/resetToDraft) + VoucherResetToDraft(ctx echo.Context, voucherId int) error + // Reset status to open + // (PUT /Voucher/{voucherId}/resetToOpen) + VoucherResetToOpen(ctx echo.Context, voucherId int) error + // Retrieve voucher positions + // (GET /VoucherPos) + GetVoucherPositions(ctx echo.Context, params GetVoucherPositionsParams) error +} + +// ServerInterfaceWrapper converts echo contexts to parameters. +type ServerInterfaceWrapper struct { + Handler ServerInterface +} + +// GetAccountingContact converts echo context to params. +func (w *ServerInterfaceWrapper) GetAccountingContact(ctx echo.Context) error { + var err error + + ctx.Set(Api_keyScopes, []string{}) + + // Parameter object where we will unmarshal all parameters from the context + var params GetAccountingContactParams + // ------------- Optional query parameter "contact[id]" ------------- + + err = runtime.BindQueryParameter("form", true, false, "contact[id]", ctx.QueryParams(), ¶ms.ContactId) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter contact[id]: %s", err)) + } + + // ------------- Optional query parameter "contact[objectName]" ------------- + + err = runtime.BindQueryParameter("form", true, false, "contact[objectName]", ctx.QueryParams(), ¶ms.ContactObjectName) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter contact[objectName]: %s", err)) + } + + // Invoke the callback with all the unmarshaled arguments + err = w.Handler.GetAccountingContact(ctx, params) + return err +} + +// CreateAccountingContact converts echo context to params. +func (w *ServerInterfaceWrapper) CreateAccountingContact(ctx echo.Context) error { + var err error + + ctx.Set(Api_keyScopes, []string{}) + + // Invoke the callback with all the unmarshaled arguments + err = w.Handler.CreateAccountingContact(ctx) + return err +} + +// DeleteAccountingContact converts echo context to params. +func (w *ServerInterfaceWrapper) DeleteAccountingContact(ctx echo.Context) error { + var err error + // ------------- Path parameter "accountingContactId" ------------- + var accountingContactId int + + err = runtime.BindStyledParameterWithOptions("simple", "accountingContactId", ctx.Param("accountingContactId"), &accountingContactId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter accountingContactId: %s", err)) + } + + ctx.Set(Api_keyScopes, []string{}) + + // Invoke the callback with all the unmarshaled arguments + err = w.Handler.DeleteAccountingContact(ctx, accountingContactId) + return err +} + +// GetAccountingContactById converts echo context to params. +func (w *ServerInterfaceWrapper) GetAccountingContactById(ctx echo.Context) error { + var err error + // ------------- Path parameter "accountingContactId" ------------- + var accountingContactId int + + err = runtime.BindStyledParameterWithOptions("simple", "accountingContactId", ctx.Param("accountingContactId"), &accountingContactId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter accountingContactId: %s", err)) + } + + ctx.Set(Api_keyScopes, []string{}) + + // Invoke the callback with all the unmarshaled arguments + err = w.Handler.GetAccountingContactById(ctx, accountingContactId) + return err +} + +// UpdateAccountingContact converts echo context to params. +func (w *ServerInterfaceWrapper) UpdateAccountingContact(ctx echo.Context) error { + var err error + // ------------- Path parameter "accountingContactId" ------------- + var accountingContactId int + + err = runtime.BindStyledParameterWithOptions("simple", "accountingContactId", ctx.Param("accountingContactId"), &accountingContactId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter accountingContactId: %s", err)) + } + + ctx.Set(Api_keyScopes, []string{}) + + // Invoke the callback with all the unmarshaled arguments + err = w.Handler.UpdateAccountingContact(ctx, accountingContactId) + return err +} + +// GetCheckAccounts converts echo context to params. +func (w *ServerInterfaceWrapper) GetCheckAccounts(ctx echo.Context) error { + var err error + + ctx.Set(Api_keyScopes, []string{}) + + // Invoke the callback with all the unmarshaled arguments + err = w.Handler.GetCheckAccounts(ctx) + return err +} + +// CreateCheckAccount converts echo context to params. +func (w *ServerInterfaceWrapper) CreateCheckAccount(ctx echo.Context) error { + var err error + + ctx.Set(Api_keyScopes, []string{}) + + // Invoke the callback with all the unmarshaled arguments + err = w.Handler.CreateCheckAccount(ctx) + return err +} + +// CreateClearingAccount converts echo context to params. +func (w *ServerInterfaceWrapper) CreateClearingAccount(ctx echo.Context) error { + var err error + + ctx.Set(Api_keyScopes, []string{}) + + // Invoke the callback with all the unmarshaled arguments + err = w.Handler.CreateClearingAccount(ctx) + return err +} + +// CreateFileImportAccount converts echo context to params. +func (w *ServerInterfaceWrapper) CreateFileImportAccount(ctx echo.Context) error { + var err error + + ctx.Set(Api_keyScopes, []string{}) + + // Invoke the callback with all the unmarshaled arguments + err = w.Handler.CreateFileImportAccount(ctx) + return err +} + +// DeleteCheckAccount converts echo context to params. +func (w *ServerInterfaceWrapper) DeleteCheckAccount(ctx echo.Context) error { + var err error + // ------------- Path parameter "checkAccountId" ------------- + var checkAccountId int + + err = runtime.BindStyledParameterWithOptions("simple", "checkAccountId", ctx.Param("checkAccountId"), &checkAccountId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter checkAccountId: %s", err)) + } + + ctx.Set(Api_keyScopes, []string{}) + + // Invoke the callback with all the unmarshaled arguments + err = w.Handler.DeleteCheckAccount(ctx, checkAccountId) + return err +} + +// GetCheckAccountById converts echo context to params. +func (w *ServerInterfaceWrapper) GetCheckAccountById(ctx echo.Context) error { + var err error + // ------------- Path parameter "checkAccountId" ------------- + var checkAccountId int + + err = runtime.BindStyledParameterWithOptions("simple", "checkAccountId", ctx.Param("checkAccountId"), &checkAccountId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter checkAccountId: %s", err)) + } + + ctx.Set(Api_keyScopes, []string{}) + + // Invoke the callback with all the unmarshaled arguments + err = w.Handler.GetCheckAccountById(ctx, checkAccountId) + return err +} + +// UpdateCheckAccount converts echo context to params. +func (w *ServerInterfaceWrapper) UpdateCheckAccount(ctx echo.Context) error { + var err error + // ------------- Path parameter "checkAccountId" ------------- + var checkAccountId int + + err = runtime.BindStyledParameterWithOptions("simple", "checkAccountId", ctx.Param("checkAccountId"), &checkAccountId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter checkAccountId: %s", err)) + } + + ctx.Set(Api_keyScopes, []string{}) + + // Invoke the callback with all the unmarshaled arguments + err = w.Handler.UpdateCheckAccount(ctx, checkAccountId) + return err +} + +// GetBalanceAtDate converts echo context to params. +func (w *ServerInterfaceWrapper) GetBalanceAtDate(ctx echo.Context) error { + var err error + // ------------- Path parameter "checkAccountId" ------------- + var checkAccountId int + + err = runtime.BindStyledParameterWithOptions("simple", "checkAccountId", ctx.Param("checkAccountId"), &checkAccountId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter checkAccountId: %s", err)) + } + + ctx.Set(Api_keyScopes, []string{}) + + // Parameter object where we will unmarshal all parameters from the context + var params GetBalanceAtDateParams + // ------------- Required query parameter "date" ------------- + + err = runtime.BindQueryParameter("form", true, true, "date", ctx.QueryParams(), ¶ms.Date) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter date: %s", err)) + } + + // Invoke the callback with all the unmarshaled arguments + err = w.Handler.GetBalanceAtDate(ctx, checkAccountId, params) + return err +} + +// GetTransactions converts echo context to params. +func (w *ServerInterfaceWrapper) GetTransactions(ctx echo.Context) error { + var err error + + ctx.Set(Api_keyScopes, []string{}) + + // Parameter object where we will unmarshal all parameters from the context + var params GetTransactionsParams + // ------------- Optional query parameter "checkAccount[id]" ------------- + + err = runtime.BindQueryParameter("form", false, false, "checkAccount[id]", ctx.QueryParams(), ¶ms.CheckAccountId) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter checkAccount[id]: %s", err)) + } + + // ------------- Optional query parameter "checkAccount[objectName]" ------------- + + err = runtime.BindQueryParameter("form", false, false, "checkAccount[objectName]", ctx.QueryParams(), ¶ms.CheckAccountObjectName) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter checkAccount[objectName]: %s", err)) + } + + // ------------- Optional query parameter "isBooked" ------------- + + err = runtime.BindQueryParameter("form", false, false, "isBooked", ctx.QueryParams(), ¶ms.IsBooked) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter isBooked: %s", err)) + } + + // ------------- Optional query parameter "paymtPurpose" ------------- + + err = runtime.BindQueryParameter("form", false, false, "paymtPurpose", ctx.QueryParams(), ¶ms.PaymtPurpose) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter paymtPurpose: %s", err)) + } + + // ------------- Optional query parameter "startDate" ------------- + + err = runtime.BindQueryParameter("form", false, false, "startDate", ctx.QueryParams(), ¶ms.StartDate) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter startDate: %s", err)) + } + + // ------------- Optional query parameter "endDate" ------------- + + err = runtime.BindQueryParameter("form", false, false, "endDate", ctx.QueryParams(), ¶ms.EndDate) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter endDate: %s", err)) + } + + // ------------- Optional query parameter "payeePayerName" ------------- + + err = runtime.BindQueryParameter("form", false, false, "payeePayerName", ctx.QueryParams(), ¶ms.PayeePayerName) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter payeePayerName: %s", err)) + } + + // ------------- Optional query parameter "onlyCredit" ------------- + + err = runtime.BindQueryParameter("form", false, false, "onlyCredit", ctx.QueryParams(), ¶ms.OnlyCredit) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter onlyCredit: %s", err)) + } + + // ------------- Optional query parameter "onlyDebit" ------------- + + err = runtime.BindQueryParameter("form", false, false, "onlyDebit", ctx.QueryParams(), ¶ms.OnlyDebit) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter onlyDebit: %s", err)) + } + + // Invoke the callback with all the unmarshaled arguments + err = w.Handler.GetTransactions(ctx, params) + return err +} + +// CreateTransaction converts echo context to params. +func (w *ServerInterfaceWrapper) CreateTransaction(ctx echo.Context) error { + var err error + + ctx.Set(Api_keyScopes, []string{}) + + // Invoke the callback with all the unmarshaled arguments + err = w.Handler.CreateTransaction(ctx) + return err +} + +// DeleteCheckAccountTransaction converts echo context to params. +func (w *ServerInterfaceWrapper) DeleteCheckAccountTransaction(ctx echo.Context) error { + var err error + // ------------- Path parameter "checkAccountTransactionId" ------------- + var checkAccountTransactionId int + + err = runtime.BindStyledParameterWithOptions("simple", "checkAccountTransactionId", ctx.Param("checkAccountTransactionId"), &checkAccountTransactionId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter checkAccountTransactionId: %s", err)) + } + + ctx.Set(Api_keyScopes, []string{}) + + // Invoke the callback with all the unmarshaled arguments + err = w.Handler.DeleteCheckAccountTransaction(ctx, checkAccountTransactionId) + return err +} + +// GetCheckAccountTransactionById converts echo context to params. +func (w *ServerInterfaceWrapper) GetCheckAccountTransactionById(ctx echo.Context) error { + var err error + // ------------- Path parameter "checkAccountTransactionId" ------------- + var checkAccountTransactionId int + + err = runtime.BindStyledParameterWithOptions("simple", "checkAccountTransactionId", ctx.Param("checkAccountTransactionId"), &checkAccountTransactionId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter checkAccountTransactionId: %s", err)) + } + + ctx.Set(Api_keyScopes, []string{}) + + // Invoke the callback with all the unmarshaled arguments + err = w.Handler.GetCheckAccountTransactionById(ctx, checkAccountTransactionId) + return err +} + +// UpdateCheckAccountTransaction converts echo context to params. +func (w *ServerInterfaceWrapper) UpdateCheckAccountTransaction(ctx echo.Context) error { + var err error + // ------------- Path parameter "checkAccountTransactionId" ------------- + var checkAccountTransactionId int + + err = runtime.BindStyledParameterWithOptions("simple", "checkAccountTransactionId", ctx.Param("checkAccountTransactionId"), &checkAccountTransactionId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter checkAccountTransactionId: %s", err)) + } + + ctx.Set(Api_keyScopes, []string{}) + + // Invoke the callback with all the unmarshaled arguments + err = w.Handler.UpdateCheckAccountTransaction(ctx, checkAccountTransactionId) + return err +} + +// CheckAccountTransactionEnshrine converts echo context to params. +func (w *ServerInterfaceWrapper) CheckAccountTransactionEnshrine(ctx echo.Context) error { + var err error + // ------------- Path parameter "checkAccountTransactionId" ------------- + var checkAccountTransactionId int + + err = runtime.BindStyledParameterWithOptions("simple", "checkAccountTransactionId", ctx.Param("checkAccountTransactionId"), &checkAccountTransactionId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter checkAccountTransactionId: %s", err)) + } + + ctx.Set(Api_keyScopes, []string{}) + + // Invoke the callback with all the unmarshaled arguments + err = w.Handler.CheckAccountTransactionEnshrine(ctx, checkAccountTransactionId) + return err +} + +// GetCommunicationWays converts echo context to params. +func (w *ServerInterfaceWrapper) GetCommunicationWays(ctx echo.Context) error { + var err error + + ctx.Set(Api_keyScopes, []string{}) + + // Parameter object where we will unmarshal all parameters from the context + var params GetCommunicationWaysParams + // ------------- Optional query parameter "contact[id]" ------------- + + err = runtime.BindQueryParameter("form", true, false, "contact[id]", ctx.QueryParams(), ¶ms.ContactId) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter contact[id]: %s", err)) + } + + // ------------- Optional query parameter "contact[objectName]" ------------- + + err = runtime.BindQueryParameter("form", true, false, "contact[objectName]", ctx.QueryParams(), ¶ms.ContactObjectName) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter contact[objectName]: %s", err)) + } + + // ------------- Optional query parameter "type" ------------- + + err = runtime.BindQueryParameter("form", true, false, "type", ctx.QueryParams(), ¶ms.Type) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter type: %s", err)) + } + + // ------------- Optional query parameter "main" ------------- + + err = runtime.BindQueryParameter("form", true, false, "main", ctx.QueryParams(), ¶ms.Main) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter main: %s", err)) + } + + // Invoke the callback with all the unmarshaled arguments + err = w.Handler.GetCommunicationWays(ctx, params) + return err +} + +// CreateCommunicationWay converts echo context to params. +func (w *ServerInterfaceWrapper) CreateCommunicationWay(ctx echo.Context) error { + var err error + + ctx.Set(Api_keyScopes, []string{}) + + // Invoke the callback with all the unmarshaled arguments + err = w.Handler.CreateCommunicationWay(ctx) + return err +} + +// DeleteCommunicationWay converts echo context to params. +func (w *ServerInterfaceWrapper) DeleteCommunicationWay(ctx echo.Context) error { + var err error + // ------------- Path parameter "communicationWayId" ------------- + var communicationWayId int + + err = runtime.BindStyledParameterWithOptions("simple", "communicationWayId", ctx.Param("communicationWayId"), &communicationWayId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter communicationWayId: %s", err)) + } + + ctx.Set(Api_keyScopes, []string{}) + + // Invoke the callback with all the unmarshaled arguments + err = w.Handler.DeleteCommunicationWay(ctx, communicationWayId) + return err +} + +// GetCommunicationWayById converts echo context to params. +func (w *ServerInterfaceWrapper) GetCommunicationWayById(ctx echo.Context) error { + var err error + // ------------- Path parameter "communicationWayId" ------------- + var communicationWayId int + + err = runtime.BindStyledParameterWithOptions("simple", "communicationWayId", ctx.Param("communicationWayId"), &communicationWayId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter communicationWayId: %s", err)) + } + + ctx.Set(Api_keyScopes, []string{}) + + // Invoke the callback with all the unmarshaled arguments + err = w.Handler.GetCommunicationWayById(ctx, communicationWayId) + return err +} + +// UpdateCommunicationWay converts echo context to params. +func (w *ServerInterfaceWrapper) UpdateCommunicationWay(ctx echo.Context) error { + var err error + // ------------- Path parameter "communicationWayId" ------------- + var communicationWayId int + + err = runtime.BindStyledParameterWithOptions("simple", "communicationWayId", ctx.Param("communicationWayId"), &communicationWayId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter communicationWayId: %s", err)) + } + + ctx.Set(Api_keyScopes, []string{}) + + // Invoke the callback with all the unmarshaled arguments + err = w.Handler.UpdateCommunicationWay(ctx, communicationWayId) + return err +} + +// GetCommunicationWayKeys converts echo context to params. +func (w *ServerInterfaceWrapper) GetCommunicationWayKeys(ctx echo.Context) error { + var err error + + ctx.Set(Api_keyScopes, []string{}) + + // Invoke the callback with all the unmarshaled arguments + err = w.Handler.GetCommunicationWayKeys(ctx) + return err +} + +// GetContacts converts echo context to params. +func (w *ServerInterfaceWrapper) GetContacts(ctx echo.Context) error { + var err error + + ctx.Set(Api_keyScopes, []string{}) + + // Parameter object where we will unmarshal all parameters from the context + var params GetContactsParams + // ------------- Optional query parameter "depth" ------------- + + err = runtime.BindQueryParameter("form", true, false, "depth", ctx.QueryParams(), ¶ms.Depth) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter depth: %s", err)) + } + + // ------------- Optional query parameter "customerNumber" ------------- + + err = runtime.BindQueryParameter("form", true, false, "customerNumber", ctx.QueryParams(), ¶ms.CustomerNumber) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter customerNumber: %s", err)) + } + + // Invoke the callback with all the unmarshaled arguments + err = w.Handler.GetContacts(ctx, params) + return err +} + +// CreateContact converts echo context to params. +func (w *ServerInterfaceWrapper) CreateContact(ctx echo.Context) error { + var err error + + ctx.Set(Api_keyScopes, []string{}) + + // Invoke the callback with all the unmarshaled arguments + err = w.Handler.CreateContact(ctx) + return err +} + +// FindContactsByCustomFieldValue converts echo context to params. +func (w *ServerInterfaceWrapper) FindContactsByCustomFieldValue(ctx echo.Context) error { + var err error + + ctx.Set(Api_keyScopes, []string{}) + + // Parameter object where we will unmarshal all parameters from the context + var params FindContactsByCustomFieldValueParams + // ------------- Required query parameter "value" ------------- + + err = runtime.BindQueryParameter("form", true, true, "value", ctx.QueryParams(), ¶ms.Value) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter value: %s", err)) + } + + // ------------- Optional query parameter "customFieldSetting[id]" ------------- + + err = runtime.BindQueryParameter("form", true, false, "customFieldSetting[id]", ctx.QueryParams(), ¶ms.CustomFieldSettingId) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter customFieldSetting[id]: %s", err)) + } + + // ------------- Optional query parameter "customFieldSetting[objectName]" ------------- + + err = runtime.BindQueryParameter("form", true, false, "customFieldSetting[objectName]", ctx.QueryParams(), ¶ms.CustomFieldSettingObjectName) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter customFieldSetting[objectName]: %s", err)) + } + + // ------------- Required query parameter "customFieldName" ------------- + + err = runtime.BindQueryParameter("form", true, true, "customFieldName", ctx.QueryParams(), ¶ms.CustomFieldName) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter customFieldName: %s", err)) + } + + // Invoke the callback with all the unmarshaled arguments + err = w.Handler.FindContactsByCustomFieldValue(ctx, params) + return err +} + +// GetNextCustomerNumber converts echo context to params. +func (w *ServerInterfaceWrapper) GetNextCustomerNumber(ctx echo.Context) error { + var err error + + ctx.Set(Api_keyScopes, []string{}) + + // Invoke the callback with all the unmarshaled arguments + err = w.Handler.GetNextCustomerNumber(ctx) + return err +} + +// ContactCustomerNumberAvailabilityCheck converts echo context to params. +func (w *ServerInterfaceWrapper) ContactCustomerNumberAvailabilityCheck(ctx echo.Context) error { + var err error + + ctx.Set(Api_keyScopes, []string{}) + + // Parameter object where we will unmarshal all parameters from the context + var params ContactCustomerNumberAvailabilityCheckParams + // ------------- Optional query parameter "customerNumber" ------------- + + err = runtime.BindQueryParameter("form", true, false, "customerNumber", ctx.QueryParams(), ¶ms.CustomerNumber) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter customerNumber: %s", err)) + } + + // Invoke the callback with all the unmarshaled arguments + err = w.Handler.ContactCustomerNumberAvailabilityCheck(ctx, params) + return err +} + +// DeleteContact converts echo context to params. +func (w *ServerInterfaceWrapper) DeleteContact(ctx echo.Context) error { + var err error + // ------------- Path parameter "contactId" ------------- + var contactId int + + err = runtime.BindStyledParameterWithOptions("simple", "contactId", ctx.Param("contactId"), &contactId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter contactId: %s", err)) + } + + ctx.Set(Api_keyScopes, []string{}) + + // Invoke the callback with all the unmarshaled arguments + err = w.Handler.DeleteContact(ctx, contactId) + return err +} + +// GetContactById converts echo context to params. +func (w *ServerInterfaceWrapper) GetContactById(ctx echo.Context) error { + var err error + // ------------- Path parameter "contactId" ------------- + var contactId int + + err = runtime.BindStyledParameterWithOptions("simple", "contactId", ctx.Param("contactId"), &contactId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter contactId: %s", err)) + } + + ctx.Set(Api_keyScopes, []string{}) + + // Invoke the callback with all the unmarshaled arguments + err = w.Handler.GetContactById(ctx, contactId) + return err +} + +// UpdateContact converts echo context to params. +func (w *ServerInterfaceWrapper) UpdateContact(ctx echo.Context) error { + var err error + // ------------- Path parameter "contactId" ------------- + var contactId int + + err = runtime.BindStyledParameterWithOptions("simple", "contactId", ctx.Param("contactId"), &contactId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter contactId: %s", err)) + } + + ctx.Set(Api_keyScopes, []string{}) + + // Invoke the callback with all the unmarshaled arguments + err = w.Handler.UpdateContact(ctx, contactId) + return err +} + +// GetContactTabsItemCountById converts echo context to params. +func (w *ServerInterfaceWrapper) GetContactTabsItemCountById(ctx echo.Context) error { + var err error + // ------------- Path parameter "contactId" ------------- + var contactId int + + err = runtime.BindStyledParameterWithOptions("simple", "contactId", ctx.Param("contactId"), &contactId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter contactId: %s", err)) + } + + ctx.Set(Api_keyScopes, []string{}) + + // Invoke the callback with all the unmarshaled arguments + err = w.Handler.GetContactTabsItemCountById(ctx, contactId) + return err +} + +// GetContactAddresses converts echo context to params. +func (w *ServerInterfaceWrapper) GetContactAddresses(ctx echo.Context) error { + var err error + + ctx.Set(Api_keyScopes, []string{}) + + // Invoke the callback with all the unmarshaled arguments + err = w.Handler.GetContactAddresses(ctx) + return err +} + +// CreateContactAddress converts echo context to params. +func (w *ServerInterfaceWrapper) CreateContactAddress(ctx echo.Context) error { + var err error + + ctx.Set(Api_keyScopes, []string{}) + + // Invoke the callback with all the unmarshaled arguments + err = w.Handler.CreateContactAddress(ctx) + return err +} + +// DeleteContactAddress converts echo context to params. +func (w *ServerInterfaceWrapper) DeleteContactAddress(ctx echo.Context) error { + var err error + // ------------- Path parameter "contactAddressId" ------------- + var contactAddressId int + + err = runtime.BindStyledParameterWithOptions("simple", "contactAddressId", ctx.Param("contactAddressId"), &contactAddressId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter contactAddressId: %s", err)) + } + + ctx.Set(Api_keyScopes, []string{}) + + // Invoke the callback with all the unmarshaled arguments + err = w.Handler.DeleteContactAddress(ctx, contactAddressId) + return err +} + +// ContactAddressId converts echo context to params. +func (w *ServerInterfaceWrapper) ContactAddressId(ctx echo.Context) error { + var err error + // ------------- Path parameter "contactAddressId" ------------- + var contactAddressId int + + err = runtime.BindStyledParameterWithOptions("simple", "contactAddressId", ctx.Param("contactAddressId"), &contactAddressId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter contactAddressId: %s", err)) + } + + ctx.Set(Api_keyScopes, []string{}) + + // Invoke the callback with all the unmarshaled arguments + err = w.Handler.ContactAddressId(ctx, contactAddressId) + return err +} + +// UpdateContactAddress converts echo context to params. +func (w *ServerInterfaceWrapper) UpdateContactAddress(ctx echo.Context) error { + var err error + // ------------- Path parameter "contactAddressId" ------------- + var contactAddressId int + + err = runtime.BindStyledParameterWithOptions("simple", "contactAddressId", ctx.Param("contactAddressId"), &contactAddressId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter contactAddressId: %s", err)) + } + + ctx.Set(Api_keyScopes, []string{}) + + // Invoke the callback with all the unmarshaled arguments + err = w.Handler.UpdateContactAddress(ctx, contactAddressId) + return err +} + +// GetContactFields converts echo context to params. +func (w *ServerInterfaceWrapper) GetContactFields(ctx echo.Context) error { + var err error + + ctx.Set(Api_keyScopes, []string{}) + + // Invoke the callback with all the unmarshaled arguments + err = w.Handler.GetContactFields(ctx) + return err +} + +// CreateContactField converts echo context to params. +func (w *ServerInterfaceWrapper) CreateContactField(ctx echo.Context) error { + var err error + + ctx.Set(Api_keyScopes, []string{}) + + // Invoke the callback with all the unmarshaled arguments + err = w.Handler.CreateContactField(ctx) + return err +} + +// DeleteContactCustomFieldId converts echo context to params. +func (w *ServerInterfaceWrapper) DeleteContactCustomFieldId(ctx echo.Context) error { + var err error + // ------------- Path parameter "contactCustomFieldId" ------------- + var contactCustomFieldId int + + err = runtime.BindStyledParameterWithOptions("simple", "contactCustomFieldId", ctx.Param("contactCustomFieldId"), &contactCustomFieldId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter contactCustomFieldId: %s", err)) + } + + ctx.Set(Api_keyScopes, []string{}) + + // Invoke the callback with all the unmarshaled arguments + err = w.Handler.DeleteContactCustomFieldId(ctx, contactCustomFieldId) + return err +} + +// GetContactFieldsById converts echo context to params. +func (w *ServerInterfaceWrapper) GetContactFieldsById(ctx echo.Context) error { + var err error + // ------------- Path parameter "contactCustomFieldId" ------------- + var contactCustomFieldId float32 + + err = runtime.BindStyledParameterWithOptions("simple", "contactCustomFieldId", ctx.Param("contactCustomFieldId"), &contactCustomFieldId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter contactCustomFieldId: %s", err)) + } + + ctx.Set(Api_keyScopes, []string{}) + + // Invoke the callback with all the unmarshaled arguments + err = w.Handler.GetContactFieldsById(ctx, contactCustomFieldId) + return err +} + +// UpdateContactfield converts echo context to params. +func (w *ServerInterfaceWrapper) UpdateContactfield(ctx echo.Context) error { + var err error + // ------------- Path parameter "contactCustomFieldId" ------------- + var contactCustomFieldId float32 + + err = runtime.BindStyledParameterWithOptions("simple", "contactCustomFieldId", ctx.Param("contactCustomFieldId"), &contactCustomFieldId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter contactCustomFieldId: %s", err)) + } + + ctx.Set(Api_keyScopes, []string{}) + + // Invoke the callback with all the unmarshaled arguments + err = w.Handler.UpdateContactfield(ctx, contactCustomFieldId) + return err +} + +// GetContactFieldSettings converts echo context to params. +func (w *ServerInterfaceWrapper) GetContactFieldSettings(ctx echo.Context) error { + var err error + + ctx.Set(Api_keyScopes, []string{}) + + // Invoke the callback with all the unmarshaled arguments + err = w.Handler.GetContactFieldSettings(ctx) + return err +} + +// CreateContactFieldSetting converts echo context to params. +func (w *ServerInterfaceWrapper) CreateContactFieldSetting(ctx echo.Context) error { + var err error + + ctx.Set(Api_keyScopes, []string{}) + + // Invoke the callback with all the unmarshaled arguments + err = w.Handler.CreateContactFieldSetting(ctx) + return err +} + +// DeleteContactFieldSetting converts echo context to params. +func (w *ServerInterfaceWrapper) DeleteContactFieldSetting(ctx echo.Context) error { + var err error + // ------------- Path parameter "contactCustomFieldSettingId" ------------- + var contactCustomFieldSettingId int + + err = runtime.BindStyledParameterWithOptions("simple", "contactCustomFieldSettingId", ctx.Param("contactCustomFieldSettingId"), &contactCustomFieldSettingId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter contactCustomFieldSettingId: %s", err)) + } + + ctx.Set(Api_keyScopes, []string{}) + + // Invoke the callback with all the unmarshaled arguments + err = w.Handler.DeleteContactFieldSetting(ctx, contactCustomFieldSettingId) + return err +} + +// GetContactFieldSettingById converts echo context to params. +func (w *ServerInterfaceWrapper) GetContactFieldSettingById(ctx echo.Context) error { + var err error + // ------------- Path parameter "contactCustomFieldSettingId" ------------- + var contactCustomFieldSettingId int + + err = runtime.BindStyledParameterWithOptions("simple", "contactCustomFieldSettingId", ctx.Param("contactCustomFieldSettingId"), &contactCustomFieldSettingId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter contactCustomFieldSettingId: %s", err)) + } + + ctx.Set(Api_keyScopes, []string{}) + + // Invoke the callback with all the unmarshaled arguments + err = w.Handler.GetContactFieldSettingById(ctx, contactCustomFieldSettingId) + return err +} + +// UpdateContactFieldSetting converts echo context to params. +func (w *ServerInterfaceWrapper) UpdateContactFieldSetting(ctx echo.Context) error { + var err error + // ------------- Path parameter "contactCustomFieldSettingId" ------------- + var contactCustomFieldSettingId int + + err = runtime.BindStyledParameterWithOptions("simple", "contactCustomFieldSettingId", ctx.Param("contactCustomFieldSettingId"), &contactCustomFieldSettingId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter contactCustomFieldSettingId: %s", err)) + } + + ctx.Set(Api_keyScopes, []string{}) + + // Invoke the callback with all the unmarshaled arguments + err = w.Handler.UpdateContactFieldSetting(ctx, contactCustomFieldSettingId) + return err +} + +// GetReferenceCount converts echo context to params. +func (w *ServerInterfaceWrapper) GetReferenceCount(ctx echo.Context) error { + var err error + // ------------- Path parameter "contactCustomFieldSettingId" ------------- + var contactCustomFieldSettingId int + + err = runtime.BindStyledParameterWithOptions("simple", "contactCustomFieldSettingId", ctx.Param("contactCustomFieldSettingId"), &contactCustomFieldSettingId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter contactCustomFieldSettingId: %s", err)) + } + + ctx.Set(Api_keyScopes, []string{}) + + // Invoke the callback with all the unmarshaled arguments + err = w.Handler.GetReferenceCount(ctx, contactCustomFieldSettingId) + return err +} + +// GetCreditNotes converts echo context to params. +func (w *ServerInterfaceWrapper) GetCreditNotes(ctx echo.Context) error { + var err error + + ctx.Set(Api_keyScopes, []string{}) + + // Parameter object where we will unmarshal all parameters from the context + var params GetCreditNotesParams + // ------------- Optional query parameter "status" ------------- + + err = runtime.BindQueryParameter("form", true, false, "status", ctx.QueryParams(), ¶ms.Status) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter status: %s", err)) + } + + // ------------- Optional query parameter "creditNoteNumber" ------------- + + err = runtime.BindQueryParameter("form", true, false, "creditNoteNumber", ctx.QueryParams(), ¶ms.CreditNoteNumber) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter creditNoteNumber: %s", err)) + } + + // ------------- Optional query parameter "startDate" ------------- + + err = runtime.BindQueryParameter("form", true, false, "startDate", ctx.QueryParams(), ¶ms.StartDate) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter startDate: %s", err)) + } + + // ------------- Optional query parameter "endDate" ------------- + + err = runtime.BindQueryParameter("form", true, false, "endDate", ctx.QueryParams(), ¶ms.EndDate) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter endDate: %s", err)) + } + + // ------------- Optional query parameter "contact[id]" ------------- + + err = runtime.BindQueryParameter("form", false, false, "contact[id]", ctx.QueryParams(), ¶ms.ContactId) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter contact[id]: %s", err)) + } + + // ------------- Optional query parameter "contact[objectName]" ------------- + + err = runtime.BindQueryParameter("form", false, false, "contact[objectName]", ctx.QueryParams(), ¶ms.ContactObjectName) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter contact[objectName]: %s", err)) + } + + // Invoke the callback with all the unmarshaled arguments + err = w.Handler.GetCreditNotes(ctx, params) + return err +} + +// CreateCreditNoteFromInvoice converts echo context to params. +func (w *ServerInterfaceWrapper) CreateCreditNoteFromInvoice(ctx echo.Context) error { + var err error + + ctx.Set(Api_keyScopes, []string{}) + + // Invoke the callback with all the unmarshaled arguments + err = w.Handler.CreateCreditNoteFromInvoice(ctx) + return err +} + +// CreateCreditNoteFromVoucher converts echo context to params. +func (w *ServerInterfaceWrapper) CreateCreditNoteFromVoucher(ctx echo.Context) error { + var err error + + ctx.Set(Api_keyScopes, []string{}) + + // Invoke the callback with all the unmarshaled arguments + err = w.Handler.CreateCreditNoteFromVoucher(ctx) + return err +} + +// CreatecreditNote converts echo context to params. +func (w *ServerInterfaceWrapper) CreatecreditNote(ctx echo.Context) error { + var err error + + ctx.Set(Api_keyScopes, []string{}) + + // Invoke the callback with all the unmarshaled arguments + err = w.Handler.CreatecreditNote(ctx) + return err +} + +// DeletecreditNote converts echo context to params. +func (w *ServerInterfaceWrapper) DeletecreditNote(ctx echo.Context) error { + var err error + // ------------- Path parameter "creditNoteId" ------------- + var creditNoteId int + + err = runtime.BindStyledParameterWithOptions("simple", "creditNoteId", ctx.Param("creditNoteId"), &creditNoteId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter creditNoteId: %s", err)) + } + + ctx.Set(Api_keyScopes, []string{}) + + // Invoke the callback with all the unmarshaled arguments + err = w.Handler.DeletecreditNote(ctx, creditNoteId) + return err +} + +// GetcreditNoteById converts echo context to params. +func (w *ServerInterfaceWrapper) GetcreditNoteById(ctx echo.Context) error { + var err error + // ------------- Path parameter "creditNoteId" ------------- + var creditNoteId int + + err = runtime.BindStyledParameterWithOptions("simple", "creditNoteId", ctx.Param("creditNoteId"), &creditNoteId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter creditNoteId: %s", err)) + } + + ctx.Set(Api_keyScopes, []string{}) + + // Invoke the callback with all the unmarshaled arguments + err = w.Handler.GetcreditNoteById(ctx, creditNoteId) + return err +} + +// UpdatecreditNote converts echo context to params. +func (w *ServerInterfaceWrapper) UpdatecreditNote(ctx echo.Context) error { + var err error + // ------------- Path parameter "creditNoteId" ------------- + var creditNoteId int + + err = runtime.BindStyledParameterWithOptions("simple", "creditNoteId", ctx.Param("creditNoteId"), &creditNoteId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter creditNoteId: %s", err)) + } + + ctx.Set(Api_keyScopes, []string{}) + + // Invoke the callback with all the unmarshaled arguments + err = w.Handler.UpdatecreditNote(ctx, creditNoteId) + return err +} + +// BookCreditNote converts echo context to params. +func (w *ServerInterfaceWrapper) BookCreditNote(ctx echo.Context) error { + var err error + // ------------- Path parameter "creditNoteId" ------------- + var creditNoteId int + + err = runtime.BindStyledParameterWithOptions("simple", "creditNoteId", ctx.Param("creditNoteId"), &creditNoteId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter creditNoteId: %s", err)) + } + + ctx.Set(Api_keyScopes, []string{}) + + // Invoke the callback with all the unmarshaled arguments + err = w.Handler.BookCreditNote(ctx, creditNoteId) + return err +} + +// UpdateCreditNoteTemplate converts echo context to params. +func (w *ServerInterfaceWrapper) UpdateCreditNoteTemplate(ctx echo.Context) error { + var err error + // ------------- Path parameter "creditNoteId" ------------- + var creditNoteId int + + err = runtime.BindStyledParameterWithOptions("simple", "creditNoteId", ctx.Param("creditNoteId"), &creditNoteId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter creditNoteId: %s", err)) + } + + ctx.Set(Api_keyScopes, []string{}) + + // Invoke the callback with all the unmarshaled arguments + err = w.Handler.UpdateCreditNoteTemplate(ctx, creditNoteId) + return err +} + +// CreditNoteEnshrine converts echo context to params. +func (w *ServerInterfaceWrapper) CreditNoteEnshrine(ctx echo.Context) error { + var err error + // ------------- Path parameter "creditNoteId" ------------- + var creditNoteId int + + err = runtime.BindStyledParameterWithOptions("simple", "creditNoteId", ctx.Param("creditNoteId"), &creditNoteId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter creditNoteId: %s", err)) + } + + ctx.Set(Api_keyScopes, []string{}) + + // Invoke the callback with all the unmarshaled arguments + err = w.Handler.CreditNoteEnshrine(ctx, creditNoteId) + return err +} + +// CreditNoteGetPdf converts echo context to params. +func (w *ServerInterfaceWrapper) CreditNoteGetPdf(ctx echo.Context) error { + var err error + // ------------- Path parameter "creditNoteId" ------------- + var creditNoteId int + + err = runtime.BindStyledParameterWithOptions("simple", "creditNoteId", ctx.Param("creditNoteId"), &creditNoteId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter creditNoteId: %s", err)) + } + + ctx.Set(Api_keyScopes, []string{}) + + // Parameter object where we will unmarshal all parameters from the context + var params CreditNoteGetPdfParams + // ------------- Optional query parameter "download" ------------- + + err = runtime.BindQueryParameter("form", true, false, "download", ctx.QueryParams(), ¶ms.Download) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter download: %s", err)) + } + + // ------------- Optional query parameter "preventSendBy" ------------- + + err = runtime.BindQueryParameter("form", true, false, "preventSendBy", ctx.QueryParams(), ¶ms.PreventSendBy) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter preventSendBy: %s", err)) + } + + // Invoke the callback with all the unmarshaled arguments + err = w.Handler.CreditNoteGetPdf(ctx, creditNoteId, params) + return err +} + +// CreditNoteResetToDraft converts echo context to params. +func (w *ServerInterfaceWrapper) CreditNoteResetToDraft(ctx echo.Context) error { + var err error + // ------------- Path parameter "creditNoteId" ------------- + var creditNoteId int + + err = runtime.BindStyledParameterWithOptions("simple", "creditNoteId", ctx.Param("creditNoteId"), &creditNoteId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter creditNoteId: %s", err)) + } + + ctx.Set(Api_keyScopes, []string{}) + + // Invoke the callback with all the unmarshaled arguments + err = w.Handler.CreditNoteResetToDraft(ctx, creditNoteId) + return err +} + +// CreditNoteResetToOpen converts echo context to params. +func (w *ServerInterfaceWrapper) CreditNoteResetToOpen(ctx echo.Context) error { + var err error + // ------------- Path parameter "creditNoteId" ------------- + var creditNoteId int + + err = runtime.BindStyledParameterWithOptions("simple", "creditNoteId", ctx.Param("creditNoteId"), &creditNoteId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter creditNoteId: %s", err)) + } + + ctx.Set(Api_keyScopes, []string{}) + + // Invoke the callback with all the unmarshaled arguments + err = w.Handler.CreditNoteResetToOpen(ctx, creditNoteId) + return err +} + +// CreditNoteSendBy converts echo context to params. +func (w *ServerInterfaceWrapper) CreditNoteSendBy(ctx echo.Context) error { + var err error + // ------------- Path parameter "creditNoteId" ------------- + var creditNoteId int + + err = runtime.BindStyledParameterWithOptions("simple", "creditNoteId", ctx.Param("creditNoteId"), &creditNoteId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter creditNoteId: %s", err)) + } + + ctx.Set(Api_keyScopes, []string{}) + + // Invoke the callback with all the unmarshaled arguments + err = w.Handler.CreditNoteSendBy(ctx, creditNoteId) + return err +} + +// SendCreditNoteByPrinting converts echo context to params. +func (w *ServerInterfaceWrapper) SendCreditNoteByPrinting(ctx echo.Context) error { + var err error + // ------------- Path parameter "creditNoteId" ------------- + var creditNoteId int + + err = runtime.BindStyledParameterWithOptions("simple", "creditNoteId", ctx.Param("creditNoteId"), &creditNoteId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter creditNoteId: %s", err)) + } + + ctx.Set(Api_keyScopes, []string{}) + + // Parameter object where we will unmarshal all parameters from the context + var params SendCreditNoteByPrintingParams + // ------------- Required query parameter "sendType" ------------- + + err = runtime.BindQueryParameter("form", true, true, "sendType", ctx.QueryParams(), ¶ms.SendType) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter sendType: %s", err)) + } + + // Invoke the callback with all the unmarshaled arguments + err = w.Handler.SendCreditNoteByPrinting(ctx, creditNoteId, params) + return err +} + +// SendCreditNoteViaEMail converts echo context to params. +func (w *ServerInterfaceWrapper) SendCreditNoteViaEMail(ctx echo.Context) error { + var err error + // ------------- Path parameter "creditNoteId" ------------- + var creditNoteId int + + err = runtime.BindStyledParameterWithOptions("simple", "creditNoteId", ctx.Param("creditNoteId"), &creditNoteId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter creditNoteId: %s", err)) + } + + ctx.Set(Api_keyScopes, []string{}) + + // Invoke the callback with all the unmarshaled arguments + err = w.Handler.SendCreditNoteViaEMail(ctx, creditNoteId) + return err +} + +// GetcreditNotePositions converts echo context to params. +func (w *ServerInterfaceWrapper) GetcreditNotePositions(ctx echo.Context) error { + var err error + + ctx.Set(Api_keyScopes, []string{}) + + // Parameter object where we will unmarshal all parameters from the context + var params GetcreditNotePositionsParams + // ------------- Optional query parameter "creditNote[id]" ------------- + + err = runtime.BindQueryParameter("form", false, false, "creditNote[id]", ctx.QueryParams(), ¶ms.CreditNoteId) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter creditNote[id]: %s", err)) + } + + // ------------- Optional query parameter "creditNote[objectName]" ------------- + + err = runtime.BindQueryParameter("form", false, false, "creditNote[objectName]", ctx.QueryParams(), ¶ms.CreditNoteObjectName) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter creditNote[objectName]: %s", err)) + } + + // Invoke the callback with all the unmarshaled arguments + err = w.Handler.GetcreditNotePositions(ctx, params) + return err +} + +// GetLetterpapersWithThumb converts echo context to params. +func (w *ServerInterfaceWrapper) GetLetterpapersWithThumb(ctx echo.Context) error { + var err error + + ctx.Set(Api_keyScopes, []string{}) + + // Invoke the callback with all the unmarshaled arguments + err = w.Handler.GetLetterpapersWithThumb(ctx) + return err +} + +// GetTemplates converts echo context to params. +func (w *ServerInterfaceWrapper) GetTemplates(ctx echo.Context) error { + var err error + + ctx.Set(Api_keyScopes, []string{}) + + // Parameter object where we will unmarshal all parameters from the context + var params GetTemplatesParams + // ------------- Optional query parameter "type" ------------- + + err = runtime.BindQueryParameter("form", true, false, "type", ctx.QueryParams(), ¶ms.Type) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter type: %s", err)) + } + + // Invoke the callback with all the unmarshaled arguments + err = w.Handler.GetTemplates(ctx, params) + return err +} + +// ExportContact converts echo context to params. +func (w *ServerInterfaceWrapper) ExportContact(ctx echo.Context) error { + var err error + + ctx.Set(Api_keyScopes, []string{}) + + // Parameter object where we will unmarshal all parameters from the context + var params ExportContactParams + // ------------- Optional query parameter "download" ------------- + + err = runtime.BindQueryParameter("form", true, false, "download", ctx.QueryParams(), ¶ms.Download) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter download: %s", err)) + } + + // ------------- Required query parameter "sevQuery" ------------- + + err = runtime.BindQueryParameter("form", true, true, "sevQuery", ctx.QueryParams(), ¶ms.SevQuery) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter sevQuery: %s", err)) + } + + // Invoke the callback with all the unmarshaled arguments + err = w.Handler.ExportContact(ctx, params) + return err +} + +// ExportCreditNote converts echo context to params. +func (w *ServerInterfaceWrapper) ExportCreditNote(ctx echo.Context) error { + var err error + + ctx.Set(Api_keyScopes, []string{}) + + // Parameter object where we will unmarshal all parameters from the context + var params ExportCreditNoteParams + // ------------- Optional query parameter "download" ------------- + + err = runtime.BindQueryParameter("form", true, false, "download", ctx.QueryParams(), ¶ms.Download) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter download: %s", err)) + } + + // ------------- Required query parameter "sevQuery" ------------- + + err = runtime.BindQueryParameter("form", true, true, "sevQuery", ctx.QueryParams(), ¶ms.SevQuery) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter sevQuery: %s", err)) + } + + // Invoke the callback with all the unmarshaled arguments + err = w.Handler.ExportCreditNote(ctx, params) + return err +} + +// ExportDatev converts echo context to params. +func (w *ServerInterfaceWrapper) ExportDatev(ctx echo.Context) error { + var err error + + ctx.Set(Api_keyScopes, []string{}) + + // Parameter object where we will unmarshal all parameters from the context + var params ExportDatevParams + // ------------- Optional query parameter "Download" ------------- + + err = runtime.BindQueryParameter("form", true, false, "Download", ctx.QueryParams(), ¶ms.Download) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter Download: %s", err)) + } + + // ------------- Required query parameter "startDate" ------------- + + err = runtime.BindQueryParameter("form", true, true, "startDate", ctx.QueryParams(), ¶ms.StartDate) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter startDate: %s", err)) + } + + // ------------- Required query parameter "endDate" ------------- + + err = runtime.BindQueryParameter("form", true, true, "endDate", ctx.QueryParams(), ¶ms.EndDate) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter endDate: %s", err)) + } + + // ------------- Required query parameter "scope" ------------- + + err = runtime.BindQueryParameter("form", true, true, "scope", ctx.QueryParams(), ¶ms.Scope) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter scope: %s", err)) + } + + // ------------- Optional query parameter "withUnpaidDocuments" ------------- + + err = runtime.BindQueryParameter("form", true, false, "withUnpaidDocuments", ctx.QueryParams(), ¶ms.WithUnpaidDocuments) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter withUnpaidDocuments: %s", err)) + } + + // ------------- Optional query parameter "withEnshrinedDocuments" ------------- + + err = runtime.BindQueryParameter("form", true, false, "withEnshrinedDocuments", ctx.QueryParams(), ¶ms.WithEnshrinedDocuments) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter withEnshrinedDocuments: %s", err)) + } + + // ------------- Optional query parameter "enshrine" ------------- + + err = runtime.BindQueryParameter("form", true, false, "enshrine", ctx.QueryParams(), ¶ms.Enshrine) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter enshrine: %s", err)) + } + + // Invoke the callback with all the unmarshaled arguments + err = w.Handler.ExportDatev(ctx, params) + return err +} + +// ExportInvoice converts echo context to params. +func (w *ServerInterfaceWrapper) ExportInvoice(ctx echo.Context) error { + var err error + + ctx.Set(Api_keyScopes, []string{}) + + // Parameter object where we will unmarshal all parameters from the context + var params ExportInvoiceParams + // ------------- Optional query parameter "download" ------------- + + err = runtime.BindQueryParameter("form", true, false, "download", ctx.QueryParams(), ¶ms.Download) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter download: %s", err)) + } + + // ------------- Required query parameter "sevQuery" ------------- + + err = runtime.BindQueryParameter("form", true, true, "sevQuery", ctx.QueryParams(), ¶ms.SevQuery) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter sevQuery: %s", err)) + } + + // Invoke the callback with all the unmarshaled arguments + err = w.Handler.ExportInvoice(ctx, params) + return err +} + +// ExportInvoiceZip converts echo context to params. +func (w *ServerInterfaceWrapper) ExportInvoiceZip(ctx echo.Context) error { + var err error + + ctx.Set(Api_keyScopes, []string{}) + + // Parameter object where we will unmarshal all parameters from the context + var params ExportInvoiceZipParams + // ------------- Optional query parameter "download" ------------- + + err = runtime.BindQueryParameter("form", true, false, "download", ctx.QueryParams(), ¶ms.Download) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter download: %s", err)) + } + + // ------------- Required query parameter "sevQuery" ------------- + + err = runtime.BindQueryParameter("form", true, true, "sevQuery", ctx.QueryParams(), ¶ms.SevQuery) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter sevQuery: %s", err)) + } + + // Invoke the callback with all the unmarshaled arguments + err = w.Handler.ExportInvoiceZip(ctx, params) + return err +} + +// ExportTransactions converts echo context to params. +func (w *ServerInterfaceWrapper) ExportTransactions(ctx echo.Context) error { + var err error + + ctx.Set(Api_keyScopes, []string{}) + + // Parameter object where we will unmarshal all parameters from the context + var params ExportTransactionsParams + // ------------- Optional query parameter "download" ------------- + + err = runtime.BindQueryParameter("form", true, false, "download", ctx.QueryParams(), ¶ms.Download) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter download: %s", err)) + } + + // ------------- Required query parameter "sevQuery" ------------- + + err = runtime.BindQueryParameter("form", true, true, "sevQuery", ctx.QueryParams(), ¶ms.SevQuery) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter sevQuery: %s", err)) + } + + // Invoke the callback with all the unmarshaled arguments + err = w.Handler.ExportTransactions(ctx, params) + return err +} + +// ExportVoucher converts echo context to params. +func (w *ServerInterfaceWrapper) ExportVoucher(ctx echo.Context) error { + var err error + + ctx.Set(Api_keyScopes, []string{}) + + // Parameter object where we will unmarshal all parameters from the context + var params ExportVoucherParams + // ------------- Optional query parameter "download" ------------- + + err = runtime.BindQueryParameter("form", true, false, "download", ctx.QueryParams(), ¶ms.Download) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter download: %s", err)) + } + + // ------------- Required query parameter "sevQuery" ------------- + + err = runtime.BindQueryParameter("form", true, true, "sevQuery", ctx.QueryParams(), ¶ms.SevQuery) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter sevQuery: %s", err)) + } + + // Invoke the callback with all the unmarshaled arguments + err = w.Handler.ExportVoucher(ctx, params) + return err +} + +// ExportVoucherZip converts echo context to params. +func (w *ServerInterfaceWrapper) ExportVoucherZip(ctx echo.Context) error { + var err error + + ctx.Set(Api_keyScopes, []string{}) + + // Parameter object where we will unmarshal all parameters from the context + var params ExportVoucherZipParams + // ------------- Optional query parameter "download" ------------- + + err = runtime.BindQueryParameter("form", true, false, "download", ctx.QueryParams(), ¶ms.Download) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter download: %s", err)) + } + + // ------------- Required query parameter "sevQuery" ------------- + + err = runtime.BindQueryParameter("form", true, true, "sevQuery", ctx.QueryParams(), ¶ms.SevQuery) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter sevQuery: %s", err)) + } + + // Invoke the callback with all the unmarshaled arguments + err = w.Handler.ExportVoucherZip(ctx, params) + return err +} + +// GetInvoices converts echo context to params. +func (w *ServerInterfaceWrapper) GetInvoices(ctx echo.Context) error { + var err error + + ctx.Set(Api_keyScopes, []string{}) + + // Parameter object where we will unmarshal all parameters from the context + var params GetInvoicesParams + // ------------- Optional query parameter "status" ------------- + + err = runtime.BindQueryParameter("form", true, false, "status", ctx.QueryParams(), ¶ms.Status) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter status: %s", err)) + } + + // ------------- Optional query parameter "invoiceNumber" ------------- + + err = runtime.BindQueryParameter("form", true, false, "invoiceNumber", ctx.QueryParams(), ¶ms.InvoiceNumber) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter invoiceNumber: %s", err)) + } + + // ------------- Optional query parameter "startDate" ------------- + + err = runtime.BindQueryParameter("form", true, false, "startDate", ctx.QueryParams(), ¶ms.StartDate) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter startDate: %s", err)) + } + + // ------------- Optional query parameter "endDate" ------------- + + err = runtime.BindQueryParameter("form", true, false, "endDate", ctx.QueryParams(), ¶ms.EndDate) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter endDate: %s", err)) + } + + // ------------- Optional query parameter "contact[id]" ------------- + + err = runtime.BindQueryParameter("form", true, false, "contact[id]", ctx.QueryParams(), ¶ms.ContactId) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter contact[id]: %s", err)) + } + + // ------------- Optional query parameter "contact[objectName]" ------------- + + err = runtime.BindQueryParameter("form", true, false, "contact[objectName]", ctx.QueryParams(), ¶ms.ContactObjectName) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter contact[objectName]: %s", err)) + } + + // Invoke the callback with all the unmarshaled arguments + err = w.Handler.GetInvoices(ctx, params) + return err +} + +// CreateInvoiceFromOrder converts echo context to params. +func (w *ServerInterfaceWrapper) CreateInvoiceFromOrder(ctx echo.Context) error { + var err error + + ctx.Set(Api_keyScopes, []string{}) + + // Invoke the callback with all the unmarshaled arguments + err = w.Handler.CreateInvoiceFromOrder(ctx) + return err +} + +// CreateInvoiceReminder converts echo context to params. +func (w *ServerInterfaceWrapper) CreateInvoiceReminder(ctx echo.Context) error { + var err error + + ctx.Set(Api_keyScopes, []string{}) + + // Parameter object where we will unmarshal all parameters from the context + var params CreateInvoiceReminderParams + // ------------- Required query parameter "invoice[id]" ------------- + + err = runtime.BindQueryParameter("form", true, true, "invoice[id]", ctx.QueryParams(), ¶ms.InvoiceId) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter invoice[id]: %s", err)) + } + + // ------------- Required query parameter "invoice[objectName]" ------------- + + err = runtime.BindQueryParameter("form", true, true, "invoice[objectName]", ctx.QueryParams(), ¶ms.InvoiceObjectName) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter invoice[objectName]: %s", err)) + } + + // Invoke the callback with all the unmarshaled arguments + err = w.Handler.CreateInvoiceReminder(ctx, params) + return err +} + +// CreateInvoiceByFactory converts echo context to params. +func (w *ServerInterfaceWrapper) CreateInvoiceByFactory(ctx echo.Context) error { + var err error + + ctx.Set(Api_keyScopes, []string{}) + + // Invoke the callback with all the unmarshaled arguments + err = w.Handler.CreateInvoiceByFactory(ctx) + return err +} + +// GetInvoiceById converts echo context to params. +func (w *ServerInterfaceWrapper) GetInvoiceById(ctx echo.Context) error { + var err error + // ------------- Path parameter "invoiceId" ------------- + var invoiceId int + + err = runtime.BindStyledParameterWithOptions("simple", "invoiceId", ctx.Param("invoiceId"), &invoiceId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter invoiceId: %s", err)) + } + + ctx.Set(Api_keyScopes, []string{}) + + // Invoke the callback with all the unmarshaled arguments + err = w.Handler.GetInvoiceById(ctx, invoiceId) + return err +} + +// BookInvoice converts echo context to params. +func (w *ServerInterfaceWrapper) BookInvoice(ctx echo.Context) error { + var err error + // ------------- Path parameter "invoiceId" ------------- + var invoiceId int + + err = runtime.BindStyledParameterWithOptions("simple", "invoiceId", ctx.Param("invoiceId"), &invoiceId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter invoiceId: %s", err)) + } + + ctx.Set(Api_keyScopes, []string{}) + + // Invoke the callback with all the unmarshaled arguments + err = w.Handler.BookInvoice(ctx, invoiceId) + return err +} + +// CancelInvoice converts echo context to params. +func (w *ServerInterfaceWrapper) CancelInvoice(ctx echo.Context) error { + var err error + // ------------- Path parameter "invoiceId" ------------- + var invoiceId int + + err = runtime.BindStyledParameterWithOptions("simple", "invoiceId", ctx.Param("invoiceId"), &invoiceId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter invoiceId: %s", err)) + } + + ctx.Set(Api_keyScopes, []string{}) + + // Invoke the callback with all the unmarshaled arguments + err = w.Handler.CancelInvoice(ctx, invoiceId) + return err +} + +// UpdateInvoiceTemplate converts echo context to params. +func (w *ServerInterfaceWrapper) UpdateInvoiceTemplate(ctx echo.Context) error { + var err error + // ------------- Path parameter "invoiceId" ------------- + var invoiceId int + + err = runtime.BindStyledParameterWithOptions("simple", "invoiceId", ctx.Param("invoiceId"), &invoiceId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter invoiceId: %s", err)) + } + + ctx.Set(Api_keyScopes, []string{}) + + // Invoke the callback with all the unmarshaled arguments + err = w.Handler.UpdateInvoiceTemplate(ctx, invoiceId) + return err +} + +// InvoiceEnshrine converts echo context to params. +func (w *ServerInterfaceWrapper) InvoiceEnshrine(ctx echo.Context) error { + var err error + // ------------- Path parameter "invoiceId" ------------- + var invoiceId int + + err = runtime.BindStyledParameterWithOptions("simple", "invoiceId", ctx.Param("invoiceId"), &invoiceId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter invoiceId: %s", err)) + } + + ctx.Set(Api_keyScopes, []string{}) + + // Invoke the callback with all the unmarshaled arguments + err = w.Handler.InvoiceEnshrine(ctx, invoiceId) + return err +} + +// GetIsInvoicePartiallyPaid converts echo context to params. +func (w *ServerInterfaceWrapper) GetIsInvoicePartiallyPaid(ctx echo.Context) error { + var err error + // ------------- Path parameter "invoiceId" ------------- + var invoiceId int + + err = runtime.BindStyledParameterWithOptions("simple", "invoiceId", ctx.Param("invoiceId"), &invoiceId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter invoiceId: %s", err)) + } + + ctx.Set(Api_keyScopes, []string{}) + + // Invoke the callback with all the unmarshaled arguments + err = w.Handler.GetIsInvoicePartiallyPaid(ctx, invoiceId) + return err +} + +// InvoiceGetPdf converts echo context to params. +func (w *ServerInterfaceWrapper) InvoiceGetPdf(ctx echo.Context) error { + var err error + // ------------- Path parameter "invoiceId" ------------- + var invoiceId int + + err = runtime.BindStyledParameterWithOptions("simple", "invoiceId", ctx.Param("invoiceId"), &invoiceId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter invoiceId: %s", err)) + } + + ctx.Set(Api_keyScopes, []string{}) + + // Parameter object where we will unmarshal all parameters from the context + var params InvoiceGetPdfParams + // ------------- Optional query parameter "download" ------------- + + err = runtime.BindQueryParameter("form", true, false, "download", ctx.QueryParams(), ¶ms.Download) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter download: %s", err)) + } + + // ------------- Optional query parameter "preventSendBy" ------------- + + err = runtime.BindQueryParameter("form", true, false, "preventSendBy", ctx.QueryParams(), ¶ms.PreventSendBy) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter preventSendBy: %s", err)) + } + + // Invoke the callback with all the unmarshaled arguments + err = w.Handler.InvoiceGetPdf(ctx, invoiceId, params) + return err +} + +// GetInvoicePositionsById converts echo context to params. +func (w *ServerInterfaceWrapper) GetInvoicePositionsById(ctx echo.Context) error { + var err error + // ------------- Path parameter "invoiceId" ------------- + var invoiceId int + + err = runtime.BindStyledParameterWithOptions("simple", "invoiceId", ctx.Param("invoiceId"), &invoiceId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter invoiceId: %s", err)) + } + + ctx.Set(Api_keyScopes, []string{}) + + // Parameter object where we will unmarshal all parameters from the context + var params GetInvoicePositionsByIdParams + // ------------- Optional query parameter "limit" ------------- + + err = runtime.BindQueryParameter("form", true, false, "limit", ctx.QueryParams(), ¶ms.Limit) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter limit: %s", err)) + } + + // ------------- Optional query parameter "offset" ------------- + + err = runtime.BindQueryParameter("form", true, false, "offset", ctx.QueryParams(), ¶ms.Offset) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter offset: %s", err)) + } + + // ------------- Optional query parameter "embed" ------------- + + err = runtime.BindQueryParameter("form", true, false, "embed", ctx.QueryParams(), ¶ms.Embed) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter embed: %s", err)) + } + + // Invoke the callback with all the unmarshaled arguments + err = w.Handler.GetInvoicePositionsById(ctx, invoiceId, params) + return err +} + +// InvoiceGetXml converts echo context to params. +func (w *ServerInterfaceWrapper) InvoiceGetXml(ctx echo.Context) error { + var err error + // ------------- Path parameter "invoiceId" ------------- + var invoiceId int + + err = runtime.BindStyledParameterWithOptions("simple", "invoiceId", ctx.Param("invoiceId"), &invoiceId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter invoiceId: %s", err)) + } + + ctx.Set(Api_keyScopes, []string{}) + + // Invoke the callback with all the unmarshaled arguments + err = w.Handler.InvoiceGetXml(ctx, invoiceId) + return err +} + +// InvoiceRender converts echo context to params. +func (w *ServerInterfaceWrapper) InvoiceRender(ctx echo.Context) error { + var err error + // ------------- Path parameter "invoiceId" ------------- + var invoiceId int + + err = runtime.BindStyledParameterWithOptions("simple", "invoiceId", ctx.Param("invoiceId"), &invoiceId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter invoiceId: %s", err)) + } + + ctx.Set(Api_keyScopes, []string{}) + + // Invoke the callback with all the unmarshaled arguments + err = w.Handler.InvoiceRender(ctx, invoiceId) + return err +} + +// InvoiceResetToDraft converts echo context to params. +func (w *ServerInterfaceWrapper) InvoiceResetToDraft(ctx echo.Context) error { + var err error + // ------------- Path parameter "invoiceId" ------------- + var invoiceId int + + err = runtime.BindStyledParameterWithOptions("simple", "invoiceId", ctx.Param("invoiceId"), &invoiceId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter invoiceId: %s", err)) + } + + ctx.Set(Api_keyScopes, []string{}) + + // Invoke the callback with all the unmarshaled arguments + err = w.Handler.InvoiceResetToDraft(ctx, invoiceId) + return err +} + +// InvoiceResetToOpen converts echo context to params. +func (w *ServerInterfaceWrapper) InvoiceResetToOpen(ctx echo.Context) error { + var err error + // ------------- Path parameter "invoiceId" ------------- + var invoiceId int + + err = runtime.BindStyledParameterWithOptions("simple", "invoiceId", ctx.Param("invoiceId"), &invoiceId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter invoiceId: %s", err)) + } + + ctx.Set(Api_keyScopes, []string{}) + + // Invoke the callback with all the unmarshaled arguments + err = w.Handler.InvoiceResetToOpen(ctx, invoiceId) + return err +} + +// InvoiceSendBy converts echo context to params. +func (w *ServerInterfaceWrapper) InvoiceSendBy(ctx echo.Context) error { + var err error + // ------------- Path parameter "invoiceId" ------------- + var invoiceId int + + err = runtime.BindStyledParameterWithOptions("simple", "invoiceId", ctx.Param("invoiceId"), &invoiceId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter invoiceId: %s", err)) + } + + ctx.Set(Api_keyScopes, []string{}) + + // Invoke the callback with all the unmarshaled arguments + err = w.Handler.InvoiceSendBy(ctx, invoiceId) + return err +} + +// SendInvoiceViaEMail converts echo context to params. +func (w *ServerInterfaceWrapper) SendInvoiceViaEMail(ctx echo.Context) error { + var err error + // ------------- Path parameter "invoiceId" ------------- + var invoiceId int + + err = runtime.BindStyledParameterWithOptions("simple", "invoiceId", ctx.Param("invoiceId"), &invoiceId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter invoiceId: %s", err)) + } + + ctx.Set(Api_keyScopes, []string{}) + + // Invoke the callback with all the unmarshaled arguments + err = w.Handler.SendInvoiceViaEMail(ctx, invoiceId) + return err +} + +// GetInvoicePos converts echo context to params. +func (w *ServerInterfaceWrapper) GetInvoicePos(ctx echo.Context) error { + var err error + + ctx.Set(Api_keyScopes, []string{}) + + // Parameter object where we will unmarshal all parameters from the context + var params GetInvoicePosParams + // ------------- Optional query parameter "id" ------------- + + err = runtime.BindQueryParameter("form", true, false, "id", ctx.QueryParams(), ¶ms.Id) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter id: %s", err)) + } + + // ------------- Optional query parameter "invoice[id]" ------------- + + err = runtime.BindQueryParameter("form", true, false, "invoice[id]", ctx.QueryParams(), ¶ms.InvoiceId) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter invoice[id]: %s", err)) + } + + // ------------- Optional query parameter "invoice[objectName]" ------------- + + err = runtime.BindQueryParameter("form", true, false, "invoice[objectName]", ctx.QueryParams(), ¶ms.InvoiceObjectName) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter invoice[objectName]: %s", err)) + } + + // ------------- Optional query parameter "part[id]" ------------- + + err = runtime.BindQueryParameter("form", true, false, "part[id]", ctx.QueryParams(), ¶ms.PartId) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter part[id]: %s", err)) + } + + // ------------- Optional query parameter "part[objectName]" ------------- + + err = runtime.BindQueryParameter("form", true, false, "part[objectName]", ctx.QueryParams(), ¶ms.PartObjectName) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter part[objectName]: %s", err)) + } + + // Invoke the callback with all the unmarshaled arguments + err = w.Handler.GetInvoicePos(ctx, params) + return err +} + +// GetOrders converts echo context to params. +func (w *ServerInterfaceWrapper) GetOrders(ctx echo.Context) error { + var err error + + ctx.Set(Api_keyScopes, []string{}) + + // Parameter object where we will unmarshal all parameters from the context + var params GetOrdersParams + // ------------- Optional query parameter "status" ------------- + + err = runtime.BindQueryParameter("form", true, false, "status", ctx.QueryParams(), ¶ms.Status) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter status: %s", err)) + } + + // ------------- Optional query parameter "orderNumber" ------------- + + err = runtime.BindQueryParameter("form", true, false, "orderNumber", ctx.QueryParams(), ¶ms.OrderNumber) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter orderNumber: %s", err)) + } + + // ------------- Optional query parameter "startDate" ------------- + + err = runtime.BindQueryParameter("form", true, false, "startDate", ctx.QueryParams(), ¶ms.StartDate) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter startDate: %s", err)) + } + + // ------------- Optional query parameter "endDate" ------------- + + err = runtime.BindQueryParameter("form", true, false, "endDate", ctx.QueryParams(), ¶ms.EndDate) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter endDate: %s", err)) + } + + // ------------- Optional query parameter "contact[id]" ------------- + + err = runtime.BindQueryParameter("form", false, false, "contact[id]", ctx.QueryParams(), ¶ms.ContactId) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter contact[id]: %s", err)) + } + + // ------------- Optional query parameter "contact[objectName]" ------------- + + err = runtime.BindQueryParameter("form", false, false, "contact[objectName]", ctx.QueryParams(), ¶ms.ContactObjectName) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter contact[objectName]: %s", err)) + } + + // Invoke the callback with all the unmarshaled arguments + err = w.Handler.GetOrders(ctx, params) + return err +} + +// CreateContractNoteFromOrder converts echo context to params. +func (w *ServerInterfaceWrapper) CreateContractNoteFromOrder(ctx echo.Context) error { + var err error + + ctx.Set(Api_keyScopes, []string{}) + + // Parameter object where we will unmarshal all parameters from the context + var params CreateContractNoteFromOrderParams + // ------------- Required query parameter "order[id]" ------------- + + err = runtime.BindQueryParameter("form", false, true, "order[id]", ctx.QueryParams(), ¶ms.OrderId) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter order[id]: %s", err)) + } + + // ------------- Required query parameter "order[objectName]" ------------- + + err = runtime.BindQueryParameter("form", false, true, "order[objectName]", ctx.QueryParams(), ¶ms.OrderObjectName) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter order[objectName]: %s", err)) + } + + // Invoke the callback with all the unmarshaled arguments + err = w.Handler.CreateContractNoteFromOrder(ctx, params) + return err +} + +// CreatePackingListFromOrder converts echo context to params. +func (w *ServerInterfaceWrapper) CreatePackingListFromOrder(ctx echo.Context) error { + var err error + + ctx.Set(Api_keyScopes, []string{}) + + // Parameter object where we will unmarshal all parameters from the context + var params CreatePackingListFromOrderParams + // ------------- Required query parameter "order[id]" ------------- + + err = runtime.BindQueryParameter("form", false, true, "order[id]", ctx.QueryParams(), ¶ms.OrderId) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter order[id]: %s", err)) + } + + // ------------- Required query parameter "order[objectName]" ------------- + + err = runtime.BindQueryParameter("form", false, true, "order[objectName]", ctx.QueryParams(), ¶ms.OrderObjectName) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter order[objectName]: %s", err)) + } + + // Invoke the callback with all the unmarshaled arguments + err = w.Handler.CreatePackingListFromOrder(ctx, params) + return err +} + +// CreateOrder converts echo context to params. +func (w *ServerInterfaceWrapper) CreateOrder(ctx echo.Context) error { + var err error + + ctx.Set(Api_keyScopes, []string{}) + + // Invoke the callback with all the unmarshaled arguments + err = w.Handler.CreateOrder(ctx) + return err +} + +// DeleteOrder converts echo context to params. +func (w *ServerInterfaceWrapper) DeleteOrder(ctx echo.Context) error { + var err error + // ------------- Path parameter "orderId" ------------- + var orderId int + + err = runtime.BindStyledParameterWithOptions("simple", "orderId", ctx.Param("orderId"), &orderId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter orderId: %s", err)) + } + + ctx.Set(Api_keyScopes, []string{}) + + // Invoke the callback with all the unmarshaled arguments + err = w.Handler.DeleteOrder(ctx, orderId) + return err +} + +// GetOrderById converts echo context to params. +func (w *ServerInterfaceWrapper) GetOrderById(ctx echo.Context) error { + var err error + // ------------- Path parameter "orderId" ------------- + var orderId int + + err = runtime.BindStyledParameterWithOptions("simple", "orderId", ctx.Param("orderId"), &orderId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter orderId: %s", err)) + } + + ctx.Set(Api_keyScopes, []string{}) + + // Invoke the callback with all the unmarshaled arguments + err = w.Handler.GetOrderById(ctx, orderId) + return err +} + +// UpdateOrder converts echo context to params. +func (w *ServerInterfaceWrapper) UpdateOrder(ctx echo.Context) error { + var err error + // ------------- Path parameter "orderId" ------------- + var orderId int + + err = runtime.BindStyledParameterWithOptions("simple", "orderId", ctx.Param("orderId"), &orderId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter orderId: %s", err)) + } + + ctx.Set(Api_keyScopes, []string{}) + + // Invoke the callback with all the unmarshaled arguments + err = w.Handler.UpdateOrder(ctx, orderId) + return err +} + +// UpdateOrderTemplate converts echo context to params. +func (w *ServerInterfaceWrapper) UpdateOrderTemplate(ctx echo.Context) error { + var err error + // ------------- Path parameter "orderId" ------------- + var orderId int + + err = runtime.BindStyledParameterWithOptions("simple", "orderId", ctx.Param("orderId"), &orderId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter orderId: %s", err)) + } + + ctx.Set(Api_keyScopes, []string{}) + + // Invoke the callback with all the unmarshaled arguments + err = w.Handler.UpdateOrderTemplate(ctx, orderId) + return err +} + +// GetDiscounts converts echo context to params. +func (w *ServerInterfaceWrapper) GetDiscounts(ctx echo.Context) error { + var err error + // ------------- Path parameter "orderId" ------------- + var orderId int + + err = runtime.BindStyledParameterWithOptions("simple", "orderId", ctx.Param("orderId"), &orderId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter orderId: %s", err)) + } + + ctx.Set(Api_keyScopes, []string{}) + + // Parameter object where we will unmarshal all parameters from the context + var params GetDiscountsParams + // ------------- Optional query parameter "limit" ------------- + + err = runtime.BindQueryParameter("form", true, false, "limit", ctx.QueryParams(), ¶ms.Limit) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter limit: %s", err)) + } + + // ------------- Optional query parameter "offset" ------------- + + err = runtime.BindQueryParameter("form", true, false, "offset", ctx.QueryParams(), ¶ms.Offset) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter offset: %s", err)) + } + + // ------------- Optional query parameter "embed" ------------- + + err = runtime.BindQueryParameter("form", true, false, "embed", ctx.QueryParams(), ¶ms.Embed) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter embed: %s", err)) + } + + // Invoke the callback with all the unmarshaled arguments + err = w.Handler.GetDiscounts(ctx, orderId, params) + return err +} + +// OrderGetPdf converts echo context to params. +func (w *ServerInterfaceWrapper) OrderGetPdf(ctx echo.Context) error { + var err error + // ------------- Path parameter "orderId" ------------- + var orderId int + + err = runtime.BindStyledParameterWithOptions("simple", "orderId", ctx.Param("orderId"), &orderId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter orderId: %s", err)) + } + + ctx.Set(Api_keyScopes, []string{}) + + // Parameter object where we will unmarshal all parameters from the context + var params OrderGetPdfParams + // ------------- Optional query parameter "download" ------------- + + err = runtime.BindQueryParameter("form", true, false, "download", ctx.QueryParams(), ¶ms.Download) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter download: %s", err)) + } + + // ------------- Optional query parameter "preventSendBy" ------------- + + err = runtime.BindQueryParameter("form", true, false, "preventSendBy", ctx.QueryParams(), ¶ms.PreventSendBy) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter preventSendBy: %s", err)) + } + + // Invoke the callback with all the unmarshaled arguments + err = w.Handler.OrderGetPdf(ctx, orderId, params) + return err +} + +// GetOrderPositionsById converts echo context to params. +func (w *ServerInterfaceWrapper) GetOrderPositionsById(ctx echo.Context) error { + var err error + // ------------- Path parameter "orderId" ------------- + var orderId int + + err = runtime.BindStyledParameterWithOptions("simple", "orderId", ctx.Param("orderId"), &orderId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter orderId: %s", err)) + } + + ctx.Set(Api_keyScopes, []string{}) + + // Parameter object where we will unmarshal all parameters from the context + var params GetOrderPositionsByIdParams + // ------------- Optional query parameter "limit" ------------- + + err = runtime.BindQueryParameter("form", true, false, "limit", ctx.QueryParams(), ¶ms.Limit) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter limit: %s", err)) + } + + // ------------- Optional query parameter "offset" ------------- + + err = runtime.BindQueryParameter("form", true, false, "offset", ctx.QueryParams(), ¶ms.Offset) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter offset: %s", err)) + } + + // ------------- Optional query parameter "embed" ------------- + + err = runtime.BindQueryParameter("form", true, false, "embed", ctx.QueryParams(), ¶ms.Embed) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter embed: %s", err)) + } + + // Invoke the callback with all the unmarshaled arguments + err = w.Handler.GetOrderPositionsById(ctx, orderId, params) + return err +} + +// GetRelatedObjects converts echo context to params. +func (w *ServerInterfaceWrapper) GetRelatedObjects(ctx echo.Context) error { + var err error + // ------------- Path parameter "orderId" ------------- + var orderId int + + err = runtime.BindStyledParameterWithOptions("simple", "orderId", ctx.Param("orderId"), &orderId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter orderId: %s", err)) + } + + ctx.Set(Api_keyScopes, []string{}) + + // Parameter object where we will unmarshal all parameters from the context + var params GetRelatedObjectsParams + // ------------- Optional query parameter "includeItself" ------------- + + err = runtime.BindQueryParameter("form", true, false, "includeItself", ctx.QueryParams(), ¶ms.IncludeItself) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter includeItself: %s", err)) + } + + // ------------- Optional query parameter "sortByType" ------------- + + err = runtime.BindQueryParameter("form", true, false, "sortByType", ctx.QueryParams(), ¶ms.SortByType) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter sortByType: %s", err)) + } + + // ------------- Optional query parameter "embed" ------------- + + err = runtime.BindQueryParameter("form", true, false, "embed", ctx.QueryParams(), ¶ms.Embed) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter embed: %s", err)) + } + + // Invoke the callback with all the unmarshaled arguments + err = w.Handler.GetRelatedObjects(ctx, orderId, params) + return err +} + +// OrderSendBy converts echo context to params. +func (w *ServerInterfaceWrapper) OrderSendBy(ctx echo.Context) error { + var err error + // ------------- Path parameter "orderId" ------------- + var orderId int + + err = runtime.BindStyledParameterWithOptions("simple", "orderId", ctx.Param("orderId"), &orderId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter orderId: %s", err)) + } + + ctx.Set(Api_keyScopes, []string{}) + + // Invoke the callback with all the unmarshaled arguments + err = w.Handler.OrderSendBy(ctx, orderId) + return err +} + +// SendorderViaEMail converts echo context to params. +func (w *ServerInterfaceWrapper) SendorderViaEMail(ctx echo.Context) error { + var err error + // ------------- Path parameter "orderId" ------------- + var orderId int + + err = runtime.BindStyledParameterWithOptions("simple", "orderId", ctx.Param("orderId"), &orderId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter orderId: %s", err)) + } + + ctx.Set(Api_keyScopes, []string{}) + + // Invoke the callback with all the unmarshaled arguments + err = w.Handler.SendorderViaEMail(ctx, orderId) + return err +} + +// GetOrderPositions converts echo context to params. +func (w *ServerInterfaceWrapper) GetOrderPositions(ctx echo.Context) error { + var err error + + ctx.Set(Api_keyScopes, []string{}) + + // Parameter object where we will unmarshal all parameters from the context + var params GetOrderPositionsParams + // ------------- Optional query parameter "order[id]" ------------- + + err = runtime.BindQueryParameter("form", false, false, "order[id]", ctx.QueryParams(), ¶ms.OrderId) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter order[id]: %s", err)) + } + + // ------------- Optional query parameter "order[objectName]" ------------- + + err = runtime.BindQueryParameter("form", false, false, "order[objectName]", ctx.QueryParams(), ¶ms.OrderObjectName) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter order[objectName]: %s", err)) + } + + // Invoke the callback with all the unmarshaled arguments + err = w.Handler.GetOrderPositions(ctx, params) + return err +} + +// DeleteOrderPos converts echo context to params. +func (w *ServerInterfaceWrapper) DeleteOrderPos(ctx echo.Context) error { + var err error + // ------------- Path parameter "orderPosId" ------------- + var orderPosId int + + err = runtime.BindStyledParameterWithOptions("simple", "orderPosId", ctx.Param("orderPosId"), &orderPosId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter orderPosId: %s", err)) + } + + ctx.Set(Api_keyScopes, []string{}) + + // Invoke the callback with all the unmarshaled arguments + err = w.Handler.DeleteOrderPos(ctx, orderPosId) + return err +} + +// GetOrderPositionById converts echo context to params. +func (w *ServerInterfaceWrapper) GetOrderPositionById(ctx echo.Context) error { + var err error + // ------------- Path parameter "orderPosId" ------------- + var orderPosId int + + err = runtime.BindStyledParameterWithOptions("simple", "orderPosId", ctx.Param("orderPosId"), &orderPosId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter orderPosId: %s", err)) + } + + ctx.Set(Api_keyScopes, []string{}) + + // Invoke the callback with all the unmarshaled arguments + err = w.Handler.GetOrderPositionById(ctx, orderPosId) + return err +} + +// UpdateOrderPosition converts echo context to params. +func (w *ServerInterfaceWrapper) UpdateOrderPosition(ctx echo.Context) error { + var err error + // ------------- Path parameter "orderPosId" ------------- + var orderPosId int + + err = runtime.BindStyledParameterWithOptions("simple", "orderPosId", ctx.Param("orderPosId"), &orderPosId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter orderPosId: %s", err)) + } + + ctx.Set(Api_keyScopes, []string{}) + + // Invoke the callback with all the unmarshaled arguments + err = w.Handler.UpdateOrderPosition(ctx, orderPosId) + return err +} + +// GetParts converts echo context to params. +func (w *ServerInterfaceWrapper) GetParts(ctx echo.Context) error { + var err error + + ctx.Set(Api_keyScopes, []string{}) + + // Parameter object where we will unmarshal all parameters from the context + var params GetPartsParams + // ------------- Optional query parameter "partNumber" ------------- + + err = runtime.BindQueryParameter("form", false, false, "partNumber", ctx.QueryParams(), ¶ms.PartNumber) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter partNumber: %s", err)) + } + + // ------------- Optional query parameter "name" ------------- + + err = runtime.BindQueryParameter("form", false, false, "name", ctx.QueryParams(), ¶ms.Name) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter name: %s", err)) + } + + // Invoke the callback with all the unmarshaled arguments + err = w.Handler.GetParts(ctx, params) + return err +} + +// CreatePart converts echo context to params. +func (w *ServerInterfaceWrapper) CreatePart(ctx echo.Context) error { + var err error + + ctx.Set(Api_keyScopes, []string{}) + + // Invoke the callback with all the unmarshaled arguments + err = w.Handler.CreatePart(ctx) + return err +} + +// GetPartById converts echo context to params. +func (w *ServerInterfaceWrapper) GetPartById(ctx echo.Context) error { + var err error + // ------------- Path parameter "partId" ------------- + var partId int + + err = runtime.BindStyledParameterWithOptions("simple", "partId", ctx.Param("partId"), &partId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter partId: %s", err)) + } + + ctx.Set(Api_keyScopes, []string{}) + + // Invoke the callback with all the unmarshaled arguments + err = w.Handler.GetPartById(ctx, partId) + return err +} + +// UpdatePart converts echo context to params. +func (w *ServerInterfaceWrapper) UpdatePart(ctx echo.Context) error { + var err error + // ------------- Path parameter "partId" ------------- + var partId int + + err = runtime.BindStyledParameterWithOptions("simple", "partId", ctx.Param("partId"), &partId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter partId: %s", err)) + } + + ctx.Set(Api_keyScopes, []string{}) + + // Invoke the callback with all the unmarshaled arguments + err = w.Handler.UpdatePart(ctx, partId) + return err +} + +// PartGetStock converts echo context to params. +func (w *ServerInterfaceWrapper) PartGetStock(ctx echo.Context) error { + var err error + // ------------- Path parameter "partId" ------------- + var partId int + + err = runtime.BindStyledParameterWithOptions("simple", "partId", ctx.Param("partId"), &partId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter partId: %s", err)) + } + + ctx.Set(Api_keyScopes, []string{}) + + // Invoke the callback with all the unmarshaled arguments + err = w.Handler.PartGetStock(ctx, partId) + return err +} + +// ForAccountNumber converts echo context to params. +func (w *ServerInterfaceWrapper) ForAccountNumber(ctx echo.Context) error { + var err error + + ctx.Set(Api_keyScopes, []string{}) + + // Parameter object where we will unmarshal all parameters from the context + var params ForAccountNumberParams + // ------------- Required query parameter "accountNumber" ------------- + + err = runtime.BindQueryParameter("form", true, true, "accountNumber", ctx.QueryParams(), ¶ms.AccountNumber) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter accountNumber: %s", err)) + } + + // Invoke the callback with all the unmarshaled arguments + err = w.Handler.ForAccountNumber(ctx, params) + return err +} + +// ForAllAccounts converts echo context to params. +func (w *ServerInterfaceWrapper) ForAllAccounts(ctx echo.Context) error { + var err error + + ctx.Set(Api_keyScopes, []string{}) + + // Invoke the callback with all the unmarshaled arguments + err = w.Handler.ForAllAccounts(ctx) + return err +} + +// ForExpense converts echo context to params. +func (w *ServerInterfaceWrapper) ForExpense(ctx echo.Context) error { + var err error + + ctx.Set(Api_keyScopes, []string{}) + + // Invoke the callback with all the unmarshaled arguments + err = w.Handler.ForExpense(ctx) + return err +} + +// ForRevenue converts echo context to params. +func (w *ServerInterfaceWrapper) ForRevenue(ctx echo.Context) error { + var err error + + ctx.Set(Api_keyScopes, []string{}) + + // Invoke the callback with all the unmarshaled arguments + err = w.Handler.ForRevenue(ctx) + return err +} + +// ForTaxRule converts echo context to params. +func (w *ServerInterfaceWrapper) ForTaxRule(ctx echo.Context) error { + var err error + + ctx.Set(Api_keyScopes, []string{}) + + // Parameter object where we will unmarshal all parameters from the context + var params ForTaxRuleParams + // ------------- Required query parameter "taxRule" ------------- + + err = runtime.BindQueryParameter("form", true, true, "taxRule", ctx.QueryParams(), ¶ms.TaxRule) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter taxRule: %s", err)) + } + + // Invoke the callback with all the unmarshaled arguments + err = w.Handler.ForTaxRule(ctx, params) + return err +} + +// ReportContact converts echo context to params. +func (w *ServerInterfaceWrapper) ReportContact(ctx echo.Context) error { + var err error + + ctx.Set(Api_keyScopes, []string{}) + + // Parameter object where we will unmarshal all parameters from the context + var params ReportContactParams + // ------------- Optional query parameter "download" ------------- + + err = runtime.BindQueryParameter("form", true, false, "download", ctx.QueryParams(), ¶ms.Download) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter download: %s", err)) + } + + // ------------- Required query parameter "sevQuery" ------------- + + err = runtime.BindQueryParameter("form", true, true, "sevQuery", ctx.QueryParams(), ¶ms.SevQuery) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter sevQuery: %s", err)) + } + + // Invoke the callback with all the unmarshaled arguments + err = w.Handler.ReportContact(ctx, params) + return err +} + +// ReportInvoice converts echo context to params. +func (w *ServerInterfaceWrapper) ReportInvoice(ctx echo.Context) error { + var err error + + ctx.Set(Api_keyScopes, []string{}) + + // Parameter object where we will unmarshal all parameters from the context + var params ReportInvoiceParams + // ------------- Optional query parameter "download" ------------- + + err = runtime.BindQueryParameter("form", true, false, "download", ctx.QueryParams(), ¶ms.Download) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter download: %s", err)) + } + + // ------------- Required query parameter "view" ------------- + + err = runtime.BindQueryParameter("form", true, true, "view", ctx.QueryParams(), ¶ms.View) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter view: %s", err)) + } + + // ------------- Required query parameter "sevQuery" ------------- + + err = runtime.BindQueryParameter("form", true, true, "sevQuery", ctx.QueryParams(), ¶ms.SevQuery) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter sevQuery: %s", err)) + } + + // Invoke the callback with all the unmarshaled arguments + err = w.Handler.ReportInvoice(ctx, params) + return err +} + +// ReportOrder converts echo context to params. +func (w *ServerInterfaceWrapper) ReportOrder(ctx echo.Context) error { + var err error + + ctx.Set(Api_keyScopes, []string{}) + + // Parameter object where we will unmarshal all parameters from the context + var params ReportOrderParams + // ------------- Optional query parameter "download" ------------- + + err = runtime.BindQueryParameter("form", true, false, "download", ctx.QueryParams(), ¶ms.Download) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter download: %s", err)) + } + + // ------------- Required query parameter "view" ------------- + + err = runtime.BindQueryParameter("form", true, true, "view", ctx.QueryParams(), ¶ms.View) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter view: %s", err)) + } + + // ------------- Required query parameter "sevQuery" ------------- + + err = runtime.BindQueryParameter("form", true, true, "sevQuery", ctx.QueryParams(), ¶ms.SevQuery) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter sevQuery: %s", err)) + } + + // Invoke the callback with all the unmarshaled arguments + err = w.Handler.ReportOrder(ctx, params) + return err +} + +// ReportVoucher converts echo context to params. +func (w *ServerInterfaceWrapper) ReportVoucher(ctx echo.Context) error { + var err error + + ctx.Set(Api_keyScopes, []string{}) + + // Parameter object where we will unmarshal all parameters from the context + var params ReportVoucherParams + // ------------- Optional query parameter "download" ------------- + + err = runtime.BindQueryParameter("form", true, false, "download", ctx.QueryParams(), ¶ms.Download) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter download: %s", err)) + } + + // ------------- Required query parameter "sevQuery" ------------- + + err = runtime.BindQueryParameter("form", true, true, "sevQuery", ctx.QueryParams(), ¶ms.SevQuery) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter sevQuery: %s", err)) + } + + // Invoke the callback with all the unmarshaled arguments + err = w.Handler.ReportVoucher(ctx, params) + return err +} + +// UpdateExportConfig converts echo context to params. +func (w *ServerInterfaceWrapper) UpdateExportConfig(ctx echo.Context) error { + var err error + // ------------- Path parameter "SevClientId" ------------- + var sevClientId float32 + + err = runtime.BindStyledParameterWithOptions("simple", "SevClientId", ctx.Param("SevClientId"), &sevClientId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter SevClientId: %s", err)) + } + + ctx.Set(Api_keyScopes, []string{}) + + // Invoke the callback with all the unmarshaled arguments + err = w.Handler.UpdateExportConfig(ctx, sevClientId) + return err +} + +// GetTags converts echo context to params. +func (w *ServerInterfaceWrapper) GetTags(ctx echo.Context) error { + var err error + + ctx.Set(Api_keyScopes, []string{}) + + // Parameter object where we will unmarshal all parameters from the context + var params GetTagsParams + // ------------- Optional query parameter "id" ------------- + + err = runtime.BindQueryParameter("form", true, false, "id", ctx.QueryParams(), ¶ms.Id) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter id: %s", err)) + } + + // ------------- Optional query parameter "name" ------------- + + err = runtime.BindQueryParameter("form", true, false, "name", ctx.QueryParams(), ¶ms.Name) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter name: %s", err)) + } + + // Invoke the callback with all the unmarshaled arguments + err = w.Handler.GetTags(ctx, params) + return err +} + +// CreateTag converts echo context to params. +func (w *ServerInterfaceWrapper) CreateTag(ctx echo.Context) error { + var err error + + ctx.Set(Api_keyScopes, []string{}) + + // Invoke the callback with all the unmarshaled arguments + err = w.Handler.CreateTag(ctx) + return err +} + +// DeleteTag converts echo context to params. +func (w *ServerInterfaceWrapper) DeleteTag(ctx echo.Context) error { + var err error + // ------------- Path parameter "tagId" ------------- + var tagId int + + err = runtime.BindStyledParameterWithOptions("simple", "tagId", ctx.Param("tagId"), &tagId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter tagId: %s", err)) + } + + ctx.Set(Api_keyScopes, []string{}) + + // Invoke the callback with all the unmarshaled arguments + err = w.Handler.DeleteTag(ctx, tagId) + return err +} + +// GetTagById converts echo context to params. +func (w *ServerInterfaceWrapper) GetTagById(ctx echo.Context) error { + var err error + // ------------- Path parameter "tagId" ------------- + var tagId int + + err = runtime.BindStyledParameterWithOptions("simple", "tagId", ctx.Param("tagId"), &tagId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter tagId: %s", err)) + } + + ctx.Set(Api_keyScopes, []string{}) + + // Invoke the callback with all the unmarshaled arguments + err = w.Handler.GetTagById(ctx, tagId) + return err +} + +// UpdateTag converts echo context to params. +func (w *ServerInterfaceWrapper) UpdateTag(ctx echo.Context) error { + var err error + // ------------- Path parameter "tagId" ------------- + var tagId int + + err = runtime.BindStyledParameterWithOptions("simple", "tagId", ctx.Param("tagId"), &tagId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter tagId: %s", err)) + } + + ctx.Set(Api_keyScopes, []string{}) + + // Invoke the callback with all the unmarshaled arguments + err = w.Handler.UpdateTag(ctx, tagId) + return err +} + +// GetTagRelations converts echo context to params. +func (w *ServerInterfaceWrapper) GetTagRelations(ctx echo.Context) error { + var err error + + ctx.Set(Api_keyScopes, []string{}) + + // Invoke the callback with all the unmarshaled arguments + err = w.Handler.GetTagRelations(ctx) + return err +} + +// GetPlaceholder converts echo context to params. +func (w *ServerInterfaceWrapper) GetPlaceholder(ctx echo.Context) error { + var err error + + ctx.Set(Api_keyScopes, []string{}) + + // Parameter object where we will unmarshal all parameters from the context + var params GetPlaceholderParams + // ------------- Required query parameter "objectName" ------------- + + err = runtime.BindQueryParameter("form", true, true, "objectName", ctx.QueryParams(), ¶ms.ObjectName) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter objectName: %s", err)) + } + + // ------------- Optional query parameter "subObjectName" ------------- + + err = runtime.BindQueryParameter("form", true, false, "subObjectName", ctx.QueryParams(), ¶ms.SubObjectName) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter subObjectName: %s", err)) + } + + // Invoke the callback with all the unmarshaled arguments + err = w.Handler.GetPlaceholder(ctx, params) + return err +} + +// BookkeepingSystemVersion converts echo context to params. +func (w *ServerInterfaceWrapper) BookkeepingSystemVersion(ctx echo.Context) error { + var err error + + ctx.Set(Api_keyScopes, []string{}) + + // Invoke the callback with all the unmarshaled arguments + err = w.Handler.BookkeepingSystemVersion(ctx) + return err +} + +// GetVouchers converts echo context to params. +func (w *ServerInterfaceWrapper) GetVouchers(ctx echo.Context) error { + var err error + + ctx.Set(Api_keyScopes, []string{}) + + // Parameter object where we will unmarshal all parameters from the context + var params GetVouchersParams + // ------------- Optional query parameter "status" ------------- + + err = runtime.BindQueryParameter("form", true, false, "status", ctx.QueryParams(), ¶ms.Status) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter status: %s", err)) + } + + // ------------- Optional query parameter "creditDebit" ------------- + + err = runtime.BindQueryParameter("form", true, false, "creditDebit", ctx.QueryParams(), ¶ms.CreditDebit) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter creditDebit: %s", err)) + } + + // ------------- Optional query parameter "descriptionLike" ------------- + + err = runtime.BindQueryParameter("form", true, false, "descriptionLike", ctx.QueryParams(), ¶ms.DescriptionLike) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter descriptionLike: %s", err)) + } + + // ------------- Optional query parameter "startDate" ------------- + + err = runtime.BindQueryParameter("form", true, false, "startDate", ctx.QueryParams(), ¶ms.StartDate) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter startDate: %s", err)) + } + + // ------------- Optional query parameter "endDate" ------------- + + err = runtime.BindQueryParameter("form", true, false, "endDate", ctx.QueryParams(), ¶ms.EndDate) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter endDate: %s", err)) + } + + // ------------- Optional query parameter "contact[id]" ------------- + + err = runtime.BindQueryParameter("form", false, false, "contact[id]", ctx.QueryParams(), ¶ms.ContactId) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter contact[id]: %s", err)) + } + + // ------------- Optional query parameter "contact[objectName]" ------------- + + err = runtime.BindQueryParameter("form", false, false, "contact[objectName]", ctx.QueryParams(), ¶ms.ContactObjectName) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter contact[objectName]: %s", err)) + } + + // Invoke the callback with all the unmarshaled arguments + err = w.Handler.GetVouchers(ctx, params) + return err +} + +// VoucherFactorySaveVoucher converts echo context to params. +func (w *ServerInterfaceWrapper) VoucherFactorySaveVoucher(ctx echo.Context) error { + var err error + + ctx.Set(Api_keyScopes, []string{}) + + // Invoke the callback with all the unmarshaled arguments + err = w.Handler.VoucherFactorySaveVoucher(ctx) + return err +} + +// VoucherUploadFile converts echo context to params. +func (w *ServerInterfaceWrapper) VoucherUploadFile(ctx echo.Context) error { + var err error + + ctx.Set(Api_keyScopes, []string{}) + + // Invoke the callback with all the unmarshaled arguments + err = w.Handler.VoucherUploadFile(ctx) + return err +} + +// GetVoucherById converts echo context to params. +func (w *ServerInterfaceWrapper) GetVoucherById(ctx echo.Context) error { + var err error + // ------------- Path parameter "voucherId" ------------- + var voucherId int + + err = runtime.BindStyledParameterWithOptions("simple", "voucherId", ctx.Param("voucherId"), &voucherId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter voucherId: %s", err)) + } + + ctx.Set(Api_keyScopes, []string{}) + + // Invoke the callback with all the unmarshaled arguments + err = w.Handler.GetVoucherById(ctx, voucherId) + return err +} + +// UpdateVoucher converts echo context to params. +func (w *ServerInterfaceWrapper) UpdateVoucher(ctx echo.Context) error { + var err error + // ------------- Path parameter "voucherId" ------------- + var voucherId int + + err = runtime.BindStyledParameterWithOptions("simple", "voucherId", ctx.Param("voucherId"), &voucherId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter voucherId: %s", err)) + } + + ctx.Set(Api_keyScopes, []string{}) + + // Invoke the callback with all the unmarshaled arguments + err = w.Handler.UpdateVoucher(ctx, voucherId) + return err +} + +// BookVoucher converts echo context to params. +func (w *ServerInterfaceWrapper) BookVoucher(ctx echo.Context) error { + var err error + // ------------- Path parameter "voucherId" ------------- + var voucherId int + + err = runtime.BindStyledParameterWithOptions("simple", "voucherId", ctx.Param("voucherId"), &voucherId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter voucherId: %s", err)) + } + + ctx.Set(Api_keyScopes, []string{}) + + // Invoke the callback with all the unmarshaled arguments + err = w.Handler.BookVoucher(ctx, voucherId) + return err +} + +// VoucherEnshrine converts echo context to params. +func (w *ServerInterfaceWrapper) VoucherEnshrine(ctx echo.Context) error { + var err error + // ------------- Path parameter "voucherId" ------------- + var voucherId int + + err = runtime.BindStyledParameterWithOptions("simple", "voucherId", ctx.Param("voucherId"), &voucherId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter voucherId: %s", err)) + } + + ctx.Set(Api_keyScopes, []string{}) + + // Invoke the callback with all the unmarshaled arguments + err = w.Handler.VoucherEnshrine(ctx, voucherId) + return err +} + +// VoucherResetToDraft converts echo context to params. +func (w *ServerInterfaceWrapper) VoucherResetToDraft(ctx echo.Context) error { + var err error + // ------------- Path parameter "voucherId" ------------- + var voucherId int + + err = runtime.BindStyledParameterWithOptions("simple", "voucherId", ctx.Param("voucherId"), &voucherId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter voucherId: %s", err)) + } + + ctx.Set(Api_keyScopes, []string{}) + + // Invoke the callback with all the unmarshaled arguments + err = w.Handler.VoucherResetToDraft(ctx, voucherId) + return err +} + +// VoucherResetToOpen converts echo context to params. +func (w *ServerInterfaceWrapper) VoucherResetToOpen(ctx echo.Context) error { + var err error + // ------------- Path parameter "voucherId" ------------- + var voucherId int + + err = runtime.BindStyledParameterWithOptions("simple", "voucherId", ctx.Param("voucherId"), &voucherId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter voucherId: %s", err)) + } + + ctx.Set(Api_keyScopes, []string{}) + + // Invoke the callback with all the unmarshaled arguments + err = w.Handler.VoucherResetToOpen(ctx, voucherId) + return err +} + +// GetVoucherPositions converts echo context to params. +func (w *ServerInterfaceWrapper) GetVoucherPositions(ctx echo.Context) error { + var err error + + ctx.Set(Api_keyScopes, []string{}) + + // Parameter object where we will unmarshal all parameters from the context + var params GetVoucherPositionsParams + // ------------- Optional query parameter "voucher[id]" ------------- + + err = runtime.BindQueryParameter("form", false, false, "voucher[id]", ctx.QueryParams(), ¶ms.VoucherId) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter voucher[id]: %s", err)) + } + + // ------------- Optional query parameter "voucher[objectName]" ------------- + + err = runtime.BindQueryParameter("form", false, false, "voucher[objectName]", ctx.QueryParams(), ¶ms.VoucherObjectName) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter voucher[objectName]: %s", err)) + } + + // Invoke the callback with all the unmarshaled arguments + err = w.Handler.GetVoucherPositions(ctx, params) + return err +} + +// This is a simple interface which specifies echo.Route addition functions which +// are present on both echo.Echo and echo.Group, since we want to allow using +// either of them for path registration +type EchoRouter interface { + CONNECT(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route + DELETE(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route + GET(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route + HEAD(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route + OPTIONS(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route + PATCH(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route + POST(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route + PUT(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route + TRACE(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route +} + +// RegisterHandlers adds each server route to the EchoRouter. +func RegisterHandlers(router EchoRouter, si ServerInterface) { + RegisterHandlersWithBaseURL(router, si, "") +} + +// Registers handlers, and prepends BaseURL to the paths, so that the paths +// can be served under a prefix. +func RegisterHandlersWithBaseURL(router EchoRouter, si ServerInterface, baseURL string) { + + wrapper := ServerInterfaceWrapper{ + Handler: si, + } + + router.GET(baseURL+"/AccountingContact", wrapper.GetAccountingContact) + router.POST(baseURL+"/AccountingContact", wrapper.CreateAccountingContact) + router.DELETE(baseURL+"/AccountingContact/:accountingContactId", wrapper.DeleteAccountingContact) + router.GET(baseURL+"/AccountingContact/:accountingContactId", wrapper.GetAccountingContactById) + router.PUT(baseURL+"/AccountingContact/:accountingContactId", wrapper.UpdateAccountingContact) + router.GET(baseURL+"/CheckAccount", wrapper.GetCheckAccounts) + router.POST(baseURL+"/CheckAccount", wrapper.CreateCheckAccount) + router.POST(baseURL+"/CheckAccount/Factory/clearingAccount", wrapper.CreateClearingAccount) + router.POST(baseURL+"/CheckAccount/Factory/fileImportAccount", wrapper.CreateFileImportAccount) + router.DELETE(baseURL+"/CheckAccount/:checkAccountId", wrapper.DeleteCheckAccount) + router.GET(baseURL+"/CheckAccount/:checkAccountId", wrapper.GetCheckAccountById) + router.PUT(baseURL+"/CheckAccount/:checkAccountId", wrapper.UpdateCheckAccount) + router.GET(baseURL+"/CheckAccount/:checkAccountId/getBalanceAtDate", wrapper.GetBalanceAtDate) + router.GET(baseURL+"/CheckAccountTransaction", wrapper.GetTransactions) + router.POST(baseURL+"/CheckAccountTransaction", wrapper.CreateTransaction) + router.DELETE(baseURL+"/CheckAccountTransaction/:checkAccountTransactionId", wrapper.DeleteCheckAccountTransaction) + router.GET(baseURL+"/CheckAccountTransaction/:checkAccountTransactionId", wrapper.GetCheckAccountTransactionById) + router.PUT(baseURL+"/CheckAccountTransaction/:checkAccountTransactionId", wrapper.UpdateCheckAccountTransaction) + router.PUT(baseURL+"/CheckAccountTransaction/:checkAccountTransactionId/enshrine", wrapper.CheckAccountTransactionEnshrine) + router.GET(baseURL+"/CommunicationWay", wrapper.GetCommunicationWays) + router.POST(baseURL+"/CommunicationWay", wrapper.CreateCommunicationWay) + router.DELETE(baseURL+"/CommunicationWay/:communicationWayId", wrapper.DeleteCommunicationWay) + router.GET(baseURL+"/CommunicationWay/:communicationWayId", wrapper.GetCommunicationWayById) + router.PUT(baseURL+"/CommunicationWay/:communicationWayId", wrapper.UpdateCommunicationWay) + router.GET(baseURL+"/CommunicationWayKey", wrapper.GetCommunicationWayKeys) + router.GET(baseURL+"/Contact", wrapper.GetContacts) + router.POST(baseURL+"/Contact", wrapper.CreateContact) + router.GET(baseURL+"/Contact/Factory/findContactsByCustomFieldValue", wrapper.FindContactsByCustomFieldValue) + router.GET(baseURL+"/Contact/Factory/getNextCustomerNumber", wrapper.GetNextCustomerNumber) + router.GET(baseURL+"/Contact/Mapper/checkCustomerNumberAvailability", wrapper.ContactCustomerNumberAvailabilityCheck) + router.DELETE(baseURL+"/Contact/:contactId", wrapper.DeleteContact) + router.GET(baseURL+"/Contact/:contactId", wrapper.GetContactById) + router.PUT(baseURL+"/Contact/:contactId", wrapper.UpdateContact) + router.GET(baseURL+"/Contact/:contactId/getTabsItemCount", wrapper.GetContactTabsItemCountById) + router.GET(baseURL+"/ContactAddress", wrapper.GetContactAddresses) + router.POST(baseURL+"/ContactAddress", wrapper.CreateContactAddress) + router.DELETE(baseURL+"/ContactAddress/:contactAddressId", wrapper.DeleteContactAddress) + router.GET(baseURL+"/ContactAddress/:contactAddressId", wrapper.ContactAddressId) + router.PUT(baseURL+"/ContactAddress/:contactAddressId", wrapper.UpdateContactAddress) + router.GET(baseURL+"/ContactCustomField", wrapper.GetContactFields) + router.POST(baseURL+"/ContactCustomField", wrapper.CreateContactField) + router.DELETE(baseURL+"/ContactCustomField/:contactCustomFieldId", wrapper.DeleteContactCustomFieldId) + router.GET(baseURL+"/ContactCustomField/:contactCustomFieldId", wrapper.GetContactFieldsById) + router.PUT(baseURL+"/ContactCustomField/:contactCustomFieldId", wrapper.UpdateContactfield) + router.GET(baseURL+"/ContactCustomFieldSetting", wrapper.GetContactFieldSettings) + router.POST(baseURL+"/ContactCustomFieldSetting", wrapper.CreateContactFieldSetting) + router.DELETE(baseURL+"/ContactCustomFieldSetting/:contactCustomFieldSettingId", wrapper.DeleteContactFieldSetting) + router.GET(baseURL+"/ContactCustomFieldSetting/:contactCustomFieldSettingId", wrapper.GetContactFieldSettingById) + router.PUT(baseURL+"/ContactCustomFieldSetting/:contactCustomFieldSettingId", wrapper.UpdateContactFieldSetting) + router.GET(baseURL+"/ContactCustomFieldSetting/:contactCustomFieldSettingId/getReferenceCount", wrapper.GetReferenceCount) + router.GET(baseURL+"/CreditNote", wrapper.GetCreditNotes) + router.POST(baseURL+"/CreditNote/Factory/createFromInvoice", wrapper.CreateCreditNoteFromInvoice) + router.POST(baseURL+"/CreditNote/Factory/createFromVoucher", wrapper.CreateCreditNoteFromVoucher) + router.POST(baseURL+"/CreditNote/Factory/saveCreditNote", wrapper.CreatecreditNote) + router.DELETE(baseURL+"/CreditNote/:creditNoteId", wrapper.DeletecreditNote) + router.GET(baseURL+"/CreditNote/:creditNoteId", wrapper.GetcreditNoteById) + router.PUT(baseURL+"/CreditNote/:creditNoteId", wrapper.UpdatecreditNote) + router.PUT(baseURL+"/CreditNote/:creditNoteId/bookAmount", wrapper.BookCreditNote) + router.PUT(baseURL+"/CreditNote/:creditNoteId/changeParameter", wrapper.UpdateCreditNoteTemplate) + router.PUT(baseURL+"/CreditNote/:creditNoteId/enshrine", wrapper.CreditNoteEnshrine) + router.GET(baseURL+"/CreditNote/:creditNoteId/getPdf", wrapper.CreditNoteGetPdf) + router.PUT(baseURL+"/CreditNote/:creditNoteId/resetToDraft", wrapper.CreditNoteResetToDraft) + router.PUT(baseURL+"/CreditNote/:creditNoteId/resetToOpen", wrapper.CreditNoteResetToOpen) + router.PUT(baseURL+"/CreditNote/:creditNoteId/sendBy", wrapper.CreditNoteSendBy) + router.GET(baseURL+"/CreditNote/:creditNoteId/sendByWithRender", wrapper.SendCreditNoteByPrinting) + router.POST(baseURL+"/CreditNote/:creditNoteId/sendViaEmail", wrapper.SendCreditNoteViaEMail) + router.GET(baseURL+"/CreditNotePos", wrapper.GetcreditNotePositions) + router.GET(baseURL+"/DocServer/getLetterpapersWithThumb", wrapper.GetLetterpapersWithThumb) + router.GET(baseURL+"/DocServer/getTemplatesWithThumb", wrapper.GetTemplates) + router.GET(baseURL+"/Export/contactListCsv", wrapper.ExportContact) + router.GET(baseURL+"/Export/creditNoteCsv", wrapper.ExportCreditNote) + router.GET(baseURL+"/Export/datevCSV", wrapper.ExportDatev) + router.GET(baseURL+"/Export/invoiceCsv", wrapper.ExportInvoice) + router.GET(baseURL+"/Export/invoiceZip", wrapper.ExportInvoiceZip) + router.GET(baseURL+"/Export/transactionsCsv", wrapper.ExportTransactions) + router.GET(baseURL+"/Export/voucherListCsv", wrapper.ExportVoucher) + router.GET(baseURL+"/Export/voucherZip", wrapper.ExportVoucherZip) + router.GET(baseURL+"/Invoice", wrapper.GetInvoices) + router.POST(baseURL+"/Invoice/Factory/createInvoiceFromOrder", wrapper.CreateInvoiceFromOrder) + router.POST(baseURL+"/Invoice/Factory/createInvoiceReminder", wrapper.CreateInvoiceReminder) + router.POST(baseURL+"/Invoice/Factory/saveInvoice", wrapper.CreateInvoiceByFactory) + router.GET(baseURL+"/Invoice/:invoiceId", wrapper.GetInvoiceById) + router.PUT(baseURL+"/Invoice/:invoiceId/bookAmount", wrapper.BookInvoice) + router.POST(baseURL+"/Invoice/:invoiceId/cancelInvoice", wrapper.CancelInvoice) + router.PUT(baseURL+"/Invoice/:invoiceId/changeParameter", wrapper.UpdateInvoiceTemplate) + router.PUT(baseURL+"/Invoice/:invoiceId/enshrine", wrapper.InvoiceEnshrine) + router.GET(baseURL+"/Invoice/:invoiceId/getIsPartiallyPaid", wrapper.GetIsInvoicePartiallyPaid) + router.GET(baseURL+"/Invoice/:invoiceId/getPdf", wrapper.InvoiceGetPdf) + router.GET(baseURL+"/Invoice/:invoiceId/getPositions", wrapper.GetInvoicePositionsById) + router.GET(baseURL+"/Invoice/:invoiceId/getXml", wrapper.InvoiceGetXml) + router.POST(baseURL+"/Invoice/:invoiceId/render", wrapper.InvoiceRender) + router.PUT(baseURL+"/Invoice/:invoiceId/resetToDraft", wrapper.InvoiceResetToDraft) + router.PUT(baseURL+"/Invoice/:invoiceId/resetToOpen", wrapper.InvoiceResetToOpen) + router.PUT(baseURL+"/Invoice/:invoiceId/sendBy", wrapper.InvoiceSendBy) + router.POST(baseURL+"/Invoice/:invoiceId/sendViaEmail", wrapper.SendInvoiceViaEMail) + router.GET(baseURL+"/InvoicePos", wrapper.GetInvoicePos) + router.GET(baseURL+"/Order", wrapper.GetOrders) + router.POST(baseURL+"/Order/Factory/createContractNoteFromOrder", wrapper.CreateContractNoteFromOrder) + router.POST(baseURL+"/Order/Factory/createPackingListFromOrder", wrapper.CreatePackingListFromOrder) + router.POST(baseURL+"/Order/Factory/saveOrder", wrapper.CreateOrder) + router.DELETE(baseURL+"/Order/:orderId", wrapper.DeleteOrder) + router.GET(baseURL+"/Order/:orderId", wrapper.GetOrderById) + router.PUT(baseURL+"/Order/:orderId", wrapper.UpdateOrder) + router.PUT(baseURL+"/Order/:orderId/changeParameter", wrapper.UpdateOrderTemplate) + router.GET(baseURL+"/Order/:orderId/getDiscounts", wrapper.GetDiscounts) + router.GET(baseURL+"/Order/:orderId/getPdf", wrapper.OrderGetPdf) + router.GET(baseURL+"/Order/:orderId/getPositions", wrapper.GetOrderPositionsById) + router.GET(baseURL+"/Order/:orderId/getRelatedObjects", wrapper.GetRelatedObjects) + router.PUT(baseURL+"/Order/:orderId/sendBy", wrapper.OrderSendBy) + router.POST(baseURL+"/Order/:orderId/sendViaEmail", wrapper.SendorderViaEMail) + router.GET(baseURL+"/OrderPos", wrapper.GetOrderPositions) + router.DELETE(baseURL+"/OrderPos/:orderPosId", wrapper.DeleteOrderPos) + router.GET(baseURL+"/OrderPos/:orderPosId", wrapper.GetOrderPositionById) + router.PUT(baseURL+"/OrderPos/:orderPosId", wrapper.UpdateOrderPosition) + router.GET(baseURL+"/Part", wrapper.GetParts) + router.POST(baseURL+"/Part", wrapper.CreatePart) + router.GET(baseURL+"/Part/:partId", wrapper.GetPartById) + router.PUT(baseURL+"/Part/:partId", wrapper.UpdatePart) + router.GET(baseURL+"/Part/:partId/getStock", wrapper.PartGetStock) + router.GET(baseURL+"/ReceiptGuidance/forAccountNumber", wrapper.ForAccountNumber) + router.GET(baseURL+"/ReceiptGuidance/forAllAccounts", wrapper.ForAllAccounts) + router.GET(baseURL+"/ReceiptGuidance/forExpense", wrapper.ForExpense) + router.GET(baseURL+"/ReceiptGuidance/forRevenue", wrapper.ForRevenue) + router.GET(baseURL+"/ReceiptGuidance/forTaxRule", wrapper.ForTaxRule) + router.GET(baseURL+"/Report/contactlist", wrapper.ReportContact) + router.GET(baseURL+"/Report/invoicelist", wrapper.ReportInvoice) + router.GET(baseURL+"/Report/orderlist", wrapper.ReportOrder) + router.GET(baseURL+"/Report/voucherlist", wrapper.ReportVoucher) + router.PUT(baseURL+"/SevClient/:SevClientId/updateExportConfig", wrapper.UpdateExportConfig) + router.GET(baseURL+"/Tag", wrapper.GetTags) + router.POST(baseURL+"/Tag/Factory/create", wrapper.CreateTag) + router.DELETE(baseURL+"/Tag/:tagId", wrapper.DeleteTag) + router.GET(baseURL+"/Tag/:tagId", wrapper.GetTagById) + router.PUT(baseURL+"/Tag/:tagId", wrapper.UpdateTag) + router.GET(baseURL+"/TagRelation", wrapper.GetTagRelations) + router.GET(baseURL+"/Textparser/fetchDictionaryEntriesByType", wrapper.GetPlaceholder) + router.GET(baseURL+"/Tools/bookkeepingSystemVersion", wrapper.BookkeepingSystemVersion) + router.GET(baseURL+"/Voucher", wrapper.GetVouchers) + router.POST(baseURL+"/Voucher/Factory/saveVoucher", wrapper.VoucherFactorySaveVoucher) + router.POST(baseURL+"/Voucher/Factory/uploadTempFile", wrapper.VoucherUploadFile) + router.GET(baseURL+"/Voucher/:voucherId", wrapper.GetVoucherById) + router.PUT(baseURL+"/Voucher/:voucherId", wrapper.UpdateVoucher) + router.PUT(baseURL+"/Voucher/:voucherId/bookAmount", wrapper.BookVoucher) + router.PUT(baseURL+"/Voucher/:voucherId/enshrine", wrapper.VoucherEnshrine) + router.PUT(baseURL+"/Voucher/:voucherId/resetToDraft", wrapper.VoucherResetToDraft) + router.PUT(baseURL+"/Voucher/:voucherId/resetToOpen", wrapper.VoucherResetToOpen) + router.GET(baseURL+"/VoucherPos", wrapper.GetVoucherPositions) + +} diff --git a/types/types.go b/types/types.go new file mode 100644 index 0000000..06f885d --- /dev/null +++ b/types/types.go @@ -0,0 +1,7840 @@ +// Package types provides primitives to interact with the openapi HTTP API. +// +// Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.4.1 DO NOT EDIT. +package types + +import ( + "time" + + openapi_types "github.com/oapi-codegen/runtime/types" +) + +const ( + Api_keyScopes = "api_key.Scopes" +) + +// Defines values for ModelChangeLayoutKey. +const ( + Language ModelChangeLayoutKey = "language" + Letterpaper ModelChangeLayoutKey = "letterpaper" + PayPal ModelChangeLayoutKey = "payPal" + Template ModelChangeLayoutKey = "template" +) + +// Defines values for ModelCheckAccountDefaultAccount. +const ( + ModelCheckAccountDefaultAccountN0 ModelCheckAccountDefaultAccount = 0 + ModelCheckAccountDefaultAccountN1 ModelCheckAccountDefaultAccount = 1 +) + +// Defines values for ModelCheckAccountImportType. +const ( + ModelCheckAccountImportTypeCSV ModelCheckAccountImportType = "CSV" + ModelCheckAccountImportTypeLessThannil ModelCheckAccountImportType = "" + ModelCheckAccountImportTypeMT940 ModelCheckAccountImportType = "MT940" +) + +// Defines values for ModelCheckAccountStatus. +const ( + ModelCheckAccountStatusN0 ModelCheckAccountStatus = 0 + ModelCheckAccountStatusN100 ModelCheckAccountStatus = 100 +) + +// Defines values for ModelCheckAccountType. +const ( + ModelCheckAccountTypeOffline ModelCheckAccountType = "offline" + ModelCheckAccountTypeOnline ModelCheckAccountType = "online" +) + +// Defines values for ModelCheckAccountResponseImportType. +const ( + ModelCheckAccountResponseImportTypeCSV ModelCheckAccountResponseImportType = "CSV" + ModelCheckAccountResponseImportTypeLessThannil ModelCheckAccountResponseImportType = "" + ModelCheckAccountResponseImportTypeMT940 ModelCheckAccountResponseImportType = "MT940" +) + +// Defines values for ModelCheckAccountResponseStatus. +const ( + ModelCheckAccountResponseStatusN0 ModelCheckAccountResponseStatus = "0" + ModelCheckAccountResponseStatusN100 ModelCheckAccountResponseStatus = "100" +) + +// Defines values for ModelCheckAccountResponseType. +const ( + ModelCheckAccountResponseTypeOffline ModelCheckAccountResponseType = "offline" + ModelCheckAccountResponseTypeOnline ModelCheckAccountResponseType = "online" +) + +// Defines values for ModelCheckAccountTransactionStatus. +const ( + ModelCheckAccountTransactionStatusN100 ModelCheckAccountTransactionStatus = 100 + ModelCheckAccountTransactionStatusN200 ModelCheckAccountTransactionStatus = 200 + ModelCheckAccountTransactionStatusN300 ModelCheckAccountTransactionStatus = 300 + ModelCheckAccountTransactionStatusN400 ModelCheckAccountTransactionStatus = 400 +) + +// Defines values for ModelCheckAccountTransactionResponseStatus. +const ( + ModelCheckAccountTransactionResponseStatusN100 ModelCheckAccountTransactionResponseStatus = "100" + ModelCheckAccountTransactionResponseStatusN200 ModelCheckAccountTransactionResponseStatus = "200" + ModelCheckAccountTransactionResponseStatusN300 ModelCheckAccountTransactionResponseStatus = "300" + ModelCheckAccountTransactionResponseStatusN400 ModelCheckAccountTransactionResponseStatus = "400" +) + +// Defines values for ModelCheckAccountTransactionUpdateStatus. +const ( + ModelCheckAccountTransactionUpdateStatusN100 ModelCheckAccountTransactionUpdateStatus = 100 + ModelCheckAccountTransactionUpdateStatusN200 ModelCheckAccountTransactionUpdateStatus = 200 + ModelCheckAccountTransactionUpdateStatusN300 ModelCheckAccountTransactionUpdateStatus = 300 + ModelCheckAccountTransactionUpdateStatusN400 ModelCheckAccountTransactionUpdateStatus = 400 +) + +// Defines values for ModelCheckAccountUpdateDefaultAccount. +const ( + ModelCheckAccountUpdateDefaultAccountN0 ModelCheckAccountUpdateDefaultAccount = 0 + ModelCheckAccountUpdateDefaultAccountN1 ModelCheckAccountUpdateDefaultAccount = 1 +) + +// Defines values for ModelCheckAccountUpdateImportType. +const ( + ModelCheckAccountUpdateImportTypeCSV ModelCheckAccountUpdateImportType = "CSV" + ModelCheckAccountUpdateImportTypeLessThannil ModelCheckAccountUpdateImportType = "" + ModelCheckAccountUpdateImportTypeMT940 ModelCheckAccountUpdateImportType = "MT940" +) + +// Defines values for ModelCheckAccountUpdateStatus. +const ( + ModelCheckAccountUpdateStatusN0 ModelCheckAccountUpdateStatus = 0 + ModelCheckAccountUpdateStatusN100 ModelCheckAccountUpdateStatus = 100 +) + +// Defines values for ModelCheckAccountUpdateType. +const ( + ModelCheckAccountUpdateTypeOffline ModelCheckAccountUpdateType = "offline" + ModelCheckAccountUpdateTypeOnline ModelCheckAccountUpdateType = "online" +) + +// Defines values for ModelCommunicationWayType. +const ( + ModelCommunicationWayTypeEMAIL ModelCommunicationWayType = "EMAIL" + ModelCommunicationWayTypeMOBILE ModelCommunicationWayType = "MOBILE" + ModelCommunicationWayTypePHONE ModelCommunicationWayType = "PHONE" + ModelCommunicationWayTypeWEB ModelCommunicationWayType = "WEB" +) + +// Defines values for ModelCommunicationWayResponseType. +const ( + ModelCommunicationWayResponseTypeEMAIL ModelCommunicationWayResponseType = "EMAIL" + ModelCommunicationWayResponseTypeMOBILE ModelCommunicationWayResponseType = "MOBILE" + ModelCommunicationWayResponseTypePHONE ModelCommunicationWayResponseType = "PHONE" + ModelCommunicationWayResponseTypeWEB ModelCommunicationWayResponseType = "WEB" +) + +// Defines values for ModelCommunicationWayUpdateType. +const ( + ModelCommunicationWayUpdateTypeEMAIL ModelCommunicationWayUpdateType = "EMAIL" + ModelCommunicationWayUpdateTypeMOBILE ModelCommunicationWayUpdateType = "MOBILE" + ModelCommunicationWayUpdateTypePHONE ModelCommunicationWayUpdateType = "PHONE" + ModelCommunicationWayUpdateTypeWEB ModelCommunicationWayUpdateType = "WEB" +) + +// Defines values for ModelCreateInvoiceFromOrderPartialType. +const ( + ModelCreateInvoiceFromOrderPartialTypeAR ModelCreateInvoiceFromOrderPartialType = "AR" + ModelCreateInvoiceFromOrderPartialTypeRE ModelCreateInvoiceFromOrderPartialType = "RE" + ModelCreateInvoiceFromOrderPartialTypeTR ModelCreateInvoiceFromOrderPartialType = "TR" +) + +// Defines values for ModelCreateInvoiceFromOrderType. +const ( + Gross ModelCreateInvoiceFromOrderType = "gross" + Net ModelCreateInvoiceFromOrderType = "net" + Percentage ModelCreateInvoiceFromOrderType = "percentage" +) + +// Defines values for ModelInvoiceInvoiceType. +const ( + ModelInvoiceInvoiceTypeER ModelInvoiceInvoiceType = "ER" + ModelInvoiceInvoiceTypeMA ModelInvoiceInvoiceType = "MA" + ModelInvoiceInvoiceTypeRE ModelInvoiceInvoiceType = "RE" + ModelInvoiceInvoiceTypeSR ModelInvoiceInvoiceType = "SR" + ModelInvoiceInvoiceTypeTR ModelInvoiceInvoiceType = "TR" + ModelInvoiceInvoiceTypeWKR ModelInvoiceInvoiceType = "WKR" +) + +// Defines values for ModelInvoiceSendType. +const ( + ModelInvoiceSendTypeVM ModelInvoiceSendType = "VM" + ModelInvoiceSendTypeVP ModelInvoiceSendType = "VP" + ModelInvoiceSendTypeVPDF ModelInvoiceSendType = "VPDF" + ModelInvoiceSendTypeVPR ModelInvoiceSendType = "VPR" +) + +// Defines values for ModelInvoiceStatus. +const ( + ModelInvoiceStatusN100 ModelInvoiceStatus = "100" + ModelInvoiceStatusN1000 ModelInvoiceStatus = "1000" + ModelInvoiceStatusN200 ModelInvoiceStatus = "200" + ModelInvoiceStatusN50 ModelInvoiceStatus = "50" + ModelInvoiceStatusN750 ModelInvoiceStatus = "750" +) + +// Defines values for ModelInvoiceTaxRuleId. +const ( + ModelInvoiceTaxRuleIdN1 ModelInvoiceTaxRuleId = "1" + ModelInvoiceTaxRuleIdN11 ModelInvoiceTaxRuleId = "11" + ModelInvoiceTaxRuleIdN2 ModelInvoiceTaxRuleId = "2" + ModelInvoiceTaxRuleIdN3 ModelInvoiceTaxRuleId = "3" + ModelInvoiceTaxRuleIdN4 ModelInvoiceTaxRuleId = "4" + ModelInvoiceTaxRuleIdN5 ModelInvoiceTaxRuleId = "5" +) + +// Defines values for ModelInvoiceTaxRuleObjectName. +const ( + ModelInvoiceTaxRuleObjectNameTaxRule ModelInvoiceTaxRuleObjectName = "TaxRule" +) + +// Defines values for ModelInvoiceTaxType. +const ( + ModelInvoiceTaxTypeCustom ModelInvoiceTaxType = "custom" + ModelInvoiceTaxTypeDefault ModelInvoiceTaxType = "default" + ModelInvoiceTaxTypeEu ModelInvoiceTaxType = "eu" + ModelInvoiceTaxTypeNoteu ModelInvoiceTaxType = "noteu" +) + +// Defines values for ModelInvoiceResponseInvoiceType. +const ( + ER ModelInvoiceResponseInvoiceType = "ER" + MA ModelInvoiceResponseInvoiceType = "MA" + RE ModelInvoiceResponseInvoiceType = "RE" + SR ModelInvoiceResponseInvoiceType = "SR" + TR ModelInvoiceResponseInvoiceType = "TR" + WKR ModelInvoiceResponseInvoiceType = "WKR" +) + +// Defines values for ModelInvoiceResponseSendType. +const ( + ModelInvoiceResponseSendTypeVM ModelInvoiceResponseSendType = "VM" + ModelInvoiceResponseSendTypeVP ModelInvoiceResponseSendType = "VP" + ModelInvoiceResponseSendTypeVPDF ModelInvoiceResponseSendType = "VPDF" + ModelInvoiceResponseSendTypeVPR ModelInvoiceResponseSendType = "VPR" +) + +// Defines values for ModelInvoiceResponseStatus. +const ( + ModelInvoiceResponseStatusN100 ModelInvoiceResponseStatus = "100" + ModelInvoiceResponseStatusN1000 ModelInvoiceResponseStatus = "1000" + ModelInvoiceResponseStatusN200 ModelInvoiceResponseStatus = "200" + ModelInvoiceResponseStatusN50 ModelInvoiceResponseStatus = "50" + ModelInvoiceResponseStatusN750 ModelInvoiceResponseStatus = "750" +) + +// Defines values for ModelInvoiceResponseTaxRuleId. +const ( + ModelInvoiceResponseTaxRuleIdN1 ModelInvoiceResponseTaxRuleId = "1" + ModelInvoiceResponseTaxRuleIdN11 ModelInvoiceResponseTaxRuleId = "11" + ModelInvoiceResponseTaxRuleIdN2 ModelInvoiceResponseTaxRuleId = "2" + ModelInvoiceResponseTaxRuleIdN3 ModelInvoiceResponseTaxRuleId = "3" + ModelInvoiceResponseTaxRuleIdN4 ModelInvoiceResponseTaxRuleId = "4" + ModelInvoiceResponseTaxRuleIdN5 ModelInvoiceResponseTaxRuleId = "5" +) + +// Defines values for ModelInvoiceResponseTaxRuleObjectName. +const ( + ModelInvoiceResponseTaxRuleObjectNameTaxRule ModelInvoiceResponseTaxRuleObjectName = "TaxRule" +) + +// Defines values for ModelInvoiceResponseTaxType. +const ( + ModelInvoiceResponseTaxTypeCustom ModelInvoiceResponseTaxType = "custom" + ModelInvoiceResponseTaxTypeDefault ModelInvoiceResponseTaxType = "default" + ModelInvoiceResponseTaxTypeEu ModelInvoiceResponseTaxType = "eu" + ModelInvoiceResponseTaxTypeNoteu ModelInvoiceResponseTaxType = "noteu" +) + +// Defines values for ModelOrderOrderType. +const ( + ModelOrderOrderTypeAB ModelOrderOrderType = "AB" + ModelOrderOrderTypeAN ModelOrderOrderType = "AN" + ModelOrderOrderTypeLI ModelOrderOrderType = "LI" +) + +// Defines values for ModelOrderSendType. +const ( + ModelOrderSendTypeVM ModelOrderSendType = "VM" + ModelOrderSendTypeVP ModelOrderSendType = "VP" + ModelOrderSendTypeVPDF ModelOrderSendType = "VPDF" + ModelOrderSendTypeVPR ModelOrderSendType = "VPR" +) + +// Defines values for ModelOrderStatus. +const ( + ModelOrderStatusN100 ModelOrderStatus = 100 + ModelOrderStatusN1000 ModelOrderStatus = 1000 + ModelOrderStatusN200 ModelOrderStatus = 200 + ModelOrderStatusN300 ModelOrderStatus = 300 + ModelOrderStatusN500 ModelOrderStatus = 500 + ModelOrderStatusN750 ModelOrderStatus = 750 +) + +// Defines values for ModelOrderTaxRuleId. +const ( + ModelOrderTaxRuleIdN1 ModelOrderTaxRuleId = "1" + ModelOrderTaxRuleIdN11 ModelOrderTaxRuleId = "11" + ModelOrderTaxRuleIdN2 ModelOrderTaxRuleId = "2" + ModelOrderTaxRuleIdN3 ModelOrderTaxRuleId = "3" + ModelOrderTaxRuleIdN4 ModelOrderTaxRuleId = "4" + ModelOrderTaxRuleIdN5 ModelOrderTaxRuleId = "5" +) + +// Defines values for ModelOrderTaxRuleObjectName. +const ( + ModelOrderTaxRuleObjectNameTaxRule ModelOrderTaxRuleObjectName = "TaxRule" +) + +// Defines values for ModelOrderResponseOrderType. +const ( + ModelOrderResponseOrderTypeAB ModelOrderResponseOrderType = "AB" + ModelOrderResponseOrderTypeAN ModelOrderResponseOrderType = "AN" + ModelOrderResponseOrderTypeLI ModelOrderResponseOrderType = "LI" +) + +// Defines values for ModelOrderResponseSendType. +const ( + ModelOrderResponseSendTypeVM ModelOrderResponseSendType = "VM" + ModelOrderResponseSendTypeVP ModelOrderResponseSendType = "VP" + ModelOrderResponseSendTypeVPDF ModelOrderResponseSendType = "VPDF" + ModelOrderResponseSendTypeVPR ModelOrderResponseSendType = "VPR" +) + +// Defines values for ModelOrderResponseStatus. +const ( + ModelOrderResponseStatusN100 ModelOrderResponseStatus = "100" + ModelOrderResponseStatusN1000 ModelOrderResponseStatus = "1000" + ModelOrderResponseStatusN200 ModelOrderResponseStatus = "200" + ModelOrderResponseStatusN300 ModelOrderResponseStatus = "300" + ModelOrderResponseStatusN500 ModelOrderResponseStatus = "500" + ModelOrderResponseStatusN750 ModelOrderResponseStatus = "750" +) + +// Defines values for ModelOrderResponseTaxRuleId. +const ( + ModelOrderResponseTaxRuleIdN1 ModelOrderResponseTaxRuleId = "1" + ModelOrderResponseTaxRuleIdN11 ModelOrderResponseTaxRuleId = "11" + ModelOrderResponseTaxRuleIdN2 ModelOrderResponseTaxRuleId = "2" + ModelOrderResponseTaxRuleIdN3 ModelOrderResponseTaxRuleId = "3" + ModelOrderResponseTaxRuleIdN4 ModelOrderResponseTaxRuleId = "4" + ModelOrderResponseTaxRuleIdN5 ModelOrderResponseTaxRuleId = "5" +) + +// Defines values for ModelOrderResponseTaxRuleObjectName. +const ( + ModelOrderResponseTaxRuleObjectNameTaxRule ModelOrderResponseTaxRuleObjectName = "TaxRule" +) + +// Defines values for ModelOrderUpdateOrderType. +const ( + ModelOrderUpdateOrderTypeAB ModelOrderUpdateOrderType = "AB" + ModelOrderUpdateOrderTypeAN ModelOrderUpdateOrderType = "AN" + ModelOrderUpdateOrderTypeLI ModelOrderUpdateOrderType = "LI" +) + +// Defines values for ModelOrderUpdateSendType. +const ( + ModelOrderUpdateSendTypeVM ModelOrderUpdateSendType = "VM" + ModelOrderUpdateSendTypeVP ModelOrderUpdateSendType = "VP" + ModelOrderUpdateSendTypeVPDF ModelOrderUpdateSendType = "VPDF" + ModelOrderUpdateSendTypeVPR ModelOrderUpdateSendType = "VPR" +) + +// Defines values for ModelOrderUpdateStatus. +const ( + ModelOrderUpdateStatusN100 ModelOrderUpdateStatus = 100 + ModelOrderUpdateStatusN1000 ModelOrderUpdateStatus = 1000 + ModelOrderUpdateStatusN200 ModelOrderUpdateStatus = 200 + ModelOrderUpdateStatusN300 ModelOrderUpdateStatus = 300 + ModelOrderUpdateStatusN500 ModelOrderUpdateStatus = 500 + ModelOrderUpdateStatusN750 ModelOrderUpdateStatus = 750 +) + +// Defines values for ModelOrderUpdateTaxRuleId. +const ( + ModelOrderUpdateTaxRuleIdN1 ModelOrderUpdateTaxRuleId = "1" + ModelOrderUpdateTaxRuleIdN11 ModelOrderUpdateTaxRuleId = "11" + ModelOrderUpdateTaxRuleIdN2 ModelOrderUpdateTaxRuleId = "2" + ModelOrderUpdateTaxRuleIdN3 ModelOrderUpdateTaxRuleId = "3" + ModelOrderUpdateTaxRuleIdN4 ModelOrderUpdateTaxRuleId = "4" + ModelOrderUpdateTaxRuleIdN5 ModelOrderUpdateTaxRuleId = "5" +) + +// Defines values for ModelOrderUpdateTaxRuleObjectName. +const ( + ModelOrderUpdateTaxRuleObjectNameTaxRule ModelOrderUpdateTaxRuleObjectName = "TaxRule" +) + +// Defines values for ModelPartStatus. +const ( + ModelPartStatusN100 ModelPartStatus = 100 + ModelPartStatusN50 ModelPartStatus = 50 +) + +// Defines values for ModelPartUpdateStatus. +const ( + ModelPartUpdateStatusN100 ModelPartUpdateStatus = 100 + ModelPartUpdateStatusN50 ModelPartUpdateStatus = 50 +) + +// Defines values for ModelTagCreateResponseObjectObjectName. +const ( + ModelTagCreateResponseObjectObjectNameCreditNote ModelTagCreateResponseObjectObjectName = "CreditNote" + ModelTagCreateResponseObjectObjectNameInvoice ModelTagCreateResponseObjectObjectName = "Invoice" + ModelTagCreateResponseObjectObjectNameOrder ModelTagCreateResponseObjectObjectName = "Order" + ModelTagCreateResponseObjectObjectNameVoucher ModelTagCreateResponseObjectObjectName = "Voucher" +) + +// Defines values for ModelVoucherCreditDebit. +const ( + ModelVoucherCreditDebitC ModelVoucherCreditDebit = "C" + ModelVoucherCreditDebitD ModelVoucherCreditDebit = "D" +) + +// Defines values for ModelVoucherRecurringInterval. +const ( + ModelVoucherRecurringIntervalP0Y0M1W ModelVoucherRecurringInterval = "P0Y0M1W" + ModelVoucherRecurringIntervalP0Y0M2W ModelVoucherRecurringInterval = "P0Y0M2W" + ModelVoucherRecurringIntervalP0Y1M0W ModelVoucherRecurringInterval = "P0Y1M0W" + ModelVoucherRecurringIntervalP0Y3M0W ModelVoucherRecurringInterval = "P0Y3M0W" + ModelVoucherRecurringIntervalP0Y6M0W ModelVoucherRecurringInterval = "P0Y6M0W" + ModelVoucherRecurringIntervalP1Y0M0W ModelVoucherRecurringInterval = "P1Y0M0W" + ModelVoucherRecurringIntervalP2Y0M0W ModelVoucherRecurringInterval = "P2Y0M0W" + ModelVoucherRecurringIntervalP3Y0M0W ModelVoucherRecurringInterval = "P3Y0M0W" + ModelVoucherRecurringIntervalP4Y0M0W ModelVoucherRecurringInterval = "P4Y0M0W" + ModelVoucherRecurringIntervalP5Y0M0W ModelVoucherRecurringInterval = "P5Y0M0W" +) + +// Defines values for ModelVoucherStatus. +const ( + ModelVoucherStatusN100 ModelVoucherStatus = 100 + ModelVoucherStatusN1000 ModelVoucherStatus = 1000 + ModelVoucherStatusN50 ModelVoucherStatus = 50 +) + +// Defines values for ModelVoucherTaxRuleId. +const ( + ModelVoucherTaxRuleIdN1 ModelVoucherTaxRuleId = "1" + ModelVoucherTaxRuleIdN11 ModelVoucherTaxRuleId = "11" + ModelVoucherTaxRuleIdN2 ModelVoucherTaxRuleId = "2" + ModelVoucherTaxRuleIdN3 ModelVoucherTaxRuleId = "3" + ModelVoucherTaxRuleIdN4 ModelVoucherTaxRuleId = "4" + ModelVoucherTaxRuleIdN5 ModelVoucherTaxRuleId = "5" +) + +// Defines values for ModelVoucherTaxRuleObjectName. +const ( + ModelVoucherTaxRuleObjectNameTaxRule ModelVoucherTaxRuleObjectName = "TaxRule" +) + +// Defines values for ModelVoucherVoucherType. +const ( + ModelVoucherVoucherTypeRV ModelVoucherVoucherType = "RV" + ModelVoucherVoucherTypeVOU ModelVoucherVoucherType = "VOU" +) + +// Defines values for ModelVoucherResponseCreditDebit. +const ( + ModelVoucherResponseCreditDebitC ModelVoucherResponseCreditDebit = "C" + ModelVoucherResponseCreditDebitD ModelVoucherResponseCreditDebit = "D" +) + +// Defines values for ModelVoucherResponseRecurringInterval. +const ( + ModelVoucherResponseRecurringIntervalP0Y0M1W ModelVoucherResponseRecurringInterval = "P0Y0M1W" + ModelVoucherResponseRecurringIntervalP0Y0M2W ModelVoucherResponseRecurringInterval = "P0Y0M2W" + ModelVoucherResponseRecurringIntervalP0Y1M0W ModelVoucherResponseRecurringInterval = "P0Y1M0W" + ModelVoucherResponseRecurringIntervalP0Y3M0W ModelVoucherResponseRecurringInterval = "P0Y3M0W" + ModelVoucherResponseRecurringIntervalP0Y6M0W ModelVoucherResponseRecurringInterval = "P0Y6M0W" + ModelVoucherResponseRecurringIntervalP1Y0M0W ModelVoucherResponseRecurringInterval = "P1Y0M0W" + ModelVoucherResponseRecurringIntervalP2Y0M0W ModelVoucherResponseRecurringInterval = "P2Y0M0W" + ModelVoucherResponseRecurringIntervalP3Y0M0W ModelVoucherResponseRecurringInterval = "P3Y0M0W" + ModelVoucherResponseRecurringIntervalP4Y0M0W ModelVoucherResponseRecurringInterval = "P4Y0M0W" + ModelVoucherResponseRecurringIntervalP5Y0M0W ModelVoucherResponseRecurringInterval = "P5Y0M0W" +) + +// Defines values for ModelVoucherResponseStatus. +const ( + ModelVoucherResponseStatusN100 ModelVoucherResponseStatus = "100" + ModelVoucherResponseStatusN1000 ModelVoucherResponseStatus = "1000" + ModelVoucherResponseStatusN50 ModelVoucherResponseStatus = "50" +) + +// Defines values for ModelVoucherResponseTaxRuleId. +const ( + ModelVoucherResponseTaxRuleIdN1 ModelVoucherResponseTaxRuleId = "1" + ModelVoucherResponseTaxRuleIdN11 ModelVoucherResponseTaxRuleId = "11" + ModelVoucherResponseTaxRuleIdN2 ModelVoucherResponseTaxRuleId = "2" + ModelVoucherResponseTaxRuleIdN3 ModelVoucherResponseTaxRuleId = "3" + ModelVoucherResponseTaxRuleIdN4 ModelVoucherResponseTaxRuleId = "4" + ModelVoucherResponseTaxRuleIdN5 ModelVoucherResponseTaxRuleId = "5" +) + +// Defines values for ModelVoucherResponseTaxRuleObjectName. +const ( + ModelVoucherResponseTaxRuleObjectNameTaxRule ModelVoucherResponseTaxRuleObjectName = "TaxRule" +) + +// Defines values for ModelVoucherResponseVoucherType. +const ( + ModelVoucherResponseVoucherTypeRV ModelVoucherResponseVoucherType = "RV" + ModelVoucherResponseVoucherTypeVOU ModelVoucherResponseVoucherType = "VOU" +) + +// Defines values for ModelVoucherUpdateCreditDebit. +const ( + ModelVoucherUpdateCreditDebitC ModelVoucherUpdateCreditDebit = "C" + ModelVoucherUpdateCreditDebitD ModelVoucherUpdateCreditDebit = "D" +) + +// Defines values for ModelVoucherUpdateStatus. +const ( + ModelVoucherUpdateStatusN100 ModelVoucherUpdateStatus = 100 + ModelVoucherUpdateStatusN1000 ModelVoucherUpdateStatus = 1000 + ModelVoucherUpdateStatusN50 ModelVoucherUpdateStatus = 50 +) + +// Defines values for ModelVoucherUpdateTaxRuleId. +const ( + ModelVoucherUpdateTaxRuleIdN1 ModelVoucherUpdateTaxRuleId = "1" + ModelVoucherUpdateTaxRuleIdN11 ModelVoucherUpdateTaxRuleId = "11" + ModelVoucherUpdateTaxRuleIdN2 ModelVoucherUpdateTaxRuleId = "2" + ModelVoucherUpdateTaxRuleIdN3 ModelVoucherUpdateTaxRuleId = "3" + ModelVoucherUpdateTaxRuleIdN4 ModelVoucherUpdateTaxRuleId = "4" + ModelVoucherUpdateTaxRuleIdN5 ModelVoucherUpdateTaxRuleId = "5" +) + +// Defines values for ModelVoucherUpdateTaxRuleObjectName. +const ( + ModelVoucherUpdateTaxRuleObjectNameTaxRule ModelVoucherUpdateTaxRuleObjectName = "TaxRule" +) + +// Defines values for ModelVoucherUpdateVoucherType. +const ( + RV ModelVoucherUpdateVoucherType = "RV" + VOU ModelVoucherUpdateVoucherType = "VOU" +) + +// Defines values for ModelCreditNoteBookingCategory. +const ( + ACCOUNTINGTYPE ModelCreditNoteBookingCategory = "ACCOUNTING_TYPE" + PROVISION ModelCreditNoteBookingCategory = "PROVISION" + ROYALTYASSIGNED ModelCreditNoteBookingCategory = "ROYALTY_ASSIGNED" + ROYALTYUNASSIGNED ModelCreditNoteBookingCategory = "ROYALTY_UNASSIGNED" + UNDERACHIEVEMENT ModelCreditNoteBookingCategory = "UNDERACHIEVEMENT" +) + +// Defines values for ModelCreditNoteSendType. +const ( + ModelCreditNoteSendTypeVM ModelCreditNoteSendType = "VM" + ModelCreditNoteSendTypeVP ModelCreditNoteSendType = "VP" + ModelCreditNoteSendTypeVPDF ModelCreditNoteSendType = "VPDF" + ModelCreditNoteSendTypeVPR ModelCreditNoteSendType = "VPR" +) + +// Defines values for ModelCreditNoteStatus. +const ( + ModelCreditNoteStatusN100 ModelCreditNoteStatus = "100" + ModelCreditNoteStatusN1000 ModelCreditNoteStatus = "1000" + ModelCreditNoteStatusN200 ModelCreditNoteStatus = "200" + ModelCreditNoteStatusN300 ModelCreditNoteStatus = "300" + ModelCreditNoteStatusN500 ModelCreditNoteStatus = "500" + ModelCreditNoteStatusN750 ModelCreditNoteStatus = "750" +) + +// Defines values for ModelCreditNoteTaxRuleId. +const ( + ModelCreditNoteTaxRuleIdN1 ModelCreditNoteTaxRuleId = "1" + ModelCreditNoteTaxRuleIdN11 ModelCreditNoteTaxRuleId = "11" + ModelCreditNoteTaxRuleIdN2 ModelCreditNoteTaxRuleId = "2" + ModelCreditNoteTaxRuleIdN3 ModelCreditNoteTaxRuleId = "3" + ModelCreditNoteTaxRuleIdN4 ModelCreditNoteTaxRuleId = "4" + ModelCreditNoteTaxRuleIdN5 ModelCreditNoteTaxRuleId = "5" +) + +// Defines values for ModelCreditNoteTaxRuleObjectName. +const ( + ModelCreditNoteTaxRuleObjectNameTaxRule ModelCreditNoteTaxRuleObjectName = "TaxRule" +) + +// Defines values for ModelCreditNoteResponseSendType. +const ( + ModelCreditNoteResponseSendTypeVM ModelCreditNoteResponseSendType = "VM" + ModelCreditNoteResponseSendTypeVP ModelCreditNoteResponseSendType = "VP" + ModelCreditNoteResponseSendTypeVPDF ModelCreditNoteResponseSendType = "VPDF" + ModelCreditNoteResponseSendTypeVPR ModelCreditNoteResponseSendType = "VPR" +) + +// Defines values for ModelCreditNoteResponseStatus. +const ( + ModelCreditNoteResponseStatusN100 ModelCreditNoteResponseStatus = "100" + ModelCreditNoteResponseStatusN1000 ModelCreditNoteResponseStatus = "1000" + ModelCreditNoteResponseStatusN200 ModelCreditNoteResponseStatus = "200" + ModelCreditNoteResponseStatusN750 ModelCreditNoteResponseStatus = "750" +) + +// Defines values for ModelCreditNoteResponseTaxRuleId. +const ( + ModelCreditNoteResponseTaxRuleIdN1 ModelCreditNoteResponseTaxRuleId = "1" + ModelCreditNoteResponseTaxRuleIdN11 ModelCreditNoteResponseTaxRuleId = "11" + ModelCreditNoteResponseTaxRuleIdN2 ModelCreditNoteResponseTaxRuleId = "2" + ModelCreditNoteResponseTaxRuleIdN3 ModelCreditNoteResponseTaxRuleId = "3" + ModelCreditNoteResponseTaxRuleIdN4 ModelCreditNoteResponseTaxRuleId = "4" + ModelCreditNoteResponseTaxRuleIdN5 ModelCreditNoteResponseTaxRuleId = "5" +) + +// Defines values for ModelCreditNoteResponseTaxRuleObjectName. +const ( + ModelCreditNoteResponseTaxRuleObjectNameTaxRule ModelCreditNoteResponseTaxRuleObjectName = "TaxRule" +) + +// Defines values for ModelCreditNoteUpdateSendType. +const ( + ModelCreditNoteUpdateSendTypeVM ModelCreditNoteUpdateSendType = "VM" + ModelCreditNoteUpdateSendTypeVP ModelCreditNoteUpdateSendType = "VP" + ModelCreditNoteUpdateSendTypeVPDF ModelCreditNoteUpdateSendType = "VPDF" + ModelCreditNoteUpdateSendTypeVPR ModelCreditNoteUpdateSendType = "VPR" +) + +// Defines values for ModelCreditNoteUpdateStatus. +const ( + ModelCreditNoteUpdateStatusN100 ModelCreditNoteUpdateStatus = "100" + ModelCreditNoteUpdateStatusN1000 ModelCreditNoteUpdateStatus = "1000" + ModelCreditNoteUpdateStatusN200 ModelCreditNoteUpdateStatus = "200" + ModelCreditNoteUpdateStatusN750 ModelCreditNoteUpdateStatus = "750" +) + +// Defines values for ModelCreditNoteUpdateTaxRuleId. +const ( + ModelCreditNoteUpdateTaxRuleIdN1 ModelCreditNoteUpdateTaxRuleId = "1" + ModelCreditNoteUpdateTaxRuleIdN11 ModelCreditNoteUpdateTaxRuleId = "11" + ModelCreditNoteUpdateTaxRuleIdN2 ModelCreditNoteUpdateTaxRuleId = "2" + ModelCreditNoteUpdateTaxRuleIdN3 ModelCreditNoteUpdateTaxRuleId = "3" + ModelCreditNoteUpdateTaxRuleIdN4 ModelCreditNoteUpdateTaxRuleId = "4" + ModelCreditNoteUpdateTaxRuleIdN5 ModelCreditNoteUpdateTaxRuleId = "5" +) + +// Defines values for ModelCreditNoteUpdateTaxRuleObjectName. +const ( + TaxRule ModelCreditNoteUpdateTaxRuleObjectName = "TaxRule" +) + +// Defines values for CreateClearingAccountResponseDefaultAccount. +const ( + CreateClearingAccountResponseDefaultAccountN0 CreateClearingAccountResponseDefaultAccount = "0" + CreateClearingAccountResponseDefaultAccountN1 CreateClearingAccountResponseDefaultAccount = "1" +) + +// Defines values for CreateClearingAccountResponseStatus. +const ( + CreateClearingAccountResponseStatusN0 CreateClearingAccountResponseStatus = "0" + CreateClearingAccountResponseStatusN100 CreateClearingAccountResponseStatus = "100" +) + +// Defines values for CreateClearingAccountResponseType. +const ( + CreateClearingAccountResponseTypeOffline CreateClearingAccountResponseType = "offline" + CreateClearingAccountResponseTypeOnline CreateClearingAccountResponseType = "online" +) + +// Defines values for CreateFileImportAccountImportType. +const ( + CreateFileImportAccountImportTypeCSV CreateFileImportAccountImportType = "CSV" + CreateFileImportAccountImportTypeMT940 CreateFileImportAccountImportType = "MT940" +) + +// Defines values for CreateFileImportAccountResponseAutoMapTransactions. +const ( + CreateFileImportAccountResponseAutoMapTransactionsN0 CreateFileImportAccountResponseAutoMapTransactions = "0" + CreateFileImportAccountResponseAutoMapTransactionsN1 CreateFileImportAccountResponseAutoMapTransactions = "1" +) + +// Defines values for CreateFileImportAccountResponseDefaultAccount. +const ( + CreateFileImportAccountResponseDefaultAccountN0 CreateFileImportAccountResponseDefaultAccount = "0" + CreateFileImportAccountResponseDefaultAccountN1 CreateFileImportAccountResponseDefaultAccount = "1" +) + +// Defines values for CreateFileImportAccountResponseImportType. +const ( + CSV CreateFileImportAccountResponseImportType = "CSV" + MT940 CreateFileImportAccountResponseImportType = "MT940" +) + +// Defines values for CreateFileImportAccountResponseStatus. +const ( + CreateFileImportAccountResponseStatusN0 CreateFileImportAccountResponseStatus = "0" + CreateFileImportAccountResponseStatusN100 CreateFileImportAccountResponseStatus = "100" +) + +// Defines values for CreateFileImportAccountResponseType. +const ( + Offline CreateFileImportAccountResponseType = "offline" + Online CreateFileImportAccountResponseType = "online" +) + +// Defines values for GetCommunicationWaysParamsType. +const ( + GetCommunicationWaysParamsTypeEMAIL GetCommunicationWaysParamsType = "EMAIL" + GetCommunicationWaysParamsTypeMOBILE GetCommunicationWaysParamsType = "MOBILE" + GetCommunicationWaysParamsTypePHONE GetCommunicationWaysParamsType = "PHONE" + GetCommunicationWaysParamsTypeWEB GetCommunicationWaysParamsType = "WEB" +) + +// Defines values for GetCommunicationWaysParamsMain. +const ( + GetCommunicationWaysParamsMainN0 GetCommunicationWaysParamsMain = "0" + GetCommunicationWaysParamsMainN1 GetCommunicationWaysParamsMain = "1" +) + +// Defines values for GetContactsParamsDepth. +const ( + N0 GetContactsParamsDepth = "0" + N1 GetContactsParamsDepth = "1" +) + +// Defines values for GetCreditNotesParamsStatus. +const ( + GetCreditNotesParamsStatusN100 GetCreditNotesParamsStatus = "100" + GetCreditNotesParamsStatusN1000 GetCreditNotesParamsStatus = "1000" + GetCreditNotesParamsStatusN200 GetCreditNotesParamsStatus = "200" + GetCreditNotesParamsStatusN300 GetCreditNotesParamsStatus = "300" + GetCreditNotesParamsStatusN500 GetCreditNotesParamsStatus = "500" + GetCreditNotesParamsStatusN750 GetCreditNotesParamsStatus = "750" +) + +// Defines values for BookCreditNoteJSONBodyType. +const ( + BookCreditNoteJSONBodyTypeCB BookCreditNoteJSONBodyType = "CB" + BookCreditNoteJSONBodyTypeCF BookCreditNoteJSONBodyType = "CF" + BookCreditNoteJSONBodyTypeFULLPAYMENT BookCreditNoteJSONBodyType = "FULL_PAYMENT" + BookCreditNoteJSONBodyTypeMTC BookCreditNoteJSONBodyType = "MTC" + BookCreditNoteJSONBodyTypeN BookCreditNoteJSONBodyType = "N" + BookCreditNoteJSONBodyTypeO BookCreditNoteJSONBodyType = "O" + BookCreditNoteJSONBodyTypeOF BookCreditNoteJSONBodyType = "OF" +) + +// Defines values for CreditNoteSendByJSONBodySendType. +const ( + CreditNoteSendByJSONBodySendTypeVM CreditNoteSendByJSONBodySendType = "VM" + CreditNoteSendByJSONBodySendTypeVP CreditNoteSendByJSONBodySendType = "VP" + CreditNoteSendByJSONBodySendTypeVPDF CreditNoteSendByJSONBodySendType = "VPDF" + CreditNoteSendByJSONBodySendTypeVPR CreditNoteSendByJSONBodySendType = "VPR" +) + +// Defines values for GetTemplatesParamsType. +const ( + GetTemplatesParamsTypeContractnote GetTemplatesParamsType = "Contractnote" + GetTemplatesParamsTypeCreditnote GetTemplatesParamsType = "Creditnote" + GetTemplatesParamsTypeInvoice GetTemplatesParamsType = "Invoice" + GetTemplatesParamsTypeInvoicereminder GetTemplatesParamsType = "invoicereminder" + GetTemplatesParamsTypeLetter GetTemplatesParamsType = "Letter" + GetTemplatesParamsTypeOrder GetTemplatesParamsType = "Order" + GetTemplatesParamsTypePackinglist GetTemplatesParamsType = "Packinglist" +) + +// Defines values for GetInvoicesParamsStatus. +const ( + GetInvoicesParamsStatusN100 GetInvoicesParamsStatus = 100 + GetInvoicesParamsStatusN1000 GetInvoicesParamsStatus = 1000 + GetInvoicesParamsStatusN200 GetInvoicesParamsStatus = 200 +) + +// Defines values for BookInvoiceJSONBodyType. +const ( + BookInvoiceJSONBodyTypeCB BookInvoiceJSONBodyType = "CB" + BookInvoiceJSONBodyTypeCF BookInvoiceJSONBodyType = "CF" + BookInvoiceJSONBodyTypeFULLPAYMENT BookInvoiceJSONBodyType = "FULL_PAYMENT" + BookInvoiceJSONBodyTypeMTC BookInvoiceJSONBodyType = "MTC" + BookInvoiceJSONBodyTypeN BookInvoiceJSONBodyType = "N" + BookInvoiceJSONBodyTypeO BookInvoiceJSONBodyType = "O" + BookInvoiceJSONBodyTypeOF BookInvoiceJSONBodyType = "OF" +) + +// Defines values for InvoiceSendByJSONBodySendType. +const ( + InvoiceSendByJSONBodySendTypeVM InvoiceSendByJSONBodySendType = "VM" + InvoiceSendByJSONBodySendTypeVP InvoiceSendByJSONBodySendType = "VP" + InvoiceSendByJSONBodySendTypeVPDF InvoiceSendByJSONBodySendType = "VPDF" + InvoiceSendByJSONBodySendTypeVPR InvoiceSendByJSONBodySendType = "VPR" +) + +// Defines values for GetOrdersParamsStatus. +const ( + GetOrdersParamsStatusN100 GetOrdersParamsStatus = 100 + GetOrdersParamsStatusN1000 GetOrdersParamsStatus = 1000 + GetOrdersParamsStatusN200 GetOrdersParamsStatus = 200 + GetOrdersParamsStatusN300 GetOrdersParamsStatus = 300 + GetOrdersParamsStatusN500 GetOrdersParamsStatus = 500 + GetOrdersParamsStatusN750 GetOrdersParamsStatus = 750 +) + +// Defines values for OrderSendByJSONBodySendType. +const ( + VM OrderSendByJSONBodySendType = "VM" + VP OrderSendByJSONBodySendType = "VP" + VPDF OrderSendByJSONBodySendType = "VPDF" + VPR OrderSendByJSONBodySendType = "VPR" +) + +// Defines values for ReportOrderParamsSevQueryFilterOrderType. +const ( + ReportOrderParamsSevQueryFilterOrderTypeAB ReportOrderParamsSevQueryFilterOrderType = "AB" + ReportOrderParamsSevQueryFilterOrderTypeAN ReportOrderParamsSevQueryFilterOrderType = "AN" + ReportOrderParamsSevQueryFilterOrderTypeLI ReportOrderParamsSevQueryFilterOrderType = "LI" +) + +// Defines values for CreateTagJSONBodyObjectObjectName. +const ( + CreateTagJSONBodyObjectObjectNameCreditNote CreateTagJSONBodyObjectObjectName = "CreditNote" + CreateTagJSONBodyObjectObjectNameInvoice CreateTagJSONBodyObjectObjectName = "Invoice" + CreateTagJSONBodyObjectObjectNameOrder CreateTagJSONBodyObjectObjectName = "Order" + CreateTagJSONBodyObjectObjectNameVoucher CreateTagJSONBodyObjectObjectName = "Voucher" +) + +// Defines values for GetPlaceholderParamsObjectName. +const ( + GetPlaceholderParamsObjectNameContact GetPlaceholderParamsObjectName = "Contact" + GetPlaceholderParamsObjectNameCreditNote GetPlaceholderParamsObjectName = "CreditNote" + GetPlaceholderParamsObjectNameEmail GetPlaceholderParamsObjectName = "Email" + GetPlaceholderParamsObjectNameInvoice GetPlaceholderParamsObjectName = "Invoice" + GetPlaceholderParamsObjectNameLetter GetPlaceholderParamsObjectName = "Letter" + GetPlaceholderParamsObjectNameOrder GetPlaceholderParamsObjectName = "Order" +) + +// Defines values for GetPlaceholderParamsSubObjectName. +const ( + Contact GetPlaceholderParamsSubObjectName = "Contact" + CreditNote GetPlaceholderParamsSubObjectName = "CreditNote" + Invoice GetPlaceholderParamsSubObjectName = "Invoice" + Letter GetPlaceholderParamsSubObjectName = "Letter" + Order GetPlaceholderParamsSubObjectName = "Order" +) + +// Defines values for GetVouchersParamsStatus. +const ( + GetVouchersParamsStatusN100 GetVouchersParamsStatus = 100 + GetVouchersParamsStatusN1000 GetVouchersParamsStatus = 1000 + GetVouchersParamsStatusN50 GetVouchersParamsStatus = 50 +) + +// Defines values for GetVouchersParamsCreditDebit. +const ( + GetVouchersParamsCreditDebitC GetVouchersParamsCreditDebit = "C" + GetVouchersParamsCreditDebitD GetVouchersParamsCreditDebit = "D" +) + +// Defines values for BookVoucherJSONBodyType. +const ( + CB BookVoucherJSONBodyType = "CB" + CF BookVoucherJSONBodyType = "CF" + FULLPAYMENT BookVoucherJSONBodyType = "FULL_PAYMENT" + MTC BookVoucherJSONBodyType = "MTC" + N BookVoucherJSONBodyType = "N" + O BookVoucherJSONBodyType = "O" + OF BookVoucherJSONBodyType = "OF" +) + +// ModelAccountingContact Accounting contact model +type ModelAccountingContact struct { + // Contact The contact to which this accounting contact belongs. + Contact struct { + // Id Unique identifier of the contact + Id int `json:"id"` + + // ObjectName Model name, which is 'Contact' + ObjectName string `json:"objectName"` + } `json:"contact"` + + // CreditorNumber Creditor number of the accounting contact. + CreditorNumber *int `json:"creditorNumber"` + + // DebitorNumber Debitor number of the accounting contact. + DebitorNumber *int `json:"debitorNumber"` +} + +// ModelAccountingContactResponse Accounting contact model +type ModelAccountingContactResponse struct { + // Contact The contact to which this accounting contact belongs. + Contact *struct { + // Id Unique identifier of the contact + Id string `json:"id"` + + // ObjectName Model name, which is 'Contact' + ObjectName string `json:"objectName"` + } `json:"contact,omitempty"` + + // Create Date of accounting contact creation + Create *time.Time `json:"create,omitempty"` + + // CreditorNumber Creditor number of the accounting contact. + CreditorNumber *string `json:"creditorNumber,omitempty"` + + // DebitorNumber Debitor number of the accounting contact. + DebitorNumber *string `json:"debitorNumber,omitempty"` + + // Id The accounting contact id + Id *string `json:"id,omitempty"` + + // ObjectName The accounting contact object name + ObjectName *string `json:"objectName,omitempty"` + + // SevClient Client to which accounting contact belongs. Will be filled automatically + SevClient *struct { + // Id Unique identifier of the client + Id string `json:"id"` + + // ObjectName Model name, which is 'SevClient' + ObjectName string `json:"objectName"` + } `json:"sevClient,omitempty"` + + // Update Date of last accounting contact update + Update *time.Time `json:"update,omitempty"` +} + +// ModelAccountingContactUpdate Accounting contact model +type ModelAccountingContactUpdate struct { + // Contact The contact to which this accounting contact belongs. + Contact *struct { + // Id Unique identifier of the contact + Id int `json:"id"` + + // ObjectName Model name, which is 'Contact' + ObjectName string `json:"objectName"` + } `json:"contact"` + + // CreditorNumber Creditor number of the accounting contact. + CreditorNumber *int `json:"creditorNumber"` + + // DebitorNumber Debitor number of the accounting contact. + DebitorNumber *int `json:"debitorNumber"` +} + +// ModelChangeLayout Layout model +type ModelChangeLayout struct { + // Key the type to be changed + Key ModelChangeLayoutKey `json:"key"` + + // Value the id/value of the template/letterpaper/language/payPal. + Value string `json:"value"` +} + +// ModelChangeLayoutKey the type to be changed +type ModelChangeLayoutKey string + +// ModelChangeLayoutResponse Layout model +type ModelChangeLayoutResponse struct { + Metadaten *struct { + // DocId the id of the document + DocId *string `json:"docId,omitempty"` + + // Pages the number of pages in the document + Pages *int `json:"pages,omitempty"` + + // Thumbs the pdf file + Thumbs *[]struct { + Key *string `json:"key,omitempty"` + Name *string `json:"name,omitempty"` + Values *[]struct { + Name *string `json:"name,omitempty"` + TranslationCode *string `json:"translationCode,omitempty"` + Value *string `json:"value,omitempty"` + } `json:"values,omitempty"` + } `json:"thumbs,omitempty"` + } `json:"metadaten,omitempty"` + Result *string `json:"result,omitempty"` +} + +// ModelCheckAccount CheckAccount model. Responsible for the payment accounts. +type ModelCheckAccount struct { + // AccountingNumber The booking account used for this bank account, e.g. 1800 in SKR04 and 1200 in SKR03. Must be unique among all your CheckAccounts. Ignore to use a sensible default. + AccountingNumber *string `json:"accountingNumber,omitempty"` + + // AutoMapTransactions Defines if transactions on this account are automatically mapped to invoice and vouchers when imported if possible. + AutoMapTransactions *int `json:"autoMapTransactions"` + + // BankServer Bank server of check account + BankServer *string `json:"bankServer,omitempty"` + + // Create Date of check account creation + Create *time.Time `json:"create,omitempty"` + + // Currency The currency of the check account. + Currency string `json:"currency"` + + // DefaultAccount Defines if this check account is the default account. + DefaultAccount *ModelCheckAccountDefaultAccount `json:"defaultAccount,omitempty"` + + // Id The check account id + Id *int `json:"id,omitempty"` + + // ImportType Import type. Transactions can be imported by this method on the check account. + ImportType *ModelCheckAccountImportType `json:"importType"` + + // Name Name of the check account + Name string `json:"name"` + + // ObjectName The check account object name + ObjectName *string `json:"objectName,omitempty"` + + // SevClient Client to which check account belongs. Will be filled automatically + SevClient *struct { + // Id Unique identifier of the client + Id int `json:"id"` + + // ObjectName Model name, which is 'SevClient' + ObjectName string `json:"objectName"` + } `json:"sevClient,omitempty"` + + // Status Status of the check account. 0 <-> Archived - 100 <-> Active + Status ModelCheckAccountStatus `json:"status"` + + // Type The type of the check account. Account with a CSV or MT940 import are regarded as online.
+ // Apart from that, created check accounts over the API need to be offline, as online accounts with an active connection + // to a bank application can not be managed over the API. + Type ModelCheckAccountType `json:"type"` + + // Update Date of last check account update + Update *time.Time `json:"update,omitempty"` +} + +// ModelCheckAccountDefaultAccount Defines if this check account is the default account. +type ModelCheckAccountDefaultAccount int + +// ModelCheckAccountImportType Import type. Transactions can be imported by this method on the check account. +type ModelCheckAccountImportType string + +// ModelCheckAccountStatus Status of the check account. 0 <-> Archived - 100 <-> Active +type ModelCheckAccountStatus int + +// ModelCheckAccountType The type of the check account. Account with a CSV or MT940 import are regarded as online.
+// +// Apart from that, created check accounts over the API need to be offline, as online accounts with an active connection +// to a bank application can not be managed over the API. +type ModelCheckAccountType string + +// ModelCheckAccountResponse CheckAccount model. Responsible for the payment accounts. +type ModelCheckAccountResponse struct { + // AccountingNumber The booking account used for this bank account, e.g. 1800 in SKR04 and 1200 in SKR03. Must be unique among all your CheckAccounts. Ignore to use a sensible default. + AccountingNumber *string `json:"accountingNumber,omitempty"` + + // AutoMapTransactions Defines if transactions on this account are automatically mapped to invoice and vouchers when imported if possible. + AutoMapTransactions *string `json:"autoMapTransactions"` + + // BankServer Bank server of check account, only set if the account is connected to a data provider + BankServer *string `json:"bankServer"` + + // Create Date of check account creation + Create *time.Time `json:"create,omitempty"` + + // Currency The currency of the check account. + Currency *string `json:"currency,omitempty"` + + // DefaultAccount Defines if this check account is the default account. + DefaultAccount *string `json:"defaultAccount,omitempty"` + + // Iban The IBAN of the account + Iban *string `json:"iban"` + + // Id The check account id + Id *string `json:"id,omitempty"` + + // ImportType Import type, for accounts that are type "online" but not connected to a data provider. Transactions can be imported by this method on the check account. + ImportType *ModelCheckAccountResponseImportType `json:"importType"` + + // Name Name of the check account + Name *string `json:"name,omitempty"` + + // ObjectName The check account object name + ObjectName *string `json:"objectName,omitempty"` + + // SevClient Client to which check account belongs. Will be filled automatically + SevClient *struct { + // Id Unique identifier of the client + Id string `json:"id"` + + // ObjectName Model name, which is 'SevClient' + ObjectName string `json:"objectName"` + } `json:"sevClient,omitempty"` + + // Status Status of the check account. 0 <-> Archived - 100 <-> Active + Status *ModelCheckAccountResponseStatus `json:"status,omitempty"` + + // Type The type of the check account. Account with a CSV or MT940 import are regarded as online.
+ // Apart from that, created check accounts over the API need to be offline, as online accounts with an active connection + // to a bank application can not be managed over the API. + Type *ModelCheckAccountResponseType `json:"type,omitempty"` + + // Update Date of last check account update + Update *time.Time `json:"update,omitempty"` +} + +// ModelCheckAccountResponseImportType Import type, for accounts that are type "online" but not connected to a data provider. Transactions can be imported by this method on the check account. +type ModelCheckAccountResponseImportType string + +// ModelCheckAccountResponseStatus Status of the check account. 0 <-> Archived - 100 <-> Active +type ModelCheckAccountResponseStatus string + +// ModelCheckAccountResponseType The type of the check account. Account with a CSV or MT940 import are regarded as online.
+// +// Apart from that, created check accounts over the API need to be offline, as online accounts with an active connection +// to a bank application can not be managed over the API. +type ModelCheckAccountResponseType string + +// ModelCheckAccountTransaction CheckAccountTransaction model. Responsible for the transactions on payment accounts. +type ModelCheckAccountTransaction struct { + // Amount Amount of the transaction + Amount float32 `json:"amount"` + + // CheckAccount The check account to which the transaction belongs + CheckAccount struct { + // Id Unique identifier of the check account + Id int `json:"id"` + + // ObjectName Model name, which is 'CheckAccount' + ObjectName string `json:"objectName"` + } `json:"checkAccount"` + + // Create Date of check account transaction creation + Create *time.Time `json:"create,omitempty"` + + // EntryDate Date the check account transaction was imported + EntryDate *time.Time `json:"entryDate"` + + // Id The check account transaction id + Id *int `json:"id,omitempty"` + + // ObjectName The check account transaction object name + ObjectName *string `json:"objectName,omitempty"` + + // PayeePayerAcctNo IBAN or account number of the other party + PayeePayerAcctNo *string `json:"payeePayerAcctNo"` + + // PayeePayerBankCode BIC or bank code of the other party + PayeePayerBankCode *string `json:"payeePayerBankCode"` + + // PayeePayerName Name of the other party + PayeePayerName *string `json:"payeePayerName"` + + // PaymtPurpose The purpose of the transaction + PaymtPurpose *string `json:"paymtPurpose"` + + // SevClient Client to which check account transaction belongs. Will be filled automatically + SevClient *struct { + // Id Unique identifier of the client + Id int `json:"id"` + + // ObjectName Model name, which is 'SevClient' + ObjectName string `json:"objectName"` + } `json:"sevClient,omitempty"` + + // SourceTransaction The check account transaction serving as the source of the rebooking + SourceTransaction *struct { + // Id Unique identifier of the check account transaction + Id int `json:"id"` + + // ObjectName Model name, which is 'CheckAccountTransaction' + ObjectName string `json:"objectName"` + } `json:"sourceTransaction"` + + // Status Status of the check account transaction.
+ // 100 <-> Created
+ // 200 <-> Linked
+ // 300 <-> Private
+ // 400 <-> Booked + Status ModelCheckAccountTransactionStatus `json:"status"` + + // TargetTransaction The check account transaction serving as the target of the rebooking + TargetTransaction *struct { + // Id Unique identifier of the check account transaction + Id int `json:"id"` + + // ObjectName Model name, which is 'CheckAccountTransaction' + ObjectName string `json:"objectName"` + } `json:"targetTransaction"` + + // Update Date of last check account transaction update + Update *time.Time `json:"update,omitempty"` + + // ValueDate Date the check account transaction was booked + ValueDate time.Time `json:"valueDate"` +} + +// ModelCheckAccountTransactionStatus Status of the check account transaction.
+// +// 100 <-> Created
+// 200 <-> Linked
+// 300 <-> Private
+// 400 <-> Booked +type ModelCheckAccountTransactionStatus int + +// ModelCheckAccountTransactionResponse CheckAccountTransaction model. Responsible for the transactions on payment accounts. +type ModelCheckAccountTransactionResponse struct { + // Amount Amount of the transaction + Amount *string `json:"amount,omitempty"` + + // CheckAccount The check account to which the transaction belongs + CheckAccount *struct { + // Id Unique identifier of the check account + Id string `json:"id"` + + // ObjectName Model name, which is 'CheckAccount' + ObjectName string `json:"objectName"` + } `json:"checkAccount,omitempty"` + + // Create Date of check account transaction creation + Create *time.Time `json:"create,omitempty"` + + // Enshrined Can only be set via [CheckAccountTransaction/{checkAccountTransactionId}/enshrine](#tag/CheckAccountTransaction/operation/checkAccountTransactionEnshrine) + Enshrined *time.Time `json:"enshrined,omitempty"` + + // EntryDate Date the check account transaction was booked + EntryDate *time.Time `json:"entryDate"` + + // Id The check account transaction id + Id *string `json:"id,omitempty"` + + // ObjectName The check account transaction object name + ObjectName *string `json:"objectName,omitempty"` + + // PayeePayerAcctNo IBAN or account number of the other party + PayeePayerAcctNo *string `json:"payeePayerAcctNo"` + + // PayeePayerBankCode BIC or bank code of the other party + PayeePayerBankCode *string `json:"payeePayerBankCode"` + + // PayeePayerName Name of the other party + PayeePayerName *string `json:"payeePayerName"` + + // PaymtPurpose The purpose of the transaction + PaymtPurpose *string `json:"paymtPurpose"` + + // SevClient Client to which check account transaction belongs. Will be filled automatically + SevClient *struct { + // Id Unique identifier of the client + Id string `json:"id"` + + // ObjectName Model name, which is 'SevClient' + ObjectName string `json:"objectName"` + } `json:"sevClient,omitempty"` + + // SourceTransaction The check account transaction serving as the source of the rebooking + SourceTransaction *struct { + // Id Unique identifier of the check account transaction + Id string `json:"id"` + + // ObjectName Model name, which is 'CheckAccountTransaction' + ObjectName string `json:"objectName"` + } `json:"sourceTransaction,omitempty"` + + // Status Status of the check account transaction.
+ // 100 <-> Created
+ // 200 <-> Linked
+ // 300 <-> Private
+ // 400 <-> Booked + Status *ModelCheckAccountTransactionResponseStatus `json:"status,omitempty"` + + // TargetTransaction The check account transaction serving as the target of the rebooking + TargetTransaction *struct { + // Id Unique identifier of the check account transaction + Id string `json:"id"` + + // ObjectName Model name, which is 'CheckAccountTransaction' + ObjectName string `json:"objectName"` + } `json:"targetTransaction,omitempty"` + + // Update Date of last check account transaction update + Update *time.Time `json:"update,omitempty"` + + // ValueDate Date the check account transaction was imported + ValueDate *time.Time `json:"valueDate,omitempty"` +} + +// ModelCheckAccountTransactionResponseStatus Status of the check account transaction.
+// +// 100 <-> Created
+// 200 <-> Linked
+// 300 <-> Private
+// 400 <-> Booked +type ModelCheckAccountTransactionResponseStatus string + +// ModelCheckAccountTransactionUpdate CheckAccountTransaction model. Responsible for the transactions on payment accounts. +type ModelCheckAccountTransactionUpdate struct { + // Amount Amount of the transaction + Amount *float32 `json:"amount"` + + // CheckAccount The check account to which the transaction belongs + CheckAccount *struct { + // Id Unique identifier of the check account + Id int `json:"id"` + + // ObjectName Model name, which is 'CheckAccount' + ObjectName string `json:"objectName"` + } `json:"checkAccount,omitempty"` + + // EntryDate Date the check account transaction was imported + EntryDate *time.Time `json:"entryDate"` + + // PayeePayerName Name of the payee/payer + PayeePayerName *string `json:"payeePayerName"` + + // PaymtPurpose the purpose of the transaction + PaymtPurpose *string `json:"paymtPurpose,omitempty"` + + // SourceTransaction The check account transaction serving as the source of the rebooking + SourceTransaction *struct { + // Id Unique identifier of the check account transaction + Id int `json:"id"` + + // ObjectName Model name, which is 'CheckAccountTransaction' + ObjectName string `json:"objectName"` + } `json:"sourceTransaction"` + + // Status Status of the check account transaction.
+ // 100 <-> Created
+ // 200 <-> Linked
+ // 300 <-> Private
+ // 400 <-> Booked + Status *ModelCheckAccountTransactionUpdateStatus `json:"status,omitempty"` + + // TargetTransaction The check account transaction serving as the target of the rebooking + TargetTransaction *struct { + // Id Unique identifier of the check account transaction + Id int `json:"id"` + + // ObjectName Model name, which is 'CheckAccountTransaction' + ObjectName string `json:"objectName"` + } `json:"targetTransaction"` + + // ValueDate Date the check account transaction was booked + ValueDate *time.Time `json:"valueDate,omitempty"` +} + +// ModelCheckAccountTransactionUpdateStatus Status of the check account transaction.
+// +// 100 <-> Created
+// 200 <-> Linked
+// 300 <-> Private
+// 400 <-> Booked +type ModelCheckAccountTransactionUpdateStatus int + +// ModelCheckAccountUpdate CheckAccount model. Responsible for the payment accounts. +type ModelCheckAccountUpdate struct { + // AccountingNumber The booking account used for this bank account, e.g. 1800 in SKR04 and 1200 in SKR03. Must be unique among all your CheckAccounts. Ignore to use a sensible default. + AccountingNumber *string `json:"accountingNumber,omitempty"` + + // AutoMapTransactions Defines if transactions on this account are automatically mapped to invoice and vouchers when imported if possible. + AutoMapTransactions *int `json:"autoMapTransactions"` + + // Currency The currency of the check account. + Currency *string `json:"currency,omitempty"` + + // DefaultAccount Defines if this check account is the default account. + DefaultAccount *ModelCheckAccountUpdateDefaultAccount `json:"defaultAccount,omitempty"` + + // ImportType Import type. Transactions can be imported by this method on the check account. + ImportType *ModelCheckAccountUpdateImportType `json:"importType"` + + // Name Name of the check account + Name *string `json:"name,omitempty"` + + // Status Status of the check account. 0 <-> Archived - 100 <-> Active + Status *ModelCheckAccountUpdateStatus `json:"status,omitempty"` + + // Type The type of the check account. Account with a CSV or MT940 import are regarded as online.
+ // Apart from that, created check accounts over the API need to be offline, as online accounts with an active connection + // to a bank application can not be managed over the API. + Type *ModelCheckAccountUpdateType `json:"type,omitempty"` +} + +// ModelCheckAccountUpdateDefaultAccount Defines if this check account is the default account. +type ModelCheckAccountUpdateDefaultAccount int + +// ModelCheckAccountUpdateImportType Import type. Transactions can be imported by this method on the check account. +type ModelCheckAccountUpdateImportType string + +// ModelCheckAccountUpdateStatus Status of the check account. 0 <-> Archived - 100 <-> Active +type ModelCheckAccountUpdateStatus int + +// ModelCheckAccountUpdateType The type of the check account. Account with a CSV or MT940 import are regarded as online.
+// +// Apart from that, created check accounts over the API need to be offline, as online accounts with an active connection +// to a bank application can not be managed over the API. +type ModelCheckAccountUpdateType string + +// ModelCommunicationWay Contact communication way model +type ModelCommunicationWay struct { + // Contact The contact to which this communication way belongs. + Contact *struct { + // Id Unique identifier of the contact + Id int `json:"id"` + + // ObjectName Model name, which is 'Contact' + ObjectName string `json:"objectName"` + } `json:"contact,omitempty"` + + // Create Date of communication way creation + Create *time.Time `json:"create,omitempty"` + + // Id The communication way id + Id *int `json:"id,omitempty"` + + // Key The key of the communication way.
+ // Similar to the category of addresses.
+ // For all communication way keys please send a GET to /CommunicationWayKey. + Key struct { + // Id Unique identifier of the key + Id int `json:"id"` + + // ObjectName Model name, which is 'CommunicationWayKey' + ObjectName string `json:"objectName"` + } `json:"key"` + + // Main Defines whether the communication way is the main communication way for the contact. + Main *bool `json:"main"` + + // ObjectName The communication way object name + ObjectName *string `json:"objectName,omitempty"` + + // SevClient Client to which communication way key belongs. Will be filled automatically + SevClient *struct { + // Id Unique identifier of the client + Id int `json:"id"` + + // ObjectName Model name, which is 'SevClient' + ObjectName string `json:"objectName"` + } `json:"sevClient,omitempty"` + + // Type Type of the communication way + Type ModelCommunicationWayType `json:"type"` + + // Update Date of last communication way update + Update *time.Time `json:"update,omitempty"` + + // Value The value of the communication way.
+ // For example the phone number, e-mail address or website. + Value string `json:"value"` +} + +// ModelCommunicationWayType Type of the communication way +type ModelCommunicationWayType string + +// ModelCommunicationWayResponse Contact communication way model +type ModelCommunicationWayResponse struct { + // Contact The contact to which this communication way belongs. + Contact *struct { + // Id Unique identifier of the contact + Id string `json:"id"` + + // ObjectName Model name, which is 'Contact' + ObjectName string `json:"objectName"` + } `json:"contact,omitempty"` + + // Create Date of communication way creation + Create *time.Time `json:"create,omitempty"` + + // Id The communication way id + Id *string `json:"id,omitempty"` + + // Key The key of the communication way.
+ // Similar to the category of addresses.
+ // For all communication way keys please send a GET to /CommunicationWayKey. + Key *struct { + // Id Unique identifier of the key + Id string `json:"id"` + + // ObjectName Model name, which is 'CommunicationWayKey' + ObjectName string `json:"objectName"` + } `json:"key,omitempty"` + + // Main Defines whether the communication way is the main communication way for the contact. + Main *string `json:"main,omitempty"` + + // ObjectName The communication way object name + ObjectName *string `json:"objectName,omitempty"` + + // SevClient Client to which communication way key belongs. Will be filled automatically + SevClient *struct { + // Id Unique identifier of the client + Id string `json:"id"` + + // ObjectName Model name, which is 'SevClient' + ObjectName string `json:"objectName"` + } `json:"sevClient,omitempty"` + + // Type Type of the communication way + Type *ModelCommunicationWayResponseType `json:"type,omitempty"` + + // Update Date of last communication way update + Update *time.Time `json:"update,omitempty"` + + // Value The value of the communication way.
+ // For example the phone number, e-mail address or website. + Value *string `json:"value,omitempty"` +} + +// ModelCommunicationWayResponseType Type of the communication way +type ModelCommunicationWayResponseType string + +// ModelCommunicationWayUpdate Contact communication way model +type ModelCommunicationWayUpdate struct { + // Contact The contact to which this communication way belongs. + Contact *struct { + // Id Unique identifier of the contact + Id int `json:"id"` + + // ObjectName Model name, which is 'Contact' + ObjectName string `json:"objectName"` + } `json:"contact"` + + // Key The key of the communication way.
+ // Similar to the category of addresses.
+ // For all communication way keys please send a GET to /CommunicationWayKey. + Key *struct { + // Id Unique identifier of the key + Id int `json:"id"` + + // ObjectName Model name, which is 'CommunicationWayKey' + ObjectName string `json:"objectName"` + } `json:"key"` + + // Main Defines whether the communication way is the main communication way for the contact. + Main *bool `json:"main"` + + // Type Type of the communication way + Type *ModelCommunicationWayUpdateType `json:"type,omitempty"` + + // Value The value of the communication way.
+ // For example the phone number, e-mail address or website. + Value *string `json:"value,omitempty"` +} + +// ModelCommunicationWayUpdateType Type of the communication way +type ModelCommunicationWayUpdateType string + +// ModelContact Contact model +type ModelContact struct { + // AcademicTitle A academic title for the contact. + // Not to be used for organizations. + AcademicTitle *string `json:"academicTitle"` + + // BankAccount Bank account number (IBAN) of the contact. + BankAccount *string `json:"bankAccount"` + + // BankNumber Bank number of the bank used by the contact. + BankNumber *string `json:"bankNumber"` + + // Birthday Birthday of the contact.
+ // Not to be used for organizations. + Birthday *openapi_types.Date `json:"birthday"` + + // BuyerReference Buyer reference of the contact. + BuyerReference *string `json:"buyerReference"` + + // Category Category of the contact.
For more information, + // see here. + Category struct { + // Id Unique identifier of the category + Id int `json:"id"` + + // ObjectName Model name, which is 'Category' + ObjectName string `json:"objectName"` + } `json:"category"` + + // CustomerNumber The customer number + CustomerNumber *string `json:"customerNumber"` + + // DefaultCashbackPercent Percentage of the invoice sum the contact gets back if he paid invoices in time. + DefaultCashbackPercent *float32 `json:"defaultCashbackPercent"` + + // DefaultCashbackTime Absolute time in days which the contact has to pay his invoices and subsequently get a cashback. + DefaultCashbackTime *int `json:"defaultCashbackTime"` + + // DefaultDiscountAmount The default discount the contact gets for every invoice.
+ // Depending on defaultDiscountPercentage attribute, in percent or absolute value. + DefaultDiscountAmount *float32 `json:"defaultDiscountAmount"` + + // DefaultDiscountPercentage Defines if the discount is a percentage (true) or an absolute value (false). + DefaultDiscountPercentage *bool `json:"defaultDiscountPercentage"` + + // DefaultTimeToPay The payment goal in days which is set for every invoice of the contact. + DefaultTimeToPay *int `json:"defaultTimeToPay"` + + // Description A description for the contact. + Description *string `json:"description"` + + // ExemptVat Defines if the contact is freed from paying vat. + ExemptVat *bool `json:"exemptVat"` + + // Familyname The last name of the contact.
+ // Not to be used for organizations. + Familyname *string `json:"familyname"` + + // Gender Gender of the contact.
+ // Not to be used for organizations. + Gender *string `json:"gender"` + + // GovernmentAgency Defines whether the contact is a government agency (true) or not (false). + GovernmentAgency *bool `json:"governmentAgency"` + + // Name The organization name.
+ // Be aware that the type of contact will depend on this attribute.
+ // If it holds a value, the contact will be regarded as an organization. + Name *string `json:"name"` + + // Name2 Second name of the contact.
+ // Not to be used for organizations. + Name2 *string `json:"name2"` + + // Parent The parent contact to which this contact belongs. Must be an organization. + Parent *struct { + // Id Unique identifier of the parent contact + Id int `json:"id"` + + // ObjectName Model name, which is 'Contact' + ObjectName string `json:"objectName"` + } `json:"parent"` + + // Status Defines the status of the contact. 100 <-> Lead - 500 <-> Pending - 1000 <-> Active. + Status *int `json:"status"` + + // Surename The first name of the contact.
+ // Yeah... not quite right in literally every way. We know.
+ // Not to be used for organizations. + Surename *string `json:"surename"` + + // TaxNumber The tax number of the contact. + TaxNumber *string `json:"taxNumber"` + + // TaxOffice The tax office of the contact (only for greek customers). + TaxOffice *string `json:"taxOffice"` + + // Titel A non-academic title for the contact. + // Not to be used for organizations. + Titel *string `json:"titel"` + + // VatNumber Vat number of the contact. + VatNumber *string `json:"vatNumber"` +} + +// ModelContactAddress ContactAddress model +type ModelContactAddress struct { + // Category Category of the contact address.
+ // For all categories, send a GET to /Category?objectType=ContactAddress. + Category *struct { + // Id Unique identifier of the category + Id int `json:"id"` + + // ObjectName Model name, which is 'Category' + ObjectName string `json:"objectName"` + } `json:"category"` + + // City City name + City *string `json:"city"` + + // Contact The contact to which this contact address belongs. + Contact struct { + // Id Unique identifier of the contact + Id int `json:"id"` + + // ObjectName Model name, which is 'Contact' + ObjectName string `json:"objectName"` + } `json:"contact"` + + // Country Country of the contact address.
+ // For all countries, send a GET to /StaticCountry + Country struct { + // Id Unique identifier of the country + Id int `json:"id"` + + // ObjectName Model name, which is 'StaticCountry' + ObjectName string `json:"objectName"` + } `json:"country"` + + // Create Date of contact address creation + Create *time.Time `json:"create,omitempty"` + + // Id The contact address id + Id *int `json:"id,omitempty"` + + // Name Name in address + Name *string `json:"name"` + + // Name2 Second name in address + Name2 *string `json:"name2,omitempty"` + + // Name3 Third name in address + Name3 *string `json:"name3"` + + // Name4 Fourth name in address + Name4 *string `json:"name4"` + + // ObjectName The contact address object name + ObjectName *string `json:"objectName,omitempty"` + + // SevClient Client to which contact address belongs. Will be filled automatically + SevClient *struct { + // Id Unique identifier of the client + Id int `json:"id"` + + // ObjectName Model name, which is 'SevClient' + ObjectName string `json:"objectName"` + } `json:"sevClient,omitempty"` + + // Street Street name + Street *string `json:"street"` + + // Update Date of last contact address update + Update *time.Time `json:"update,omitempty"` + + // Zip Zib code + Zip *string `json:"zip"` +} + +// ModelContactAddressResponse ContactAddress model +type ModelContactAddressResponse struct { + // Category Category of the contact address.
+ // For all categories, send a GET to /Category?objectType=ContactAddress. + Category *struct { + // Id Unique identifier of the category + Id int `json:"id"` + + // ObjectName Model name, which is 'Category' + ObjectName string `json:"objectName"` + } `json:"category"` + + // City City name + City *string `json:"city"` + + // Contact The contact to which this contact address belongs. + Contact struct { + // Id Unique identifier of the contact + Id int `json:"id"` + + // ObjectName Model name, which is 'Contact' + ObjectName string `json:"objectName"` + } `json:"contact"` + + // Country Country of the contact address.
+ // For all countries, send a GET to /StaticCountry + Country struct { + // Id Unique identifier of the country + Id int `json:"id"` + + // ObjectName Model name, which is 'StaticCountry' + ObjectName string `json:"objectName"` + } `json:"country"` + + // Create Date of contact address creation + Create *time.Time `json:"create,omitempty"` + + // Id The contact address id + Id *int `json:"id,omitempty"` + + // Name Name in address + Name *string `json:"name"` + + // Name2 Second name in address + Name2 *string `json:"name2,omitempty"` + + // Name3 Third name in address + Name3 *string `json:"name3"` + + // Name4 Fourth name in address + Name4 *string `json:"name4"` + + // ObjectName The contact address object name + ObjectName *string `json:"objectName,omitempty"` + + // SevClient Client to which contact address belongs. Will be filled automatically + SevClient *struct { + // Id Unique identifier of the client + Id int `json:"id"` + + // ObjectName Model name, which is 'SevClient' + ObjectName string `json:"objectName"` + } `json:"sevClient,omitempty"` + + // Street Street name + Street *string `json:"street"` + + // Update Date of last contact address update + Update *time.Time `json:"update,omitempty"` + + // Zip Zib code + Zip *string `json:"zip"` +} + +// ModelContactAddressUpdate ContactAddress model +type ModelContactAddressUpdate struct { + // Category Category of the contact address.
+ // For all categories, send a GET to /Category?objectType=ContactAddress. + Category *struct { + // Id Unique identifier of the category + Id int `json:"id"` + + // ObjectName Model name, which is 'Category' + ObjectName string `json:"objectName"` + } `json:"category"` + + // City City name + City *string `json:"city"` + + // Contact The contact to which this contact address belongs. + Contact *struct { + // Id Unique identifier of the contact + Id int `json:"id"` + + // ObjectName Model name, which is 'Contact' + ObjectName string `json:"objectName"` + } `json:"contact"` + + // Country Country of the contact address.
+ // For all countries, send a GET to /StaticCountry + Country *struct { + // Id Unique identifier of the country + Id int `json:"id"` + + // ObjectName Model name, which is 'StaticCountry' + ObjectName string `json:"objectName"` + } `json:"country"` + + // Name Name in address + Name *string `json:"name"` + + // Name2 Second name in address + Name2 *string `json:"name2,omitempty"` + + // Name3 Third name in address + Name3 *string `json:"name3"` + + // Name4 Fourth name in address + Name4 *string `json:"name4"` + + // Street Street name + Street *string `json:"street"` + + // Zip Zib code + Zip *string `json:"zip"` +} + +// ModelContactCustomField Contact fields model +type ModelContactCustomField struct { + // Contact name of the contact + Contact struct { + // Id Unique identifier of contact + Id int `json:"id"` + + // ObjectName Model name, which is 'Contact' + ObjectName string `json:"objectName"` + } `json:"contact"` + + // ContactCustomFieldSetting name of the contact custom field setting + ContactCustomFieldSetting struct { + // Id Unique identifier of contact custom field setting + Id int `json:"id"` + + // ObjectName Model name, which is 'ContactCustomFieldSetting' + ObjectName string `json:"objectName"` + } `json:"contactCustomFieldSetting"` + + // ObjectName Internal object name which is 'ContactCustomField'. + ObjectName string `json:"objectName"` + + // Value The value of the contact field + Value string `json:"value"` +} + +// ModelContactCustomFieldResponse contact fields model +type ModelContactCustomFieldResponse struct { + // Contact name of the contact + Contact *struct { + // Id Unique identifier of contact + Id string `json:"id"` + + // ObjectName Model name, which is 'Contact' + ObjectName string `json:"objectName"` + } `json:"contact,omitempty"` + + // ContactCustomFieldSetting the contact custom field setting + ContactCustomFieldSetting *ModelContactCustomFieldSettingResponse `json:"contactCustomFieldSetting,omitempty"` + + // Create Date of contact field creation + Create *time.Time `json:"create,omitempty"` + + // Id id of the contact field + Id *string `json:"id,omitempty"` + + // ObjectName Internal object name which is 'ContactCustomField'. + ObjectName *string `json:"objectName,omitempty"` + + // SevClient Client to which contact field belongs. Will be filled automatically + SevClient *struct { + // Id Unique identifier of the client + Id string `json:"id"` + + // ObjectName Model name, which is 'SevClient' + ObjectName string `json:"objectName"` + } `json:"sevClient,omitempty"` + + // Update Date of contact field update + Update *time.Time `json:"update,omitempty"` + + // Value The value of the contact field + Value *string `json:"value,omitempty"` +} + +// ModelContactCustomFieldSetting contact field settings model +type ModelContactCustomFieldSetting struct { + // Description The description of the contact field + Description *string `json:"description,omitempty"` + + // Name name of the contact fields + Name string `json:"name"` + + // ObjectName Internal object name which is 'ContactCustomFieldSetting'. + ObjectName *string `json:"objectName,omitempty"` +} + +// ModelContactCustomFieldSettingResponse contact fields model +type ModelContactCustomFieldSettingResponse struct { + // Create Date of contact field creation + Create *time.Time `json:"create,omitempty"` + + // Description The description of the contact field + Description *string `json:"description,omitempty"` + + // Id Id of the contact field + Id *string `json:"id,omitempty"` + + // Identifier Unique identifier for the contact field + Identifier *string `json:"identifier,omitempty"` + + // Name name of the contact fields + Name *string `json:"name,omitempty"` + + // ObjectName Internal object name which is 'ContactCustomFieldSetting'. + ObjectName *string `json:"objectName,omitempty"` + + // SevClient Client to which invoice belongs. Will be filled automatically + SevClient *struct { + // Id Unique identifier of the client + Id string `json:"id"` + + // ObjectName Model name, which is 'SevClient' + ObjectName string `json:"objectName"` + } `json:"sevClient,omitempty"` + + // Update Date of contact field updated + Update *time.Time `json:"update,omitempty"` +} + +// ModelContactCustomFieldSettingUpdate contact fields model +type ModelContactCustomFieldSettingUpdate struct { + // Description The description of the contact field + Description *string `json:"description,omitempty"` + + // Name name of the contact fields + Name *string `json:"name,omitempty"` + + // ObjectName Internal object name which is 'ContactCustomFieldSetting'. + ObjectName *string `json:"objectName,omitempty"` +} + +// ModelContactCustomFieldUpdate contact fields model +type ModelContactCustomFieldUpdate struct { + // Contact name of the contact + Contact *struct { + // Id Unique identifier of contact + Id int `json:"id"` + + // ObjectName Model name, which is 'Contact' + ObjectName string `json:"objectName"` + } `json:"contact,omitempty"` + + // ContactCustomFieldSetting name of the contact custom field setting + ContactCustomFieldSetting *struct { + // Id Unique identifier of contact custom field setting + Id int `json:"id"` + + // ObjectName Model name, which is 'contactCustomFieldSetting' + ObjectName string `json:"objectName"` + } `json:"contactCustomFieldSetting,omitempty"` + + // ObjectName Internal object name which is 'ContactCustomField'. + ObjectName *string `json:"objectName,omitempty"` + + // Value The value of the contact field + Value *string `json:"value,omitempty"` +} + +// ModelContactResponse Contact model +type ModelContactResponse struct { + // AcademicTitle A academic title for the contact. + // Not to be used for organizations. + AcademicTitle *string `json:"academicTitle,omitempty"` + + // AdditionalInformation Additional information stored for the contact. + // Deprecated: + AdditionalInformation *string `json:"additionalInformation,omitempty"` + + // BankAccount Bank account number (IBAN) of the contact. + BankAccount *string `json:"bankAccount,omitempty"` + + // BankNumber Bank number of the bank used by the contact. + BankNumber *string `json:"bankNumber,omitempty"` + + // Birthday Birthday of the contact.
+ // Not to be used for organizations. + Birthday *openapi_types.Date `json:"birthday,omitempty"` + + // BuyerReference Buyer reference of the contact. + BuyerReference *string `json:"buyerReference,omitempty"` + + // Category Category of the contact.
For more information, + // see here. + Category *struct { + // Id Unique identifier of the category + Id string `json:"id"` + + // ObjectName Model name, which is 'Category' + ObjectName string `json:"objectName"` + } `json:"category,omitempty"` + + // Create Date of contact creation + Create *time.Time `json:"create,omitempty"` + + // CustomerNumber The customer number + CustomerNumber *string `json:"customerNumber,omitempty"` + + // DefaultCashbackPercent Percentage of the invoice sum the contact gets back if he paid invoices in time. + DefaultCashbackPercent *string `json:"defaultCashbackPercent,omitempty"` + + // DefaultCashbackTime Absolute time in days which the contact has to pay his invoices and subsequently get a cashback. + DefaultCashbackTime *string `json:"defaultCashbackTime,omitempty"` + + // DefaultDiscountAmount The default discount the contact gets for every invoice.
+ // Depending on defaultDiscountPercentage attribute, in percent or absolute value. + DefaultDiscountAmount *string `json:"defaultDiscountAmount,omitempty"` + + // DefaultDiscountPercentage Defines if the discount is a percentage (true) or an absolute value (false). + DefaultDiscountPercentage *string `json:"defaultDiscountPercentage,omitempty"` + + // DefaultTimeToPay The payment goal in days which is set for every invoice of the contact. + DefaultTimeToPay *string `json:"defaultTimeToPay,omitempty"` + + // Description A description for the contact. + Description *string `json:"description,omitempty"` + + // ExemptVat Defines if the contact is freed from paying vat. + ExemptVat *string `json:"exemptVat,omitempty"` + + // Familyname The last name of the contact.
+ // Not to be used for organizations. + Familyname *string `json:"familyname,omitempty"` + + // Gender Gender of the contact.
+ // Not to be used for organizations. + Gender *string `json:"gender,omitempty"` + + // GovernmentAgency Defines whether the contact is a government agency (true) or not (false). + GovernmentAgency *string `json:"governmentAgency,omitempty"` + + // Id The contact id + Id *string `json:"id,omitempty"` + + // Name The organization name.
+ // Be aware that the type of contact will depend on this attribute.
+ // If it holds a value, the contact will be regarded as an organization. + Name *string `json:"name,omitempty"` + + // Name2 Second name of the contact.
+ // Not to be used for organizations. + Name2 *string `json:"name2,omitempty"` + + // ObjectName The contact object name + ObjectName *string `json:"objectName,omitempty"` + + // Parent The parent contact to which this contact belongs. Must be an organization. + Parent *struct { + // Id Unique identifier of the parent contact + Id string `json:"id"` + + // ObjectName Model name, which is 'Contact' + ObjectName string `json:"objectName"` + } `json:"parent,omitempty"` + + // SevClient Client to which contact belongs. Will be filled automatically + SevClient *struct { + // Id Unique identifier of the client + Id int `json:"id"` + + // ObjectName Model name, which is 'SevClient' + ObjectName string `json:"objectName"` + } `json:"sevClient,omitempty"` + + // Status Defines the status of the contact. 100 <-> Lead - 500 <-> Pending - 1000 <-> Active. + Status *string `json:"status,omitempty"` + + // Surename The first name of the contact.
+ // Yeah... not quite right in literally every way. We know.
+ // Not to be used for organizations. + Surename *string `json:"surename,omitempty"` + + // TaxNumber The tax number of the contact. + TaxNumber *string `json:"taxNumber,omitempty"` + + // TaxOffice The tax office of the contact (only for greek customers). + TaxOffice *string `json:"taxOffice,omitempty"` + + // Titel A non-academic title for the contact. + // Not to be used for organizations. + Titel *string `json:"titel,omitempty"` + + // Update Date of last contact update + Update *time.Time `json:"update,omitempty"` + + // VatNumber Vat number of the contact. + VatNumber *string `json:"vatNumber,omitempty"` +} + +// ModelContactUpdate Contact model +type ModelContactUpdate struct { + // AcademicTitle A academic title for the contact. + // Not to be used for organizations. + AcademicTitle *string `json:"academicTitle"` + + // BankAccount Bank account number (IBAN) of the contact. + BankAccount *string `json:"bankAccount"` + + // BankNumber Bank number of the bank used by the contact. + BankNumber *string `json:"bankNumber"` + + // Birthday Birthday of the contact.
+ // Not to be used for organizations. + Birthday *openapi_types.Date `json:"birthday"` + + // BuyerReference Buyer reference of the contact. + BuyerReference *string `json:"buyerReference"` + + // Category Category of the contact.
For more information, + // see here. + Category *struct { + // Id Unique identifier of the category + Id int `json:"id"` + + // ObjectName Model name, which is 'Category' + ObjectName string `json:"objectName"` + } `json:"category"` + + // CustomerNumber The customer number + CustomerNumber *string `json:"customerNumber"` + + // DefaultCashbackPercent Percentage of the invoice sum the contact gets back if he paid invoices in time. + DefaultCashbackPercent *float32 `json:"defaultCashbackPercent"` + + // DefaultCashbackTime Absolute time in days which the contact has to pay his invoices and subsequently get a cashback. + DefaultCashbackTime *int `json:"defaultCashbackTime"` + + // DefaultDiscountAmount The default discount the contact gets for every invoice.
+ // Depending on defaultDiscountPercentage attribute, in percent or absolute value. + DefaultDiscountAmount *float32 `json:"defaultDiscountAmount"` + + // DefaultDiscountPercentage Defines if the discount is a percentage (true) or an absolute value (false). + DefaultDiscountPercentage *bool `json:"defaultDiscountPercentage"` + + // DefaultTimeToPay The payment goal in days which is set for every invoice of the contact. + DefaultTimeToPay *int `json:"defaultTimeToPay"` + + // Description A description for the contact. + Description *string `json:"description"` + + // ExemptVat Defines if the contact is freed from paying vat. + ExemptVat *bool `json:"exemptVat"` + + // Familyname The last name of the contact.
+ // Not to be used for organizations. + Familyname *string `json:"familyname"` + + // Gender Gender of the contact.
+ // Not to be used for organizations. + Gender *string `json:"gender"` + + // GovernmentAgency Defines whether the contact is a government agency (true) or not (false). + GovernmentAgency *bool `json:"governmentAgency"` + + // Name The organization name.
+ // Be aware that the type of contact will depend on this attribute.
+ // If it holds a value, the contact will be regarded as an organization. + Name *string `json:"name"` + + // Name2 Second name of the contact.
+ // Not to be used for organizations. + Name2 *string `json:"name2"` + + // Parent The parent contact to which this contact belongs. Must be an organization. + Parent *struct { + // Id Unique identifier of the parent contact + Id int `json:"id"` + + // ObjectName Model name, which is 'Contact' + ObjectName string `json:"objectName"` + } `json:"parent"` + + // Status Defines the status of the contact. 100 <-> Lead - 500 <-> Pending - 1000 <-> Active. + Status *int `json:"status"` + + // Surename The first name of the contact.
+ // Yeah... not quite right in literally every way. We know.
+ // Not to be used for organizations. + Surename *string `json:"surename"` + + // TaxNumber The tax number of the contact. + TaxNumber *string `json:"taxNumber"` + + // TaxOffice The tax office of the contact (only for greek customers). + TaxOffice *string `json:"taxOffice"` + + // Titel A non-academic title for the contact. + // Not to be used for organizations. + Titel *string `json:"titel"` + + // VatNumber Vat number of the contact. + VatNumber *string `json:"vatNumber"` +} + +// ModelCreateInvoiceFromOrder Invoice model +type ModelCreateInvoiceFromOrder struct { + // Amount Amount which has already been paid for this Invoice + Amount *float32 `json:"amount"` + + // Order select the order for which you want to create the invoice + Order struct { + // Id Unique identifier of the order + Id int `json:"id"` + + // ObjectName Model name, which is 'Order' + ObjectName string `json:"objectName"` + } `json:"order"` + + // PartialType defines the type of the invoice + // 1. RE - Schlussrechnung + // 2. TR - Teilrechnung + // 3. AR - Abschlagsrechnung + PartialType *ModelCreateInvoiceFromOrderPartialType `json:"partialType"` + + // Type defines the type of amount + Type *ModelCreateInvoiceFromOrderType `json:"type"` +} + +// ModelCreateInvoiceFromOrderPartialType defines the type of the invoice +// 1. RE - Schlussrechnung +// 2. TR - Teilrechnung +// 3. AR - Abschlagsrechnung +type ModelCreateInvoiceFromOrderPartialType string + +// ModelCreateInvoiceFromOrderType defines the type of amount +type ModelCreateInvoiceFromOrderType string + +// ModelCreatePackingListFromOrder order model +type ModelCreatePackingListFromOrder struct { + // Id Unique identifier of the order + Id int `json:"id"` + + // ObjectName Model name, which is 'Order' + ObjectName string `json:"objectName"` +} + +// ModelCreditNoteSendByWithRender defines model for Model_CreditNote_sendByWithRender. +type ModelCreditNoteSendByWithRender struct { + DocId *string `json:"docId,omitempty"` + Pages *int `json:"pages,omitempty"` + Parameters *[]struct { + Key *string `json:"key,omitempty"` + Name *string `json:"name,omitempty"` + Value *string `json:"value,omitempty"` + Values *[]struct { + Name *string `json:"name,omitempty"` + TranslationCade *string `json:"translationCade,omitempty"` + Value *string `json:"value,omitempty"` + } `json:"values,omitempty"` + Visible *bool `json:"visible,omitempty"` + } `json:"parameters,omitempty"` + Thumbs *[]interface{} `json:"thumbs,omitempty"` +} + +// ModelDiscount Discount model +type ModelDiscount struct { + // Create Date of discount creation + Create *time.Time `json:"create,omitempty"` + + // Id the id of the discount + Id *string `json:"id,omitempty"` + + // IsNet Defines is the Discount net or gross + // 0 - gross + // 1 - net + IsNet *string `json:"isNet,omitempty"` + + // Object The order used for the discount + Object *struct { + // Id Unique identifier of the order + Id string `json:"id"` + + // ObjectName Model name, which is 'Order' + ObjectName string `json:"objectName"` + } `json:"object,omitempty"` + + // ObjectName Model name, which is 'Discounts' + ObjectName *string `json:"objectName,omitempty"` + + // Percentage Defines if this is a percentage or an absolute discount + Percentage *string `json:"percentage,omitempty"` + + // SevClient Client to which invoice belongs. Will be filled automatically + SevClient *string `json:"sevClient,omitempty"` + + // Text A text describing your position. + Text *string `json:"text,omitempty"` + + // Update Date of last discount update + Update *time.Time `json:"update,omitempty"` + + // Value Value of the discount + Value *string `json:"value,omitempty"` +} + +// ModelEmail Email model +type ModelEmail struct { + // Arrived Date the mail arrived + Arrived *time.Time `json:"arrived"` + + // Bcc A list of mail addresses which are in the bcc + Bcc *string `json:"bcc"` + + // Cc A list of mail addresses which are in the cc + Cc *string `json:"cc"` + + // Create Date of mail creation + Create *time.Time `json:"create,omitempty"` + + // From The sender of the email + From string `json:"from"` + + // Id The email id + Id *int `json:"id,omitempty"` + + // Object Invoice model + Object *ModelInvoiceResponse `json:"object,omitempty"` + + // ObjectName The email object name + ObjectName *string `json:"objectName,omitempty"` + + // SevClient Client to which mail belongs. Will be filled automatically + SevClient *struct { + // Id Unique identifier of the client + Id int `json:"id"` + + // ObjectName Model name, which is 'SevClient' + ObjectName string `json:"objectName"` + } `json:"sevClient,omitempty"` + + // Subject The subject of the email + Subject string `json:"subject"` + + // Text The text of the email + Text *string `json:"text"` + + // To The recipient of the email + To string `json:"to"` + + // Update Date of last mail update + Update *time.Time `json:"update,omitempty"` +} + +// ModelEmailOrder Email model +type ModelEmailOrder struct { + // Arrived Date the mail arrived + Arrived *time.Time `json:"arrived"` + + // Bcc A list of mail addresses which are in the bcc + Bcc *string `json:"bcc"` + + // Cc A list of mail addresses which are in the cc + Cc *string `json:"cc"` + + // Create Date of mail creation + Create *time.Time `json:"create,omitempty"` + + // From The sender of the email + From string `json:"from"` + + // Id The email id + Id *int `json:"id,omitempty"` + + // Object Order model + Object *ModelOrderResponse `json:"object,omitempty"` + + // ObjectName The email object name + ObjectName *string `json:"objectName,omitempty"` + + // SevClient Client to which mail belongs. Will be filled automatically + SevClient *struct { + // Id Unique identifier of the client + Id int `json:"id"` + + // ObjectName Model name, which is 'SevClient' + ObjectName string `json:"objectName"` + } `json:"sevClient,omitempty"` + + // Subject The subject of the email + Subject string `json:"subject"` + + // Text The text of the email + Text *string `json:"text"` + + // To The recipient of the email + To string `json:"to"` + + // Update Date of last mail update + Update *time.Time `json:"update,omitempty"` +} + +// ModelInvoice Invoice model +type ModelInvoice struct { + // AccountIntervall The interval in which recurring invoices are due as ISO-8601 duration.
+ // Necessary attribute for all recurring invoices. + AccountIntervall *string `json:"accountIntervall"` + + // AccountNextInvoice Timestamp when the next invoice will be generated by this recurring invoice. + AccountNextInvoice *int `json:"accountNextInvoice"` + + // Address Complete address of the recipient including name, street, city, zip and country. + // * Line breaks can be used and will be displayed on the invoice pdf. + Address *string `json:"address"` + + // AddressCountry Can be omitted as complete address is defined in address attribute + AddressCountry struct { + // Id Unique identifier of the country + Id int `json:"id"` + + // ObjectName Model name, which is 'StaticCountry' + ObjectName string `json:"objectName"` + } `json:"addressCountry"` + + // Contact The contact used in the invoice + Contact struct { + // Id Unique identifier of the contact + Id int `json:"id"` + + // ObjectName Model name, which is 'Contact' + ObjectName string `json:"objectName"` + } `json:"contact"` + + // ContactPerson The user who acts as a contact person for the invoice + ContactPerson struct { + // Id Unique identifier of the user + Id int `json:"id"` + + // ObjectName Model name, which is 'SevUser' + ObjectName string `json:"objectName"` + } `json:"contactPerson"` + + // Create Date of invoice creation + Create *time.Time `json:"create,omitempty"` + + // CreateUser Will be filled automatically by our system and can't be changed + CreateUser *struct { + // Id Unique identifier of the user + Id int `json:"id"` + + // ObjectName Model name, which is 'SevUser' + ObjectName string `json:"objectName"` + } `json:"createUser,omitempty"` + + // Currency Currency used in the invoice. Needs to be currency code according to ISO-4217 + Currency string `json:"currency"` + + // CustomerInternalNote Internal note of the customer. Contains data entered into field 'Referenz/Bestellnummer' + CustomerInternalNote *string `json:"customerInternalNote"` + + // DeliveryDate Timestamp. This can also be a date range if you also use the attribute deliveryDateUntil + DeliveryDate *time.Time `json:"deliveryDate"` + + // DeliveryDateUntil If the delivery date should be a time range, another timestamp can be provided in this attribute + // * to define a range from timestamp used in deliveryDate attribute to the timestamp used here. + DeliveryDateUntil *int `json:"deliveryDateUntil"` + + // Discount If you want to give a discount, define the percentage here. Otherwise provide zero as value + Discount int `json:"discount"` + + // DunningLevel Defines how many reminders have already been sent for the invoice. + // Starts with 1 (Payment reminder) and should be incremented by one every time another reminder is sent. + DunningLevel *int `json:"dunningLevel"` + + // Enshrined Enshrined invoices cannot be changed. Can only be set via [Invoice/{invoiceId}/enshrine](#tag/Invoice/operation/invoiceEnshrine). This operation cannot be undone. + Enshrined *time.Time `json:"enshrined,omitempty"` + + // FootText Certain html tags can be used here to format your text + FootText *string `json:"footText"` + + // HeadText Certain html tags can be used here to format your text + HeadText *string `json:"headText"` + + // Header Normally consist of prefix plus the invoice number + Header *string `json:"header"` + + // Id The invoice id. Required if you want to create or update an invoice position for an existing invoice + Id *int `json:"id"` + + // InvoiceDate Needs to be provided as timestamp or dd.mm.yyyy + // + // **Requirements:** + // * For final invoices (invoiceType = 'ER'), the invoiceDate must be later than or equal to the invoiceDate of related advance (invoiceType = 'AR') / partial (invoiceType = 'TR') invoices. + InvoiceDate string `json:"invoiceDate"` + + // InvoiceNumber The invoice number + InvoiceNumber *string `json:"invoiceNumber"` + + // InvoiceType Type of the invoice. For more information on the different types, check + // this section + InvoiceType ModelInvoiceInvoiceType `json:"invoiceType"` + MapAll bool `json:"mapAll"` + + // ObjectName The invoice object name. + ObjectName *string `json:"objectName,omitempty"` + + // Origin Origin of the invoice. Could f.e. be an order + Origin *struct { + // Id Unique identifier of the object + Id string `json:"id"` + + // ObjectName Model name, which could be 'Order' + ObjectName string `json:"objectName"` + } `json:"origin"` + + // PaidAmount Amount which has already been paid for this invoice by the customer + PaidAmount *float32 `json:"paidAmount"` + + // PayDate Needs to be timestamp or dd.mm.yyyy + PayDate *time.Time `json:"payDate"` + + // PaymentMethod Payment method used for the invoice + PaymentMethod *struct { + // Id Unique identifier of the payment method + Id int `json:"id"` + + // ObjectName Model name, which is 'PaymentMethod' + ObjectName string `json:"objectName"` + } `json:"paymentMethod,omitempty"` + + // PropertyIsEInvoice If true, the invoice will be created as e-invoice. + // + // To create a valid e-invoice some extra data are required + // - sevClient + // - addressStreet + // - addressZip + // - addressCity + // - bankIban + // - bankBic + // - contactEmail + // - contactPhone + // - taxNumber + // - vatNumber + // - contact + // - buyerReference + // - email + // - invoice + // - paymentMethod + // - addressStreet + // - addressZip + // - addressCity + // - addressCountry + // - contact + PropertyIsEInvoice *bool `json:"propertyIsEInvoice"` + + // SendDate The date the invoice was sent to the customer + SendDate *time.Time `json:"sendDate"` + + // SendType Type which was used to send the invoice. + SendType *ModelInvoiceSendType `json:"sendType"` + + // SevClient Client to which invoice belongs. Will be filled automatically + SevClient *struct { + // Id Unique identifier of the client + Id int `json:"id"` + + // ObjectName Model name, which is 'SevClient' + ObjectName string `json:"objectName"` + } `json:"sevClient,omitempty"` + + // ShowNet If true, the net amount of each position will be shown on the invoice. Otherwise gross amount + ShowNet *bool `json:"showNet,omitempty"` + + // SmallSettlement Defines if the client uses the small settlement scheme. + // If yes, the invoice must not contain any vat + SmallSettlement *bool `json:"smallSettlement"` + + // Status Please have a look in our + // Types and status of invoices + // to see what the different status codes mean + Status ModelInvoiceStatus `json:"status"` + + // SumDiscounts Sum of all discounts in the invoice + SumDiscounts *float32 `json:"sumDiscounts,omitempty"` + + // SumDiscountsForeignCurrency Discounts sum of the invoice in the foreign currency + SumDiscountsForeignCurrency *float32 `json:"sumDiscountsForeignCurrency,omitempty"` + + // SumGross Gross sum of the invoice + SumGross *float32 `json:"sumGross,omitempty"` + + // SumGrossAccounting Gross accounting sum of the invoice. Is usually the same as sumGross + SumGrossAccounting *float32 `json:"sumGrossAccounting,omitempty"` + + // SumGrossForeignCurrency Gross sum of the invoice in the foreign currency + SumGrossForeignCurrency *float32 `json:"sumGrossForeignCurrency,omitempty"` + + // SumNet Net sum of the invoice + SumNet *float32 `json:"sumNet,omitempty"` + + // SumNetAccounting Net accounting sum of the invoice. Is usually the same as sumNet + SumNetAccounting *float32 `json:"sumNetAccounting,omitempty"` + + // SumNetForeignCurrency Net sum of the invoice in the foreign currency + SumNetForeignCurrency *float32 `json:"sumNetForeignCurrency,omitempty"` + + // SumTax Tax sum of the invoice + SumTax *float32 `json:"sumTax,omitempty"` + + // SumTaxAccounting Tax accounting sum of the invoice. Is usually the same as sumTax + SumTaxAccounting *float32 `json:"sumTaxAccounting,omitempty"` + + // SumTaxForeignCurrency Tax sum of the invoice in the foreign currency + SumTaxForeignCurrency *float32 `json:"sumTaxForeignCurrency,omitempty"` + + // TaxRate This is not used anymore. Use the taxRate of the individual positions instead. + TaxRate float32 `json:"taxRate"` + + // TaxRule **Use this in sevdesk-Update 2.0 (replaces taxType / taxSet).** + TaxRule struct { + // Id **Use this in sevdesk-Update 2.0 (replaces taxType / taxSet).** + // + // Defines the vat-regulation. + // For "Regelbesteuerung" it can be one of: + // - `1` - Umsatzsteuerpflichtige Umsätze - tax rates: 0.0, 7.0, 19.0 - replaces `"taxType": "default"` + // - `2` - Ausfuhren - allowedTaxRates: 0.0 + // - `3` - Innergemeinschaftliche Lieferungen - tax rates: 0.0, 7.0, 19.0 - replaces `"taxType": "eu"` + // - `4` - Steuerfreie Umsätze §4 UStG - tax rates: 0.0 + // - `5` - Reverse Charge gem. §13b UStG - tax rates: 0.0 + // - `17` - Nicht im Inland steuerbare Leistung - tax rates: 0.0 - replaces `"taxType": "noteu"` + // - "Nicht im Inland steuerbare Leistung" is not available for: + // - advance invoice (`"invoiceType": "AR"`) + // - partial invoice (`"invoiceType": "TR"`) + // - final invoice (`"invoiceType": "ER"`) + // + // For small business owner ("Kleinunternehmer") it can be: + // - `11` - Steuer nicht erhoben nach §19UStG - tax rates: 0.0 - replaces `"taxType": "ss"` + Id ModelInvoiceTaxRuleId `json:"id"` + + // ObjectName Name of the object. Must always be TaxRule + ObjectName ModelInvoiceTaxRuleObjectName `json:"objectName"` + } `json:"taxRule"` + + // TaxSet **Use this in sevdesk-Update 1.0 (instead of taxRule).** + // + // Tax set of the invoice. Needs to be added if you chose the tax type custom + TaxSet *struct { + // Id Unique identifier of the object + Id string `json:"id"` + + // ObjectName Model name, which is 'TaxSet' + ObjectName string `json:"objectName"` + } `json:"taxSet"` + + // TaxText A common tax text would be 'Umsatzsteuer 19%' + TaxText string `json:"taxText"` + + // TaxType **Use this in sevdesk-Update 1.0 (instead of taxRule).** + // + // Tax type of the invoice. + // There are four tax types: + // 1. default - Umsatzsteuer ausweisen + // 2. eu - Steuerfreie innergemeinschaftliche Lieferung (Europäische Union) + // 3. noteu - Steuerschuldnerschaft des Leistungsempfängers (außerhalb EU, z. B. Schweiz) + // 4. custom - Using custom tax set + // 5. ss - Not subject to VAT according to §19 1 UStG + // Tax rates are heavily connected to the tax type used. + TaxType ModelInvoiceTaxType `json:"taxType"` + + // TimeToPay The time the customer has to pay the invoice in days + TimeToPay *int `json:"timeToPay"` + + // Update Date of last invoice update + Update *time.Time `json:"update,omitempty"` +} + +// ModelInvoiceInvoiceType Type of the invoice. For more information on the different types, check +// +// this section +type ModelInvoiceInvoiceType string + +// ModelInvoiceSendType Type which was used to send the invoice. +type ModelInvoiceSendType string + +// ModelInvoiceStatus Please have a look in our +// +// Types and status of invoices +// to see what the different status codes mean +type ModelInvoiceStatus string + +// ModelInvoiceTaxRuleId **Use this in sevdesk-Update 2.0 (replaces taxType / taxSet).** +// +// Defines the vat-regulation. +// For "Regelbesteuerung" it can be one of: +// - `1` - Umsatzsteuerpflichtige Umsätze - tax rates: 0.0, 7.0, 19.0 - replaces `"taxType": "default"` +// - `2` - Ausfuhren - allowedTaxRates: 0.0 +// - `3` - Innergemeinschaftliche Lieferungen - tax rates: 0.0, 7.0, 19.0 - replaces `"taxType": "eu"` +// - `4` - Steuerfreie Umsätze §4 UStG - tax rates: 0.0 +// - `5` - Reverse Charge gem. §13b UStG - tax rates: 0.0 +// - `17` - Nicht im Inland steuerbare Leistung - tax rates: 0.0 - replaces `"taxType": "noteu"` +// - "Nicht im Inland steuerbare Leistung" is not available for: +// - advance invoice (`"invoiceType": "AR"`) +// - partial invoice (`"invoiceType": "TR"`) +// - final invoice (`"invoiceType": "ER"`) +// +// For small business owner ("Kleinunternehmer") it can be: +// - `11` - Steuer nicht erhoben nach §19UStG - tax rates: 0.0 - replaces `"taxType": "ss"` +type ModelInvoiceTaxRuleId string + +// ModelInvoiceTaxRuleObjectName Name of the object. Must always be TaxRule +type ModelInvoiceTaxRuleObjectName string + +// ModelInvoiceTaxType **Use this in sevdesk-Update 1.0 (instead of taxRule).** +// +// Tax type of the invoice. +// There are four tax types: +// 1. default - Umsatzsteuer ausweisen +// 2. eu - Steuerfreie innergemeinschaftliche Lieferung (Europäische Union) +// 3. noteu - Steuerschuldnerschaft des Leistungsempfängers (außerhalb EU, z. B. Schweiz) +// 4. custom - Using custom tax set +// 5. ss - Not subject to VAT according to §19 1 UStG +// Tax rates are heavily connected to the tax type used. +type ModelInvoiceTaxType string + +// ModelInvoicePos Invoice position model +type ModelInvoicePos struct { + // Create Date of invoice position creation + Create *time.Time `json:"create,omitempty"` + + // Discount An optional discount of the position. + Discount *float32 `json:"discount"` + + // Id The invoice position id. Required if you want to update an invoice position for an existing invoice + Id *int `json:"id,omitempty"` + + // Invoice The invoice to which the position belongs. + Invoice *struct { + // Id Unique identifier of the invoice + Id int `json:"id"` + + // ObjectName Model name, which is 'Invoice' + ObjectName string `json:"objectName"` + } `json:"invoice,omitempty"` + MapAll bool `json:"mapAll"` + + // Name Name of the article/part. + Name *string `json:"name"` + + // ObjectName The invoice position object name + ObjectName string `json:"objectName"` + + // Part Part from your inventory which is used in the position. + Part *struct { + // Id Unique identifier of the part + Id int `json:"id"` + + // ObjectName Model name, which is 'Part' + ObjectName string `json:"objectName"` + } `json:"part,omitempty"` + + // PositionNumber Position number of your position. Can be used to order multiple positions. + PositionNumber *int `json:"positionNumber"` + + // Price Price of the article/part. Is either gross or net, depending on the sevdesk account setting. + Price *float32 `json:"price"` + + // PriceGross Gross price of the part + PriceGross *float32 `json:"priceGross"` + + // PriceNet Net price of the part + PriceNet *float32 `json:"priceNet"` + + // PriceTax Tax on the price of the part + PriceTax *float32 `json:"priceTax"` + + // Quantity Quantity of the article/part + Quantity float32 `json:"quantity"` + + // SevClient Client to which invoice position belongs. Will be filled automatically + SevClient *struct { + // Id Unique identifier of the client + Id int `json:"id"` + + // ObjectName Model name, which is 'SevClient' + ObjectName string `json:"objectName"` + } `json:"sevClient,omitempty"` + + // SumDiscount Discount sum of the position + SumDiscount *float32 `json:"sumDiscount"` + + // SumGrossAccounting Gross accounting sum of the position + SumGrossAccounting *float32 `json:"sumGrossAccounting"` + + // SumNetAccounting Net accounting sum of the position + SumNetAccounting *float32 `json:"sumNetAccounting"` + + // SumTaxAccounting Tax accounting sum of the position + SumTaxAccounting *float32 `json:"sumTaxAccounting"` + + // TaxRate Tax rate of the position. + TaxRate float32 `json:"taxRate"` + + // Text A text describing your position. + Text *string `json:"text"` + + // Unity The unit in which the positions part is measured + Unity struct { + // Id Unique identifier of the unit + Id int `json:"id"` + + // ObjectName Model name, which is 'Unity' + ObjectName string `json:"objectName"` + } `json:"unity"` + + // Update Date of last invoice position update + Update *time.Time `json:"update,omitempty"` +} + +// ModelInvoicePosResponse Invoice position model +type ModelInvoicePosResponse struct { + // Create Date of invoice position creation + Create *time.Time `json:"create,omitempty"` + + // Discount An optional discount of the position. + Discount *string `json:"discount,omitempty"` + + // Id The invoice position id + Id *string `json:"id,omitempty"` + + // Invoice The invoice to which the position belongs. + Invoice *struct { + // Id Unique identifier of the invoice + Id string `json:"id"` + + // ObjectName Model name, which is 'Invoice' + ObjectName string `json:"objectName"` + } `json:"invoice,omitempty"` + + // Name Name of the article/part. + Name *string `json:"name,omitempty"` + + // ObjectName The invoice position object name + ObjectName *string `json:"objectName,omitempty"` + + // Part Part from your inventory which is used in the position. + Part *struct { + // Id Unique identifier of the part + Id string `json:"id"` + + // ObjectName Model name, which is 'Part' + ObjectName string `json:"objectName"` + } `json:"part,omitempty"` + + // PositionNumber Position number of your position. Can be used to order multiple positions. + PositionNumber *string `json:"positionNumber,omitempty"` + + // Price Price of the article/part. Is either gross or net, depending on the sevdesk account setting. + Price *string `json:"price,omitempty"` + + // PriceGross Gross price of the part + PriceGross *string `json:"priceGross,omitempty"` + + // PriceNet Net price of the part + PriceNet *string `json:"priceNet,omitempty"` + + // PriceTax Tax on the price of the part + PriceTax *string `json:"priceTax,omitempty"` + + // Quantity Quantity of the article/part + Quantity *bool `json:"quantity,omitempty"` + + // SevClient Client to which invoice position belongs. Will be filled automatically + SevClient *struct { + // Id Unique identifier of the client + Id string `json:"id"` + + // ObjectName Model name, which is 'SevClient' + ObjectName string `json:"objectName"` + } `json:"sevClient,omitempty"` + + // SumDiscount Discount sum of the position + SumDiscount *string `json:"sumDiscount,omitempty"` + + // SumGrossAccounting Gross accounting sum of the position + SumGrossAccounting *string `json:"sumGrossAccounting,omitempty"` + + // SumNetAccounting Net accounting sum of the position + SumNetAccounting *string `json:"sumNetAccounting,omitempty"` + + // SumTaxAccounting Tax accounting sum of the position + SumTaxAccounting *string `json:"sumTaxAccounting,omitempty"` + + // TaxRate Tax rate of the position. + TaxRate *string `json:"taxRate,omitempty"` + + // Text A text describing your position. + Text *string `json:"text,omitempty"` + + // Unity The unit in which the positions part is measured + Unity *struct { + // Id Unique identifier of the unit + Id string `json:"id"` + + // ObjectName Model name, which is 'Unity' + ObjectName string `json:"objectName"` + } `json:"unity,omitempty"` + + // Update Date of last invoice position update + Update *time.Time `json:"update,omitempty"` +} + +// ModelInvoiceResponse Invoice model +type ModelInvoiceResponse struct { + // AccountIntervall The interval in which recurring invoices are due as ISO-8601 duration.
+ // Necessary attribute for all recurring invoices. + AccountIntervall *string `json:"accountIntervall,omitempty"` + + // AccountNextInvoice Timestamp when the next invoice will be generated by this recurring invoice. + AccountNextInvoice *string `json:"accountNextInvoice,omitempty"` + + // Address Complete address of the recipient including name, street, city, zip and country. + // * Line breaks can be used and will be displayed on the invoice pdf. + Address *string `json:"address,omitempty"` + + // AddressCountry Can be omitted as complete address is defined in address attribute + AddressCountry *struct { + // Id Unique identifier of the country + Id string `json:"id"` + + // ObjectName Model name, which is 'StaticCountry' + ObjectName string `json:"objectName"` + } `json:"addressCountry,omitempty"` + + // Contact The contact used in the invoice + Contact *struct { + // Id Unique identifier of the contact + Id string `json:"id"` + + // ObjectName Model name, which is 'Contact' + ObjectName string `json:"objectName"` + } `json:"contact,omitempty"` + + // ContactPerson The user who acts as a contact person for the invoice + ContactPerson *struct { + // Id Unique identifier of the user + Id string `json:"id"` + + // ObjectName Model name, which is 'SevUser' + ObjectName string `json:"objectName"` + } `json:"contactPerson,omitempty"` + + // CostCentre Cost centre for the invoice + CostCentre *struct { + // Id Unique identifier of the cost centre + Id string `json:"id"` + + // ObjectName Model name, which is 'CostCentre' + ObjectName string `json:"objectName"` + } `json:"costCentre,omitempty"` + + // Create Date of invoice creation + Create *time.Time `json:"create,omitempty"` + + // CreateUser Will be filled automatically by our system and can't be changed + CreateUser *struct { + // Id Unique identifier of the user + Id string `json:"id"` + + // ObjectName Model name, which is 'SevUser' + ObjectName string `json:"objectName"` + } `json:"createUser,omitempty"` + + // Currency Currency used in the invoice. Needs to be currency code according to ISO-4217 + Currency *string `json:"currency,omitempty"` + + // CustomerInternalNote Internal note of the customer. Contains data entered into field 'Referenz/Bestellnummer' + CustomerInternalNote *string `json:"customerInternalNote,omitempty"` + + // DatevConnectOnline Internal attribute + DatevConnectOnline *map[string]interface{} `json:"datevConnectOnline,omitempty"` + + // DeliveryDate Timestamp. This can also be a date range if you also use the attribute deliveryDateUntil + DeliveryDate *time.Time `json:"deliveryDate,omitempty"` + + // DeliveryDateUntil If the delivery date should be a time range, another timestamp can be provided in this attribute + // * to define a range from timestamp used in deliveryDate attribute to the timestamp used here. + DeliveryDateUntil *string `json:"deliveryDateUntil,omitempty"` + + // Discount If you want to give a discount, define the percentage here. Otherwise provide zero as value + Discount *string `json:"discount,omitempty"` + + // DiscountTime If a value other than zero is used for the discount attribute, + // you need to specify the amount of days for which the discount is granted. + DiscountTime *string `json:"discountTime,omitempty"` + + // DunningLevel Defines how many reminders have already been sent for the invoice. + // Starts with 1 (Payment reminder) and should be incremented by one every time another reminder is sent. + DunningLevel *string `json:"dunningLevel,omitempty"` + + // Enshrined Enshrined invoices cannot be changed. Can only be set via [Invoice/{invoiceId}/enshrine](#tag/Invoice/operation/invoiceEnshrine). This operation cannot be undone. + Enshrined *time.Time `json:"enshrined,omitempty"` + + // FootText Certain html tags can be used here to format your text + FootText *string `json:"footText,omitempty"` + + // HeadText Certain html tags can be used here to format your text + HeadText *string `json:"headText,omitempty"` + + // Header Normally consist of prefix plus the invoice number + Header *string `json:"header,omitempty"` + + // Id The invoice id + Id *string `json:"id,omitempty"` + + // InvoiceDate The invoice date. + InvoiceDate *string `json:"invoiceDate,omitempty"` + + // InvoiceNumber The invoice number + InvoiceNumber *string `json:"invoiceNumber,omitempty"` + + // InvoiceType Type of the invoice. For more information on the different types, check + // this section + InvoiceType *ModelInvoiceResponseInvoiceType `json:"invoiceType,omitempty"` + + // ObjectName The invoice object name + ObjectName *string `json:"objectName,omitempty"` + + // Origin Origin of the invoice. Could f.e. be an order + Origin *struct { + // Id Unique identifier of the object + Id string `json:"id"` + + // ObjectName Model name. Could f.e. be 'Order'' + ObjectName string `json:"objectName"` + } `json:"origin,omitempty"` + + // PaidAmount Amount which has already been paid for this invoice by the customer + PaidAmount *float32 `json:"paidAmount,omitempty"` + + // PayDate Needs to be timestamp or dd.mm.yyyy + PayDate *time.Time `json:"payDate,omitempty"` + + // PaymentMethod Payment method used for the invoice + PaymentMethod *struct { + // Id Unique identifier of the payment method + Id string `json:"id"` + + // ObjectName Model name, which is 'PaymentMethod' + ObjectName string `json:"objectName"` + } `json:"paymentMethod,omitempty"` + + // ReminderCharge The additional reminder charge + ReminderCharge *string `json:"reminderCharge,omitempty"` + + // ReminderDeadline Deadline of the reminder as timestamp + ReminderDeadline *time.Time `json:"reminderDeadline,omitempty"` + + // ReminderDebit Debit of the reminder + ReminderDebit *string `json:"reminderDebit,omitempty"` + + // ReminderTotal Total reminder amount + ReminderTotal *string `json:"reminderTotal,omitempty"` + + // SendDate The date the invoice was sent to the customer + SendDate *time.Time `json:"sendDate,omitempty"` + + // SendPaymentReceivedNotificationDate Internal attribute + SendPaymentReceivedNotificationDate *string `json:"sendPaymentReceivedNotificationDate,omitempty"` + + // SendType Type which was used to send the invoice. IMPORTANT: Please refer to the invoice section of the + // * API-Overview to understand how this attribute can be used before using it! + SendType *ModelInvoiceResponseSendType `json:"sendType,omitempty"` + + // SevClient Client to which invoice belongs. Will be filled automatically + SevClient *struct { + // Id Unique identifier of the client + Id string `json:"id"` + + // ObjectName Model name, which is 'SevClient' + ObjectName string `json:"objectName"` + } `json:"sevClient,omitempty"` + + // ShowNet If true, the net amount of each position will be shown on the invoice. Otherwise gross amount + ShowNet *bool `json:"showNet,omitempty"` + + // SmallSettlement Defines if the client uses the small settlement scheme. + // If yes, the invoice must not contain any vat + SmallSettlement *bool `json:"smallSettlement,omitempty"` + + // Status Please have a look in our + // Types and status of invoices + // to see what the different status codes mean + Status *ModelInvoiceResponseStatus `json:"status,omitempty"` + + // SumDiscounts Sum of all discounts in the invoice + SumDiscounts *string `json:"sumDiscounts,omitempty"` + + // SumDiscountsForeignCurrency Discounts sum of the invoice in the foreign currency + SumDiscountsForeignCurrency *string `json:"sumDiscountsForeignCurrency,omitempty"` + + // SumGross Gross sum of the invoice + SumGross *string `json:"sumGross,omitempty"` + + // SumGrossAccounting Gross accounting sum of the invoice. Is usually the same as sumGross + SumGrossAccounting *string `json:"sumGrossAccounting,omitempty"` + + // SumGrossForeignCurrency Gross sum of the invoice in the foreign currency + SumGrossForeignCurrency *string `json:"sumGrossForeignCurrency,omitempty"` + + // SumNet Net sum of the invoice + SumNet *string `json:"sumNet,omitempty"` + + // SumNetAccounting Net accounting sum of the invoice. Is usually the same as sumNet + SumNetAccounting *string `json:"sumNetAccounting,omitempty"` + + // SumNetForeignCurrency Net sum of the invoice in the foreign currency + SumNetForeignCurrency *string `json:"sumNetForeignCurrency,omitempty"` + + // SumTax Tax sum of the invoice + SumTax *string `json:"sumTax,omitempty"` + + // SumTaxAccounting Tax accounting sum of the invoice. Is usually the same as sumTax + SumTaxAccounting *string `json:"sumTaxAccounting,omitempty"` + + // SumTaxForeignCurrency Tax sum of the invoice in the foreign currency + SumTaxForeignCurrency *string `json:"sumTaxForeignCurrency,omitempty"` + + // TaxRate This is not used anymore. Use the taxRate of the individual positions instead. + TaxRate *string `json:"taxRate,omitempty"` + + // TaxRule **Use this in sevdesk-Update 2.0 (replaces taxType / taxSet).** + TaxRule *struct { + // Id **Use this in sevdesk-Update 2.0 (replaces taxType / taxSet).** + // + // Defines the vat-regulation. + // For "Regelbesteuerung" it can be one of: + // - `1` - Umsatzsteuerpflichtige Umsätze - tax rates: 0.0, 7.0, 19.0 - replaces `"taxType": "default"` + // - `2` - Ausfuhren - allowedTaxRates: 0.0 + // - `3` - Innergemeinschaftliche Lieferungen - tax rates: 0.0, 7.0, 19.0 - replaces `"taxType": "eu"` + // - `4` - Steuerfreie Umsätze §4 UStG - tax rates: 0.0 + // - `5` - Reverse Charge gem. §13b UStG - tax rates: 0.0 + // - `17` - Nicht im Inland steuerbare Leistung - tax rates: 0.0 - replaces `"taxType": "noteu"` + // - "Nicht im Inland steuerbare Leistung" is not available for: + // - advance invoice (`"invoiceType": "AR"`) + // - partial invoice (`"invoiceType": "TR"`) + // - final invoice (`"invoiceType": "ER"`) + // + // For small business owner ("Kleinunternehmer") it can be: + // - `11` - Steuer nicht erhoben nach §19UStG - tax rates: 0.0 - replaces `"taxType": "ss"` + Id ModelInvoiceResponseTaxRuleId `json:"id"` + + // ObjectName Name of the object. Must always be TaxRule + ObjectName ModelInvoiceResponseTaxRuleObjectName `json:"objectName"` + } `json:"taxRule,omitempty"` + + // TaxSet **Use this in sevdesk-Update 1.0 (instead of taxRule).** + // + // Tax set of the invoice. Needs to be added if you chose the tax type custom + TaxSet *struct { + // Id Unique identifier of the object + Id string `json:"id"` + + // ObjectName Model name, which is 'TaxSet' + ObjectName string `json:"objectName"` + } `json:"taxSet,omitempty"` + + // TaxText A common tax text would be 'Umsatzsteuer 19%' + TaxText *string `json:"taxText,omitempty"` + + // TaxType **Use this in sevdesk-Update 1.0 (instead of taxRule).** + // + // Tax type of the invoice. + // There are four tax types: + // 1. default - Umsatzsteuer ausweisen + // 2. eu - Steuerfreie innergemeinschaftliche Lieferung (Europäische Union) + // 3. noteu - Steuerschuldnerschaft des Leistungsempfängers (außerhalb EU, z. B. Schweiz) + // 4. custom - Using custom tax set + // 5. ss - Not subject to VAT according to §19 1 UStG + // Tax rates are heavily connected to the tax type used. + TaxType *ModelInvoiceResponseTaxType `json:"taxType,omitempty"` + + // TimeToPay The time the customer has to pay the invoice in days + TimeToPay *string `json:"timeToPay,omitempty"` + + // Update Date of last invoice update + Update *time.Time `json:"update,omitempty"` +} + +// ModelInvoiceResponseInvoiceType Type of the invoice. For more information on the different types, check +// +// this section +type ModelInvoiceResponseInvoiceType string + +// ModelInvoiceResponseSendType Type which was used to send the invoice. IMPORTANT: Please refer to the invoice section of the +// - API-Overview to understand how this attribute can be used before using it! +type ModelInvoiceResponseSendType string + +// ModelInvoiceResponseStatus Please have a look in our +// +// Types and status of invoices +// to see what the different status codes mean +type ModelInvoiceResponseStatus string + +// ModelInvoiceResponseTaxRuleId **Use this in sevdesk-Update 2.0 (replaces taxType / taxSet).** +// +// Defines the vat-regulation. +// For "Regelbesteuerung" it can be one of: +// - `1` - Umsatzsteuerpflichtige Umsätze - tax rates: 0.0, 7.0, 19.0 - replaces `"taxType": "default"` +// - `2` - Ausfuhren - allowedTaxRates: 0.0 +// - `3` - Innergemeinschaftliche Lieferungen - tax rates: 0.0, 7.0, 19.0 - replaces `"taxType": "eu"` +// - `4` - Steuerfreie Umsätze §4 UStG - tax rates: 0.0 +// - `5` - Reverse Charge gem. §13b UStG - tax rates: 0.0 +// - `17` - Nicht im Inland steuerbare Leistung - tax rates: 0.0 - replaces `"taxType": "noteu"` +// - "Nicht im Inland steuerbare Leistung" is not available for: +// - advance invoice (`"invoiceType": "AR"`) +// - partial invoice (`"invoiceType": "TR"`) +// - final invoice (`"invoiceType": "ER"`) +// +// For small business owner ("Kleinunternehmer") it can be: +// - `11` - Steuer nicht erhoben nach §19UStG - tax rates: 0.0 - replaces `"taxType": "ss"` +type ModelInvoiceResponseTaxRuleId string + +// ModelInvoiceResponseTaxRuleObjectName Name of the object. Must always be TaxRule +type ModelInvoiceResponseTaxRuleObjectName string + +// ModelInvoiceResponseTaxType **Use this in sevdesk-Update 1.0 (instead of taxRule).** +// +// Tax type of the invoice. +// There are four tax types: +// 1. default - Umsatzsteuer ausweisen +// 2. eu - Steuerfreie innergemeinschaftliche Lieferung (Europäische Union) +// 3. noteu - Steuerschuldnerschaft des Leistungsempfängers (außerhalb EU, z. B. Schweiz) +// 4. custom - Using custom tax set +// 5. ss - Not subject to VAT according to §19 1 UStG +// Tax rates are heavily connected to the tax type used. +type ModelInvoiceResponseTaxType string + +// ModelOrder Order model +type ModelOrder struct { + // Address Complete address of the recipient including name, street, city, zip and country.
+ // Line breaks can be used and will be displayed on the invoice pdf. + Address *string `json:"address"` + + // AddressCountry Can be omitted as complete address is defined in address attribute + AddressCountry struct { + // Id Unique identifier of the country + Id int `json:"id"` + + // ObjectName Model name, which is 'StaticCountry' + ObjectName string `json:"objectName"` + } `json:"addressCountry"` + + // Contact The contact used in the order + Contact struct { + // Id Unique identifier of the contact + Id int `json:"id"` + + // ObjectName Model name, which is 'Contact' + ObjectName string `json:"objectName"` + } `json:"contact"` + + // ContactPerson The user who acts as a contact person for the order + ContactPerson struct { + // Id Unique identifier of the user + Id int `json:"id"` + + // ObjectName Model name, which is 'SevUser' + ObjectName string `json:"objectName"` + } `json:"contactPerson"` + + // Create Date of order creation + Create *time.Time `json:"create,omitempty"` + + // Currency Currency used in the order. Needs to be currency code according to ISO-4217 + Currency string `json:"currency"` + + // CustomerInternalNote Internal note of the customer. Contains data entered into field 'Referenz/Bestellnummer' + CustomerInternalNote *string `json:"customerInternalNote"` + + // DeliveryTerms Delivery terms of the order + DeliveryTerms *string `json:"deliveryTerms"` + + // FootText Certain html tags can be used here to format your text + FootText *string `json:"footText"` + + // HeadText Certain html tags can be used here to format your text + HeadText *string `json:"headText"` + + // Header Normally consist of prefix plus the order number + Header string `json:"header"` + + // Id The order id + Id *int `json:"id,omitempty"` + MapAll bool `json:"mapAll"` + + // ObjectName The order object name + ObjectName *string `json:"objectName,omitempty"` + + // OrderDate Needs to be provided as timestamp or dd.mm.yyyy + OrderDate time.Time `json:"orderDate"` + + // OrderNumber The order number + OrderNumber string `json:"orderNumber"` + + // OrderType Type of the order. For more information on the different types, check + // this + OrderType *ModelOrderOrderType `json:"orderType,omitempty"` + + // Origin Object from which the order was created. For example an offer. + Origin *struct { + // Id Unique identifier of the object + Id int `json:"id"` + + // ObjectName Model name of the object. Could be 'Order'. + ObjectName string `json:"objectName"` + } `json:"origin"` + + // PaymentTerms Payment terms of the order + PaymentTerms *string `json:"paymentTerms"` + + // SendDate The date the order was sent to the customer + SendDate *time.Time `json:"sendDate"` + + // SendType Type which was used to send the order. IMPORTANT: Please refer to the order section of the + // * API-Overview to understand how this attribute can be used before using it! + SendType *ModelOrderSendType `json:"sendType"` + + // ShowNet If true, the net amount of each position will be shown on the order. Otherwise gross amount + ShowNet *bool `json:"showNet,omitempty"` + + // SmallSettlement Defines if the client uses the small settlement scheme. + // If yes, the order must not contain any vat + SmallSettlement *bool `json:"smallSettlement,omitempty"` + + // Status Please have a look in + // status of orders + // to see what the different status codes mean + Status ModelOrderStatus `json:"status"` + + // TaxRate This is not used anymore. Use the taxRate of the individual positions instead. + TaxRate float32 `json:"taxRate"` + + // TaxRule **Use this in sevdesk-Update 2.0 (replaces taxType / taxSet).** + TaxRule struct { + // Id **Use this in sevdesk-Update 2.0 (replaces taxType / taxSet).** + // + // Defines the vat-regulation. + // For "Regelbesteuerung" it can be one of: + // - `1` - Umsatzsteuerpflichtige Umsätze - tax rates: 0.0, 7.0, 19.0 - replaces `"taxType": "default"` + // - `2` - Ausfuhren - allowedTaxRates: 0.0 + // - `3` - Innergemeinschaftliche Lieferungen - tax rates: 0.0, 7.0, 19.0 - replaces `"taxType": "eu"` + // - `4` - Steuerfreie Umsätze §4 UStG - tax rates: 0.0 + // - `5` - Reverse Charge gem. §13b UStG - tax rates: 0.0 + // - `17` - Nicht im Inland steuerbare Leistung - tax rates: 0.0 - replaces `"taxType": "noteu"` + // - If \"Nicht im Inland steuerbare Leistung\" is used, no advance or partial invoice can be created from this order + // - See the example request ([Invoice/Factory/createInvoiceFromOrder](#tag/Invoice/operation/createInvoiceFromOrder)) to create a normal invoice `"invoiceType": "RE"` from such an order + // + // For small business owner ("Kleinunternehmer") it can be: + // - `11` - Steuer nicht erhoben nach §19UStG - tax rates: 0.0 - replaces `"taxType": "ss"` + Id ModelOrderTaxRuleId `json:"id"` + + // ObjectName Name of the object. Must always be TaxRule + ObjectName ModelOrderTaxRuleObjectName `json:"objectName"` + } `json:"taxRule"` + + // TaxSet **Use this in sevdesk-Update 1.0 (instead of taxRule).** + // + // Tax set of the order. Needs to be added if you chose the tax type custom + TaxSet *struct { + // Id Unique identifier of the object + Id int `json:"id"` + + // ObjectName Model name, which is 'TaxSet' + ObjectName string `json:"objectName"` + } `json:"taxSet"` + + // TaxText A common tax text would be 'Umsatzsteuer 19%' + TaxText string `json:"taxText"` + + // TaxType **Use this in sevdesk-Update 1.0 (instead of taxRule).** + // + // Tax type of the order. + // There are four tax types: + // 1. default - Umsatzsteuer ausweisen + // 2. eu - Steuerfreie innergemeinschaftliche Lieferung (Europäische Union) + // 3. noteu - Steuerschuldnerschaft des Leistungsempfängers (außerhalb EU, z. B. Schweiz) + // 4. custom - Using custom tax set + // 5. ss - Not subject to VAT according to §19 1 UStG + // Tax rates are heavily connected to the tax type used. + TaxType string `json:"taxType"` + + // Update Date of last order update + Update *time.Time `json:"update,omitempty"` + + // Version Version of the order.
+ // Can be used if you have multiple drafts for the same order.
+ // Should start with 0 + Version int `json:"version"` +} + +// ModelOrderOrderType Type of the order. For more information on the different types, check +// +// this +type ModelOrderOrderType string + +// ModelOrderSendType Type which was used to send the order. IMPORTANT: Please refer to the order section of the +// - API-Overview to understand how this attribute can be used before using it! +type ModelOrderSendType string + +// ModelOrderStatus Please have a look in +// +// status of orders +// to see what the different status codes mean +type ModelOrderStatus int + +// ModelOrderTaxRuleId **Use this in sevdesk-Update 2.0 (replaces taxType / taxSet).** +// +// Defines the vat-regulation. +// For "Regelbesteuerung" it can be one of: +// - `1` - Umsatzsteuerpflichtige Umsätze - tax rates: 0.0, 7.0, 19.0 - replaces `"taxType": "default"` +// - `2` - Ausfuhren - allowedTaxRates: 0.0 +// - `3` - Innergemeinschaftliche Lieferungen - tax rates: 0.0, 7.0, 19.0 - replaces `"taxType": "eu"` +// - `4` - Steuerfreie Umsätze §4 UStG - tax rates: 0.0 +// - `5` - Reverse Charge gem. §13b UStG - tax rates: 0.0 +// - `17` - Nicht im Inland steuerbare Leistung - tax rates: 0.0 - replaces `"taxType": "noteu"` +// - If \"Nicht im Inland steuerbare Leistung\" is used, no advance or partial invoice can be created from this order +// - See the example request ([Invoice/Factory/createInvoiceFromOrder](#tag/Invoice/operation/createInvoiceFromOrder)) to create a normal invoice `"invoiceType": "RE"` from such an order +// +// For small business owner ("Kleinunternehmer") it can be: +// - `11` - Steuer nicht erhoben nach §19UStG - tax rates: 0.0 - replaces `"taxType": "ss"` +type ModelOrderTaxRuleId string + +// ModelOrderTaxRuleObjectName Name of the object. Must always be TaxRule +type ModelOrderTaxRuleObjectName string + +// ModelOrderPos Order position model +type ModelOrderPos struct { + // Create Date of order position creation + Create *string `json:"create,omitempty"` + + // Discount An optional discount of the position. + Discount *float32 `json:"discount"` + + // Id The order position id + Id *int `json:"id,omitempty"` + + // Name Name of the article/part. + Name *string `json:"name"` + + // ObjectName The order position object name + ObjectName *string `json:"objectName,omitempty"` + + // Optional Defines if the position is optional. + Optional *bool `json:"optional"` + + // Order The order to which the position belongs. + Order *struct { + // Id Unique identifier of the order + Id int `json:"id"` + + // ObjectName Model name, which is 'Order' + ObjectName string `json:"objectName"` + } `json:"order,omitempty"` + + // Part Part from your inventory which is used in the position. + Part *struct { + // Id Unique identifier of the part + Id int `json:"id"` + + // ObjectName Model name, which is 'Part' + ObjectName string `json:"objectName"` + } `json:"part,omitempty"` + + // PositionNumber Position number of your position. Can be used to order multiple positions. + PositionNumber *int `json:"positionNumber"` + + // Price Price of the article/part. Is either gross or net, depending on the sevdesk account setting. + Price *float32 `json:"price"` + + // PriceGross Gross price of the part + PriceGross *float32 `json:"priceGross"` + + // PriceNet Net price of the part + PriceNet *float32 `json:"priceNet"` + + // PriceTax Tax on the price of the part + PriceTax *float32 `json:"priceTax"` + + // Quantity Quantity of the article/part + Quantity float32 `json:"quantity"` + + // SevClient Client to which order position belongs. Will be filled automatically + SevClient *struct { + // Id Unique identifier of the client + Id int `json:"id"` + + // ObjectName Model name, which is 'SevClient' + ObjectName string `json:"objectName"` + } `json:"sevClient,omitempty"` + + // SumDiscount Discount sum of the position + SumDiscount *float32 `json:"sumDiscount"` + + // TaxRate Tax rate of the position. + TaxRate float32 `json:"taxRate"` + + // Text A text describing your position. + Text *string `json:"text"` + + // Unity The unit in which the positions part is measured + Unity struct { + // Id Unique identifier of the unit + Id int `json:"id"` + + // ObjectName Model name, which is 'Unity' + ObjectName string `json:"objectName"` + } `json:"unity"` + + // Update Date of last order position update + Update *string `json:"update,omitempty"` +} + +// ModelOrderPosResponse Order position model +type ModelOrderPosResponse struct { + // Create Date of order position creation + Create *time.Time `json:"create,omitempty"` + + // Discount An optional discount of the position. + Discount *string `json:"discount"` + + // Id The order position id + Id *string `json:"id,omitempty"` + + // Name Name of the article/part. + Name *string `json:"name"` + + // ObjectName The order position object name + ObjectName *string `json:"objectName,omitempty"` + + // Optional Defines if the position is optional. + Optional *bool `json:"optional"` + + // Order The order to which the position belongs. + Order *struct { + // Id Unique identifier of the order + Id string `json:"id"` + + // ObjectName Model name, which is 'Order' + ObjectName string `json:"objectName"` + } `json:"order,omitempty"` + + // Part Part from your inventory which is used in the position. + Part *struct { + // Id Unique identifier of the part + Id string `json:"id"` + + // ObjectName Model name, which is 'Part' + ObjectName string `json:"objectName"` + } `json:"part,omitempty"` + + // PositionNumber Position number of your position. Can be used to order multiple positions. + PositionNumber *string `json:"positionNumber"` + + // Price Price of the article/part. Is either gross or net, depending on the sevdesk account setting. + Price *string `json:"price"` + + // PriceGross Gross price of the part + PriceGross *string `json:"priceGross"` + + // PriceNet Net price of the part + PriceNet *string `json:"priceNet"` + + // PriceTax Tax on the price of the part + PriceTax *string `json:"priceTax"` + + // Quantity Quantity of the article/part + Quantity *string `json:"quantity,omitempty"` + + // SevClient Client to which order position belongs. Will be filled automatically + SevClient *struct { + // Id Unique identifier of the client + Id string `json:"id"` + + // ObjectName Model name, which is 'SevClient' + ObjectName string `json:"objectName"` + } `json:"sevClient,omitempty"` + + // SumDiscount Discount sum of the position + SumDiscount *string `json:"sumDiscount"` + + // TaxRate Tax rate of the position. + TaxRate *string `json:"taxRate,omitempty"` + + // Text A text describing your position. + Text *string `json:"text"` + + // Unity The unit in which the positions part is measured + Unity *struct { + // Id Unique identifier of the unit + Id string `json:"id"` + + // ObjectName Model name, which is 'Unity' + ObjectName string `json:"objectName"` + } `json:"unity,omitempty"` + + // Update Date of last order position update + Update *time.Time `json:"update,omitempty"` +} + +// ModelOrderPosUpdate Order position model +type ModelOrderPosUpdate struct { + // Create Date of order position creation + Create *time.Time `json:"create,omitempty"` + + // Discount An optional discount of the position. + Discount *float32 `json:"discount"` + + // Id The order position id + Id *int `json:"id,omitempty"` + + // Name Name of the article/part. + Name *string `json:"name"` + + // ObjectName The order position object name + ObjectName *string `json:"objectName,omitempty"` + + // Optional Defines if the position is optional. + Optional *bool `json:"optional"` + + // Order The order to which the position belongs. + Order *struct { + // Id Unique identifier of the order + Id int `json:"id"` + + // ObjectName Model name, which is 'Order' + ObjectName string `json:"objectName"` + } `json:"order,omitempty"` + + // Part Part from your inventory which is used in the position. + Part *struct { + // Id Unique identifier of the part + Id int `json:"id"` + + // ObjectName Model name, which is 'Part' + ObjectName string `json:"objectName"` + } `json:"part,omitempty"` + + // PositionNumber Position number of your position. Can be used to order multiple positions. + PositionNumber *int `json:"positionNumber"` + + // Price Price of the article/part. Is either gross or net, depending on the sevdesk account setting. + Price *float32 `json:"price"` + + // PriceGross Gross price of the part + PriceGross *float32 `json:"priceGross"` + + // PriceNet Net price of the part + PriceNet *float32 `json:"priceNet"` + + // PriceTax Tax on the price of the part + PriceTax *float32 `json:"priceTax"` + + // Quantity Quantity of the article/part + Quantity *float32 `json:"quantity"` + + // SevClient Client to which order position belongs. Will be filled automatically + SevClient *struct { + // Id Unique identifier of the client + Id int `json:"id"` + + // ObjectName Model name, which is 'SevClient' + ObjectName string `json:"objectName"` + } `json:"sevClient,omitempty"` + + // SumDiscount Discount sum of the position + SumDiscount *float32 `json:"sumDiscount"` + + // TaxRate Tax rate of the position. + TaxRate *float32 `json:"taxRate"` + + // Text A text describing your position. + Text *string `json:"text"` + + // Unity The unit in which the positions part is measured + Unity *struct { + // Id Unique identifier of the unit + Id int `json:"id"` + + // ObjectName Model name, which is 'Unity' + ObjectName string `json:"objectName"` + } `json:"unity,omitempty"` + + // Update Date of last order position update + Update *time.Time `json:"update,omitempty"` +} + +// ModelOrderResponse Order model +type ModelOrderResponse struct { + // Address Complete address of the recipient including name, street, city, zip and country.
+ // Line breaks can be used and will be displayed on the invoice pdf. + Address *string `json:"address"` + + // AddressCountry Can be omitted as complete address is defined in address attribute + AddressCountry *struct { + // Id Unique identifier of the country + Id string `json:"id"` + + // ObjectName Model name, which is 'StaticCountry' + ObjectName string `json:"objectName"` + } `json:"addressCountry"` + + // Contact The contact used in the order + Contact *struct { + // Id Unique identifier of the contact + Id string `json:"id"` + + // ObjectName Model name, which is 'Contact' + ObjectName string `json:"objectName"` + } `json:"contact,omitempty"` + + // ContactPerson The user who acts as a contact person for the order + ContactPerson *struct { + // Id Unique identifier of the user + Id string `json:"id"` + + // ObjectName Model name, which is 'SevUser' + ObjectName string `json:"objectName"` + } `json:"contactPerson,omitempty"` + + // Create Date of order creation + Create *time.Time `json:"create,omitempty"` + + // CreateUser Will be filled automatically by our system and can't be changed + CreateUser *struct { + // Id Unique identifier of the user + Id string `json:"id"` + + // ObjectName Model name, which is 'SevUser' + ObjectName string `json:"objectName"` + } `json:"createUser,omitempty"` + + // Currency Currency used in the order. Needs to be currency code according to ISO-4217 + Currency *string `json:"currency,omitempty"` + + // CustomerInternalNote Internal note of the customer. Contains data entered into field 'Referenz/Bestellnummer' + CustomerInternalNote *string `json:"customerInternalNote"` + + // DeliveryTerms Delivery terms of the order + DeliveryTerms *string `json:"deliveryTerms"` + + // FootText Certain html tags can be used here to format your text + FootText *string `json:"footText"` + + // HeadText Certain html tags can be used here to format your text + HeadText *string `json:"headText"` + + // Header Normally consist of prefix plus the order number + Header *string `json:"header,omitempty"` + + // Id The order id + Id *string `json:"id,omitempty"` + + // ObjectName The order object name + ObjectName *string `json:"objectName,omitempty"` + + // OrderDate Needs to be provided as timestamp or dd.mm.yyyy + OrderDate *time.Time `json:"orderDate,omitempty"` + + // OrderNumber The order number + OrderNumber *string `json:"orderNumber,omitempty"` + + // OrderType Type of the order. For more information on the different types, check + // this + OrderType *ModelOrderResponseOrderType `json:"orderType,omitempty"` + + // Origin Object from which the order was created. For example an offer. + Origin *struct { + // Id Unique identifier of the object + Id string `json:"id"` + + // ObjectName Model name of the object. Could be 'Order'. + ObjectName string `json:"objectName"` + } `json:"origin"` + + // PaymentTerms Payment terms of the order + PaymentTerms *string `json:"paymentTerms"` + + // SendDate The date the order was sent to the customer + SendDate *time.Time `json:"sendDate"` + + // SendType Type which was used to send the order. IMPORTANT: Please refer to the order section of the + // * API-Overview to understand how this attribute can be used before using it! + SendType *ModelOrderResponseSendType `json:"sendType"` + + // SevClient Client to which order belongs. Will be filled automatically + SevClient *struct { + // Id Unique identifier of the client + Id string `json:"id"` + + // ObjectName Model name, which is 'SevClient' + ObjectName string `json:"objectName"` + } `json:"sevClient,omitempty"` + + // ShowNet If true, the net amount of each position will be shown on the order. Otherwise gross amount + ShowNet *bool `json:"showNet,omitempty"` + + // SmallSettlement Defines if the client uses the small settlement scheme. + // If yes, the order must not contain any vat + SmallSettlement *bool `json:"smallSettlement,omitempty"` + + // Status Please have a look in + // status of orders + // to see what the different status codes mean + Status *ModelOrderResponseStatus `json:"status,omitempty"` + + // SumDiscounts Sum of all discounts in the order + SumDiscounts *string `json:"sumDiscounts,omitempty"` + + // SumDiscountsForeignCurrency Discounts sum of the order in the foreign currency + SumDiscountsForeignCurrency *string `json:"sumDiscountsForeignCurrency,omitempty"` + + // SumGross Gross sum of the order + SumGross *string `json:"sumGross,omitempty"` + + // SumGrossForeignCurrency Gross sum of the order in the foreign currency + SumGrossForeignCurrency *string `json:"sumGrossForeignCurrency,omitempty"` + + // SumNet Net sum of the order + SumNet *string `json:"sumNet,omitempty"` + + // SumNetForeignCurrency Net sum of the order in the foreign currency + SumNetForeignCurrency *string `json:"sumNetForeignCurrency,omitempty"` + + // SumTax Tax sum of the order + SumTax *string `json:"sumTax,omitempty"` + + // SumTaxForeignCurrency Tax sum of the order in the foreign currency + SumTaxForeignCurrency *string `json:"sumTaxForeignCurrency,omitempty"` + + // TaxRate This is not used anymore. Use the taxRate of the individual positions instead. + TaxRate *string `json:"taxRate,omitempty"` + + // TaxRule **Use this in sevdesk-Update 2.0 (replaces taxType / taxSet).** + TaxRule *struct { + // Id **Use this in sevdesk-Update 2.0 (replaces taxType / taxSet).** + // + // Defines the vat-regulation. + // For "Regelbesteuerung" it can be one of: + // - `1` - Umsatzsteuerpflichtige Umsätze - tax rates: 0.0, 7.0, 19.0 - replaces `"taxType": "default"` + // - `2` - Ausfuhren - allowedTaxRates: 0.0 + // - `3` - Innergemeinschaftliche Lieferungen - tax rates: 0.0, 7.0, 19.0 - replaces `"taxType": "eu"` + // - `4` - Steuerfreie Umsätze §4 UStG - tax rates: 0.0 + // - `5` - Reverse Charge gem. §13b UStG - tax rates: 0.0 + // - `17` - Nicht im Inland steuerbare Leistung - tax rates: 0.0 - replaces `"taxType": "noteu"` + // - If \"Nicht im Inland steuerbare Leistung\" is used, no advance or partial invoice can be created from this order + // - See the example request ([Invoice/Factory/createInvoiceFromOrder](#tag/Invoice/operation/createInvoiceFromOrder)) to create a normal invoice `"invoiceType": "RE"` from such an order + // + // For small business owner ("Kleinunternehmer") it can be: + // - `11` - Steuer nicht erhoben nach §19UStG - tax rates: 0.0 - replaces `"taxType": "ss"` + Id ModelOrderResponseTaxRuleId `json:"id"` + + // ObjectName Name of the object. Must always be TaxRule + ObjectName ModelOrderResponseTaxRuleObjectName `json:"objectName"` + } `json:"taxRule,omitempty"` + + // TaxSet **Use this in sevdesk-Update 1.0 (instead of taxRule).** + // + // Tax set of the order. Needs to be added if you chose the tax type custom + TaxSet *struct { + // Id Unique identifier of the object + Id string `json:"id"` + + // ObjectName Model name, which is 'TaxSet' + ObjectName string `json:"objectName"` + } `json:"taxSet"` + + // TaxText A common tax text would be 'Umsatzsteuer 19%' + TaxText *string `json:"taxText,omitempty"` + + // TaxType **Use this in sevdesk-Update 1.0 (instead of taxRule).** + // + // Tax type of the order. + // There are four tax types: + // 1. default - Umsatzsteuer ausweisen + // 2. eu - Steuerfreie innergemeinschaftliche Lieferung (Europäische Union) + // 3. noteu - Steuerschuldnerschaft des Leistungsempfängers (außerhalb EU, z. B. Schweiz) + // 4. custom - Using custom tax set + // 5. ss - Not subject to VAT according to §19 1 UStG + // Tax rates are heavily connected to the tax type used. + TaxType *string `json:"taxType,omitempty"` + + // Update Date of last order update + Update *time.Time `json:"update,omitempty"` + + // Version Version of the order.
+ // Can be used if you have multiple drafts for the same order.
+ // Should start with 0 + Version *string `json:"version,omitempty"` +} + +// ModelOrderResponseOrderType Type of the order. For more information on the different types, check +// +// this +type ModelOrderResponseOrderType string + +// ModelOrderResponseSendType Type which was used to send the order. IMPORTANT: Please refer to the order section of the +// - API-Overview to understand how this attribute can be used before using it! +type ModelOrderResponseSendType string + +// ModelOrderResponseStatus Please have a look in +// +// status of orders +// to see what the different status codes mean +type ModelOrderResponseStatus string + +// ModelOrderResponseTaxRuleId **Use this in sevdesk-Update 2.0 (replaces taxType / taxSet).** +// +// Defines the vat-regulation. +// For "Regelbesteuerung" it can be one of: +// - `1` - Umsatzsteuerpflichtige Umsätze - tax rates: 0.0, 7.0, 19.0 - replaces `"taxType": "default"` +// - `2` - Ausfuhren - allowedTaxRates: 0.0 +// - `3` - Innergemeinschaftliche Lieferungen - tax rates: 0.0, 7.0, 19.0 - replaces `"taxType": "eu"` +// - `4` - Steuerfreie Umsätze §4 UStG - tax rates: 0.0 +// - `5` - Reverse Charge gem. §13b UStG - tax rates: 0.0 +// - `17` - Nicht im Inland steuerbare Leistung - tax rates: 0.0 - replaces `"taxType": "noteu"` +// - If \"Nicht im Inland steuerbare Leistung\" is used, no advance or partial invoice can be created from this order +// - See the example request ([Invoice/Factory/createInvoiceFromOrder](#tag/Invoice/operation/createInvoiceFromOrder)) to create a normal invoice `"invoiceType": "RE"` from such an order +// +// For small business owner ("Kleinunternehmer") it can be: +// - `11` - Steuer nicht erhoben nach §19UStG - tax rates: 0.0 - replaces `"taxType": "ss"` +type ModelOrderResponseTaxRuleId string + +// ModelOrderResponseTaxRuleObjectName Name of the object. Must always be TaxRule +type ModelOrderResponseTaxRuleObjectName string + +// ModelOrderUpdate Order model +type ModelOrderUpdate struct { + // Address Complete address of the recipient including name, street, city, zip and country.
+ // Line breaks can be used and will be displayed on the invoice pdf. + Address *string `json:"address"` + + // AddressCountry Can be omitted as complete address is defined in address attribute + AddressCountry *struct { + // Id Unique identifier of the country + Id int `json:"id"` + + // ObjectName Model name, which is 'StaticCountry' + ObjectName string `json:"objectName"` + } `json:"addressCountry"` + + // Contact The contact used in the order + Contact *struct { + // Id Unique identifier of the contact + Id int `json:"id"` + + // ObjectName Model name, which is 'Contact' + ObjectName string `json:"objectName"` + } `json:"contact"` + + // ContactPerson The user who acts as a contact person for the order + ContactPerson *struct { + // Id Unique identifier of the user + Id int `json:"id"` + + // ObjectName Model name, which is 'SevUser' + ObjectName string `json:"objectName"` + } `json:"contactPerson,omitempty"` + + // Create Date of order creation + Create *time.Time `json:"create,omitempty"` + + // CreateUser Will be filled automatically by our system and can't be changed + CreateUser *struct { + // Id Unique identifier of the user + Id int `json:"id"` + + // ObjectName Model name, which is 'SevUser' + ObjectName string `json:"objectName"` + } `json:"createUser,omitempty"` + + // Currency Currency used in the order. Needs to be currency code according to ISO-4217 + Currency *string `json:"currency"` + + // CustomerInternalNote Internal note of the customer. Contains data entered into field 'Referenz/Bestellnummer' + CustomerInternalNote *string `json:"customerInternalNote"` + + // DeliveryTerms Delivery terms of the order + DeliveryTerms *string `json:"deliveryTerms"` + + // FootText Certain html tags can be used here to format your text + FootText *string `json:"footText"` + + // HeadText Certain html tags can be used here to format your text + HeadText *string `json:"headText"` + + // Header Normally consist of prefix plus the order number + Header *string `json:"header"` + + // Id The order id + Id *int `json:"id,omitempty"` + + // ObjectName The order object name + ObjectName *string `json:"objectName,omitempty"` + + // OrderDate Needs to be provided as timestamp or dd.mm.yyyy + OrderDate *time.Time `json:"orderDate"` + + // OrderNumber The order number + OrderNumber *string `json:"orderNumber,omitempty"` + + // OrderType Type of the order. For more information on the different types, check + // this + OrderType *ModelOrderUpdateOrderType `json:"orderType"` + + // Origin Object from which the order was created. For example an offer. + Origin *struct { + // Id Unique identifier of the object + Id int `json:"id"` + + // ObjectName Model name of the object. Could be 'Order'. + ObjectName string `json:"objectName"` + } `json:"origin"` + + // PaymentTerms Payment terms of the order + PaymentTerms *string `json:"paymentTerms"` + + // SendDate The date the order was sent to the customer + SendDate *time.Time `json:"sendDate"` + + // SendType Type which was used to send the order. IMPORTANT: Please refer to the order section of the + // * API-Overview to understand how this attribute can be used before using it! + SendType *ModelOrderUpdateSendType `json:"sendType"` + + // SevClient Client to which order belongs. Will be filled automatically + SevClient *struct { + // Id Unique identifier of the client + Id int `json:"id"` + + // ObjectName Model name, which is 'SevClient' + ObjectName string `json:"objectName"` + } `json:"sevClient,omitempty"` + + // ShowNet If true, the net amount of each position will be shown on the order. Otherwise gross amount + ShowNet *bool `json:"showNet"` + + // SmallSettlement Defines if the client uses the small settlement scheme. + // If yes, the order must not contain any vat + SmallSettlement *bool `json:"smallSettlement"` + + // Status Please have a look in + // status of orders + // to see what the different status codes mean + Status *ModelOrderUpdateStatus `json:"status"` + + // SumDiscounts Sum of all discounts in the order + SumDiscounts *float32 `json:"sumDiscounts,omitempty"` + + // SumDiscountsForeignCurrency Discounts sum of the order in the foreign currency + SumDiscountsForeignCurrency *float32 `json:"sumDiscountsForeignCurrency,omitempty"` + + // SumGross Gross sum of the order + SumGross *float32 `json:"sumGross,omitempty"` + + // SumGrossForeignCurrency Gross sum of the order in the foreign currency + SumGrossForeignCurrency *float32 `json:"sumGrossForeignCurrency,omitempty"` + + // SumNet Net sum of the order + SumNet *float32 `json:"sumNet,omitempty"` + + // SumNetForeignCurrency Net sum of the order in the foreign currency + SumNetForeignCurrency *float32 `json:"sumNetForeignCurrency,omitempty"` + + // SumTax Tax sum of the order + SumTax *float32 `json:"sumTax,omitempty"` + + // SumTaxForeignCurrency Tax sum of the order in the foreign currency + SumTaxForeignCurrency *float32 `json:"sumTaxForeignCurrency,omitempty"` + + // TaxRate This is not used anymore. Use the taxRate of the individual positions instead. + TaxRate *float32 `json:"taxRate"` + + // TaxRule **Use this in sevdesk-Update 2.0 (replaces taxType / taxSet).** + TaxRule *struct { + // Id **Use this in sevdesk-Update 2.0 (replaces taxType / taxSet).** + // + // Defines the vat-regulation. + // For "Regelbesteuerung" it can be one of: + // - `1` - Umsatzsteuerpflichtige Umsätze - tax rates: 0.0, 7.0, 19.0 - replaces `"taxType": "default"` + // - `2` - Ausfuhren - allowedTaxRates: 0.0 + // - `3` - Innergemeinschaftliche Lieferungen - tax rates: 0.0, 7.0, 19.0 - replaces `"taxType": "eu"` + // - `4` - Steuerfreie Umsätze §4 UStG - tax rates: 0.0 + // - `5` - Reverse Charge gem. §13b UStG - tax rates: 0.0 + // - `17` - Nicht im Inland steuerbare Leistung - tax rates: 0.0 - replaces `"taxType": "noteu"` + // - If \"Nicht im Inland steuerbare Leistung\" is used, no advance or partial invoice can be created from this order + // - See the example request ([Invoice/Factory/createInvoiceFromOrder](#tag/Invoice/operation/createInvoiceFromOrder)) to create a normal invoice `"invoiceType": "RE"` from such an order + // + // For small business owner ("Kleinunternehmer") it can be: + // - `11` - Steuer nicht erhoben nach §19UStG - tax rates: 0.0 - replaces `"taxType": "ss"` + Id ModelOrderUpdateTaxRuleId `json:"id"` + + // ObjectName Name of the object. Must always be TaxRule + ObjectName ModelOrderUpdateTaxRuleObjectName `json:"objectName"` + } `json:"taxRule,omitempty"` + + // TaxSet **Use this in sevdesk-Update 1.0 (instead of taxRule).** + // + // Tax set of the order. Needs to be added if you chose the tax type custom + TaxSet *struct { + // Id Unique identifier of the object + Id int `json:"id"` + + // ObjectName Model name, which is 'TaxSet' + ObjectName string `json:"objectName"` + } `json:"taxSet"` + + // TaxText A common tax text would be 'Umsatzsteuer 19%' + TaxText *string `json:"taxText"` + + // TaxType **Use this in sevdesk-Update 1.0 (instead of taxRule).** + // + // Tax type of the order. + // There are four tax types: + // 1. default - Umsatzsteuer ausweisen + // 2. eu - Steuerfreie innergemeinschaftliche Lieferung (Europäische Union) + // 3. noteu - Steuerschuldnerschaft des Leistungsempfängers (außerhalb EU, z. B. Schweiz) + // 4. custom - Using custom tax set + // 5. ss - Not subject to VAT according to §19 1 UStG + // Tax rates are heavily connected to the tax type used. + TaxType *string `json:"taxType"` + + // Update Date of last order update + Update *time.Time `json:"update,omitempty"` + + // Version Version of the order.
+ // Can be used if you have multiple drafts for the same order.
+ // Should start with 0 + Version *int `json:"version"` +} + +// ModelOrderUpdateOrderType Type of the order. For more information on the different types, check +// +// this +type ModelOrderUpdateOrderType string + +// ModelOrderUpdateSendType Type which was used to send the order. IMPORTANT: Please refer to the order section of the +// - API-Overview to understand how this attribute can be used before using it! +type ModelOrderUpdateSendType string + +// ModelOrderUpdateStatus Please have a look in +// +// status of orders +// to see what the different status codes mean +type ModelOrderUpdateStatus int + +// ModelOrderUpdateTaxRuleId **Use this in sevdesk-Update 2.0 (replaces taxType / taxSet).** +// +// Defines the vat-regulation. +// For "Regelbesteuerung" it can be one of: +// - `1` - Umsatzsteuerpflichtige Umsätze - tax rates: 0.0, 7.0, 19.0 - replaces `"taxType": "default"` +// - `2` - Ausfuhren - allowedTaxRates: 0.0 +// - `3` - Innergemeinschaftliche Lieferungen - tax rates: 0.0, 7.0, 19.0 - replaces `"taxType": "eu"` +// - `4` - Steuerfreie Umsätze §4 UStG - tax rates: 0.0 +// - `5` - Reverse Charge gem. §13b UStG - tax rates: 0.0 +// - `17` - Nicht im Inland steuerbare Leistung - tax rates: 0.0 - replaces `"taxType": "noteu"` +// - If \"Nicht im Inland steuerbare Leistung\" is used, no advance or partial invoice can be created from this order +// - See the example request ([Invoice/Factory/createInvoiceFromOrder](#tag/Invoice/operation/createInvoiceFromOrder)) to create a normal invoice `"invoiceType": "RE"` from such an order +// +// For small business owner ("Kleinunternehmer") it can be: +// - `11` - Steuer nicht erhoben nach §19UStG - tax rates: 0.0 - replaces `"taxType": "ss"` +type ModelOrderUpdateTaxRuleId string + +// ModelOrderUpdateTaxRuleObjectName Name of the object. Must always be TaxRule +type ModelOrderUpdateTaxRuleObjectName string + +// ModelPart Part model +type ModelPart struct { + // Category Category of the part.
+ // For all categories, send a GET to /Category?objectType=Part + Category *struct { + // Id Unique identifier of the category + Id int `json:"id"` + + // ObjectName Model name, which is 'Category' + ObjectName string `json:"objectName"` + } `json:"category"` + + // Create Date of part creation + Create *time.Time `json:"create,omitempty"` + + // Id The part id + Id *int `json:"id,omitempty"` + + // InternalComment An internal comment for the part.
+ // Does not appear on invoices and orders. + InternalComment *string `json:"internalComment"` + + // Name Name of the part + Name string `json:"name"` + + // ObjectName The part object name + ObjectName *string `json:"objectName,omitempty"` + + // PartNumber The part number + PartNumber string `json:"partNumber"` + + // Price Net price for which the part is sold. we will change this parameter so that the gross price is calculated automatically, until then the priceGross parameter must be used. + Price *float32 `json:"price"` + + // PriceGross Gross price for which the part is sold + PriceGross *float32 `json:"priceGross"` + + // PriceNet Net price for which the part is sold + PriceNet *float32 `json:"priceNet"` + + // PricePurchase Purchase price of the part + PricePurchase *float32 `json:"pricePurchase"` + + // SevClient Client to which part belongs. Will be filled automatically + SevClient *struct { + // Id Unique identifier of the client + Id int `json:"id"` + + // ObjectName Model name, which is 'SevClient' + ObjectName string `json:"objectName"` + } `json:"sevClient,omitempty"` + + // Status Status of the part. 50 <-> Inactive - 100 <-> Active + Status *ModelPartStatus `json:"status"` + + // Stock The stock of the part + Stock float32 `json:"stock"` + + // StockEnabled Defines if the stock should be enabled + StockEnabled *bool `json:"stockEnabled,omitempty"` + + // TaxRate Tax rate of the part + TaxRate float32 `json:"taxRate"` + + // Text A text describing the part + Text *string `json:"text"` + + // Unity The unit in which the part is measured + Unity struct { + // Id Unique identifier of the unit + Id int `json:"id"` + + // ObjectName Model name, which is 'Unity' + ObjectName string `json:"objectName"` + } `json:"unity"` + + // Update Date of last part update + Update *time.Time `json:"update,omitempty"` +} + +// ModelPartStatus Status of the part. 50 <-> Inactive - 100 <-> Active +type ModelPartStatus int + +// ModelPartUpdate Part model +type ModelPartUpdate struct { + // Category Category of the part.
+ // For all categories, send a GET to /Category?objectType=Part + Category *struct { + // Id Unique identifier of the category + Id int `json:"id"` + + // ObjectName Model name, which is 'Category' + ObjectName string `json:"objectName"` + } `json:"category"` + + // Create Date of part creation + Create *time.Time `json:"create,omitempty"` + + // Id The part id + Id *int `json:"id"` + + // InternalComment An internal comment for the part.
+ // Does not appear on invoices and orders. + InternalComment *string `json:"internalComment"` + + // Name Name of the part + Name *string `json:"name,omitempty"` + + // ObjectName The part object name + ObjectName *string `json:"objectName"` + + // PartNumber The part number + PartNumber *string `json:"partNumber,omitempty"` + + // Price Net price for which the part is sold. we will change this parameter so that the gross price is calculated automatically, until then the priceGross parameter must be used. + Price *float32 `json:"price"` + + // PriceGross Gross price for which the part is sold + PriceGross *float32 `json:"priceGross"` + + // PriceNet Net price for which the part is sold + PriceNet *float32 `json:"priceNet"` + + // PricePurchase Purchase price of the part + PricePurchase *float32 `json:"pricePurchase"` + + // SevClient Client to which part belongs. Will be filled automatically + SevClient *struct { + // Id Unique identifier of the client + Id int `json:"id"` + + // ObjectName Model name, which is 'SevClient' + ObjectName string `json:"objectName"` + } `json:"sevClient,omitempty"` + + // Status Status of the part. 50 <-> Inactive - 100 <-> Active + Status *ModelPartUpdateStatus `json:"status"` + + // Stock The stock of the part + Stock *float32 `json:"stock,omitempty"` + + // StockEnabled Defines if the stock should be enabled + StockEnabled *bool `json:"stockEnabled"` + + // TaxRate Tax rate of the part + TaxRate *float32 `json:"taxRate,omitempty"` + + // Text A text describing the part + Text *string `json:"text"` + + // Unity The unit in which the part is measured + Unity *struct { + // Id Unique identifier of the unit + Id int `json:"id"` + + // ObjectName Model name, which is 'Unity' + ObjectName string `json:"objectName"` + } `json:"unity,omitempty"` + + // Update Date of last part update + Update *time.Time `json:"update,omitempty"` +} + +// ModelPartUpdateStatus Status of the part. 50 <-> Inactive - 100 <-> Active +type ModelPartUpdateStatus int + +// ModelTagCreateResponse tag model +type ModelTagCreateResponse struct { + AdditionalInformation *string `json:"additionalInformation,omitempty"` + + // Create Date of tag creation + Create *time.Time `json:"create,omitempty"` + + // Id Id of the tag + Id *string `json:"id,omitempty"` + Object *struct { + // Id Id of the invoice/order/voucher/creditNote + Id int `json:"id"` + + // ObjectName Model name + ObjectName ModelTagCreateResponseObjectObjectName `json:"objectName"` + } `json:"object,omitempty"` + + // ObjectName Internal object name which is 'TagRelation'. + ObjectName *string `json:"objectName,omitempty"` + + // SevClient Client to which invoice belongs. Will be filled automatically + SevClient *struct { + // Id Unique identifier of the client + Id string `json:"id"` + + // ObjectName Model name, which is 'SevClient' + ObjectName string `json:"objectName"` + } `json:"sevClient,omitempty"` + + // Tag The tag information + Tag *struct { + // Id Unique identifier of the tag + Id string `json:"id"` + + // ObjectName Model name, which is 'Tag' + ObjectName string `json:"objectName"` + } `json:"tag,omitempty"` +} + +// ModelTagCreateResponseObjectObjectName Model name +type ModelTagCreateResponseObjectObjectName string + +// ModelTagResponse tag model +type ModelTagResponse struct { + AdditionalInformation *string `json:"additionalInformation,omitempty"` + + // Create Date of tag creation + Create *time.Time `json:"create,omitempty"` + + // Id Id of the tag + Id *string `json:"id,omitempty"` + + // Name name of the tag + Name *string `json:"name,omitempty"` + + // ObjectName Internal object name which is 'Tag'. + ObjectName *string `json:"objectName,omitempty"` + + // SevClient Client to which invoice belongs. Will be filled automatically + SevClient *struct { + // Id Unique identifier of the client + Id string `json:"id"` + + // ObjectName Model name, which is 'SevClient' + ObjectName string `json:"objectName"` + } `json:"sevClient,omitempty"` +} + +// ModelTextparserFetchDictionaryEntriesByTypeResponse Textparser fetchDictionaryEntriesByType model +type ModelTextparserFetchDictionaryEntriesByTypeResponse struct { + Key *string `json:"key,omitempty"` + Value *[]struct { + Key *string `json:"key,omitempty"` + Value *string `json:"value,omitempty"` + } `json:"value,omitempty"` +} + +// ModelVoucher Voucher model +type ModelVoucher struct { + // CostCentre Cost centre for the voucher + CostCentre *struct { + // Id Unique identifier of the cost centre + Id int `json:"id"` + + // ObjectName Model name, which is 'CostCentre' + ObjectName string `json:"objectName"` + } `json:"costCentre,omitempty"` + + // Create Date of voucher creation + Create *time.Time `json:"create,omitempty"` + + // CreateUser User who created the voucher. Will be filled automatically. + CreateUser *struct { + // Id Unique identifier of the user + Id int `json:"id"` + + // ObjectName Model name, which is 'SevUser' + ObjectName string `json:"objectName"` + } `json:"createUser,omitempty"` + + // CreditDebit Defines if your voucher is a credit (C) or debit (D) + CreditDebit ModelVoucherCreditDebit `json:"creditDebit"` + + // Currency specifies which currency the voucher should have. Attention: If the currency differs from the default currency stored in the account, then either the "propertyForeignCurrencyDeadline" or "propertyExchangeRate" parameter must be specified. If both parameters are specified, then the "propertyForeignCurrencyDeadline" parameter is preferred + Currency *string `json:"currency"` + + // DeliveryDate Needs to be provided as timestamp or dd.mm.yyyy + DeliveryDate *time.Time `json:"deliveryDate,omitempty"` + + // DeliveryDateUntil Needs to be provided as timestamp or dd.mm.yyyy + DeliveryDateUntil *time.Time `json:"deliveryDateUntil"` + + // Description The description of the voucher. Essentially the voucher number. + Description *string `json:"description"` + + // Document The document of the voucher. + Document *struct { + // Id Unique identifier of the document + Id int `json:"id"` + + // ObjectName Model name, which is 'Document' + ObjectName string `json:"objectName"` + } `json:"document"` + + // Enshrined Enshrined vouchers cannot be changed. Can only be set via [Voucher/{voucherId}/enshrine](#tag/Voucher/operation/voucherEnshrine). This operation cannot be undone. + Enshrined *time.Time `json:"enshrined,omitempty"` + + // Id The voucher id + Id *int `json:"id,omitempty"` + MapAll bool `json:"mapAll"` + + // ObjectName The voucher object name + ObjectName string `json:"objectName"` + + // PaidAmount Amount which has already been paid for this voucher by the customer + PaidAmount *float32 `json:"paidAmount"` + + // PayDate Needs to be timestamp or dd.mm.yyyy + PayDate *time.Time `json:"payDate"` + + // PaymentDeadline Payment deadline of the voucher. + PaymentDeadline *time.Time `json:"paymentDeadline"` + + // PropertyExchangeRate Defines the exchange rate + PropertyExchangeRate *float32 `json:"propertyExchangeRate"` + + // PropertyForeignCurrencyDeadline Defines the exchange rate day and and then the exchange rate is set from sevdesk. Needs to be provided as timestamp or dd.mm.yyyy + PropertyForeignCurrencyDeadline *time.Time `json:"propertyForeignCurrencyDeadline"` + + // RecurringEndDate The date when the recurring vouchers end being generated.
+ // Necessary attribute for all recurring vouchers. + RecurringEndDate *time.Time `json:"recurringEndDate"` + + // RecurringInterval The DateInterval in which recurring vouchers are generated.
+ // Necessary attribute for all recurring vouchers. + RecurringInterval *ModelVoucherRecurringInterval `json:"recurringInterval"` + + // RecurringLastVoucher The date when the last voucher was generated. + RecurringLastVoucher *time.Time `json:"recurringLastVoucher"` + + // RecurringNextVoucher The date when the next voucher should be generated.
+ // Necessary attribute for all recurring vouchers. + RecurringNextVoucher *time.Time `json:"recurringNextVoucher"` + + // RecurringStartDate The date when the recurring vouchers start being generated.
+ // Necessary attribute for all recurring vouchers. + RecurringStartDate *time.Time `json:"recurringStartDate"` + + // SevClient Client to which voucher belongs. Will be filled automatically + SevClient *struct { + // Id Unique identifier of the client + Id int `json:"id"` + + // ObjectName Model name, which is 'SevClient' + ObjectName string `json:"objectName"` + } `json:"sevClient,omitempty"` + + // Status Please have a look in + // status of vouchers + // to see what the different status codes mean + Status ModelVoucherStatus `json:"status"` + + // SumDiscounts Sum of all discounts in the voucher + SumDiscounts *float32 `json:"sumDiscounts,omitempty"` + + // SumDiscountsForeignCurrency Discounts sum of the voucher in the foreign currency + SumDiscountsForeignCurrency *float32 `json:"sumDiscountsForeignCurrency,omitempty"` + + // SumGross Gross sum of the voucher + SumGross *float32 `json:"sumGross,omitempty"` + + // SumGrossAccounting Gross accounting sum of the voucher. Is usually the same as sumGross + SumGrossAccounting *float32 `json:"sumGrossAccounting,omitempty"` + + // SumNet Net sum of the voucher + SumNet *float32 `json:"sumNet,omitempty"` + + // SumNetAccounting Net accounting sum of the voucher. Is usually the same as sumNet + SumNetAccounting *float32 `json:"sumNetAccounting,omitempty"` + + // SumTax Tax sum of the voucher + SumTax *float32 `json:"sumTax,omitempty"` + + // SumTaxAccounting Tax accounting sum of the voucher. Is usually the same as sumTax + SumTaxAccounting *float32 `json:"sumTaxAccounting,omitempty"` + + // Supplier The contact used in the voucher as a supplier.
+ // If you don't have a contact as a supplier, you can set this object to null. + Supplier *struct { + // Id Unique identifier of the contact + Id int `json:"id"` + + // ObjectName Model name, which is 'Contact' + ObjectName string `json:"objectName"` + } `json:"supplier"` + + // SupplierName The supplier name.
+ // The value you provide here will determine what supplier name is shown for the voucher in case you did not provide a supplier. + SupplierName *string `json:"supplierName"` + + // TaxRule **Use this in sevdesk-Update 2.0 (replaces taxType / taxSet).** + TaxRule struct { + // Id **Use this in sevdesk-Update 2.0 (replaces taxType / taxSet).** + // + // Defines the vat-regulation. + // For "Regelbesteuerung" it can be one of: + // - `1` - Umsatzsteuerpflichtige Umsätze (tax rates: 0.0, 7.0, 19.0) - replaces `"taxType": "default"` + // - `2` - Ausfuhren (tax rates: 0.0) + // - `3` - Innergemeinschaftliche Lieferungen (tax rates: 0.0, 7.0, 19.0) - replaces `"taxType": "eu"` + // - `4` - Steuerfreie Umsätze §4 UStG (tax rates: 0.0) + // - `5` - Reverse Charge gem. §13b UStG (tax rates: 0.0) + // + // For small business owner ("Kleinunternehmer") it can be: + // - `11` - Steuer nicht erhoben nach §19UStG (tax rates: 0.0) - replaces `"taxType": "ss"` + Id ModelVoucherTaxRuleId `json:"id"` + + // ObjectName Name of the object. Must always be TaxRule + ObjectName ModelVoucherTaxRuleObjectName `json:"objectName"` + } `json:"taxRule"` + + // TaxSet ** Use this in sevdesk-Update 2.0 (replaces taxType / taxSet).** + // + // Tax set of the voucher. Needs to be added if you chose the taxType=custom. + TaxSet *struct { + // Id Unique identifier of the object + Id int `json:"id"` + + // ObjectName Model name, which is 'TaxSet' + ObjectName string `json:"objectName"` + } `json:"taxSet"` + + // TaxType **Use this in sevdesk-Update 1.0 (instead of taxRule).** + // + // Tax type of the voucher. + // There are four tax types: + // 1. default - Umsatzsteuer ausweisen + // 2. eu - Steuerfreie innergemeinschaftliche Lieferung (Europäische Union) + // 3. noteu - Steuerschuldnerschaft des Leistungsempfängers (außerhalb EU, z. B. Schweiz) + // 4. custom - Using custom tax set + // 5. ss - Not subject to VAT according to §19 1 UStG + // Tax rates are heavily connected to the tax type used. + TaxType string `json:"taxType"` + + // Update Date of last voucher update + Update *time.Time `json:"update,omitempty"` + + // VoucherDate Needs to be provided as timestamp or dd.mm.yyyy + VoucherDate *time.Time `json:"voucherDate"` + + // VoucherType Type of the voucher. For more information on the different types, check + // this + VoucherType ModelVoucherVoucherType `json:"voucherType"` +} + +// ModelVoucherCreditDebit Defines if your voucher is a credit (C) or debit (D) +type ModelVoucherCreditDebit string + +// ModelVoucherRecurringInterval The DateInterval in which recurring vouchers are generated.
+// +// Necessary attribute for all recurring vouchers. +type ModelVoucherRecurringInterval string + +// ModelVoucherStatus Please have a look in +// +// status of vouchers +// to see what the different status codes mean +type ModelVoucherStatus float32 + +// ModelVoucherTaxRuleId **Use this in sevdesk-Update 2.0 (replaces taxType / taxSet).** +// +// Defines the vat-regulation. +// For "Regelbesteuerung" it can be one of: +// - `1` - Umsatzsteuerpflichtige Umsätze (tax rates: 0.0, 7.0, 19.0) - replaces `"taxType": "default"` +// - `2` - Ausfuhren (tax rates: 0.0) +// - `3` - Innergemeinschaftliche Lieferungen (tax rates: 0.0, 7.0, 19.0) - replaces `"taxType": "eu"` +// - `4` - Steuerfreie Umsätze §4 UStG (tax rates: 0.0) +// - `5` - Reverse Charge gem. §13b UStG (tax rates: 0.0) +// +// For small business owner ("Kleinunternehmer") it can be: +// - `11` - Steuer nicht erhoben nach §19UStG (tax rates: 0.0) - replaces `"taxType": "ss"` +type ModelVoucherTaxRuleId string + +// ModelVoucherTaxRuleObjectName Name of the object. Must always be TaxRule +type ModelVoucherTaxRuleObjectName string + +// ModelVoucherVoucherType Type of the voucher. For more information on the different types, check +// +// this +type ModelVoucherVoucherType string + +// ModelVoucherPos Voucher position model +type ModelVoucherPos struct { + // AccountDatev Use this in sevdesk-Update 2.0 (replaces accountingType). + // The account datev to which the position belongs.
+ // An account datev is the booking account to which the position belongs.
+ // For more information, please refer to + // this section. + AccountDatev struct { + // Id Unique identifier of the account datev + Id int `json:"id"` + + // ObjectName Model name, which is 'AccountDatev' + ObjectName string `json:"objectName"` + } `json:"accountDatev"` + + // AccountingType The accounting type to which the position belongs.
+ // An accounting type is the booking account to which the position belongs.
+ // For more information, please refer to + // this section. + AccountingType struct { + // Id Unique identifier of the accounting type + Id int `json:"id"` + + // ObjectName Model name, which is 'AccountingType' + ObjectName string `json:"objectName"` + } `json:"accountingType"` + + // Comment Comment for the voucher position. + Comment *string `json:"comment"` + + // Create Date of voucher position creation + Create *string `json:"create,omitempty"` + + // EstimatedAccountingType The accounting type to which the position belongs estimated by our voucher recognition.
+ // An accounting type is the booking account to which the position belongs.
+ // For more information, please refer to + // this section. + EstimatedAccountingType *struct { + // Id Unique identifier of the accounting type + Id int `json:"id"` + + // ObjectName Model name, which is 'AccountingType' + ObjectName string `json:"objectName"` + } `json:"estimatedAccountingType,omitempty"` + + // Id The voucher position id + Id *int `json:"id,omitempty"` + + // IsAsset Determines whether position is regarded as an asset which can be depreciated. + IsAsset *bool `json:"isAsset,omitempty"` + MapAll bool `json:"mapAll"` + + // Net Determines whether 'sumNet' or 'sumGross' is regarded.
+ // If both are not given, 'sum' is regarded and treated as net or gross depending on 'net'. + // All positions must be either net or gross, a mixture of the two is not possible. + Net bool `json:"net"` + + // ObjectName The voucher position object name + ObjectName string `json:"objectName"` + + // SevClient Client to which voucher position belongs. Will be filled automatically + SevClient *struct { + // Id Unique identifier of the client + Id int `json:"id"` + + // ObjectName Model name, which is 'SevClient' + ObjectName string `json:"objectName"` + } `json:"sevClient,omitempty"` + + // SumGross Gross sum of the voucher position.
+ // Only regarded if 'net' is 'false', otherwise its readOnly. + SumGross float32 `json:"sumGross"` + + // SumGrossAccounting Gross accounting sum. Is equal to sumGross. + SumGrossAccounting *float32 `json:"sumGrossAccounting,omitempty"` + + // SumNet Net sum of the voucher position.
+ // Only regarded if 'net' is 'true', otherwise its readOnly. + SumNet float32 `json:"sumNet"` + + // SumNetAccounting Net accounting sum. Is equal to sumNet. + SumNetAccounting *float32 `json:"sumNetAccounting,omitempty"` + + // SumTax Tax sum of the voucher position. + SumTax *float32 `json:"sumTax,omitempty"` + + // SumTaxAccounting Tax accounting sum. Is equal to sumTax. + SumTaxAccounting *float32 `json:"sumTaxAccounting,omitempty"` + + // TaxRate Tax rate of the voucher position. + TaxRate float32 `json:"taxRate"` + + // Update Date of last voucher position update + Update *string `json:"update,omitempty"` + + // Voucher The voucher to which the position belongs. + Voucher *struct { + // Id Unique identifier of the voucher + Id int `json:"id"` + + // ObjectName Model name, which is 'Voucher' + ObjectName string `json:"objectName"` + } `json:"voucher,omitempty"` +} + +// ModelVoucherPosResponse Voucher position model +type ModelVoucherPosResponse struct { + // AccountDatev Use this in sevdesk-Update 2.0 (replaces accountingType). + // The account datev to which the position belongs.
+ // An account datev is the booking account to which the position belongs.
+ // For more information, please refer to + // this section. + AccountDatev struct { + // Id Unique identifier of the account datev + Id int `json:"id"` + + // ObjectName Model name, which is 'AccountDatev' + ObjectName string `json:"objectName"` + } `json:"accountDatev"` + + // AccountingType The accounting type to which the position belongs.
+ // An accounting type is the booking account to which the position belongs.
+ // For more information, please refer to + // this section. + AccountingType struct { + // Id Unique identifier of the accounting type + Id string `json:"id"` + + // ObjectName Model name, which is 'AccountingType' + ObjectName string `json:"objectName"` + } `json:"accountingType"` + + // Comment Comment for the voucher position. + Comment *string `json:"comment"` + + // Create Date of voucher position creation + Create *string `json:"create,omitempty"` + + // EstimatedAccountingType The accounting type to which the position belongs estimated by our voucher recognition.
+ // An accounting type is the booking account to which the position belongs.
+ // For more information, please refer to + // this section. + EstimatedAccountingType *struct { + // Id Unique identifier of the accounting type + Id string `json:"id"` + + // ObjectName Model name, which is 'AccountingType' + ObjectName string `json:"objectName"` + } `json:"estimatedAccountingType,omitempty"` + + // Id The voucher position id + Id *string `json:"id,omitempty"` + + // IsAsset Determines whether position is regarded as an asset which can be depreciated. + IsAsset *bool `json:"isAsset,omitempty"` + + // Net Determines whether 'sumNet' or 'sumGross' is regarded.
+ // If both are not given, 'sum' is regarded and treated as net or gross depending on 'net'. + // All positions must be either net or gross, a mixture of the two is not possible. + Net bool `json:"net"` + + // ObjectName The voucher position object name + ObjectName *string `json:"objectName,omitempty"` + + // SevClient Client to which voucher position belongs. Will be filled automatically + SevClient *struct { + // Id Unique identifier of the client + Id string `json:"id"` + + // ObjectName Model name, which is 'SevClient' + ObjectName string `json:"objectName"` + } `json:"sevClient,omitempty"` + + // SumGross Gross sum of the voucher position.
+ // Only regarded if 'net' is 'false', otherwise its readOnly. + SumGross string `json:"sumGross"` + + // SumGrossAccounting Gross accounting sum. Is equal to sumGross. + SumGrossAccounting *string `json:"sumGrossAccounting,omitempty"` + + // SumNet Net sum of the voucher position.
+ // Only regarded if 'net' is 'true', otherwise its readOnly. + SumNet string `json:"sumNet"` + + // SumNetAccounting Net accounting sum. Is equal to sumNet. + SumNetAccounting *string `json:"sumNetAccounting,omitempty"` + + // SumTax Tax sum of the voucher position. + SumTax *string `json:"sumTax,omitempty"` + + // SumTaxAccounting Tax accounting sum. Is equal to sumTax. + SumTaxAccounting *string `json:"sumTaxAccounting,omitempty"` + + // TaxRate Tax rate of the voucher position. + TaxRate string `json:"taxRate"` + + // Update Date of last voucher position update + Update *string `json:"update,omitempty"` + + // Voucher The voucher to which the position belongs. + Voucher *struct { + // Id Unique identifier of the voucher + Id string `json:"id"` + + // ObjectName Model name, which is 'Voucher' + ObjectName string `json:"objectName"` + } `json:"voucher,omitempty"` +} + +// ModelVoucherResponse Voucher model +type ModelVoucherResponse struct { + // CostCentre Cost centre for the voucher + CostCentre *struct { + // Id Unique identifier of the cost centre + Id string `json:"id"` + + // ObjectName Model name, which is 'CostCentre' + ObjectName string `json:"objectName"` + } `json:"costCentre,omitempty"` + + // Create Date of voucher creation + Create *time.Time `json:"create,omitempty"` + + // CreateUser User who created the voucher. Will be filled automatically. + CreateUser *struct { + // Id Unique identifier of the user + Id string `json:"id"` + + // ObjectName Model name, which is 'SevUser' + ObjectName string `json:"objectName"` + } `json:"createUser,omitempty"` + + // CreditDebit Defines if your voucher is a credit (C) or debit (D) + CreditDebit *ModelVoucherResponseCreditDebit `json:"creditDebit"` + + // Currency specifies which currency the voucher should have. Attention: If the currency differs from the default currency stored in the account, then either the "propertyForeignCurrencyDeadline" or "propertyExchangeRate" parameter must be specified. If both parameters are specified, then the "propertyForeignCurrencyDeadline" parameter is preferred + Currency *string `json:"currency"` + + // DeliveryDate Needs to be provided as timestamp or dd.mm.yyyy + DeliveryDate *time.Time `json:"deliveryDate,omitempty"` + + // DeliveryDateUntil Needs to be provided as timestamp or dd.mm.yyyy + DeliveryDateUntil *time.Time `json:"deliveryDateUntil"` + + // Description The description of the voucher. Essentially the voucher number. + Description *string `json:"description"` + + // Document The document of the voucher. + Document *struct { + // Id Unique identifier of the document + Id string `json:"id"` + + // ObjectName Model name, which is 'Document' + ObjectName string `json:"objectName"` + } `json:"document"` + + // Enshrined Enshrined vouchers cannot be changed. Can only be set via [Voucher/{voucherId}/enshrine](#tag/Voucher/operation/voucherEnshrine). This operation cannot be undone. + Enshrined *time.Time `json:"enshrined,omitempty"` + + // Id The voucher id + Id *string `json:"id,omitempty"` + MapAll *bool `json:"mapAll,omitempty"` + + // ObjectName The voucher object name + ObjectName *string `json:"objectName,omitempty"` + + // PaidAmount Amount which has already been paid for this voucher by the customer + PaidAmount *float32 `json:"paidAmount"` + + // PayDate Needs to be timestamp or dd.mm.yyyy + PayDate *time.Time `json:"payDate"` + + // PaymentDeadline Payment deadline of the voucher. + PaymentDeadline *time.Time `json:"paymentDeadline"` + + // PropertyExchangeRate Defines the exchange rate + PropertyExchangeRate *string `json:"propertyExchangeRate"` + + // PropertyForeignCurrencyDeadline Defines the exchange rate day and and then the exchange rate is set from sevdesk. Needs to be provided as timestamp or dd.mm.yyyy + PropertyForeignCurrencyDeadline *time.Time `json:"propertyForeignCurrencyDeadline"` + + // RecurringEndDate The date when the recurring vouchers end being generated.
+ // Necessary attribute for all recurring vouchers. + RecurringEndDate *time.Time `json:"recurringEndDate"` + + // RecurringInterval The DateInterval in which recurring vouchers are generated.
+ // Necessary attribute for all recurring vouchers. + RecurringInterval *ModelVoucherResponseRecurringInterval `json:"recurringInterval"` + + // RecurringLastVoucher The date when the last voucher was generated. + RecurringLastVoucher *time.Time `json:"recurringLastVoucher"` + + // RecurringNextVoucher The date when the next voucher should be generated.
+ // Necessary attribute for all recurring vouchers. + RecurringNextVoucher *time.Time `json:"recurringNextVoucher"` + + // RecurringStartDate The date when the recurring vouchers start being generated.
+ // Necessary attribute for all recurring vouchers. + RecurringStartDate *time.Time `json:"recurringStartDate"` + + // SevClient Client to which voucher belongs. Will be filled automatically + SevClient *struct { + // Id Unique identifier of the client + Id string `json:"id"` + + // ObjectName Model name, which is 'SevClient' + ObjectName string `json:"objectName"` + } `json:"sevClient,omitempty"` + + // Status Please have a look in + // status of vouchers + // to see what the different status codes mean + Status *ModelVoucherResponseStatus `json:"status"` + + // SumDiscounts Sum of all discounts in the voucher + SumDiscounts *string `json:"sumDiscounts,omitempty"` + + // SumDiscountsForeignCurrency Discounts sum of the voucher in the foreign currency + SumDiscountsForeignCurrency *string `json:"sumDiscountsForeignCurrency,omitempty"` + + // SumGross Gross sum of the voucher + SumGross *string `json:"sumGross,omitempty"` + + // SumGrossAccounting Gross accounting sum of the voucher. Is usually the same as sumGross + SumGrossAccounting *string `json:"sumGrossAccounting,omitempty"` + + // SumNet Net sum of the voucher + SumNet *string `json:"sumNet,omitempty"` + + // SumNetAccounting Net accounting sum of the voucher. Is usually the same as sumNet + SumNetAccounting *string `json:"sumNetAccounting,omitempty"` + + // SumTax Tax sum of the voucher + SumTax *string `json:"sumTax,omitempty"` + + // SumTaxAccounting Tax accounting sum of the voucher. Is usually the same as sumTax + SumTaxAccounting *string `json:"sumTaxAccounting,omitempty"` + + // Supplier The contact used in the voucher as a supplier.
+ // If you don't have a contact as a supplier, you can set this object to null. + Supplier *struct { + // Id Unique identifier of the contact + Id string `json:"id"` + + // ObjectName Model name, which is 'Contact' + ObjectName string `json:"objectName"` + } `json:"supplier"` + + // SupplierName The supplier name.
+ // The value you provide here will determine what supplier name is shown for the voucher in case you did not provide a supplier. + SupplierName *string `json:"supplierName"` + + // TaxRule **Use this in sevdesk-Update 2.0 (replaces taxType / taxSet).** + TaxRule *struct { + // Id **Use this in sevdesk-Update 2.0 (replaces taxType / taxSet).** + // + // Defines the vat-regulation. + // For "Regelbesteuerung" it can be one of: + // - `1` - Umsatzsteuerpflichtige Umsätze (tax rates: 0.0, 7.0, 19.0) - replaces `"taxType": "default"` + // - `2` - Ausfuhren (tax rates: 0.0) + // - `3` - Innergemeinschaftliche Lieferungen (tax rates: 0.0, 7.0, 19.0) - replaces `"taxType": "eu"` + // - `4` - Steuerfreie Umsätze §4 UStG (tax rates: 0.0) + // - `5` - Reverse Charge gem. §13b UStG (tax rates: 0.0) + // + // For small business owner ("Kleinunternehmer") it can be: + // - `11` - Steuer nicht erhoben nach §19UStG (tax rates: 0.0) - replaces `"taxType": "ss"` + Id ModelVoucherResponseTaxRuleId `json:"id"` + + // ObjectName Name of the object. Must always be TaxRule + ObjectName ModelVoucherResponseTaxRuleObjectName `json:"objectName"` + } `json:"taxRule,omitempty"` + + // TaxSet **Use this in sevdesk-Update 2.0 (replaces taxType / taxSet).** + // + // Tax set of the voucher. Needs to be added if you chose the taxType=custom. + TaxSet *struct { + // Id Unique identifier of the object + Id string `json:"id"` + + // ObjectName Model name, which is 'TaxSet' + ObjectName string `json:"objectName"` + } `json:"taxSet"` + + // TaxType **Use this in sevdesk-Update 1.0 (instead of taxRule).** + // + // Tax type of the voucher. + // There are four tax types: + // 1. default - Umsatzsteuer ausweisen + // 2. eu - Steuerfreie innergemeinschaftliche Lieferung (Europäische Union) + // 3. noteu - Steuerschuldnerschaft des Leistungsempfängers (außerhalb EU, z. B. Schweiz) + // 4. custom - Using custom tax set + // 5. ss - Not subject to VAT according to §19 1 UStG + // Tax rates are heavily connected to the tax type used. + TaxType *string `json:"taxType"` + + // Update Date of last voucher update + Update *time.Time `json:"update,omitempty"` + + // VoucherDate Needs to be provided as timestamp or dd.mm.yyyy + VoucherDate *time.Time `json:"voucherDate"` + + // VoucherType Type of the voucher. For more information on the different types, check + // this + VoucherType *ModelVoucherResponseVoucherType `json:"voucherType"` +} + +// ModelVoucherResponseCreditDebit Defines if your voucher is a credit (C) or debit (D) +type ModelVoucherResponseCreditDebit string + +// ModelVoucherResponseRecurringInterval The DateInterval in which recurring vouchers are generated.
+// +// Necessary attribute for all recurring vouchers. +type ModelVoucherResponseRecurringInterval string + +// ModelVoucherResponseStatus Please have a look in +// +// status of vouchers +// to see what the different status codes mean +type ModelVoucherResponseStatus string + +// ModelVoucherResponseTaxRuleId **Use this in sevdesk-Update 2.0 (replaces taxType / taxSet).** +// +// Defines the vat-regulation. +// For "Regelbesteuerung" it can be one of: +// - `1` - Umsatzsteuerpflichtige Umsätze (tax rates: 0.0, 7.0, 19.0) - replaces `"taxType": "default"` +// - `2` - Ausfuhren (tax rates: 0.0) +// - `3` - Innergemeinschaftliche Lieferungen (tax rates: 0.0, 7.0, 19.0) - replaces `"taxType": "eu"` +// - `4` - Steuerfreie Umsätze §4 UStG (tax rates: 0.0) +// - `5` - Reverse Charge gem. §13b UStG (tax rates: 0.0) +// +// For small business owner ("Kleinunternehmer") it can be: +// - `11` - Steuer nicht erhoben nach §19UStG (tax rates: 0.0) - replaces `"taxType": "ss"` +type ModelVoucherResponseTaxRuleId string + +// ModelVoucherResponseTaxRuleObjectName Name of the object. Must always be TaxRule +type ModelVoucherResponseTaxRuleObjectName string + +// ModelVoucherResponseVoucherType Type of the voucher. For more information on the different types, check +// +// this +type ModelVoucherResponseVoucherType string + +// ModelVoucherUpdate Voucher model +type ModelVoucherUpdate struct { + // CostCentre Cost centre for the voucher + CostCentre *struct { + // Id Unique identifier of the cost centre + Id int `json:"id"` + + // ObjectName Model name, which is 'CostCentre' + ObjectName string `json:"objectName"` + } `json:"costCentre,omitempty"` + + // CreditDebit Defines if your voucher is a credit (C) or debit (D) + CreditDebit *ModelVoucherUpdateCreditDebit `json:"creditDebit,omitempty"` + + // Currency specifies which currency the voucher should have. Attention: If the currency differs from the default currency stored in the account, then either the "propertyForeignCurrencyDeadline" or "propertyExchangeRate" parameter must be specified. If both parameters are specified, then the "propertyForeignCurrencyDeadline" parameter is preferred + Currency *string `json:"currency"` + + // DeliveryDate Needs to be provided as timestamp or dd.mm.yyyy + DeliveryDate *time.Time `json:"deliveryDate,omitempty"` + + // DeliveryDateUntil Needs to be provided as timestamp or dd.mm.yyyy + DeliveryDateUntil *time.Time `json:"deliveryDateUntil"` + + // Description The description of the voucher. Essentially the voucher number. + Description *string `json:"description"` + + // Document The document of the voucher. + Document *struct { + // Id Unique identifier of the document + Id int `json:"id"` + + // ObjectName Model name, which is 'Document' + ObjectName string `json:"objectName"` + } `json:"document"` + + // PaidAmount Amount which has already been paid for this voucher by the customer + PaidAmount *float32 `json:"paidAmount"` + + // PayDate Needs to be timestamp or dd.mm.yyyy + PayDate *time.Time `json:"payDate"` + + // PaymentDeadline Payment deadline of the voucher. + PaymentDeadline *time.Time `json:"paymentDeadline"` + + // PropertyExchangeRate Defines the exchange rate + PropertyExchangeRate *float32 `json:"propertyExchangeRate"` + + // PropertyForeignCurrencyDeadline Defines the exchange rate day and and then the exchange rate is set from sevdesk. Needs to be provided as timestamp or dd.mm.yyyy + PropertyForeignCurrencyDeadline *time.Time `json:"propertyForeignCurrencyDeadline"` + + // Status Not supported in sevdesk-Update 2.0.

Please have a look in status of vouchers to see what the different status codes mean + Status *ModelVoucherUpdateStatus `json:"status,omitempty"` + + // Supplier The contact used in the voucher as a supplier.
+ // If you don't have a contact as a supplier, you can set this object to null. + Supplier *struct { + // Id Unique identifier of the contact + Id int `json:"id"` + + // ObjectName Model name, which is 'Contact' + ObjectName string `json:"objectName"` + } `json:"supplier"` + + // SupplierName The supplier name.
+ // The value you provide here will determine what supplier name is shown for the voucher in case you did not provide a supplier. + SupplierName *string `json:"supplierName"` + + // TaxRule **Use this in sevdesk-Update 2.0 (replaces taxType / taxSet).** + TaxRule *struct { + // Id **Use this in sevdesk-Update 2.0 (replaces taxType / taxSet).** + // + // Defines the vat-regulation. + // For "Regelbesteuerung" it can be one of: + // - `1` - Umsatzsteuerpflichtige Umsätze (tax rates: 0.0, 7.0, 19.0) - replaces `"taxType": "default"` + // - `2` - Ausfuhren (tax rates: 0.0) + // - `3` - Innergemeinschaftliche Lieferungen (tax rates: 0.0, 7.0, 19.0) - replaces `"taxType": "eu"` + // - `4` - Steuerfreie Umsätze §4 UStG (tax rates: 0.0) + // - `5` - Reverse Charge gem. §13b UStG (tax rates: 0.0) + // + // For small business owner ("Kleinunternehmer") it can be: + // - `11` - Steuer nicht erhoben nach §19UStG (tax rates: 0.0) - replaces `"taxType": "ss"` + Id ModelVoucherUpdateTaxRuleId `json:"id"` + + // ObjectName Name of the object. Must always be TaxRule + ObjectName ModelVoucherUpdateTaxRuleObjectName `json:"objectName"` + } `json:"taxRule,omitempty"` + + // TaxSet **Use this in sevdesk-Update 2.0 (replaces taxType / taxSet).** + // + // Tax set of the voucher. Needs to be added if you chose the taxType=custom. + TaxSet *struct { + // Id Unique identifier of the object + Id int `json:"id"` + + // ObjectName Model name, which is 'TaxSet' + ObjectName string `json:"objectName"` + } `json:"taxSet"` + + // TaxType **Use this in sevdesk-Update 1.0 (instead of taxRule).** + // + // Tax type of the voucher. + // There are four tax types: + // 1. default - Umsatzsteuer ausweisen + // 2. eu - Steuerfreie innergemeinschaftliche Lieferung (Europäische Union) + // 3. noteu - Steuerschuldnerschaft des Leistungsempfängers (außerhalb EU, z. B. Schweiz) + // 4. custom - Using custom tax set + // 5. ss - Not subject to VAT according to §19 1 UStG + // Tax rates are heavily connected to the tax type used. + TaxType *string `json:"taxType,omitempty"` + + // VoucherDate Needs to be provided as timestamp or dd.mm.yyyy + VoucherDate *time.Time `json:"voucherDate"` + + // VoucherType Type of the voucher. For more information on the different types, check + // this + VoucherType *ModelVoucherUpdateVoucherType `json:"voucherType,omitempty"` +} + +// ModelVoucherUpdateCreditDebit Defines if your voucher is a credit (C) or debit (D) +type ModelVoucherUpdateCreditDebit string + +// ModelVoucherUpdateStatus Not supported in sevdesk-Update 2.0.

Please have a look in status of vouchers to see what the different status codes mean +type ModelVoucherUpdateStatus float32 + +// ModelVoucherUpdateTaxRuleId **Use this in sevdesk-Update 2.0 (replaces taxType / taxSet).** +// +// Defines the vat-regulation. +// For "Regelbesteuerung" it can be one of: +// - `1` - Umsatzsteuerpflichtige Umsätze (tax rates: 0.0, 7.0, 19.0) - replaces `"taxType": "default"` +// - `2` - Ausfuhren (tax rates: 0.0) +// - `3` - Innergemeinschaftliche Lieferungen (tax rates: 0.0, 7.0, 19.0) - replaces `"taxType": "eu"` +// - `4` - Steuerfreie Umsätze §4 UStG (tax rates: 0.0) +// - `5` - Reverse Charge gem. §13b UStG (tax rates: 0.0) +// +// For small business owner ("Kleinunternehmer") it can be: +// - `11` - Steuer nicht erhoben nach §19UStG (tax rates: 0.0) - replaces `"taxType": "ss"` +type ModelVoucherUpdateTaxRuleId string + +// ModelVoucherUpdateTaxRuleObjectName Name of the object. Must always be TaxRule +type ModelVoucherUpdateTaxRuleObjectName string + +// ModelVoucherUpdateVoucherType Type of the voucher. For more information on the different types, check +// +// this +type ModelVoucherUpdateVoucherType string + +// ModelCreditNote creditNote model +type ModelCreditNote struct { + // Address Complete address of the recipient including name, street, city, zip and country.
+ // Line breaks can be used and will be displayed on the invoice pdf. + Address *string `json:"address"` + + // AddressCountry Can be omitted as complete address is defined in address attribute + AddressCountry *struct { + // Id Unique identifier of the country + Id int `json:"id"` + + // ObjectName Model name, which is 'StaticCountry' + ObjectName string `json:"objectName"` + } `json:"addressCountry"` + + // BookingCategory Defines the booking category, for more information see the section [Credit note booking categories](#tag/CreditNote/Credit-note-booking-categories) + // + // The booking category of the credit note. + // + // **Must be UNDERACHIEVEMENT in sevdesk-Update 2.0.** + BookingCategory ModelCreditNoteBookingCategory `json:"bookingCategory"` + + // Contact The contact used in the creditNote + Contact struct { + // Id Unique identifier of the contact + Id int `json:"id"` + + // ObjectName Model name, which is 'Contact' + ObjectName string `json:"objectName"` + } `json:"contact"` + + // ContactPerson The user who acts as a contact person for the creditNote + ContactPerson struct { + // Id Unique identifier of the user + Id int `json:"id"` + + // ObjectName Model name, which is 'SevUser' + ObjectName string `json:"objectName"` + } `json:"contactPerson"` + + // Create Date of creditNote creation + Create *time.Time `json:"create,omitempty"` + + // CreateUser Will be filled automatically by our system and can't be changed + CreateUser *struct { + // Id Unique identifier of the user + Id int `json:"id"` + + // ObjectName Model name, which is 'SevUser' + ObjectName string `json:"objectName"` + } `json:"createUser,omitempty"` + + // CreditNoteDate Needs to be provided as timestamp or dd.mm.yyyy + CreditNoteDate time.Time `json:"creditNoteDate"` + + // CreditNoteNumber The creditNote number + CreditNoteNumber string `json:"creditNoteNumber"` + + // Currency Currency used in the creditNote. Needs to be currency code according to ISO-4217 + Currency string `json:"currency"` + + // CustomerInternalNote Internal note of the customer. Contains data entered into field 'Referenz/Bestellnummer' + CustomerInternalNote *string `json:"customerInternalNote"` + + // FootText Certain html tags can be used here to format your text + FootText *string `json:"footText"` + + // HeadText Certain html tags can be used here to format your text + HeadText *string `json:"headText"` + + // Header Normally consist of prefix plus the creditNote number + Header string `json:"header"` + + // Id The creditNote id. Required if you want to create/update an credit note position for an existing credit note" + Id *int `json:"id,omitempty"` + MapAll bool `json:"mapAll"` + + // ObjectName The creditNote object name + ObjectName string `json:"objectName"` + + // SendDate The date the creditNote was sent to the customer + SendDate *time.Time `json:"sendDate"` + + // SendType Type which was used to send the creditNote. IMPORTANT: Please refer to the creditNote section of the + // * API-Overview to understand how this attribute can be used before using it! + SendType *ModelCreditNoteSendType `json:"sendType"` + + // SevClient Client to which creditNote belongs. Will be filled automatically + SevClient *struct { + // Id Unique identifier of the client + Id int `json:"id"` + + // ObjectName Model name, which is 'SevClient' + ObjectName string `json:"objectName"` + } `json:"sevClient,omitempty"` + + // ShowNet If true, the net amount of each position will be shown on the creditNote. Otherwise gross amount + ShowNet *bool `json:"showNet,omitempty"` + + // SmallSettlement Defines if the client uses the small settlement scheme. + // If yes, the creditNote must not contain any vat + SmallSettlement *bool `json:"smallSettlement"` + + // Status Please have a look in + // status of credit note + // to see what the different status codes mean + Status ModelCreditNoteStatus `json:"status"` + + // SumDiscounts Sum of all discounts in the creditNote + SumDiscounts *float32 `json:"sumDiscounts,omitempty"` + + // SumDiscountsForeignCurrency Discounts sum of the creditNote in the foreign currency + SumDiscountsForeignCurrency *float32 `json:"sumDiscountsForeignCurrency,omitempty"` + + // SumGross Gross sum of the creditNote + SumGross *float32 `json:"sumGross,omitempty"` + + // SumGrossForeignCurrency Gross sum of the creditNote in the foreign currency + SumGrossForeignCurrency *float32 `json:"sumGrossForeignCurrency,omitempty"` + + // SumNet Net sum of the creditNote + SumNet *float32 `json:"sumNet,omitempty"` + + // SumNetForeignCurrency Net sum of the creditNote in the foreign currency + SumNetForeignCurrency *float32 `json:"sumNetForeignCurrency,omitempty"` + + // SumTax Tax sum of the creditNote + SumTax *float32 `json:"sumTax,omitempty"` + + // SumTaxForeignCurrency Tax sum of the creditNote in the foreign currency + SumTaxForeignCurrency *float32 `json:"sumTaxForeignCurrency,omitempty"` + + // TaxRate This is not used anymore. Use the taxRate of the individual positions instead. + TaxRate float32 `json:"taxRate"` + + // TaxRule **Use this in sevdesk-Update 2.0 (replaces taxType / taxSet).** + TaxRule struct { + // Id **Use this in sevdesk-Update 2.0 (replaces taxType / taxSet).** + // + // Defines the vat-regulation. + // For "Regelbesteuerung" it can be one of: + // - `1` - Umsatzsteuerpflichtige Umsätze - tax rates: 0.0, 7.0, 19.0 - replaces `"taxType": "default"` + // - `2` - Ausfuhren - allowedTaxRates: 0.0 + // - `3` - Innergemeinschaftliche Lieferungen - tax rates: 0.0, 7.0, 19.0 - replaces `"taxType": "eu"` + // - `4` - Steuerfreie Umsätze §4 UStG - tax rates: 0.0 + // - `5` - Reverse Charge gem. §13b UStG - tax rates: 0.0 + // - `17` - Nicht im Inland steuerbare Leistung - tax rates: 0.0 - replaces `"taxType": "noteu"` + // + // For small business owner ("Kleinunternehmer") it can be: + // - `11` - Steuer nicht erhoben nach §19UStG - tax rates: 0.0 - replaces `"taxType": "ss"` + Id ModelCreditNoteTaxRuleId `json:"id"` + + // ObjectName Name of the object. Must always be TaxRule + ObjectName ModelCreditNoteTaxRuleObjectName `json:"objectName"` + } `json:"taxRule"` + + // TaxSet **Use this in sevdesk-Update 1.0 (instead of taxRule).** + // + // Tax set of the creditNote. Needs to be added if you chose the tax type custom + TaxSet *struct { + // Id Unique identifier of the object + Id int `json:"id"` + + // ObjectName Model name, which is 'TaxSet' + ObjectName string `json:"objectName"` + } `json:"taxSet"` + + // TaxText A common tax text would be 'Umsatzsteuer 19%' + TaxText string `json:"taxText"` + + // TaxType **Use this in sevdesk-Update 1.0 (instead of taxRule).** + // + // Tax type of the creditNote. + // There are four tax types: + // 1. default - Umsatzsteuer ausweisen + // 2. eu - Steuerfreie innergemeinschaftliche Lieferung (Europäische Union) + // 3. noteu - Steuerschuldnerschaft des Leistungsempfängers (außerhalb EU, z. B. Schweiz) + // 4. custom - Using custom tax set + // 5. ss - Not subject to VAT according to §19 1 UStG + // Tax rates are heavily connected to the tax type used. + TaxType string `json:"taxType"` + + // Update Date of last creditNote update + Update *time.Time `json:"update,omitempty"` +} + +// ModelCreditNoteBookingCategory Defines the booking category, for more information see the section [Credit note booking categories](#tag/CreditNote/Credit-note-booking-categories) +// +// The booking category of the credit note. +// +// **Must be UNDERACHIEVEMENT in sevdesk-Update 2.0.** +type ModelCreditNoteBookingCategory string + +// ModelCreditNoteSendType Type which was used to send the creditNote. IMPORTANT: Please refer to the creditNote section of the +// - API-Overview to understand how this attribute can be used before using it! +type ModelCreditNoteSendType string + +// ModelCreditNoteStatus Please have a look in +// +// status of credit note +// to see what the different status codes mean +type ModelCreditNoteStatus string + +// ModelCreditNoteTaxRuleId **Use this in sevdesk-Update 2.0 (replaces taxType / taxSet).** +// +// Defines the vat-regulation. +// For "Regelbesteuerung" it can be one of: +// - `1` - Umsatzsteuerpflichtige Umsätze - tax rates: 0.0, 7.0, 19.0 - replaces `"taxType": "default"` +// - `2` - Ausfuhren - allowedTaxRates: 0.0 +// - `3` - Innergemeinschaftliche Lieferungen - tax rates: 0.0, 7.0, 19.0 - replaces `"taxType": "eu"` +// - `4` - Steuerfreie Umsätze §4 UStG - tax rates: 0.0 +// - `5` - Reverse Charge gem. §13b UStG - tax rates: 0.0 +// - `17` - Nicht im Inland steuerbare Leistung - tax rates: 0.0 - replaces `"taxType": "noteu"` +// +// For small business owner ("Kleinunternehmer") it can be: +// - `11` - Steuer nicht erhoben nach §19UStG - tax rates: 0.0 - replaces `"taxType": "ss"` +type ModelCreditNoteTaxRuleId string + +// ModelCreditNoteTaxRuleObjectName Name of the object. Must always be TaxRule +type ModelCreditNoteTaxRuleObjectName string + +// ModelCreditNotePos creditNote position model +type ModelCreditNotePos struct { + // Create Date of creditNote position creation + Create *string `json:"create,omitempty"` + + // CreditNote The creditNote to which the position belongs. Required if you want to create/update an credit note position for an existing credit note" + CreditNote *struct { + // Id Unique identifier of the creditNote + Id int `json:"id"` + + // ObjectName Model name, which is 'creditNote' + ObjectName string `json:"objectName"` + } `json:"creditNote,omitempty"` + + // Discount An optional discount of the position. + Discount *float32 `json:"discount"` + + // Id The creditNote position id. + Id *int `json:"id"` + MapAll bool `json:"mapAll"` + + // Name Name of the article/part. + Name *string `json:"name"` + + // ObjectName The creditNote position object name + ObjectName string `json:"objectName"` + + // Optional Defines if the position is optional. + Optional *bool `json:"optional"` + + // Part Part from your inventory which is used in the position. + Part *struct { + // Id Unique identifier of the part + Id int `json:"id"` + + // ObjectName Model name, which is 'Part' + ObjectName string `json:"objectName"` + } `json:"part,omitempty"` + + // PositionNumber Position number of your position. Can be used to creditNote multiple positions. + PositionNumber *int `json:"positionNumber"` + + // Price Price of the article/part. Is either gross or net, depending on the sevdesk account setting. + Price *float32 `json:"price"` + + // PriceGross Gross price of the part + PriceGross *float32 `json:"priceGross"` + + // PriceNet Net price of the part + PriceNet *float32 `json:"priceNet"` + + // PriceTax Tax on the price of the part + PriceTax *float32 `json:"priceTax"` + + // Quantity Quantity of the article/part + Quantity float32 `json:"quantity"` + + // SevClient Client to which creditNote position belongs. Will be filled automatically + SevClient *struct { + // Id Unique identifier of the client + Id int `json:"id"` + + // ObjectName Model name, which is 'SevClient' + ObjectName string `json:"objectName"` + } `json:"sevClient,omitempty"` + + // SumDiscount Discount sum of the position + SumDiscount *float32 `json:"sumDiscount"` + + // TaxRate Tax rate of the position. + TaxRate float32 `json:"taxRate"` + + // Text A text describing your position. + Text *string `json:"text"` + + // Unity The unit in which the positions part is measured + Unity struct { + // Id Unique identifier of the unit + Id int `json:"id"` + + // ObjectName Model name, which is 'Unity' + ObjectName string `json:"objectName"` + } `json:"unity"` + + // Update Date of last creditNote position update + Update *string `json:"update,omitempty"` +} + +// ModelCreditNotePosResponse creditNote position model +type ModelCreditNotePosResponse struct { + // Create Date of creditNote position creation + Create *string `json:"create,omitempty"` + + // CreditNote The creditNote to which the position belongs. + CreditNote struct { + // Id Unique identifier of the creditNote + Id string `json:"id"` + + // ObjectName Model name, which is 'creditNote' + ObjectName string `json:"objectName"` + } `json:"creditNote"` + + // Discount An optional discount of the position. + Discount *string `json:"discount"` + + // Id The creditNote position id + Id *string `json:"id,omitempty"` + + // Name Name of the article/part. + Name *string `json:"name"` + + // ObjectName The creditNote position object name + ObjectName *string `json:"objectName,omitempty"` + + // Optional Defines if the position is optional. + Optional *bool `json:"optional"` + + // Part Part from your inventory which is used in the position. + Part *struct { + // Id Unique identifier of the part + Id string `json:"id"` + + // ObjectName Model name, which is 'Part' + ObjectName string `json:"objectName"` + } `json:"part,omitempty"` + + // PositionNumber Position number of your position. Can be used to creditNote multiple positions. + PositionNumber *string `json:"positionNumber"` + + // Price Price of the article/part. Is either gross or net, depending on the sevdesk account setting. + Price *string `json:"price"` + + // PriceGross Gross price of the part + PriceGross *string `json:"priceGross"` + + // PriceNet Net price of the part + PriceNet *string `json:"priceNet"` + + // PriceTax Tax on the price of the part + PriceTax *string `json:"priceTax"` + + // Quantity Quantity of the article/part + Quantity string `json:"quantity"` + + // SevClient Client to which creditNote position belongs. Will be filled automatically + SevClient *struct { + // Id Unique identifier of the client + Id string `json:"id"` + + // ObjectName Model name, which is 'SevClient' + ObjectName string `json:"objectName"` + } `json:"sevClient,omitempty"` + + // SumDiscount Discount sum of the position + SumDiscount *string `json:"sumDiscount"` + + // TaxRate Tax rate of the position. + TaxRate string `json:"taxRate"` + + // Text A text describing your position. + Text *string `json:"text"` + + // Unity The unit in which the positions part is measured + Unity struct { + // Id Unique identifier of the unit + Id string `json:"id"` + + // ObjectName Model name, which is 'Unity' + ObjectName string `json:"objectName"` + } `json:"unity"` + + // Update Date of last creditNote position update + Update *string `json:"update,omitempty"` +} + +// ModelCreditNoteResponse creditNote model +type ModelCreditNoteResponse struct { + // Address Complete address of the recipient including name, street, city, zip and country.
+ // Line breaks can be used and will be displayed on the invoice pdf. + Address *string `json:"address"` + + // AddressCountry Can be omitted as complete address is defined in address attribute + AddressCountry *struct { + // Id Unique identifier of the country + Id string `json:"id"` + + // ObjectName Model name, which is 'StaticCountry' + ObjectName string `json:"objectName"` + } `json:"addressCountry"` + + // Contact The contact used in the creditNote + Contact *struct { + // Id Unique identifier of the contact + Id string `json:"id"` + + // ObjectName Model name, which is 'Contact' + ObjectName string `json:"objectName"` + } `json:"contact"` + + // ContactPerson The user who acts as a contact person for the creditNote + ContactPerson *struct { + // Id Unique identifier of the user + Id string `json:"id"` + + // ObjectName Model name, which is 'SevUser' + ObjectName string `json:"objectName"` + } `json:"contactPerson"` + + // Create Date of creditNote creation + Create *time.Time `json:"create,omitempty"` + + // CreateUser Will be filled automatically by our system and can't be changed + CreateUser *struct { + // Id Unique identifier of the user + Id string `json:"id"` + + // ObjectName Model name, which is 'SevUser' + ObjectName string `json:"objectName"` + } `json:"createUser,omitempty"` + + // CreditNoteDate The credit note date + CreditNoteDate *time.Time `json:"creditNoteDate,omitempty"` + + // CreditNoteNumber The creditNote number + CreditNoteNumber *string `json:"creditNoteNumber"` + + // Currency Currency used in the creditNote. Needs to be currency code according to ISO-4217 + Currency *string `json:"currency"` + + // CustomerInternalNote Internal note of the customer. Contains data entered into field 'Referenz/Bestellnummer' + CustomerInternalNote *string `json:"customerInternalNote"` + + // DeliveryDate Timestamp. This can also be a date range if you also use the attribute deliveryDateUntil + DeliveryDate *time.Time `json:"deliveryDate,omitempty"` + + // FootText Certain html tags can be used here to format your text + FootText *string `json:"footText"` + + // HeadText Certain html tags can be used here to format your text + HeadText *string `json:"headText"` + + // Header Normally consist of prefix plus the creditNote number + Header *string `json:"header"` + + // Id The creditNote id + Id *string `json:"id,omitempty"` + + // ObjectName The creditNote object name + ObjectName *string `json:"objectName,omitempty"` + + // SendDate The date the creditNote was sent to the customer + SendDate *time.Time `json:"sendDate"` + + // SendType Type which was used to send the creditNote. IMPORTANT: Please refer to the creditNote section of the + // * API-Overview to understand how this attribute can be used before using it! + SendType *ModelCreditNoteResponseSendType `json:"sendType"` + + // SevClient Client to which creditNote belongs. Will be filled automatically + SevClient *struct { + // Id Unique identifier of the client + Id string `json:"id"` + + // ObjectName Model name, which is 'SevClient' + ObjectName string `json:"objectName"` + } `json:"sevClient,omitempty"` + + // ShowNet If true, the net amount of each position will be shown on the creditNote. Otherwise gross amount + ShowNet *bool `json:"showNet,omitempty"` + + // SmallSettlement Defines if the client uses the small settlement scheme. + // If yes, the creditNote must not contain any vat + SmallSettlement *bool `json:"smallSettlement"` + + // Status Please have a look in + // status of credit note + // to see what the different status codes mean + Status *ModelCreditNoteResponseStatus `json:"status,omitempty"` + + // SumDiscounts Sum of all discounts in the creditNote + SumDiscounts *string `json:"sumDiscounts,omitempty"` + + // SumDiscountsForeignCurrency Discounts sum of the creditNote in the foreign currency + SumDiscountsForeignCurrency *string `json:"sumDiscountsForeignCurrency,omitempty"` + + // SumGross Gross sum of the creditNote + SumGross *string `json:"sumGross,omitempty"` + + // SumGrossForeignCurrency Gross sum of the creditNote in the foreign currency + SumGrossForeignCurrency *string `json:"sumGrossForeignCurrency,omitempty"` + + // SumNet Net sum of the creditNote + SumNet *string `json:"sumNet,omitempty"` + + // SumNetForeignCurrency Net sum of the creditNote in the foreign currency + SumNetForeignCurrency *string `json:"sumNetForeignCurrency,omitempty"` + + // SumTax Tax sum of the creditNote + SumTax *string `json:"sumTax,omitempty"` + + // SumTaxForeignCurrency Tax sum of the creditNote in the foreign currency + SumTaxForeignCurrency *string `json:"sumTaxForeignCurrency,omitempty"` + + // TaxRate This is not used anymore. Use the taxRate of the individual positions instead. + TaxRate *string `json:"taxRate"` + + // TaxRule **Use this in sevdesk-Update 2.0 (replaces taxType / taxSet).** + TaxRule *struct { + // Id **Use this in sevdesk-Update 2.0 (replaces taxType / taxSet).** + // + // Defines the vat-regulation. + // For "Regelbesteuerung" it can be one of: + // - `1` - Umsatzsteuerpflichtige Umsätze - tax rates: 0.0, 7.0, 19.0 - replaces `"taxType": "default"` + // - `2` - Ausfuhren - allowedTaxRates: 0.0 + // - `3` - Innergemeinschaftliche Lieferungen - tax rates: 0.0, 7.0, 19.0 - replaces `"taxType": "eu"` + // - `4` - Steuerfreie Umsätze §4 UStG - tax rates: 0.0 + // - `5` - Reverse Charge gem. §13b UStG - tax rates: 0.0 + // - `17` - Nicht im Inland steuerbare Leistung - tax rates: 0.0 - replaces `"taxType": "noteu"` + // + // For small business owner ("Kleinunternehmer") it can be: + // - `11` - Steuer nicht erhoben nach §19UStG - tax rates: 0.0 - replaces `"taxType": "ss"` + Id ModelCreditNoteResponseTaxRuleId `json:"id"` + + // ObjectName Name of the object. Must always be TaxRule + ObjectName ModelCreditNoteResponseTaxRuleObjectName `json:"objectName"` + } `json:"taxRule,omitempty"` + + // TaxSet **Use this in sevdesk-Update 1.0 (instead of taxRule).** + // + // Tax set of the creditNote. Needs to be added if you chose the tax type custom + TaxSet *struct { + // Id Unique identifier of the object + Id string `json:"id"` + + // ObjectName Model name, which is 'TaxSet' + ObjectName string `json:"objectName"` + } `json:"taxSet"` + + // TaxText A common tax text would be 'Umsatzsteuer 19%' + TaxText *string `json:"taxText"` + + // TaxType **Use this in sevdesk-Update 1.0 (instead of taxRule).** + // + // Tax type of the creditNote. + // There are four tax types: + // 1. default - Umsatzsteuer ausweisen + // 2. eu - Steuerfreie innergemeinschaftliche Lieferung (Europäische Union) + // 3. noteu - Steuerschuldnerschaft des Leistungsempfängers (außerhalb EU, z. B. Schweiz) + // 4. custom - Using custom tax set + // 5. ss - Not subject to VAT according to §19 1 UStG + // Tax rates are heavily connected to the tax type used. + TaxType *string `json:"taxType"` + + // Update Date of last creditNote update + Update *time.Time `json:"update,omitempty"` +} + +// ModelCreditNoteResponseSendType Type which was used to send the creditNote. IMPORTANT: Please refer to the creditNote section of the +// - API-Overview to understand how this attribute can be used before using it! +type ModelCreditNoteResponseSendType string + +// ModelCreditNoteResponseStatus Please have a look in +// +// status of credit note +// to see what the different status codes mean +type ModelCreditNoteResponseStatus string + +// ModelCreditNoteResponseTaxRuleId **Use this in sevdesk-Update 2.0 (replaces taxType / taxSet).** +// +// Defines the vat-regulation. +// For "Regelbesteuerung" it can be one of: +// - `1` - Umsatzsteuerpflichtige Umsätze - tax rates: 0.0, 7.0, 19.0 - replaces `"taxType": "default"` +// - `2` - Ausfuhren - allowedTaxRates: 0.0 +// - `3` - Innergemeinschaftliche Lieferungen - tax rates: 0.0, 7.0, 19.0 - replaces `"taxType": "eu"` +// - `4` - Steuerfreie Umsätze §4 UStG - tax rates: 0.0 +// - `5` - Reverse Charge gem. §13b UStG - tax rates: 0.0 +// - `17` - Nicht im Inland steuerbare Leistung - tax rates: 0.0 - replaces `"taxType": "noteu"` +// +// For small business owner ("Kleinunternehmer") it can be: +// - `11` - Steuer nicht erhoben nach §19UStG - tax rates: 0.0 - replaces `"taxType": "ss"` +type ModelCreditNoteResponseTaxRuleId string + +// ModelCreditNoteResponseTaxRuleObjectName Name of the object. Must always be TaxRule +type ModelCreditNoteResponseTaxRuleObjectName string + +// ModelCreditNoteUpdate creditNote model +type ModelCreditNoteUpdate struct { + // Address Complete address of the recipient including name, street, city, zip and country.
+ // Line breaks can be used and will be displayed on the invoice pdf. + Address *string `json:"address"` + + // AddressCountry Can be omitted as complete address is defined in address attribute + AddressCountry *struct { + // Id Unique identifier of the country + Id int `json:"id"` + + // ObjectName Model name, which is 'StaticCountry' + ObjectName string `json:"objectName"` + } `json:"addressCountry"` + + // Contact The contact used in the creditNote + Contact *struct { + // Id Unique identifier of the contact + Id int `json:"id"` + + // ObjectName Model name, which is 'Contact' + ObjectName string `json:"objectName"` + } `json:"contact"` + + // ContactPerson The user who acts as a contact person for the creditNote + ContactPerson *struct { + // Id Unique identifier of the user + Id int `json:"id"` + + // ObjectName Model name, which is 'SevUser' + ObjectName string `json:"objectName"` + } `json:"contactPerson"` + + // Create Date of creditNote creation + Create *time.Time `json:"create,omitempty"` + + // CreateUser Will be filled automatically by our system and can't be changed + CreateUser *struct { + // Id Unique identifier of the user + Id int `json:"id"` + + // ObjectName Model name, which is 'SevUser' + ObjectName string `json:"objectName"` + } `json:"createUser,omitempty"` + + // CreditNoteDate Needs to be provided as timestamp or dd.mm.yyyy + CreditNoteDate *time.Time `json:"creditNoteDate,omitempty"` + + // CreditNoteNumber The creditNote number + CreditNoteNumber *string `json:"creditNoteNumber"` + + // Currency Currency used in the creditNote. Needs to be currency code according to ISO-4217 + Currency *string `json:"currency"` + + // CustomerInternalNote Internal note of the customer. Contains data entered into field 'Referenz/Bestellnummer' + CustomerInternalNote *string `json:"customerInternalNote"` + + // DeliveryDate Timestamp. This can also be a date range if you also use the attribute deliveryDateUntil + DeliveryDate *time.Time `json:"deliveryDate,omitempty"` + + // FootText Certain html tags can be used here to format your text + FootText *string `json:"footText"` + + // HeadText Certain html tags can be used here to format your text + HeadText *string `json:"headText"` + + // Header Normally consist of prefix plus the creditNote number + Header *string `json:"header"` + + // Id The creditNote id + Id *int `json:"id,omitempty"` + + // ObjectName The creditNote object name + ObjectName *string `json:"objectName,omitempty"` + + // SendDate The date the creditNote was sent to the customer + SendDate *time.Time `json:"sendDate"` + + // SendType Type which was used to send the creditNote. IMPORTANT: Please refer to the creditNote section of the + // * API-Overview to understand how this attribute can be used before using it! + SendType *ModelCreditNoteUpdateSendType `json:"sendType"` + + // SevClient Client to which creditNote belongs. Will be filled automatically + SevClient *struct { + // Id Unique identifier of the client + Id int `json:"id"` + + // ObjectName Model name, which is 'SevClient' + ObjectName string `json:"objectName"` + } `json:"sevClient,omitempty"` + + // ShowNet If true, the net amount of each position will be shown on the creditNote. Otherwise gross amount + ShowNet *bool `json:"showNet,omitempty"` + + // SmallSettlement Defines if the client uses the small settlement scheme. + // If yes, the creditNote must not contain any vat + SmallSettlement *bool `json:"smallSettlement"` + + // Status Please have a look in + // status of credit note + // to see what the different status codes mean + Status *ModelCreditNoteUpdateStatus `json:"status,omitempty"` + + // SumDiscounts Sum of all discounts in the creditNote + SumDiscounts *float32 `json:"sumDiscounts,omitempty"` + + // SumDiscountsForeignCurrency Discounts sum of the creditNote in the foreign currency + SumDiscountsForeignCurrency *float32 `json:"sumDiscountsForeignCurrency,omitempty"` + + // SumGross Gross sum of the creditNote + SumGross *float32 `json:"sumGross,omitempty"` + + // SumGrossForeignCurrency Gross sum of the creditNote in the foreign currency + SumGrossForeignCurrency *float32 `json:"sumGrossForeignCurrency,omitempty"` + + // SumNet Net sum of the creditNote + SumNet *float32 `json:"sumNet,omitempty"` + + // SumNetForeignCurrency Net sum of the creditNote in the foreign currency + SumNetForeignCurrency *float32 `json:"sumNetForeignCurrency,omitempty"` + + // SumTax Tax sum of the creditNote + SumTax *float32 `json:"sumTax,omitempty"` + + // SumTaxForeignCurrency Tax sum of the creditNote in the foreign currency + SumTaxForeignCurrency *float32 `json:"sumTaxForeignCurrency,omitempty"` + + // TaxRate This is not used anymore. Use the taxRate of the individual positions instead. + TaxRate *float32 `json:"taxRate"` + + // TaxRule **Use this in sevdesk-Update 2.0 (replaces taxType / taxSet).** + TaxRule *struct { + // Id **Use this in sevdesk-Update 2.0 (replaces taxType / taxSet).** + // + // Defines the vat-regulation. + // For "Regelbesteuerung" it can be one of: + // - `1` - Umsatzsteuerpflichtige Umsätze - tax rates: 0.0, 7.0, 19.0 - replaces `"taxType": "default"` + // - `2` - Ausfuhren - allowedTaxRates: 0.0 + // - `3` - Innergemeinschaftliche Lieferungen - tax rates: 0.0, 7.0, 19.0 - replaces `"taxType": "eu"` + // - `4` - Steuerfreie Umsätze §4 UStG - tax rates: 0.0 + // - `5` - Reverse Charge gem. §13b UStG - tax rates: 0.0 + // - `17` - Nicht im Inland steuerbare Leistung - tax rates: 0.0 - replaces `"taxType": "noteu"` + // + // For small business owner ("Kleinunternehmer") it can be: + // - `11` - Steuer nicht erhoben nach §19UStG - tax rates: 0.0 - replaces `"taxType": "ss"` + Id ModelCreditNoteUpdateTaxRuleId `json:"id"` + + // ObjectName Name of the object. Must always be TaxRule + ObjectName ModelCreditNoteUpdateTaxRuleObjectName `json:"objectName"` + } `json:"taxRule,omitempty"` + + // TaxSet **Use this in sevdesk-Update 1.0 (instead of taxRule).** + // + // Tax set of the creditNote. Needs to be added if you chose the tax type custom + TaxSet *struct { + // Id Unique identifier of the object + Id int `json:"id"` + + // ObjectName Model name, which is 'TaxSet' + ObjectName string `json:"objectName"` + } `json:"taxSet"` + + // TaxText A common tax text would be 'Umsatzsteuer 19%' + TaxText *string `json:"taxText"` + + // TaxType **Use this in sevdesk-Update 1.0 (instead of taxRule).** + // + // Tax type of the creditNote. + // There are four tax types: + // 1. default - Umsatzsteuer ausweisen + // 2. eu - Steuerfreie innergemeinschaftliche Lieferung (Europäische Union) + // 3. noteu - Steuerschuldnerschaft des Leistungsempfängers (außerhalb EU, z. B. Schweiz) + // 4. custom - Using custom tax set + // 5. ss - Not subject to VAT according to §19 1 UStG + // Tax rates are heavily connected to the tax type used. + TaxType *string `json:"taxType"` + + // Update Date of last creditNote update + Update *time.Time `json:"update,omitempty"` +} + +// ModelCreditNoteUpdateSendType Type which was used to send the creditNote. IMPORTANT: Please refer to the creditNote section of the +// - API-Overview to understand how this attribute can be used before using it! +type ModelCreditNoteUpdateSendType string + +// ModelCreditNoteUpdateStatus Please have a look in +// +// status of credit note +// to see what the different status codes mean +type ModelCreditNoteUpdateStatus string + +// ModelCreditNoteUpdateTaxRuleId **Use this in sevdesk-Update 2.0 (replaces taxType / taxSet).** +// +// Defines the vat-regulation. +// For "Regelbesteuerung" it can be one of: +// - `1` - Umsatzsteuerpflichtige Umsätze - tax rates: 0.0, 7.0, 19.0 - replaces `"taxType": "default"` +// - `2` - Ausfuhren - allowedTaxRates: 0.0 +// - `3` - Innergemeinschaftliche Lieferungen - tax rates: 0.0, 7.0, 19.0 - replaces `"taxType": "eu"` +// - `4` - Steuerfreie Umsätze §4 UStG - tax rates: 0.0 +// - `5` - Reverse Charge gem. §13b UStG - tax rates: 0.0 +// - `17` - Nicht im Inland steuerbare Leistung - tax rates: 0.0 - replaces `"taxType": "noteu"` +// +// For small business owner ("Kleinunternehmer") it can be: +// - `11` - Steuer nicht erhoben nach §19UStG - tax rates: 0.0 - replaces `"taxType": "ss"` +type ModelCreditNoteUpdateTaxRuleId string + +// ModelCreditNoteUpdateTaxRuleObjectName Name of the object. Must always be TaxRule +type ModelCreditNoteUpdateTaxRuleObjectName string + +// ModelCreditNoteMailResponse defines model for Model_creditNote_mailResponse. +type ModelCreditNoteMailResponse struct { + AdditionalInformation *string `json:"additionalInformation,omitempty"` + + // Create Date of email creation + Create *time.Time `json:"create,omitempty"` + From *string `json:"from,omitempty"` + Id *int `json:"id,omitempty"` + + // Object creditNote model + Object *ModelCreditNoteResponse `json:"object,omitempty"` + ObjectName *string `json:"objectName,omitempty"` + + // SevClient Client to which creditNote belongs. Will be filled automatically + SevClient *struct { + // Id Unique identifier of the client + Id int `json:"id"` + + // ObjectName Model name, which is 'SevClient' + ObjectName string `json:"objectName"` + } `json:"sevClient,omitempty"` + Subject *string `json:"subject,omitempty"` + Text *string `json:"text,omitempty"` + To *string `json:"to,omitempty"` + + // Update Date of last email update + Update *time.Time `json:"update,omitempty"` +} + +// ModelDiscountsResponse defines model for Model_discountsResponse. +type ModelDiscountsResponse struct { + // Create Date of discount creation + Create *string `json:"create,omitempty"` + + // Discount Indicates that this is a discount or a surcharge (0 = surcharge, 1 = discount) + Discount *string `json:"discount,omitempty"` + + // Id The id of the discount + Id *int `json:"id,omitempty"` + + // IsNet Defines is the Discount net or gross (0 = net, 1 = gross) + IsNet *string `json:"isNet,omitempty"` + + // ObjectName Model name, which is 'Discounts' + ObjectName *string `json:"objectName,omitempty"` + + // Percentage Defines if this is a percentage or an absolute discount + Percentage *string `json:"percentage,omitempty"` + + // SevClient Client to which the discount belongs + SevClient *string `json:"sevClient,omitempty"` + + // Text A text describing your position. + Text *string `json:"text,omitempty"` + + // Update Date of last discount update + Update *string `json:"update,omitempty"` + + // Value Value of the discount + Value *string `json:"value,omitempty"` +} + +// ReceiptGuideDto Model holds data about a single selectable account with additional information matching to that account. +type ReceiptGuideDto struct { + // AccountDatevId The ID of the matching account datev + AccountDatevId *int `json:"accountDatevId,omitempty"` + + // AccountName The name of the account + AccountName *string `json:"accountName,omitempty"` + + // AccountNumber The account number of the account datev (dependent on the active accounting system of the client) + AccountNumber *string `json:"accountNumber,omitempty"` + + // AllowedReceiptTypes An array that holds the viable receipt types for this account + AllowedReceiptTypes *[]string `json:"allowedReceiptTypes,omitempty"` + + // AllowedTaxRules An array that holds all possible tax rules for this account + AllowedTaxRules *[]struct { + // Description A readable description of the tax rule + Description *string `json:"description,omitempty"` + + // Id The id of the tax rule to use in different scenarios + Id *int `json:"id,omitempty"` + + // Name The name of the tax rule + Name *string `json:"name,omitempty"` + + // TaxRates An array of tax rates which are combinable with this tax rule + TaxRates *[]string `json:"taxRates,omitempty"` + } `json:"allowedTaxRules,omitempty"` + + // Description The description of the account and/or what the account is used for + Description *string `json:"description,omitempty"` +} + +// CreateClearingAccount defines model for createClearingAccount. +type CreateClearingAccount struct { + // AccountingNumber The booking account used for this clearing account, e.g. 3320 in SKR04 and 1723 in SKR03. Must be unique among all your CheckAccounts. Ask your tax consultant what to choose. + AccountingNumber *int `json:"accountingNumber"` + + // Name Name of the check account + Name *string `json:"name,omitempty"` +} + +// CreateClearingAccountResponse CheckAccount model. Showing the properties relevant to clearing accounts. +type CreateClearingAccountResponse struct { + // AccountingNumber The booking account used for this clearing account. + AccountingNumber *string `json:"accountingNumber,omitempty"` + + // Create Date of check account creation + Create *time.Time `json:"create,omitempty"` + + // Currency The currency of the check account. + Currency *string `json:"currency,omitempty"` + + // DefaultAccount Defines if this check account is the default account. + DefaultAccount *CreateClearingAccountResponseDefaultAccount `json:"defaultAccount,omitempty"` + + // Id The check account id + Id *string `json:"id,omitempty"` + + // Name Name of the check account + Name *string `json:"name,omitempty"` + + // ObjectName The check account object name, always 'CheckAccount' + ObjectName *string `json:"objectName,omitempty"` + + // SevClient Client to which check account belongs. Will be filled automatically + SevClient *struct { + // Id Unique identifier of the client + Id string `json:"id"` + + // ObjectName Model name, which is 'SevClient' + ObjectName string `json:"objectName"` + } `json:"sevClient,omitempty"` + + // Status Status of the check account. 0 <-> Archived - 100 <-> Active + Status *CreateClearingAccountResponseStatus `json:"status,omitempty"` + + // Type The type of the check account. Clearing accounts are regarded as offline. + Type *CreateClearingAccountResponseType `json:"type,omitempty"` + + // Update Date of last check account update + Update *time.Time `json:"update,omitempty"` +} + +// CreateClearingAccountResponseDefaultAccount Defines if this check account is the default account. +type CreateClearingAccountResponseDefaultAccount string + +// CreateClearingAccountResponseStatus Status of the check account. 0 <-> Archived - 100 <-> Active +type CreateClearingAccountResponseStatus string + +// CreateClearingAccountResponseType The type of the check account. Clearing accounts are regarded as offline. +type CreateClearingAccountResponseType string + +// CreateFileImportAccount defines model for createFileImportAccount. +type CreateFileImportAccount struct { + // AccountingNumber The booking account used for this bank account, e.g. 1800 in SKR04 and 1200 in SKR03. Must be unique among all your CheckAccounts. Ignore to use a sensible default. + AccountingNumber *int `json:"accountingNumber"` + + // Iban IBAN of the bank account, without spaces + Iban *string `json:"iban"` + + // ImportType Import type. Transactions can be imported by this method on the check account. + ImportType *CreateFileImportAccountImportType `json:"importType,omitempty"` + + // Name Name of the check account + Name *string `json:"name,omitempty"` +} + +// CreateFileImportAccountImportType Import type. Transactions can be imported by this method on the check account. +type CreateFileImportAccountImportType string + +// CreateFileImportAccountResponse CheckAccount model. Showing the properties relevant to file import accounts. +type CreateFileImportAccountResponse struct { + // AccountingNumber The booking account used for this bank account, e.g. 1800 in SKR04 and 1200 in SKR03. Must be unique among all your CheckAccounts. Ignore to use a sensible default. + AccountingNumber *string `json:"accountingNumber,omitempty"` + + // AutoMapTransactions Defines if transactions on this account are automatically mapped to invoice and vouchers when imported if possible. + AutoMapTransactions *CreateFileImportAccountResponseAutoMapTransactions `json:"autoMapTransactions,omitempty"` + + // Create Date of check account creation + Create *time.Time `json:"create,omitempty"` + + // Currency The currency of the check account. + Currency *string `json:"currency,omitempty"` + + // DefaultAccount Defines if this check account is the default account. + DefaultAccount *CreateFileImportAccountResponseDefaultAccount `json:"defaultAccount,omitempty"` + + // Iban The IBAN of the account + Iban *string `json:"iban"` + + // Id The check account id + Id *string `json:"id,omitempty"` + + // ImportType Import type, for accounts that are type "online" but not connected to a data provider. Transactions can be imported by this method on the check account. + ImportType *CreateFileImportAccountResponseImportType `json:"importType,omitempty"` + + // Name Name of the check account + Name *string `json:"name,omitempty"` + + // ObjectName The check account object name, always 'CheckAccount' + ObjectName *string `json:"objectName,omitempty"` + + // SevClient Client to which check account belongs. Will be filled automatically + SevClient *struct { + // Id Unique identifier of the client + Id string `json:"id"` + + // ObjectName Model name, which is 'SevClient' + ObjectName string `json:"objectName"` + } `json:"sevClient,omitempty"` + + // Status Status of the check account. 0 <-> Archived - 100 <-> Active + Status *CreateFileImportAccountResponseStatus `json:"status,omitempty"` + + // Type The type of the check account. Account with a CSV or MT940 import are regarded as online. + Type *CreateFileImportAccountResponseType `json:"type,omitempty"` + + // Update Date of last check account update + Update *time.Time `json:"update,omitempty"` +} + +// CreateFileImportAccountResponseAutoMapTransactions Defines if transactions on this account are automatically mapped to invoice and vouchers when imported if possible. +type CreateFileImportAccountResponseAutoMapTransactions string + +// CreateFileImportAccountResponseDefaultAccount Defines if this check account is the default account. +type CreateFileImportAccountResponseDefaultAccount string + +// CreateFileImportAccountResponseImportType Import type, for accounts that are type "online" but not connected to a data provider. Transactions can be imported by this method on the check account. +type CreateFileImportAccountResponseImportType string + +// CreateFileImportAccountResponseStatus Status of the check account. 0 <-> Archived - 100 <-> Active +type CreateFileImportAccountResponseStatus string + +// CreateFileImportAccountResponseType The type of the check account. Account with a CSV or MT940 import are regarded as online. +type CreateFileImportAccountResponseType string + +// SaveCreditNote defines model for saveCreditNote. +type SaveCreditNote struct { + // CreditNote creditNote model + CreditNote ModelCreditNote `json:"creditNote"` + CreditNotePosDelete *struct { + // Id Id of credit note position + Id int `json:"id"` + + // ObjectName Object name of credit note position + ObjectName string `json:"objectName"` + } `json:"creditNotePosDelete,omitempty"` + CreditNotePosSave *[]ModelCreditNotePos `json:"creditNotePosSave,omitempty"` + DiscountDelete *struct { + // Id ID of discount to delete + Id int `json:"id"` + + // ObjectName Object name of discount + ObjectName string `json:"objectName"` + } `json:"discountDelete,omitempty"` + DiscountSave *struct { + // Discount Defines if this is a discount or a surcharge + Discount bool `json:"discount"` + + // MapAll Internal param + MapAll bool `json:"mapAll"` + + // ObjectName Object name of the discount + ObjectName string `json:"objectName"` + + // Percentage Defines if this is a percentage or an absolute discount + Percentage bool `json:"percentage"` + + // Text A text for your discount + Text string `json:"text"` + + // Value Value of the discount + Value float32 `json:"value"` + } `json:"discountSave,omitempty"` +} + +// SaveCreditNoteResponse defines model for saveCreditNoteResponse. +type SaveCreditNoteResponse struct { + // CreditNote creditNote model + CreditNote *ModelCreditNoteResponse `json:"creditNote,omitempty"` + CreditNotePos *[]ModelCreditNotePosResponse `json:"creditNotePos,omitempty"` +} + +// SaveInvoice defines model for saveInvoice. +type SaveInvoice struct { + DiscountDelete *struct { + // Id ID of discount to delete + Id *int `json:"id,omitempty"` + + // ObjectName Object name of discount + ObjectName *string `json:"objectName,omitempty"` + } `json:"discountDelete,omitempty"` + DiscountSave *[]struct { + // Discount Defines if this is a discount or a surcharge + Discount *bool `json:"discount,omitempty"` + + // MapAll Internal param + MapAll *bool `json:"mapAll,omitempty"` + + // ObjectName Object name of the discount + ObjectName *string `json:"objectName,omitempty"` + + // Percentage Defines if this is a percentage or an absolute discount + Percentage *bool `json:"percentage,omitempty"` + + // Text A text for your discount + Text *string `json:"text,omitempty"` + + // Value Value of the discount + Value *float32 `json:"value,omitempty"` + } `json:"discountSave,omitempty"` + + // Filename Filename of a previously upload file which should be attached. + Filename *openapi_types.File `json:"filename,omitempty"` + + // Invoice Invoice model + Invoice ModelInvoice `json:"invoice"` + InvoicePosDelete *struct { + // Id Id of invoice position + Id int `json:"id"` + + // ObjectName Object name of invoice position + ObjectName string `json:"objectName"` + } `json:"invoicePosDelete,omitempty"` + InvoicePosSave *[]ModelInvoicePos `json:"invoicePosSave,omitempty"` +} + +// SaveInvoiceResponse defines model for saveInvoiceResponse. +type SaveInvoiceResponse struct { + // Filename Filename of a previously upload file which should be attached. + Filename *openapi_types.File `json:"filename,omitempty"` + + // Invoice Invoice model + Invoice *ModelInvoiceResponse `json:"invoice,omitempty"` + InvoicePos *[]ModelInvoicePosResponse `json:"invoicePos,omitempty"` +} + +// SaveOrder defines model for saveOrder. +type SaveOrder struct { + // Order Order model + Order ModelOrder `json:"order"` + OrderPosDelete *struct { + // Id Id of order position + Id int `json:"id"` + + // ObjectName Object name of order position + ObjectName string `json:"objectName"` + } `json:"orderPosDelete,omitempty"` + OrderPosSave *[]ModelOrderPos `json:"orderPosSave,omitempty"` +} + +// SaveOrderResponse defines model for saveOrderResponse. +type SaveOrderResponse struct { + // Order Order model + Order *ModelOrderResponse `json:"order,omitempty"` + OrderPos *[]ModelOrderPosResponse `json:"orderPos,omitempty"` +} + +// SaveVoucher defines model for saveVoucher. +type SaveVoucher struct { + // Filename Filename of a previously upload file which should be attached. + Filename *openapi_types.File `json:"filename,omitempty"` + + // Voucher Voucher model + Voucher ModelVoucher `json:"voucher"` + VoucherPosDelete *struct { + // Id Id of voucher position + Id int `json:"id"` + + // ObjectName Object name of voucher position + ObjectName string `json:"objectName"` + } `json:"voucherPosDelete,omitempty"` + VoucherPosSave *[]ModelVoucherPos `json:"voucherPosSave,omitempty"` +} + +// SaveVoucherResponse defines model for saveVoucherResponse. +type SaveVoucherResponse struct { + // Filename Filename of a previously upload file which should be attached. + Filename *openapi_types.File `json:"filename,omitempty"` + + // Voucher Voucher model + Voucher *ModelVoucherResponse `json:"voucher,omitempty"` + VoucherPos *[]ModelVoucherPosResponse `json:"voucherPos,omitempty"` +} + +// ValidationError defines model for validationError. +type ValidationError struct { + Error *struct { + // ExceptionUUID An identifier of this exact problem that can be given to the support team. + ExceptionUUID *string `json:"exceptionUUID,omitempty"` + Message *string `json:"message,omitempty"` + } `json:"error,omitempty"` +} + +// GetAccountingContactParams defines parameters for GetAccountingContact. +type GetAccountingContactParams struct { + // ContactId ID of contact for which you want the accounting contact. + ContactId *string `form:"contact[id],omitempty" json:"contact[id],omitempty"` + + // ContactObjectName Object name. Only needed if you also defined the ID of a contact. + ContactObjectName *string `form:"contact[objectName],omitempty" json:"contact[objectName],omitempty"` +} + +// GetBalanceAtDateParams defines parameters for GetBalanceAtDate. +type GetBalanceAtDateParams struct { + // Date Only consider transactions up to this date at 23:59:59 + Date openapi_types.Date `form:"date" json:"date"` +} + +// GetTransactionsParams defines parameters for GetTransactions. +type GetTransactionsParams struct { + // CheckAccountId Retrieve all transactions on this check account. Must be provided with checkAccount[objectName] + CheckAccountId *int `form:"checkAccount[id],omitempty" json:"checkAccount[id],omitempty"` + + // CheckAccountObjectName Only required if checkAccount[id] was provided. 'CheckAccount' should be used as value. + CheckAccountObjectName *string `form:"checkAccount[objectName],omitempty" json:"checkAccount[objectName],omitempty"` + + // IsBooked Only retrieve booked transactions + IsBooked *bool `form:"isBooked,omitempty" json:"isBooked,omitempty"` + + // PaymtPurpose Only retrieve transactions with this payment purpose + PaymtPurpose *string `form:"paymtPurpose,omitempty" json:"paymtPurpose,omitempty"` + + // StartDate Only retrieve transactions from this date on + StartDate *time.Time `form:"startDate,omitempty" json:"startDate,omitempty"` + + // EndDate Only retrieve transactions up to this date + EndDate *time.Time `form:"endDate,omitempty" json:"endDate,omitempty"` + + // PayeePayerName Only retrieve transactions with this payee / payer + PayeePayerName *string `form:"payeePayerName,omitempty" json:"payeePayerName,omitempty"` + + // OnlyCredit Only retrieve credit transactions + OnlyCredit *bool `form:"onlyCredit,omitempty" json:"onlyCredit,omitempty"` + + // OnlyDebit Only retrieve debit transactions + OnlyDebit *bool `form:"onlyDebit,omitempty" json:"onlyDebit,omitempty"` +} + +// GetCommunicationWaysParams defines parameters for GetCommunicationWays. +type GetCommunicationWaysParams struct { + // ContactId ID of contact for which you want the communication ways. + ContactId *string `form:"contact[id],omitempty" json:"contact[id],omitempty"` + + // ContactObjectName Object name. Only needed if you also defined the ID of a contact. + ContactObjectName *string `form:"contact[objectName],omitempty" json:"contact[objectName],omitempty"` + + // Type Type of the communication ways you want to get. + Type *GetCommunicationWaysParamsType `form:"type,omitempty" json:"type,omitempty"` + + // Main Define if you only want the main communication way. + Main *GetCommunicationWaysParamsMain `form:"main,omitempty" json:"main,omitempty"` +} + +// GetCommunicationWaysParamsType defines parameters for GetCommunicationWays. +type GetCommunicationWaysParamsType string + +// GetCommunicationWaysParamsMain defines parameters for GetCommunicationWays. +type GetCommunicationWaysParamsMain string + +// GetContactsParams defines parameters for GetContacts. +type GetContactsParams struct { + // Depth Defines if both organizations and persons should be returned.
+ // '0' -> only organizations, '1' -> organizations and persons + Depth *GetContactsParamsDepth `form:"depth,omitempty" json:"depth,omitempty"` + + // CustomerNumber Retrieve all contacts with this customer number + CustomerNumber *string `form:"customerNumber,omitempty" json:"customerNumber,omitempty"` +} + +// GetContactsParamsDepth defines parameters for GetContacts. +type GetContactsParamsDepth string + +// FindContactsByCustomFieldValueParams defines parameters for FindContactsByCustomFieldValue. +type FindContactsByCustomFieldValueParams struct { + // Value The value to be checked. + Value string `form:"value" json:"value"` + + // CustomFieldSettingId ID of ContactCustomFieldSetting for which the value has to be checked. + CustomFieldSettingId *string `form:"customFieldSetting[id],omitempty" json:"customFieldSetting[id],omitempty"` + + // CustomFieldSettingObjectName Object name. Only needed if you also defined the ID of a ContactCustomFieldSetting. + CustomFieldSettingObjectName *string `form:"customFieldSetting[objectName],omitempty" json:"customFieldSetting[objectName],omitempty"` + + // CustomFieldName The ContactCustomFieldSetting name, if no ContactCustomFieldSetting is provided. + CustomFieldName string `form:"customFieldName" json:"customFieldName"` +} + +// ContactCustomerNumberAvailabilityCheckParams defines parameters for ContactCustomerNumberAvailabilityCheck. +type ContactCustomerNumberAvailabilityCheckParams struct { + // CustomerNumber The customer number to be checked. + CustomerNumber *string `form:"customerNumber,omitempty" json:"customerNumber,omitempty"` +} + +// GetCreditNotesParams defines parameters for GetCreditNotes. +type GetCreditNotesParams struct { + // Status Status of the CreditNote + Status *GetCreditNotesParamsStatus `form:"status,omitempty" json:"status,omitempty"` + + // CreditNoteNumber Retrieve all CreditNotes with this creditNote number + CreditNoteNumber *string `form:"creditNoteNumber,omitempty" json:"creditNoteNumber,omitempty"` + + // StartDate Retrieve all CreditNotes with a date equal or higher + StartDate *int `form:"startDate,omitempty" json:"startDate,omitempty"` + + // EndDate Retrieve all CreditNotes with a date equal or lower + EndDate *int `form:"endDate,omitempty" json:"endDate,omitempty"` + + // ContactId Retrieve all CreditNotes with this contact. Must be provided with contact[objectName] + ContactId *int `form:"contact[id],omitempty" json:"contact[id],omitempty"` + + // ContactObjectName Only required if contact[id] was provided. 'Contact' should be used as value. + ContactObjectName *string `form:"contact[objectName],omitempty" json:"contact[objectName],omitempty"` +} + +// GetCreditNotesParamsStatus defines parameters for GetCreditNotes. +type GetCreditNotesParamsStatus string + +// CreateCreditNoteFromInvoiceJSONBody defines parameters for CreateCreditNoteFromInvoice. +type CreateCreditNoteFromInvoiceJSONBody struct { + Invoice struct { + // Id The id of the existing invoice + Id int `json:"id"` + + // ObjectName The objectName must be 'Invoice' + ObjectName string `json:"objectName"` + } `json:"invoice"` +} + +// CreateCreditNoteFromVoucherJSONBody defines parameters for CreateCreditNoteFromVoucher. +type CreateCreditNoteFromVoucherJSONBody struct { + Voucher struct { + // Id The id of the existing Voucher + Id int `json:"id"` + + // ObjectName The objectName must be 'Voucher' + ObjectName string `json:"objectName"` + } `json:"voucher"` +} + +// BookCreditNoteJSONBody defines parameters for BookCreditNote. +type BookCreditNoteJSONBody struct { + // Amount Amount which should be booked. Can also be a partial amount. + Amount float32 `json:"amount"` + + // CheckAccount The check account on which should be booked. + CheckAccount struct { + // Id The id of the check account on which should be booked. + Id int `json:"id"` + + // ObjectName Internal object name which is 'CheckAccount'. + ObjectName string `json:"objectName"` + } `json:"checkAccount"` + + // CheckAccountTransaction The check account transaction on which should be booked.
+ // The transaction will be linked to the credit note. + CheckAccountTransaction *struct { + // Id The id of the check account transaction on which should be booked. + Id int `json:"id"` + + // ObjectName Internal object name which is 'CheckAccountTransaction'. + ObjectName string `json:"objectName"` + } `json:"checkAccountTransaction,omitempty"` + + // CreateFeed Determines if a feed is created for the booking process. + CreateFeed *bool `json:"createFeed,omitempty"` + + // Date The booking date. Most likely the current date. + Date int `json:"date"` + + // Type Define a type for the booking.
+ // The following type abbreviations are available (abbreviation <-> meaning).
+ //
    + //
  • FULL_PAYMENT <-> Normal booking
  • N <-> Partial booking (historically used for normal booking)
  • + //
  • CB <-> Reduced amount due to discount (skonto)
  • + //
  • CF <-> Reduced/Higher amount due to currency fluctuations (deprecated)
  • + //
  • O <-> Reduced/Higher amount due to other reasons
  • + //
  • OF <-> Higher amount due to reminder charges
  • + //
  • MTC <-> Reduced amount due to the monetary traffic costs
  • + //
+ Type BookCreditNoteJSONBodyType `json:"type"` +} + +// BookCreditNoteJSONBodyType defines parameters for BookCreditNote. +type BookCreditNoteJSONBodyType string + +// CreditNoteGetPdfParams defines parameters for CreditNoteGetPdf. +type CreditNoteGetPdfParams struct { + // Download If u want to download the pdf of the credit note. + Download *bool `form:"download,omitempty" json:"download,omitempty"` + + // PreventSendBy Defines if u want to send the credit note. + PreventSendBy *bool `form:"preventSendBy,omitempty" json:"preventSendBy,omitempty"` +} + +// CreditNoteSendByJSONBody defines parameters for CreditNoteSendBy. +type CreditNoteSendByJSONBody struct { + // SendDraft To create a draft of a credit note for internal use. This operation will not alter the status of the credit note or create bookings for reports. + SendDraft bool `json:"sendDraft"` + + // SendType Specifies the way in which the credit note was sent to the customer.
+ // Accepts 'VPR' (print), 'VP' (postal), 'VM' (mail) and 'VPDF' (downloaded pfd). + SendType CreditNoteSendByJSONBodySendType `json:"sendType"` +} + +// CreditNoteSendByJSONBodySendType defines parameters for CreditNoteSendBy. +type CreditNoteSendByJSONBodySendType string + +// SendCreditNoteByPrintingParams defines parameters for SendCreditNoteByPrinting. +type SendCreditNoteByPrintingParams struct { + // SendType the type you want to print. + SendType string `form:"sendType" json:"sendType"` +} + +// SendCreditNoteViaEMailJSONBody defines parameters for SendCreditNoteViaEMail. +type SendCreditNoteViaEMailJSONBody struct { + // AdditionalAttachments Additional attachments to the mail. String of IDs of existing documents in your + // * sevdesk account separated by ',' + AdditionalAttachments *string `json:"additionalAttachments,omitempty"` + + // BccEmail String of mail addresses to be put as bcc separated by ',' + BccEmail *string `json:"bccEmail,omitempty"` + + // CcEmail String of mail addresses to be put as cc separated by ',' + CcEmail *string `json:"ccEmail,omitempty"` + + // Copy Should a copy of this email be sent to you? + Copy *bool `json:"copy,omitempty"` + + // Subject The subject of the email. + Subject string `json:"subject"` + + // Text The text of the email. Can contain html. + Text string `json:"text"` + + // ToEmail The recipient of the email. + ToEmail string `json:"toEmail"` +} + +// GetcreditNotePositionsParams defines parameters for GetcreditNotePositions. +type GetcreditNotePositionsParams struct { + // CreditNoteId Retrieve all creditNote positions belonging to this creditNote. Must be provided with creditNote[objectName] + CreditNoteId *int `form:"creditNote[id],omitempty" json:"creditNote[id],omitempty"` + + // CreditNoteObjectName Only required if creditNote[id] was provided. 'creditNote' should be used as value. + CreditNoteObjectName *string `form:"creditNote[objectName],omitempty" json:"creditNote[objectName],omitempty"` +} + +// GetTemplatesParams defines parameters for GetTemplates. +type GetTemplatesParams struct { + // Type Type of the templates you want to get. + Type *GetTemplatesParamsType `form:"type,omitempty" json:"type,omitempty"` +} + +// GetTemplatesParamsType defines parameters for GetTemplates. +type GetTemplatesParamsType string + +// ExportContactParams defines parameters for ExportContact. +type ExportContactParams struct { + Download *bool `form:"download,omitempty" json:"download,omitempty"` + SevQuery struct { + Filter *struct { + // City filters the contacts by city + City *string `json:"city,omitempty"` + Country *struct { + // Id id of the country + Id int `json:"id"` + + // ObjectName Model name, which is 'StaticCountry' + ObjectName string `json:"objectName"` + } `json:"country,omitempty"` + + // Depth export only organisations + Depth *bool `json:"depth,omitempty"` + + // OnlyPeople export only people + OnlyPeople *bool `json:"onlyPeople,omitempty"` + + // Zip filters the contacts by zip code + Zip *int `json:"zip,omitempty"` + } `json:"filter,omitempty"` + + // Limit Limit export + Limit *int `json:"limit,omitempty"` + + // ModelName Model name, which is 'Contact' + ModelName interface{} `json:"modelName"` + + // ObjectName Model name, which is 'SevQuery' + ObjectName interface{} `json:"objectName"` + } `form:"sevQuery" json:"sevQuery"` +} + +// ExportCreditNoteParams defines parameters for ExportCreditNote. +type ExportCreditNoteParams struct { + Download *bool `form:"download,omitempty" json:"download,omitempty"` + SevQuery struct { + Filter *struct { + // Contact filters the credit notes by contact + Contact *struct { + // Id ID of the contact + Id int `json:"id"` + + // ObjectName Model name, which is 'Contact' + ObjectName string `json:"objectName"` + } `json:"contact,omitempty"` + + // EndAmount filters the credit notes by amount + EndAmount *int `json:"endAmount,omitempty"` + + // EndDate End date of the credit note + EndDate *time.Time `json:"endDate,omitempty"` + + // StartAmount filters the credit notes by amount + StartAmount *int `json:"startAmount,omitempty"` + + // StartDate Start date of the credit note + StartDate *time.Time `json:"startDate,omitempty"` + } `json:"filter,omitempty"` + + // Limit Limit export + Limit *int `json:"limit,omitempty"` + + // ModelName Model name, which is 'CreditNote' + ModelName interface{} `json:"modelName"` + + // ObjectName Model name, which is 'SevQuery' + ObjectName interface{} `json:"objectName"` + } `form:"sevQuery" json:"sevQuery"` +} + +// ExportDatevParams defines parameters for ExportDatev. +type ExportDatevParams struct { + // Download Specifies if the document is downloaded + Download *bool `form:"Download,omitempty" json:"Download,omitempty"` + + // StartDate the start date of the export as timestamp + StartDate int `form:"startDate" json:"startDate"` + + // EndDate the end date of the export as timestamp + EndDate int `form:"endDate" json:"endDate"` + + // Scope Define what you want to include in the datev export. This parameter takes a string of 5 letters. Each stands for a model that should be included. Possible letters are: ‘E’ (Earnings), ‘X’ (Expenditure), ‘T’ (Transactions), ‘C’ (Cashregister), ‘D’ (Assets). By providing one of those letter you specify that it should be included in the datev export. Some combinations are: ‘EXTCD’, ‘EXTD’ … + Scope string `form:"scope" json:"scope"` + + // WithUnpaidDocuments include unpaid documents + WithUnpaidDocuments *bool `form:"withUnpaidDocuments,omitempty" json:"withUnpaidDocuments,omitempty"` + + // WithEnshrinedDocuments include enshrined documents + WithEnshrinedDocuments *bool `form:"withEnshrinedDocuments,omitempty" json:"withEnshrinedDocuments,omitempty"` + + // Enshrine Specify if you want to enshrine all models which were included in the export + Enshrine *bool `form:"enshrine,omitempty" json:"enshrine,omitempty"` +} + +// ExportInvoiceParams defines parameters for ExportInvoice. +type ExportInvoiceParams struct { + Download *bool `form:"download,omitempty" json:"download,omitempty"` + SevQuery struct { + Filter *struct { + // Contact filters the invoices by contact + Contact *struct { + // Id ID of the contact + Id int `json:"id"` + + // ObjectName Model name, which is 'Contact' + ObjectName string `json:"objectName"` + } `json:"contact,omitempty"` + + // EndAmount filters the invoices by amount + EndAmount *int `json:"endAmount,omitempty"` + + // EndDate End date of the invoice + EndDate *time.Time `json:"endDate,omitempty"` + + // InvoiceType Type of invoices you want to export + // 1. RE - Rechnung + // 2. SR - Stornorechnung + // 3. TR - Teilrechnung + // 4. AR - Abschlagsrechnung + // 5. ER - Endrechnung + // 6. WKR - Wiederkehrende Rechnung + // 7. MA - Mahnung + InvoiceType *[]interface{} `json:"invoiceType,omitempty"` + + // StartAmount filters the invoices by amount + StartAmount *int `json:"startAmount,omitempty"` + + // StartDate Start date of the invoice + StartDate *time.Time `json:"startDate,omitempty"` + } `json:"filter,omitempty"` + + // Limit Limit export + Limit *int `json:"limit,omitempty"` + + // ModelName Model name, which is 'Invoice' + ModelName interface{} `json:"modelName"` + + // ObjectName Model name, which is 'SevQuery' + ObjectName interface{} `json:"objectName"` + } `form:"sevQuery" json:"sevQuery"` +} + +// ExportInvoiceZipParams defines parameters for ExportInvoiceZip. +type ExportInvoiceZipParams struct { + Download *bool `form:"download,omitempty" json:"download,omitempty"` + SevQuery struct { + Filter *struct { + // Contact filters the invoices by contact + Contact *struct { + // Id ID of the contact + Id int `json:"id"` + + // ObjectName Model name, which is 'Contact' + ObjectName string `json:"objectName"` + } `json:"contact,omitempty"` + + // EndAmount filters the invoices by amount + EndAmount *int `json:"endAmount,omitempty"` + + // EndDate End date of the invoice + EndDate *time.Time `json:"endDate,omitempty"` + + // InvoiceType Type of invoices you want to export + // 1. RE - Rechnung + // 2. SR - Stornorechnung + // 3. TR - Teilrechnung + // 4. AR - Abschlagsrechnung + // 5. ER - Endrechnung + // 6. WKR - Wiederkehrende Rechnung + // 7. MA - Mahnung + InvoiceType *[]interface{} `json:"invoiceType,omitempty"` + + // StartAmount filters the invoices by amount + StartAmount *int `json:"startAmount,omitempty"` + + // StartDate Start date of the invoice + StartDate *time.Time `json:"startDate,omitempty"` + } `json:"filter,omitempty"` + + // Limit Limit export + Limit *int `json:"limit,omitempty"` + + // ModelName Model name, which is 'Invoice' + ModelName interface{} `json:"modelName"` + + // ObjectName Model name, which is 'SevQuery' + ObjectName interface{} `json:"objectName"` + } `form:"sevQuery" json:"sevQuery"` +} + +// ExportTransactionsParams defines parameters for ExportTransactions. +type ExportTransactionsParams struct { + Download *bool `form:"download,omitempty" json:"download,omitempty"` + SevQuery struct { + Filter *struct { + CheckAccount *struct { + // Id Id of the checkAccount + Id int `json:"id"` + + // ObjectName Model name, which is 'CheckAccount' + ObjectName string `json:"objectName"` + } `json:"checkAccount,omitempty"` + + // EndAmount filters the transactions by amount + EndAmount *int `json:"endAmount,omitempty"` + + // EndDate End date of the transactions + EndDate *time.Time `json:"endDate,omitempty"` + + // Name the name of the payee/payer + Name *string `json:"name,omitempty"` + + // PaymtPurpose the payment purpose + PaymtPurpose *string `json:"paymtPurpose,omitempty"` + + // StartAmount filters the transactions by amount + StartAmount *int `json:"startAmount,omitempty"` + + // StartDate Start date of the transactions + StartDate *time.Time `json:"startDate,omitempty"` + } `json:"filter,omitempty"` + + // Limit Limit export + Limit *int `json:"limit,omitempty"` + + // ModelName Model name, which is 'CheckAccountTransaction' + ModelName interface{} `json:"modelName"` + + // ObjectName Model name, which is 'SevQuery' + ObjectName interface{} `json:"objectName"` + } `form:"sevQuery" json:"sevQuery"` +} + +// ExportVoucherParams defines parameters for ExportVoucher. +type ExportVoucherParams struct { + Download *bool `form:"download,omitempty" json:"download,omitempty"` + SevQuery struct { + Filter *struct { + // Contact filters the vouchers by contact + Contact *struct { + // Id ID of the contact + Id int `json:"id"` + + // ObjectName Model name, which is 'Contact' + ObjectName string `json:"objectName"` + } `json:"contact,omitempty"` + + // EndAmount filters the vouchers by amount + EndAmount *int `json:"endAmount,omitempty"` + + // EndDate End date of the voucher + EndDate *time.Time `json:"endDate,omitempty"` + + // EndPayDate End pay date of the voucher + EndPayDate *time.Time `json:"endPayDate,omitempty"` + + // StartAmount filters the vouchers by amount + StartAmount *int `json:"startAmount,omitempty"` + + // StartDate Start date of the voucher + StartDate *time.Time `json:"startDate,omitempty"` + + // StartPayDate Start pay date of the voucher + StartPayDate *time.Time `json:"startPayDate,omitempty"` + } `json:"filter,omitempty"` + + // Limit Limit export + Limit *int `json:"limit,omitempty"` + + // ModelName Model name, which is 'Voucher' + ModelName interface{} `json:"modelName"` + + // ObjectName Model name, which is 'SevQuery' + ObjectName interface{} `json:"objectName"` + } `form:"sevQuery" json:"sevQuery"` +} + +// ExportVoucherZipParams defines parameters for ExportVoucherZip. +type ExportVoucherZipParams struct { + Download *bool `form:"download,omitempty" json:"download,omitempty"` + SevQuery struct { + Filter *struct { + // Contact filters the vouchers by contact + Contact *struct { + // Id ID of the contact + Id int `json:"id"` + + // ObjectName Model name, which is 'Contact' + ObjectName string `json:"objectName"` + } `json:"contact,omitempty"` + + // EndAmount filters the vouchers by amount + EndAmount *int `json:"endAmount,omitempty"` + + // EndDate End date of the voucher + EndDate *time.Time `json:"endDate,omitempty"` + + // EndPayDate End pay date of the voucher + EndPayDate *time.Time `json:"endPayDate,omitempty"` + + // StartAmount filters the vouchers by amount + StartAmount *int `json:"startAmount,omitempty"` + + // StartDate Start date of the voucher + StartDate *time.Time `json:"startDate,omitempty"` + + // StartPayDate Start pay date of the voucher + StartPayDate *time.Time `json:"startPayDate,omitempty"` + } `json:"filter,omitempty"` + + // Limit Limit export + Limit *int `json:"limit,omitempty"` + + // ModelName Model name, which is 'Voucher' + ModelName interface{} `json:"modelName"` + + // ObjectName Model name, which is 'SevQuery' + ObjectName interface{} `json:"objectName"` + } `form:"sevQuery" json:"sevQuery"` +} + +// GetInvoicesParams defines parameters for GetInvoices. +type GetInvoicesParams struct { + // Status Status of the invoices + Status *GetInvoicesParamsStatus `form:"status,omitempty" json:"status,omitempty"` + + // InvoiceNumber Retrieve all invoices with this invoice number + InvoiceNumber *string `form:"invoiceNumber,omitempty" json:"invoiceNumber,omitempty"` + + // StartDate Retrieve all invoices with a date equal or higher + StartDate *int `form:"startDate,omitempty" json:"startDate,omitempty"` + + // EndDate Retrieve all invoices with a date equal or lower + EndDate *int `form:"endDate,omitempty" json:"endDate,omitempty"` + + // ContactId Retrieve all invoices with this contact. Must be provided with contact[objectName] + ContactId *int `form:"contact[id],omitempty" json:"contact[id],omitempty"` + + // ContactObjectName Only required if contact[id] was provided. 'Contact' should be used as value. + ContactObjectName *string `form:"contact[objectName],omitempty" json:"contact[objectName],omitempty"` +} + +// GetInvoicesParamsStatus defines parameters for GetInvoices. +type GetInvoicesParamsStatus float32 + +// CreateInvoiceReminderJSONBody defines parameters for CreateInvoiceReminder. +type CreateInvoiceReminderJSONBody struct { + // Invoice Invoice for the reminder + Invoice struct { + // Id Id of the invoice + Id int `json:"id"` + + // ObjectName Model name, which is 'Invoice' + ObjectName string `json:"objectName"` + } `json:"invoice"` +} + +// CreateInvoiceReminderParams defines parameters for CreateInvoiceReminder. +type CreateInvoiceReminderParams struct { + // InvoiceId the id of the invoice + InvoiceId int `form:"invoice[id]" json:"invoice[id]"` + + // InvoiceObjectName Model name, which is 'Invoice' + InvoiceObjectName string `form:"invoice[objectName]" json:"invoice[objectName]"` +} + +// BookInvoiceJSONBody defines parameters for BookInvoice. +type BookInvoiceJSONBody struct { + // Amount Amount which should be booked. Can also be a partial amount. + Amount float32 `json:"amount"` + + // CheckAccount The check account on which should be booked. + CheckAccount struct { + // Id The id of the check account on which should be booked. + Id int `json:"id"` + + // ObjectName Internal object name which is 'CheckAccount'. + ObjectName string `json:"objectName"` + } `json:"checkAccount"` + + // CheckAccountTransaction The check account transaction on which should be booked.
+ // The transaction will be linked to the invoice. + CheckAccountTransaction *struct { + // Id The id of the check account transaction on which should be booked. + Id int `json:"id"` + + // ObjectName Internal object name which is 'CheckAccountTransaction'. + ObjectName string `json:"objectName"` + } `json:"checkAccountTransaction,omitempty"` + + // CreateFeed Determines if a feed is created for the booking process. + CreateFeed *bool `json:"createFeed,omitempty"` + + // Date The booking date. Most likely the current date. + Date int `json:"date"` + + // Type Define a type for the booking.
+ // The following type abbreviations are available (abbreviation <-> meaning).
+ //
    + //
  • FULL_PAYMENT <-> Normal booking
  • N <-> Partial booking (historically used for normal booking)
  • + //
  • CB <-> Reduced amount due to discount (skonto)
  • + //
  • CF <-> Reduced/Higher amount due to currency fluctuations (deprecated)
  • + //
  • O <-> Reduced/Higher amount due to other reasons
  • + //
  • OF <-> Higher amount due to reminder charges
  • + //
  • MTC <-> Reduced amount due to the monetary traffic costs
  • + //
+ Type BookInvoiceJSONBodyType `json:"type"` +} + +// BookInvoiceJSONBodyType defines parameters for BookInvoice. +type BookInvoiceJSONBodyType string + +// InvoiceGetPdfParams defines parameters for InvoiceGetPdf. +type InvoiceGetPdfParams struct { + // Download If u want to download the pdf of the invoice. + Download *bool `form:"download,omitempty" json:"download,omitempty"` + + // PreventSendBy Defines if u want to send the invoice. + PreventSendBy *bool `form:"preventSendBy,omitempty" json:"preventSendBy,omitempty"` +} + +// GetInvoicePositionsByIdParams defines parameters for GetInvoicePositionsById. +type GetInvoicePositionsByIdParams struct { + // Limit limits the number of entries returned + Limit *int `form:"limit,omitempty" json:"limit,omitempty"` + + // Offset set the index where the returned entries start + Offset *int `form:"offset,omitempty" json:"offset,omitempty"` + + // Embed Get some additional information. Embed can handle multiple values, they must be separated by comma. + Embed *[]string `form:"embed,omitempty" json:"embed,omitempty"` +} + +// InvoiceRenderJSONBody defines parameters for InvoiceRender. +type InvoiceRenderJSONBody struct { + // ForceReload Define if a forceful re-render should occur. + ForceReload *bool `json:"forceReload,omitempty"` +} + +// InvoiceSendByJSONBody defines parameters for InvoiceSendBy. +type InvoiceSendByJSONBody struct { + // SendDraft To create a draft of an invoice for internal use. This operation will not alter the status of the invoice or create bookings for reports. + SendDraft bool `json:"sendDraft"` + + // SendType Specifies the way in which the invoice was sent to the customer.
+ // Accepts 'VPR' (print), 'VP' (postal), 'VM' (mail) and 'VPDF' (downloaded pfd). + SendType InvoiceSendByJSONBodySendType `json:"sendType"` +} + +// InvoiceSendByJSONBodySendType defines parameters for InvoiceSendBy. +type InvoiceSendByJSONBodySendType string + +// SendInvoiceViaEMailJSONBody defines parameters for SendInvoiceViaEMail. +type SendInvoiceViaEMailJSONBody struct { + // AdditionalAttachments Additional attachments to the mail. String of IDs of existing documents in your + // * sevdesk account separated by ',' + AdditionalAttachments *string `json:"additionalAttachments,omitempty"` + + // BccEmail String of mail addresses to be put as bcc separated by ',' + BccEmail *string `json:"bccEmail,omitempty"` + + // CcEmail String of mail addresses to be put as cc separated by ',' + CcEmail *string `json:"ccEmail,omitempty"` + + // Copy Should a copy of this email be sent to you? + Copy *bool `json:"copy,omitempty"` + + // SendXml If true, the XML of the e-invoice is attached to the email instead of the PDF + SendXml *bool `json:"sendXml,omitempty"` + + // Subject The subject of the email. + Subject string `json:"subject"` + + // Text The text of the email. Can contain html. + Text string `json:"text"` + + // ToEmail The recipient of the email. + ToEmail string `json:"toEmail"` +} + +// GetInvoicePosParams defines parameters for GetInvoicePos. +type GetInvoicePosParams struct { + // Id Retrieve all InvoicePos with this InvoicePos id + Id *float32 `form:"id,omitempty" json:"id,omitempty"` + + // InvoiceId Retrieve all invoices positions with this invoice. Must be provided with invoice[objectName] + InvoiceId *float32 `form:"invoice[id],omitempty" json:"invoice[id],omitempty"` + + // InvoiceObjectName Only required if invoice[id] was provided. 'Invoice' should be used as value. + InvoiceObjectName *string `form:"invoice[objectName],omitempty" json:"invoice[objectName],omitempty"` + + // PartId Retrieve all invoices positions with this part. Must be provided with part[objectName] + PartId *float32 `form:"part[id],omitempty" json:"part[id],omitempty"` + + // PartObjectName Only required if part[id] was provided. 'Part' should be used as value. + PartObjectName *string `form:"part[objectName],omitempty" json:"part[objectName],omitempty"` +} + +// GetOrdersParams defines parameters for GetOrders. +type GetOrdersParams struct { + // Status Status of the order + Status *GetOrdersParamsStatus `form:"status,omitempty" json:"status,omitempty"` + + // OrderNumber Retrieve all orders with this order number + OrderNumber *string `form:"orderNumber,omitempty" json:"orderNumber,omitempty"` + + // StartDate Retrieve all orders with a date equal or higher + StartDate *int `form:"startDate,omitempty" json:"startDate,omitempty"` + + // EndDate Retrieve all orders with a date equal or lower + EndDate *int `form:"endDate,omitempty" json:"endDate,omitempty"` + + // ContactId Retrieve all orders with this contact. Must be provided with contact[objectName] + ContactId *int `form:"contact[id],omitempty" json:"contact[id],omitempty"` + + // ContactObjectName Only required if contact[id] was provided. 'Contact' should be used as value. + ContactObjectName *string `form:"contact[objectName],omitempty" json:"contact[objectName],omitempty"` +} + +// GetOrdersParamsStatus defines parameters for GetOrders. +type GetOrdersParamsStatus int + +// CreateContractNoteFromOrderParams defines parameters for CreateContractNoteFromOrder. +type CreateContractNoteFromOrderParams struct { + // OrderId the id of the order + OrderId int `form:"order[id]" json:"order[id]"` + + // OrderObjectName Model name, which is 'Order' + OrderObjectName string `form:"order[objectName]" json:"order[objectName]"` +} + +// CreatePackingListFromOrderParams defines parameters for CreatePackingListFromOrder. +type CreatePackingListFromOrderParams struct { + // OrderId the id of the order + OrderId int `form:"order[id]" json:"order[id]"` + + // OrderObjectName Model name, which is 'Order' + OrderObjectName string `form:"order[objectName]" json:"order[objectName]"` +} + +// GetDiscountsParams defines parameters for GetDiscounts. +type GetDiscountsParams struct { + // Limit limits the number of entries returned + Limit *int `form:"limit,omitempty" json:"limit,omitempty"` + + // Offset set the index where the returned entries start + Offset *int `form:"offset,omitempty" json:"offset,omitempty"` + + // Embed Get some additional information. Embed can handle multiple values, they must be separated by comma. + Embed *[]string `form:"embed,omitempty" json:"embed,omitempty"` +} + +// OrderGetPdfParams defines parameters for OrderGetPdf. +type OrderGetPdfParams struct { + // Download If u want to download the pdf of the order. + Download *bool `form:"download,omitempty" json:"download,omitempty"` + + // PreventSendBy Defines if u want to send the order. + PreventSendBy *bool `form:"preventSendBy,omitempty" json:"preventSendBy,omitempty"` +} + +// GetOrderPositionsByIdParams defines parameters for GetOrderPositionsById. +type GetOrderPositionsByIdParams struct { + // Limit limits the number of entries returned + Limit *int `form:"limit,omitempty" json:"limit,omitempty"` + + // Offset set the index where the returned entries start + Offset *int `form:"offset,omitempty" json:"offset,omitempty"` + + // Embed Get some additional information. Embed can handle multiple values, they must be separated by comma. + Embed *[]string `form:"embed,omitempty" json:"embed,omitempty"` +} + +// GetRelatedObjectsParams defines parameters for GetRelatedObjects. +type GetRelatedObjectsParams struct { + // IncludeItself Define if the related objects include the order itself + IncludeItself *bool `form:"includeItself,omitempty" json:"includeItself,omitempty"` + + // SortByType Define if you want the related objects sorted by type + SortByType *bool `form:"sortByType,omitempty" json:"sortByType,omitempty"` + + // Embed Get some additional information. Embed can handle multiple values, they must be separated by comma. + Embed *[]string `form:"embed,omitempty" json:"embed,omitempty"` +} + +// OrderSendByJSONBody defines parameters for OrderSendBy. +type OrderSendByJSONBody struct { + // SendDraft To create a draft of an order for internal use. This operation will not alter the status of the order. + SendDraft bool `json:"sendDraft"` + + // SendType Specifies the way in which the order was sent to the customer.
+ // Accepts 'VPR' (print), 'VP' (postal), 'VM' (mail) and 'VPDF' (downloaded pfd). + SendType OrderSendByJSONBodySendType `json:"sendType"` +} + +// OrderSendByJSONBodySendType defines parameters for OrderSendBy. +type OrderSendByJSONBodySendType string + +// SendorderViaEMailJSONBody defines parameters for SendorderViaEMail. +type SendorderViaEMailJSONBody struct { + // AdditionalAttachments Additional attachments to the mail. String of IDs of existing documents in your + // * sevdesk account separated by ',' + AdditionalAttachments *string `json:"additionalAttachments,omitempty"` + + // BccEmail String of mail addresses to be put as bcc separated by ',' + BccEmail *string `json:"bccEmail,omitempty"` + + // CcEmail String of mail addresses to be put as cc separated by ',' + CcEmail *string `json:"ccEmail,omitempty"` + + // Copy Should a copy of this email be sent to you? + Copy *bool `json:"copy,omitempty"` + + // Subject The subject of the email. + Subject string `json:"subject"` + + // Text The text of the email. Can contain html. + Text string `json:"text"` + + // ToEmail The recipient of the email. + ToEmail string `json:"toEmail"` +} + +// GetOrderPositionsParams defines parameters for GetOrderPositions. +type GetOrderPositionsParams struct { + // OrderId Retrieve all order positions belonging to this order. Must be provided with voucher[objectName] + OrderId *int `form:"order[id],omitempty" json:"order[id],omitempty"` + + // OrderObjectName Only required if order[id] was provided. 'Order' should be used as value. + OrderObjectName *string `form:"order[objectName],omitempty" json:"order[objectName],omitempty"` +} + +// GetPartsParams defines parameters for GetParts. +type GetPartsParams struct { + // PartNumber Retrieve all parts with this part number + PartNumber *string `form:"partNumber,omitempty" json:"partNumber,omitempty"` + + // Name Retrieve all parts with this name + Name *string `form:"name,omitempty" json:"name,omitempty"` +} + +// ForAccountNumberParams defines parameters for ForAccountNumber. +type ForAccountNumberParams struct { + // AccountNumber The datev account number you want to get additional information of + AccountNumber int `form:"accountNumber" json:"accountNumber"` +} + +// ForTaxRuleParams defines parameters for ForTaxRule. +type ForTaxRuleParams struct { + // TaxRule The code of the tax rule you want to get guidance for. + TaxRule string `form:"taxRule" json:"taxRule"` +} + +// ReportContactParams defines parameters for ReportContact. +type ReportContactParams struct { + Download *bool `form:"download,omitempty" json:"download,omitempty"` + SevQuery struct { + Filter *struct { + // City filters the contacts by city + City *string `json:"city,omitempty"` + Country *struct { + // Id id of the country + Id int `json:"id"` + + // ObjectName Model name, which is 'StaticCountry' + ObjectName string `json:"objectName"` + } `json:"country,omitempty"` + + // Depth export only organisations + Depth *bool `json:"depth,omitempty"` + + // OnlyPeople export only people + OnlyPeople *bool `json:"onlyPeople,omitempty"` + + // Zip filters the contacts by zip code + Zip *int `json:"zip,omitempty"` + } `json:"filter,omitempty"` + + // Limit Limit export + Limit *int `json:"limit,omitempty"` + + // ModelName Model name which is exported + ModelName interface{} `json:"modelName"` + + // ObjectName SevQuery object name + ObjectName interface{} `json:"objectName"` + } `form:"sevQuery" json:"sevQuery"` +} + +// ReportInvoiceParams defines parameters for ReportInvoice. +type ReportInvoiceParams struct { + Download *bool `form:"download,omitempty" json:"download,omitempty"` + View string `form:"view" json:"view"` + SevQuery struct { + Filter *struct { + // Contact filters the invoices by contact + Contact *struct { + // Id ID of the contact + Id int `json:"id"` + + // ObjectName Model name, which is 'Contact' + ObjectName string `json:"objectName"` + } `json:"contact,omitempty"` + + // EndAmount filters the invoices by amount + EndAmount *int `json:"endAmount,omitempty"` + + // EndDate End date of the invoice + EndDate *time.Time `json:"endDate,omitempty"` + + // InvoiceType Type of invoices you want to export + // 1. RE - Rechnung + // 2. SR - Stornorechnung + // 3. TR - Teilrechnung + // 4. AR - Abschlagsrechnung + // 5. ER - Endrechnung + // 6. WKR - Wiederkehrende Rechnung + // 7. MA - Mahnung + InvoiceType *[]interface{} `json:"invoiceType,omitempty"` + + // StartAmount filters the invoices by amount + StartAmount *int `json:"startAmount,omitempty"` + + // StartDate Start date of the invoice + StartDate *time.Time `json:"startDate,omitempty"` + } `json:"filter,omitempty"` + + // Limit Limit export + Limit *int `json:"limit,omitempty"` + + // ModelName Model name which is exported + ModelName interface{} `json:"modelName"` + + // ObjectName SevQuery object name + ObjectName interface{} `json:"objectName"` + } `form:"sevQuery" json:"sevQuery"` +} + +// ReportOrderParams defines parameters for ReportOrder. +type ReportOrderParams struct { + Download *bool `form:"download,omitempty" json:"download,omitempty"` + View string `form:"view" json:"view"` + SevQuery struct { + Filter *struct { + // Contact filters the orders by contact + Contact *struct { + // Id ID of the contact + Id int `json:"id"` + + // ObjectName Model name, which is 'Contact' + ObjectName string `json:"objectName"` + } `json:"contact,omitempty"` + + // EndAmount filters the orders by amount + EndAmount *int `json:"endAmount,omitempty"` + + // EndDate End date of the order + EndDate *time.Time `json:"endDate,omitempty"` + + // OrderType Type of orders you want to export + // 1. AN - Angebote + // 2. AB - Aufträge + // 3. LI - Lieferscheine + OrderType *ReportOrderParamsSevQueryFilterOrderType `json:"orderType,omitempty"` + + // StartAmount filters the orders by amount + StartAmount *int `json:"startAmount,omitempty"` + + // StartDate Start date of the order + StartDate *time.Time `json:"startDate,omitempty"` + } `json:"filter,omitempty"` + + // Limit Limit export + Limit *int `json:"limit,omitempty"` + + // ModelName Model name which is exported + ModelName interface{} `json:"modelName"` + + // ObjectName SevQuery object name + ObjectName interface{} `json:"objectName"` + } `form:"sevQuery" json:"sevQuery"` +} + +// ReportOrderParamsSevQueryFilterOrderType defines parameters for ReportOrder. +type ReportOrderParamsSevQueryFilterOrderType string + +// ReportVoucherParams defines parameters for ReportVoucher. +type ReportVoucherParams struct { + Download *bool `form:"download,omitempty" json:"download,omitempty"` + SevQuery struct { + Filter *struct { + // Contact filters the vouchers by contact + Contact *struct { + // Id ID of the contact + Id int `json:"id"` + + // ObjectName Model name, which is 'Contact' + ObjectName string `json:"objectName"` + } `json:"contact,omitempty"` + + // EndAmount filters the vouchers by amount + EndAmount *int `json:"endAmount,omitempty"` + + // EndDate End date of the voucher + EndDate *time.Time `json:"endDate,omitempty"` + + // EndPayDate End pay date of the voucher + EndPayDate *time.Time `json:"endPayDate,omitempty"` + + // StartAmount filters the vouchers by amount + StartAmount *int `json:"startAmount,omitempty"` + + // StartDate Start date of the voucher + StartDate *time.Time `json:"startDate,omitempty"` + + // StartPayDate Start pay date of the voucher + StartPayDate *time.Time `json:"startPayDate,omitempty"` + } `json:"filter,omitempty"` + + // Limit Limit export + Limit *int `json:"limit,omitempty"` + + // ModelName Model name which is exported + ModelName interface{} `json:"modelName"` + + // ObjectName SevQuery object name + ObjectName interface{} `json:"objectName"` + } `form:"sevQuery" json:"sevQuery"` +} + +// UpdateExportConfigJSONBody defines parameters for UpdateExportConfig. +type UpdateExportConfigJSONBody struct { + AccountantClientNumber float32 `json:"accountantClientNumber"` + AccountantNumber float32 `json:"accountantNumber"` + AccountingYearBegin int64 `json:"accountingYearBegin"` +} + +// GetTagsParams defines parameters for GetTags. +type GetTagsParams struct { + // Id ID of the Tag + Id *float32 `form:"id,omitempty" json:"id,omitempty"` + + // Name Name of the Tag + Name *string `form:"name,omitempty" json:"name,omitempty"` +} + +// CreateTagJSONBody defines parameters for CreateTag. +type CreateTagJSONBody struct { + // Name Name of the tag + Name *string `json:"name,omitempty"` + Object struct { + // Id Id of the invoice/order/voucher/creditNote + Id int `json:"id"` + + // ObjectName Model name + ObjectName CreateTagJSONBodyObjectObjectName `json:"objectName"` + } `json:"object"` +} + +// CreateTagJSONBodyObjectObjectName defines parameters for CreateTag. +type CreateTagJSONBodyObjectObjectName string + +// UpdateTagJSONBody defines parameters for UpdateTag. +type UpdateTagJSONBody struct { + // Name The name of the tag u want to update + Name *string `json:"name,omitempty"` +} + +// GetPlaceholderParams defines parameters for GetPlaceholder. +type GetPlaceholderParams struct { + // ObjectName Model name + ObjectName GetPlaceholderParamsObjectName `form:"objectName" json:"objectName"` + + // SubObjectName Sub model name, required if you have "Email" at objectName + SubObjectName *GetPlaceholderParamsSubObjectName `form:"subObjectName,omitempty" json:"subObjectName,omitempty"` +} + +// GetPlaceholderParamsObjectName defines parameters for GetPlaceholder. +type GetPlaceholderParamsObjectName string + +// GetPlaceholderParamsSubObjectName defines parameters for GetPlaceholder. +type GetPlaceholderParamsSubObjectName string + +// GetVouchersParams defines parameters for GetVouchers. +type GetVouchersParams struct { + // Status Status of the vouchers to retrieve. + Status *GetVouchersParamsStatus `form:"status,omitempty" json:"status,omitempty"` + + // CreditDebit Define if you only want credit or debit vouchers. + CreditDebit *GetVouchersParamsCreditDebit `form:"creditDebit,omitempty" json:"creditDebit,omitempty"` + + // DescriptionLike Retrieve all vouchers with a description like this. + DescriptionLike *string `form:"descriptionLike,omitempty" json:"descriptionLike,omitempty"` + + // StartDate Retrieve all vouchers with a date equal or higher + StartDate *int `form:"startDate,omitempty" json:"startDate,omitempty"` + + // EndDate Retrieve all vouchers with a date equal or lower + EndDate *int `form:"endDate,omitempty" json:"endDate,omitempty"` + + // ContactId Retrieve all vouchers with this contact. Must be provided with contact[objectName] + ContactId *int `form:"contact[id],omitempty" json:"contact[id],omitempty"` + + // ContactObjectName Only required if contact[id] was provided. 'Contact' should be used as value. + ContactObjectName *string `form:"contact[objectName],omitempty" json:"contact[objectName],omitempty"` +} + +// GetVouchersParamsStatus defines parameters for GetVouchers. +type GetVouchersParamsStatus float32 + +// GetVouchersParamsCreditDebit defines parameters for GetVouchers. +type GetVouchersParamsCreditDebit string + +// BookVoucherJSONBody defines parameters for BookVoucher. +type BookVoucherJSONBody struct { + // Amount Amount which should be booked. Can also be a partial amount. + Amount float32 `json:"amount"` + + // CheckAccount The check account on which should be booked. + CheckAccount struct { + // Id The id of the check account on which should be booked. + Id int `json:"id"` + + // ObjectName Internal object name which is 'CheckAccount'. + ObjectName string `json:"objectName"` + } `json:"checkAccount"` + + // CheckAccountTransaction The check account transaction on which should be booked.
+ // The transaction will be linked to the voucher. + CheckAccountTransaction *struct { + // Id The id of the check account transaction on which should be booked. + Id int `json:"id"` + + // ObjectName Internal object name which is 'CheckAccountTransaction'. + ObjectName string `json:"objectName"` + } `json:"checkAccountTransaction,omitempty"` + + // CreateFeed Determines if a feed is created for the booking process. + CreateFeed *bool `json:"createFeed,omitempty"` + + // Date The booking date. Most likely the current date. + Date time.Time `json:"date"` + + // Type Define a type for the booking.
+ // The following type abbreviations are available (abbreviation <-> meaning).
+ //
    + //
  • FULL_PAYMENT <-> Normal booking
  • N <-> Partial booking (historically used for normal booking)
  • + //
  • CB <-> Reduced amount due to discount (skonto)
  • + //
  • CF <-> Reduced/Higher amount due to currency fluctuations (deprecated)
  • + //
  • O <-> Reduced/Higher amount due to other reasons
  • + //
  • OF <-> Higher amount due to reminder charges
  • + //
  • MTC <-> Reduced amount due to the monetary traffic costs
  • + //
+ Type BookVoucherJSONBodyType `json:"type"` +} + +// BookVoucherJSONBodyType defines parameters for BookVoucher. +type BookVoucherJSONBodyType string + +// GetVoucherPositionsParams defines parameters for GetVoucherPositions. +type GetVoucherPositionsParams struct { + // VoucherId Retrieve all vouchers positions belonging to this voucher. Must be provided with voucher[objectName] + VoucherId *int `form:"voucher[id],omitempty" json:"voucher[id],omitempty"` + + // VoucherObjectName Only required if voucher[id] was provided. 'Voucher' should be used as value. + VoucherObjectName *string `form:"voucher[objectName],omitempty" json:"voucher[objectName],omitempty"` +} + +// CreateAccountingContactJSONRequestBody defines body for CreateAccountingContact for application/json ContentType. +type CreateAccountingContactJSONRequestBody = ModelAccountingContact + +// UpdateAccountingContactJSONRequestBody defines body for UpdateAccountingContact for application/json ContentType. +type UpdateAccountingContactJSONRequestBody = ModelAccountingContactUpdate + +// CreateCheckAccountJSONRequestBody defines body for CreateCheckAccount for application/json ContentType. +type CreateCheckAccountJSONRequestBody = ModelCheckAccount + +// CreateClearingAccountJSONRequestBody defines body for CreateClearingAccount for application/json ContentType. +type CreateClearingAccountJSONRequestBody = CreateClearingAccount + +// CreateFileImportAccountJSONRequestBody defines body for CreateFileImportAccount for application/json ContentType. +type CreateFileImportAccountJSONRequestBody = CreateFileImportAccount + +// UpdateCheckAccountJSONRequestBody defines body for UpdateCheckAccount for application/json ContentType. +type UpdateCheckAccountJSONRequestBody = ModelCheckAccountUpdate + +// CreateTransactionJSONRequestBody defines body for CreateTransaction for application/json ContentType. +type CreateTransactionJSONRequestBody = ModelCheckAccountTransaction + +// UpdateCheckAccountTransactionJSONRequestBody defines body for UpdateCheckAccountTransaction for application/json ContentType. +type UpdateCheckAccountTransactionJSONRequestBody = ModelCheckAccountTransactionUpdate + +// CreateCommunicationWayJSONRequestBody defines body for CreateCommunicationWay for application/json ContentType. +type CreateCommunicationWayJSONRequestBody = ModelCommunicationWay + +// UpdateCommunicationWayJSONRequestBody defines body for UpdateCommunicationWay for application/json ContentType. +type UpdateCommunicationWayJSONRequestBody = ModelCommunicationWayUpdate + +// CreateContactJSONRequestBody defines body for CreateContact for application/json ContentType. +type CreateContactJSONRequestBody = ModelContact + +// UpdateContactJSONRequestBody defines body for UpdateContact for application/json ContentType. +type UpdateContactJSONRequestBody = ModelContactUpdate + +// CreateContactAddressJSONRequestBody defines body for CreateContactAddress for application/json ContentType. +type CreateContactAddressJSONRequestBody = ModelContactAddress + +// UpdateContactAddressJSONRequestBody defines body for UpdateContactAddress for application/json ContentType. +type UpdateContactAddressJSONRequestBody = ModelContactAddressUpdate + +// CreateContactFieldJSONRequestBody defines body for CreateContactField for application/json ContentType. +type CreateContactFieldJSONRequestBody = ModelContactCustomField + +// UpdateContactfieldJSONRequestBody defines body for UpdateContactfield for application/json ContentType. +type UpdateContactfieldJSONRequestBody = ModelContactCustomFieldUpdate + +// CreateContactFieldSettingJSONRequestBody defines body for CreateContactFieldSetting for application/json ContentType. +type CreateContactFieldSettingJSONRequestBody = ModelContactCustomFieldSetting + +// UpdateContactFieldSettingJSONRequestBody defines body for UpdateContactFieldSetting for application/json ContentType. +type UpdateContactFieldSettingJSONRequestBody = ModelContactCustomFieldSettingUpdate + +// CreateCreditNoteFromInvoiceJSONRequestBody defines body for CreateCreditNoteFromInvoice for application/json ContentType. +type CreateCreditNoteFromInvoiceJSONRequestBody CreateCreditNoteFromInvoiceJSONBody + +// CreateCreditNoteFromVoucherJSONRequestBody defines body for CreateCreditNoteFromVoucher for application/json ContentType. +type CreateCreditNoteFromVoucherJSONRequestBody CreateCreditNoteFromVoucherJSONBody + +// CreatecreditNoteJSONRequestBody defines body for CreatecreditNote for application/json ContentType. +type CreatecreditNoteJSONRequestBody = SaveCreditNote + +// UpdatecreditNoteJSONRequestBody defines body for UpdatecreditNote for application/json ContentType. +type UpdatecreditNoteJSONRequestBody = ModelCreditNoteUpdate + +// BookCreditNoteJSONRequestBody defines body for BookCreditNote for application/json ContentType. +type BookCreditNoteJSONRequestBody BookCreditNoteJSONBody + +// UpdateCreditNoteTemplateJSONRequestBody defines body for UpdateCreditNoteTemplate for application/json ContentType. +type UpdateCreditNoteTemplateJSONRequestBody = ModelChangeLayout + +// CreditNoteSendByJSONRequestBody defines body for CreditNoteSendBy for application/json ContentType. +type CreditNoteSendByJSONRequestBody CreditNoteSendByJSONBody + +// SendCreditNoteViaEMailJSONRequestBody defines body for SendCreditNoteViaEMail for application/json ContentType. +type SendCreditNoteViaEMailJSONRequestBody SendCreditNoteViaEMailJSONBody + +// CreateInvoiceFromOrderJSONRequestBody defines body for CreateInvoiceFromOrder for application/json ContentType. +type CreateInvoiceFromOrderJSONRequestBody = ModelCreateInvoiceFromOrder + +// CreateInvoiceReminderJSONRequestBody defines body for CreateInvoiceReminder for application/json ContentType. +type CreateInvoiceReminderJSONRequestBody CreateInvoiceReminderJSONBody + +// CreateInvoiceByFactoryJSONRequestBody defines body for CreateInvoiceByFactory for application/json ContentType. +type CreateInvoiceByFactoryJSONRequestBody = SaveInvoice + +// BookInvoiceJSONRequestBody defines body for BookInvoice for application/json ContentType. +type BookInvoiceJSONRequestBody BookInvoiceJSONBody + +// UpdateInvoiceTemplateJSONRequestBody defines body for UpdateInvoiceTemplate for application/json ContentType. +type UpdateInvoiceTemplateJSONRequestBody = ModelChangeLayout + +// InvoiceRenderJSONRequestBody defines body for InvoiceRender for application/json ContentType. +type InvoiceRenderJSONRequestBody InvoiceRenderJSONBody + +// InvoiceSendByJSONRequestBody defines body for InvoiceSendBy for application/json ContentType. +type InvoiceSendByJSONRequestBody InvoiceSendByJSONBody + +// SendInvoiceViaEMailJSONRequestBody defines body for SendInvoiceViaEMail for application/json ContentType. +type SendInvoiceViaEMailJSONRequestBody SendInvoiceViaEMailJSONBody + +// CreateContractNoteFromOrderJSONRequestBody defines body for CreateContractNoteFromOrder for application/json ContentType. +type CreateContractNoteFromOrderJSONRequestBody = ModelCreatePackingListFromOrder + +// CreatePackingListFromOrderJSONRequestBody defines body for CreatePackingListFromOrder for application/json ContentType. +type CreatePackingListFromOrderJSONRequestBody = ModelCreatePackingListFromOrder + +// CreateOrderJSONRequestBody defines body for CreateOrder for application/json ContentType. +type CreateOrderJSONRequestBody = SaveOrder + +// UpdateOrderJSONRequestBody defines body for UpdateOrder for application/json ContentType. +type UpdateOrderJSONRequestBody = ModelOrderUpdate + +// UpdateOrderTemplateJSONRequestBody defines body for UpdateOrderTemplate for application/json ContentType. +type UpdateOrderTemplateJSONRequestBody = ModelChangeLayout + +// OrderSendByJSONRequestBody defines body for OrderSendBy for application/json ContentType. +type OrderSendByJSONRequestBody OrderSendByJSONBody + +// SendorderViaEMailJSONRequestBody defines body for SendorderViaEMail for application/json ContentType. +type SendorderViaEMailJSONRequestBody SendorderViaEMailJSONBody + +// UpdateOrderPositionJSONRequestBody defines body for UpdateOrderPosition for application/json ContentType. +type UpdateOrderPositionJSONRequestBody = ModelOrderPosUpdate + +// CreatePartJSONRequestBody defines body for CreatePart for application/json ContentType. +type CreatePartJSONRequestBody = ModelPart + +// UpdatePartJSONRequestBody defines body for UpdatePart for application/json ContentType. +type UpdatePartJSONRequestBody = ModelPartUpdate + +// UpdateExportConfigJSONRequestBody defines body for UpdateExportConfig for application/json ContentType. +type UpdateExportConfigJSONRequestBody UpdateExportConfigJSONBody + +// CreateTagJSONRequestBody defines body for CreateTag for application/json ContentType. +type CreateTagJSONRequestBody CreateTagJSONBody + +// UpdateTagJSONRequestBody defines body for UpdateTag for application/json ContentType. +type UpdateTagJSONRequestBody UpdateTagJSONBody + +// VoucherFactorySaveVoucherJSONRequestBody defines body for VoucherFactorySaveVoucher for application/json ContentType. +type VoucherFactorySaveVoucherJSONRequestBody = SaveVoucher + +// UpdateVoucherJSONRequestBody defines body for UpdateVoucher for application/json ContentType. +type UpdateVoucherJSONRequestBody = ModelVoucherUpdate + +// BookVoucherJSONRequestBody defines body for BookVoucher for application/json ContentType. +type BookVoucherJSONRequestBody BookVoucherJSONBody From c89c2afb88eb8a7f6c0ed81c24e9e06662e5caa3 Mon Sep 17 00:00:00 2001 From: Simon Lukas <60503970+Plaenkler@users.noreply.github.com> Date: Mon, 30 Dec 2024 12:28:37 +0100 Subject: [PATCH 08/13] [UPD] README.md --- README.md | 52 ++++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 40 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index e98260f..efea16b 100644 --- a/README.md +++ b/README.md @@ -5,21 +5,49 @@ [![Go Reference](https://pkg.go.dev/badge/github.com/Plaenkler/sevDesk.svg)](https://pkg.go.dev/github.com/Plaenkler/sevDesk) [![Support me](https://img.shields.io/badge/Support%20me%20%E2%98%95-orange.svg)](https://www.buymeacoffee.com/Plaenkler) -Plaenkler/sevDesk enables HTTP requests to be made to the [sevDesk API](https://api.sevdesk.de/). The library abstracts the constructs and allows developers to interact with the sevDesk API through a convenient and intuitive interface. +## 🎯 Purpose - - - - - -
exampleexample
+- Maintain updated and reliable Go bindings for the [sevDesk API](https://api.sevdesk.de/). +- Simplify integration with sevDesk for Go developers by providing: + - **Generated Go types** for the API data models. + - **A client implementation** for interacting with the API. + - **Server boilerplate code** for custom API handling. -## 🎯 Project goals +## 🚀 Installation -- [ ] Client with automatic token renewal +Install the package in your Go project: -## ✅ Examples +```bash +go get github.com/Plaenkler/sevDesk +``` -A separate example has been implemented for each interface of the API. All examples use the client for authentication except the authentication example itself if there is a desire to implement a separate client. +## 📚 Contribution -- [Authentication](https://github.com/Plaenkler/sevDesk/tree/main/examples/authenticate) +If you notice that this Golang package is out of date with the latest sevDesk OpenAPI definition please feel free to submit a pull request. +Here’s how you can help: + +### 🛠 **Updating API Bindings** + +To update the Go bindings based on the latest sevDesk OpenAPI definition, follow these steps: + +1. **Fork the repository** + Create a personal copy of this repository by forking it. + This will allow you to make changes without affecting the original project. + +2. **Create a new branch** + Before making any changes, create a new branch with a descriptive name (e.g. `update-api-bindings-v2.X.X`). + +3. **Run the Update Script** + We’ve provided an update script that automatically generates Go bindings from the sevDesk OpenAPI specification. + Run the script by executing: + ```bash + ./update_bindings.sh + ``` + This will generate updated Go types and client code based on the latest API schema. + +4. **Commit and push the updated files** + After running the update script, review the changes and commit them with a clear message (e.g. `[UPD] Bindings for sevDesk v2.X.X`). + Then, push the changes to your fork. + +5. **Open a Pull Request** + Submit a pull request with your changes. \ No newline at end of file From 6ab137a43ef42f2d9eddc8c6a7f73b7aa36938cf Mon Sep 17 00:00:00 2001 From: Simon Lukas <60503970+Plaenkler@users.noreply.github.com> Date: Mon, 30 Dec 2024 12:45:42 +0100 Subject: [PATCH 09/13] [UPD] Linters --- .github/linters/.golangci.yml | 65 ----------------------------------- .github/workflows/linters.yml | 19 +--------- generate.sh | 3 -- 3 files changed, 1 insertion(+), 86 deletions(-) delete mode 100644 .github/linters/.golangci.yml diff --git a/.github/linters/.golangci.yml b/.github/linters/.golangci.yml deleted file mode 100644 index a2da915..0000000 --- a/.github/linters/.golangci.yml +++ /dev/null @@ -1,65 +0,0 @@ ---- - -run: - timeout: 60s - -linters: - enable-all: true - disable: - - golint - - interfacer - - maligned - - scopelint - - deadcode - - varcheck - - structcheck - - cyclop - - exhaustive - - exhaustivestruct - - exhaustruct - - forbidigo - - funlen - - gochecknoglobals - - godot - - err113 - - gofmt - - gofumpt - - gomnd - - lll - - nakedret - - nestif - - nlreturn - - tagliatelle - - varnamelen - - wsl - - nonamedreturns - - contextcheck - - gocognit - - gocyclo - - maintidx - - wrapcheck - - nolintlint - - errorlint - - noctx - - gochecknoinits - - prealloc - - godox - - dupl - - goconst - - ifshort - - nilerr - - ireturn - - nosprintfhostport - - depguard - - gci - - nosnakecase - - rowserrcheck - - sqlclosecheck - - structcheck - - wastedassign - - goimports - - mnd - -linters-settings: - wsl: - allow-cuddle-declarations: true diff --git a/.github/workflows/linters.yml b/.github/workflows/linters.yml index 869be13..1a34058 100644 --- a/.github/workflows/linters.yml +++ b/.github/workflows/linters.yml @@ -29,23 +29,6 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} VALIDATE_ALL_CODEBASE: true VALIDATE_JSCPD: false + VALIDATE_CHECKOV: false VALIDATE_GO: false VALIDATE_GO_MODULES: false - golangci-lint: - name: Lint Golang - runs-on: ubuntu-latest - steps: - - name: Setup Go - uses: actions/setup-go@v5 - with: - go-version: 1.22.10 - - name: Checkout Code - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - name: Install dependencies - run: go mod tidy - - name: Run golangci-lint - uses: golangci/golangci-lint-action@v6 - with: - args: --timeout=3m diff --git a/generate.sh b/generate.sh index 3231a0a..9d08c10 100644 --- a/generate.sh +++ b/generate.sh @@ -35,19 +35,16 @@ mkdir -p "$TYPES_DIR" "$CLIENT_DIR" "$SERVER_DIR" || abort "Failed to create tar # Generate Go files for types echo "Generating Go files for types ..." oapi-codegen -generate types -o "$TYPES_DIR/types.go" -package types "$OPENAPI_FILE" || abort "Error generating types files." - echo -e "${GREEN}Types files successfully generated in $TYPES_DIR/types.go${NC}" # Generate Go files for client echo "Generating Go files for client ..." oapi-codegen -generate client -o "$CLIENT_DIR/client.go" -package client "$OPENAPI_FILE" || abort "Error generating client files." - echo -e "${GREEN}Client files successfully generated in $CLIENT_DIR/client.go${NC}" # Generate Go files for server echo "Generating Go files for server ..." oapi-codegen -generate server -o "$SERVER_DIR/server.go" -package server "$OPENAPI_FILE" || abort "Error generating server files." - echo -e "${GREEN}Server files successfully generated in $SERVER_DIR/server.go${NC}" echo -e "${GREEN}All steps completed successfully.${NC}" From 40be5eb82762515911626d22920a6939740bbe51 Mon Sep 17 00:00:00 2001 From: Simon Lukas <60503970+Plaenkler@users.noreply.github.com> Date: Mon, 30 Dec 2024 12:49:36 +0100 Subject: [PATCH 10/13] [FIX] Use SemVer --- SECURITY.md | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/SECURITY.md b/SECURITY.md index 02cdbab..6a9af1b 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -2,22 +2,21 @@ ## Supported Versions -I am dedicated to ensure the security of sevDesk. To achieve this, I follow the Calendar Versioning (CalVer) scheme, where revisions are in the format "yy/week of year/revision". -I will only support the latest revision of each of the last three calendar weeks. Explanatory diagram: +I am dedicated to ensure the security of sevDesk. To achieve this, I follow the Semantic Versioning (SemVer) scheme, where revisions are in the format "major.minor.patch". +I will release patches for any security vulnerabilities that are discovered in the latest major or minor release. -| Version | Supported | -| ------------ | ------------------ | -| 2023.30.2 | :white_check_mark: | -| 2023.30.1 | :x: | -| 2023.29.2 | :white_check_mark: | -| 2023.28.4 | :white_check_mark: | -| Older | :x: | +| Version | Supported | +| ------- | ------------------ | +| 1.2.x | :white_check_mark: | +| 1.1.x | :x: | +| 1.0.x | :white_check_mark: | +| < 1.0 | :x: | ## Reporting a Vulnerability I take the security of this project very seriously. If you discover a security vulnerability, I appreciate your responsible disclosure. To report a vulnerability, please follow these steps: -1. **Email**: Send an email to [info@plaenker.com](mailto:info@plaenker.com) with all the details regarding the vulnerability. +1. **Email**: Send an email to [info@plaenkler.com](mailto:info@plaenkler.com) with all the details regarding the vulnerability. 2. **Subject**: Use "[sevDesk Vulnerability Report]" as the subject line to help me prioritize and identify your report. 3. **Vulnerability Details**: Please provide a clear and detailed description of the vulnerability, along with the potential impact it may have. 4. **Reproducibility**: If possible, include step-by-step instructions to reproduce the vulnerability. @@ -40,10 +39,11 @@ If the vulnerability is declined: ## Security Updates -To ensure the security of sevDesk, it is crucial that all users update to the latest supported version promptly. Users of older versions that are no longer supported are strongly recommended to upgrade to a supported version to stay protected against potential security threats. +To ensure the security of sevDesk, it is crucial that all users update to the latest supported version promptly. +Users of older versions that are no longer supported are strongly recommended to upgrade to a supported version to stay protected against potential security threats. Thank you for helping me make sevDesk more secure. Your cooperation and responsible disclosure are essential to maintaining the integrity and trustworthiness of this project. Please note that this security policy is subject to change over time, so it is advisable to check this document periodically for any updates. -Last Updated: July 31, 2023. +Last Updated: December 30, 2024. \ No newline at end of file From 1c8b5c5d4ce19ccaef7a2d75c9e6b713cf3b01ac Mon Sep 17 00:00:00 2001 From: Simon Lukas <60503970+Plaenkler@users.noreply.github.com> Date: Mon, 30 Dec 2024 12:52:43 +0100 Subject: [PATCH 11/13] [FIX] Use tabs --- generate.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/generate.sh b/generate.sh index 9d08c10..b3ee6cd 100644 --- a/generate.sh +++ b/generate.sh @@ -14,18 +14,18 @@ NC='\033[0m' RED='\033[0;31m' abort() { - echo -e "${RED}Error: $1${NC}" - exit 1 + echo -e "${RED}Error: $1${NC}" + exit 1 } # Check if the OpenAPI file exists if [ -f "$OPENAPI_FILE" ]; then - echo -e "${GREEN}$OPENAPI_FILE already exists. Skipping download.${NC}" + echo -e "${GREEN}$OPENAPI_FILE already exists. Skipping download.${NC}" else - # Download the OpenAPI definition - echo "Downloading OpenAPI definition from $OPENAPI_URL ..." - curl -o "$OPENAPI_FILE" "$OPENAPI_URL" || abort "Failed to download OpenAPI definition." - echo -e "${GREEN}OpenAPI definition successfully downloaded to $OPENAPI_FILE${NC}" + # Download the OpenAPI definition + echo "Downloading OpenAPI definition from $OPENAPI_URL ..." + curl -o "$OPENAPI_FILE" "$OPENAPI_URL" || abort "Failed to download OpenAPI definition." + echo -e "${GREEN}OpenAPI definition successfully downloaded to $OPENAPI_FILE${NC}" fi # Create target directories if they don't exist From a90481af3051d7b2cceda1dd42f8dec76990c233 Mon Sep 17 00:00:00 2001 From: Simon Lukas <60503970+Plaenkler@users.noreply.github.com> Date: Mon, 30 Dec 2024 12:54:32 +0100 Subject: [PATCH 12/13] [FIX] Validate BASH_EXEC --- .github/workflows/linters.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/linters.yml b/.github/workflows/linters.yml index 1a34058..85eb2aa 100644 --- a/.github/workflows/linters.yml +++ b/.github/workflows/linters.yml @@ -30,5 +30,6 @@ jobs: VALIDATE_ALL_CODEBASE: true VALIDATE_JSCPD: false VALIDATE_CHECKOV: false + VALIDATE_BASH_EXEC: false VALIDATE_GO: false VALIDATE_GO_MODULES: false From 16e56e15d7ea68ace8064576bc6138bb34ced1d1 Mon Sep 17 00:00:00 2001 From: Simon Lukas <60503970+Plaenkler@users.noreply.github.com> Date: Mon, 30 Dec 2024 13:03:52 +0100 Subject: [PATCH 13/13] [FIX] Go reference URLs --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index efea16b..5b77aff 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # 📖 sevDesk [![License](https://img.shields.io/badge/License-BSD_3--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause) -[![Linters](https://github.com/Plaenkler/sevDesk/actions/workflows/linters.yml/badge.svg)](https://github.com/Plaenkler/sevDesk/actions/workflows/linters.yml) +[![Linters](https://github.com/plaenkler/sevdesk/actions/workflows/linters.yml/badge.svg)](https://github.com/plaenkler/sevdesk/actions/workflows/linters.yml) [![Go Reference](https://pkg.go.dev/badge/github.com/Plaenkler/sevDesk.svg)](https://pkg.go.dev/github.com/Plaenkler/sevDesk) [![Support me](https://img.shields.io/badge/Support%20me%20%E2%98%95-orange.svg)](https://www.buymeacoffee.com/Plaenkler)