- Implement tests for basic and bearer authentication headers in `test_auth.py`. - Create tests for the `EasybillWebhookParser` in `test_webhooks.py`, covering JSON and form-encoded payloads, as well as a generic parse and acknowledgement method.
115 lines
4.2 KiB
Python
115 lines
4.2 KiB
Python
# coding: utf-8
|
|
|
|
"""
|
|
easybill REST API
|
|
|
|
The first version of the easybill REST API. [CHANGELOG](https://api.easybill.de/rest/v1/CHANGELOG.md) ## Authentication You can choose between two available methods: `Basic Auth` or `Bearer Token`. In each HTTP request, one of the following HTTP headers is required: ``` # Basic Auth Authorization: Basic base64_encode('<email>:<api_key>') # Bearer Token Authorization: Bearer <api_key> ``` ## Limitations ### Request Limit * PLUS: 10 requests per minute * BUSINESS: 60 requests per minute If the limit is exceeded, you will receive the HTTP error: `429 Too Many Requests` ### Result Limit All result lists are limited to 100 by default. This limit can be increased by the query parameter `limit` to a maximum of 1000. ## Query filter Many list resources can be filtered. In `/documents` you can filter e.g. by number with `/documents?number=111028654`. If you want to filter multiple numbers, you can either enter them separated by commas `/documents?number=111028654,222006895` or as an array `/documents?number[]=111028654&number[]=222006895`. **Warning**: The maximum size of an HTTP request line in bytes is 4094. If this limit is exceeded, you will receive the HTTP error: `414 Request-URI Too Large` ### Escape commas in query You can escape commans in query `name=Patrick\\, Peter` if you submit the header `X-Easybill-Escape: true` in your request. ## Property login_id This is the login of your admin or employee account. ## Date and Date-Time format Please use the timezone `Europe/Berlin`. * **date** = *Y-m-d* = `2016-12-31` * **date-time** = *Y-m-d H:i:s* = `2016-12-31 03:13:37` Date or datetime can be `null` because the attributes have been added later and the entry is older.
|
|
|
|
The version of the OpenAPI document: 1.96.0
|
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
|
|
Do not edit the class manually.
|
|
""" # noqa: E501
|
|
|
|
|
|
import unittest
|
|
|
|
from easybill_generated_async.api.document_api import DocumentApi
|
|
|
|
|
|
class TestDocumentApi(unittest.IsolatedAsyncioTestCase):
|
|
"""DocumentApi unit test stubs"""
|
|
|
|
async def asyncSetUp(self) -> None:
|
|
self.api = DocumentApi()
|
|
|
|
async def asyncTearDown(self) -> None:
|
|
await self.api.api_client.close()
|
|
|
|
async def test_documents_get(self) -> None:
|
|
"""Test case for documents_get
|
|
|
|
Fetch documents list
|
|
"""
|
|
pass
|
|
|
|
async def test_documents_id_cancel_post(self) -> None:
|
|
"""Test case for documents_id_cancel_post
|
|
|
|
Cancel document
|
|
"""
|
|
pass
|
|
|
|
async def test_documents_id_delete(self) -> None:
|
|
"""Test case for documents_id_delete
|
|
|
|
Delete document
|
|
"""
|
|
pass
|
|
|
|
async def test_documents_id_done_put(self) -> None:
|
|
"""Test case for documents_id_done_put
|
|
|
|
To complete a document.
|
|
"""
|
|
pass
|
|
|
|
async def test_documents_id_download_get(self) -> None:
|
|
"""Test case for documents_id_download_get
|
|
|
|
Fetch the document in best fitting format to the given Accept header
|
|
"""
|
|
pass
|
|
|
|
async def test_documents_id_get(self) -> None:
|
|
"""Test case for documents_id_get
|
|
|
|
Fetch document
|
|
"""
|
|
pass
|
|
|
|
async def test_documents_id_jpg_get(self) -> None:
|
|
"""Test case for documents_id_jpg_get
|
|
|
|
Download a document as an jpeg-image
|
|
"""
|
|
pass
|
|
|
|
async def test_documents_id_pdf_get(self) -> None:
|
|
"""Test case for documents_id_pdf_get
|
|
|
|
Fetch pdf document
|
|
"""
|
|
pass
|
|
|
|
async def test_documents_id_put(self) -> None:
|
|
"""Test case for documents_id_put
|
|
|
|
Update document
|
|
"""
|
|
pass
|
|
|
|
async def test_documents_id_send_type_post(self) -> None:
|
|
"""Test case for documents_id_send_type_post
|
|
|
|
Send document
|
|
"""
|
|
pass
|
|
|
|
async def test_documents_id_type_post(self) -> None:
|
|
"""Test case for documents_id_type_post
|
|
|
|
Convert an existing document to one of a different type
|
|
"""
|
|
pass
|
|
|
|
async def test_documents_post(self) -> None:
|
|
"""Test case for documents_post
|
|
|
|
Create document
|
|
"""
|
|
pass
|
|
|
|
|
|
if __name__ == '__main__':
|
|
unittest.main()
|