- 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.
7.1 KiB
7.1 KiB
Document
Properties
| Name | Type | Description | Notes |
|---|---|---|---|
| address | DocumentAddress | [optional] | |
| advanced_data_fields | List[AdvancedDataField] | EN16931 Business Terms (BT fields) for structured invoice data. On update the submitted list fully replaces the existing fields — send an empty array to clear all. | [optional] |
| attachment_ids | List[int] | [optional] [readonly] | |
| label_address | DocumentAddress | [optional] | |
| amount | int | Amount in cents (e.g. "150" = 1.50€) | [optional] [readonly] |
| amount_net | int | Amount in cents (e.g. "150" = 1.50€) | [optional] [readonly] |
| anonymize_due_date | date | A date which signals when to anonymize the document. Must be in the future. Turns into a read only field if the document is anonymized | [optional] |
| anonymize_status | str | This field signals if the document was anonymized | [optional] [readonly] [default to 'NOT_ANONYMIZED'] |
| anonymized_at | str | [optional] [readonly] | |
| bank_debit_form | str | [optional] [default to 'null'] | |
| billing_country | str | [optional] [readonly] | |
| calc_vat_from | int | 0 === Net, 1 === Gross. | [optional] |
| cancel_id | int | ID from the cancel document. Only for document type INVOICE. | [optional] [readonly] |
| cash_allowance | float | Cash allowance percentage. If not provided, inherits from customer when available. | [optional] |
| cash_allowance_days | int | Days for cash allowance. If not provided, inherits from customer when available. | [optional] |
| cash_allowance_text | str | [optional] [default to 'null'] | |
| contact_id | int | [optional] | |
| contact_label | str | [optional] [default to ''] | |
| contact_text | str | [optional] [default to ''] | |
| created_at | datetime | [optional] [readonly] | |
| currency | str | [optional] [default to 'EUR'] | |
| customer_id | int | [optional] | |
| customer_snapshot | CustomerSnapshot | [optional] | |
| discount | str | [optional] [default to 'null'] | |
| discount_type | str | [optional] [default to null] | |
| document_date | date | [optional] | |
| due_date | date | To change the value use grace_period. | [optional] [readonly] |
| edited_at | datetime | [optional] [readonly] | |
| external_id | str | [optional] [default to 'null'] | |
| replica_url | str | [optional] [default to 'null'] | |
| grace_period | int | will be replaced by its alias due_in_days. | [optional] |
| due_in_days | int | due date in days. If not provided, inherits from customer when available | [optional] |
| id | int | [optional] [readonly] | |
| is_acceptable_on_public_domain | bool | Indicates if a document can be accepted by the end customer through the document's public access page. | [optional] [default to False] |
| is_archive | bool | [optional] [default to False] | |
| is_draft | bool | This property is read only. To finish the document call /documents/{id}/done. | [optional] [readonly] |
| is_replica | bool | Marks a document as a replica from another software. | [optional] [default to False] |
| is_oss | bool | Indicates if a document is a one-stop-shop document | [optional] [default to False] |
| item_notes | List[str] | Field holds all unique document_note of items for the document | [optional] [readonly] |
| items | List[DocumentPosition] | [optional] | |
| last_postbox_id | int | [optional] [readonly] | |
| login_id | int | If omitted or null, the currently active login is used. | [optional] |
| number | str | [optional] [default to 'null'] | |
| order_number | str | [optional] [default to ''] | |
| buyer_reference | str | [optional] [default to ''] | |
| paid_amount | int | [optional] [readonly] | |
| paid_at | date | [optional] [readonly] | |
| pdf_pages | int | [optional] [readonly] | |
| pdf_template | str | Default template is null or 'DE', default english is 'EN' and for all others use the numeric template ID. | [optional] |
| payment_link_enabled | bool | Whether the payment link is shown on this document. Overrides the setting from the referenced template. | [optional] [default to False] |
| payment_link_locale | str | Language of the payment link text on the document. | [optional] [default to 'de'] |
| project_id | int | [optional] | |
| recurring_options | DocumentRecurring | [optional] | |
| ref_id | int | Reference document id | [optional] |
| root_id | int | Root document id | [optional] [readonly] |
| service_date | ServiceDate | [optional] | |
| shipping_country | str | [optional] [default to 'null'] | |
| status | str | This value can only be used in document type DELIVERY, ORDER, CHARGE or OFFER. NULL is default = not set. | [optional] [default to null] |
| text | str | [optional] | |
| text_prefix | str | [optional] | |
| text_tax | str | Overwrites the default vat-option text from the document layout. It is only displayed in documents with the type other than: Delivery, Dunning, Reminder or Letter and a different vat-option than null | [optional] [default to 'null'] |
| title | str | [optional] [default to 'null'] | |
| type | str | Can only set on create. | [optional] [default to 'INVOICE'] |
| use_shipping_address | bool | If true and customer has shipping address then it will be used. | [optional] [default to False] |
| vat_country | str | [optional] [default to 'null'] | |
| vat_id | str | [optional] [readonly] [default to ''] | |
| fulfillment_country | str | [optional] [default to 'null'] | |
| vat_option | str | NULL: Normal steuerbar<br/> nStb: Nicht steuerbar (Drittland)<br/> nStbUstID: Nicht steuerbar (EU mit USt-IdNr.)<br/> nStbNoneUstID: Nicht steuerbar (EU ohne USt-IdNr.)<br/> nStbIm: Nicht steuerbarer Innenumsatz<br/> revc: Steuerschuldwechsel §13b (Inland)<br/> IG: Innergemeinschaftliche Lieferung<br/> AL: Ausfuhrlieferung<br/> sStfr: sonstige Steuerbefreiung<br/> smallBusiness: Kleinunternehmen (Keine MwSt.) | [optional] [default to null] |
| file_format_config | List[FileFormatConfig] | [optional] |
Example
from easybill_generated_sync.models.document import Document
# TODO update the JSON string below
json = "{}"
# create an instance of Document from a JSON string
document_instance = Document.from_json(json)
# print the JSON string representation of the object
print(Document.to_json())
# convert the object into a dict
document_dict = document_instance.to_dict()
# create an instance of Document from a dict
document_from_dict = Document.from_dict(document_dict)