easybill_client/generated/sync/easybill_generated_sync/models/customer_snapshot.py
claudi caacb339dd Add unit tests for authentication and webhook parsing
- 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.
2026-04-17 10:20:12 +02:00

577 lines
30 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
from __future__ import annotations
import pprint
import re # noqa: F401
import json
from datetime import date
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr, field_validator
from typing import Any, ClassVar, Dict, List, Optional, Union
from typing_extensions import Annotated
from typing import Optional, Set
from typing_extensions import Self
from pydantic_core import to_jsonable_python
class CustomerSnapshot(BaseModel):
"""
A snapshot of the customer model which belongs to a document. This model is readonly and the state is final after finalization of the document. It's is identical to the state of the customer model at the time of finalization. Updates to the actual customer dataset won't affect this snapshot, however if you update the document the customer and therefore the customer snapshot may reflect a different state.
""" # noqa: E501
acquire_options: Optional[StrictInt] = Field(default=None, description="1 = Empfehlung eines anderen Kunden, 2 = Zeitungsanzeige, 3 = Eigene Akquisition, 4 = Mitarbeiter Akquisition, 5 = Google, 6 = Gelbe Seiten, 7 = Kostenlose Internet Plattform, 8 = Bezahlte Internet Plattform")
additional_groups_ids: Optional[List[StrictInt]] = None
bank_account: Optional[StrictStr] = None
bank_account_owner: Optional[StrictStr] = None
bank_bic: Optional[StrictStr] = None
bank_code: Optional[StrictStr] = None
bank_iban: Optional[StrictStr] = None
bank_name: Optional[StrictStr] = None
birth_date: Optional[date] = None
cash_allowance: Optional[Union[Annotated[float, Field(le=100, strict=True, ge=0)], Annotated[int, Field(le=100, strict=True, ge=0)]]] = None
cash_allowance_days: Optional[StrictInt] = None
cash_discount: Optional[Union[StrictFloat, StrictInt]] = None
cash_discount_type: Optional[StrictStr] = None
city: Optional[StrictStr] = None
state: Optional[StrictStr] = None
company_name: Optional[StrictStr]
country: Optional[StrictStr] = None
created_at: Optional[date] = None
updated_at: Optional[StrictStr] = None
delivery_title: Optional[StrictStr] = None
delivery_city: Optional[StrictStr] = None
delivery_state: Optional[StrictStr] = None
delivery_company_name: Optional[StrictStr] = None
delivery_country: Optional[StrictStr] = None
delivery_first_name: Optional[StrictStr] = None
delivery_last_name: Optional[StrictStr] = None
delivery_personal: Optional[StrictBool] = None
delivery_salutation: Optional[StrictInt] = Field(default=None, description="0 = nothing, 1 = Mr, 2 = Mrs, 3 = Company, 4 = Mr & Mrs, 5 = Married couple, 6 = Family")
delivery_street: Optional[StrictStr] = None
delivery_suffix_1: Optional[StrictStr] = None
delivery_suffix_2: Optional[StrictStr] = None
delivery_zip_code: Optional[StrictStr] = None
display_name: Optional[StrictStr] = None
emails: Optional[List[StrictStr]] = None
fax: Optional[StrictStr] = None
first_name: Optional[StrictStr] = None
grace_period: Optional[StrictInt] = Field(default=None, description="will be replaced by its alias due_in_days.")
due_in_days: Optional[StrictInt] = Field(default=None, description="due date in days")
group_id: Optional[StrictInt] = None
id: Optional[StrictInt] = None
info_1: Optional[StrictStr] = None
info_2: Optional[StrictStr] = None
internet: Optional[StrictStr] = None
last_name: Optional[StrictStr]
login_id: Optional[StrictInt] = None
mobile: Optional[StrictStr] = None
note: Optional[StrictStr] = None
number: Optional[StrictStr] = Field(default=None, description="Automatically generated if empty/omitted and when no type in query is provided or the type 'CUSTOMER', 'CUSTOMER,SUPPLIER'")
supplier_number: Optional[StrictStr] = Field(default=None, description="Automatically generated if the type SUPPLIER or 'CUSTOMER,SUPPLIER' is provided as query parameter and the field supplier_number is empty/omitted.")
payment_options: Optional[StrictInt] = Field(default=None, description="1 = Stets pünktliche Zahlung, 2 = überwiegend pünktliche Zahlung, 3 = überwiegend verspätete Zahlung, 5 = Grundsätzlich verspätete Zahlung")
personal: Optional[StrictBool] = False
phone_1: Optional[StrictStr] = None
phone_2: Optional[StrictStr] = None
postbox: Optional[StrictStr] = None
postbox_city: Optional[StrictStr] = None
postbox_state: Optional[StrictStr] = None
postbox_country: Optional[StrictStr] = None
postbox_zip_code: Optional[StrictStr] = None
sale_price_level: Optional[StrictStr] = None
salutation: Optional[StrictInt] = Field(default=None, description="0 = nothing, 1 = Mr, 2 = Mrs, 3 = Company, 4 = Mr & Mrs, 5 = Married couple, 6 = Family")
sepa_agreement: Optional[StrictStr] = Field(default=None, description="BASIC = SEPA-Basislastschrift, COR1 = SEPA-Basislastschrift COR1 (deprecated use BASIC instead), COMPANY = SEPA-Firmenlastschrift, NULL = Noch kein Mandat erteilt")
sepa_agreement_date: Optional[date] = None
sepa_mandate_reference: Optional[StrictStr] = None
since_date: Optional[date] = None
street: Optional[StrictStr] = None
suffix_1: Optional[StrictStr] = None
suffix_2: Optional[StrictStr] = None
tax_number: Optional[StrictStr] = None
court: Optional[StrictStr] = None
court_registry_number: Optional[StrictStr] = None
tax_options: Optional[StrictStr] = Field(default=None, description="nStb = Nicht steuerbar (Drittland), nStbUstID = Nicht steuerbar (EU mit USt-IdNr.), nStbNoneUstID = Nicht steuerbar (EU ohne USt-IdNr.), revc = Steuerschuldwechsel §13b (Inland), IG = Innergemeinschaftliche Lieferung, AL = Ausfuhrlieferung, sStfr = sonstige Steuerbefreiung, NULL = Umsatzsteuerpflichtig")
title: Optional[StrictStr] = None
archived: Optional[StrictBool] = None
vat_identifier: Optional[StrictStr] = None
zip_code: Optional[StrictStr] = None
document_pdf_type: Optional[StrictStr] = Field(default='default', description="Type of PDF to use when sending a Document to the Customer.")
buyer_reference: Optional[StrictStr] = Field(default=None, description="Used as \"buyerReference\" in ZUGFeRD and as \"Leitweg-ID\" in the XRechnung format.")
foreign_supplier_number: Optional[StrictStr] = Field(default=None, description="The ID given to your company by the customer in his system.")
__properties: ClassVar[List[str]] = ["acquire_options", "additional_groups_ids", "bank_account", "bank_account_owner", "bank_bic", "bank_code", "bank_iban", "bank_name", "birth_date", "cash_allowance", "cash_allowance_days", "cash_discount", "cash_discount_type", "city", "state", "company_name", "country", "created_at", "updated_at", "delivery_title", "delivery_city", "delivery_state", "delivery_company_name", "delivery_country", "delivery_first_name", "delivery_last_name", "delivery_personal", "delivery_salutation", "delivery_street", "delivery_suffix_1", "delivery_suffix_2", "delivery_zip_code", "display_name", "emails", "fax", "first_name", "grace_period", "due_in_days", "group_id", "id", "info_1", "info_2", "internet", "last_name", "login_id", "mobile", "note", "number", "supplier_number", "payment_options", "personal", "phone_1", "phone_2", "postbox", "postbox_city", "postbox_state", "postbox_country", "postbox_zip_code", "sale_price_level", "salutation", "sepa_agreement", "sepa_agreement_date", "sepa_mandate_reference", "since_date", "street", "suffix_1", "suffix_2", "tax_number", "court", "court_registry_number", "tax_options", "title", "archived", "vat_identifier", "zip_code", "document_pdf_type", "buyer_reference", "foreign_supplier_number"]
@field_validator('cash_discount_type')
def cash_discount_type_validate_enum(cls, value):
"""Validates the enum"""
if value is None:
return value
if value not in set(['PERCENT', 'AMOUNT']):
raise ValueError("must be one of enum values ('PERCENT', 'AMOUNT')")
return value
@field_validator('sale_price_level')
def sale_price_level_validate_enum(cls, value):
"""Validates the enum"""
if value is None:
return value
if value not in set(['SALEPRICE2', 'SALEPRICE3', 'SALEPRICE4', 'SALEPRICE5', 'SALEPRICE6', 'SALEPRICE7', 'SALEPRICE8', 'SALEPRICE9', 'SALEPRICE10']):
raise ValueError("must be one of enum values ('SALEPRICE2', 'SALEPRICE3', 'SALEPRICE4', 'SALEPRICE5', 'SALEPRICE6', 'SALEPRICE7', 'SALEPRICE8', 'SALEPRICE9', 'SALEPRICE10')")
return value
@field_validator('sepa_agreement')
def sepa_agreement_validate_enum(cls, value):
"""Validates the enum"""
if value is None:
return value
if value not in set(['BASIC', 'COR1', 'COMPANY', 'NULL']):
raise ValueError("must be one of enum values ('BASIC', 'COR1', 'COMPANY', 'NULL')")
return value
@field_validator('tax_options')
def tax_options_validate_enum(cls, value):
"""Validates the enum"""
if value is None:
return value
if value not in set(['nStb', 'nStbUstID', 'nStbNoneUstID', 'nStbIm', 'revc', 'IG', 'AL', 'sStfr', 'NULL']):
raise ValueError("must be one of enum values ('nStb', 'nStbUstID', 'nStbNoneUstID', 'nStbIm', 'revc', 'IG', 'AL', 'sStfr', 'NULL')")
return value
@field_validator('document_pdf_type')
def document_pdf_type_validate_enum(cls, value):
"""Validates the enum"""
if value is None:
return value
if value not in set(['default', 'zugferd1', 'zugferd2_2', 'zugferd2_4_en16931', 'zugferd2_4_extended', 'xrechnung2_1_xml', 'xrechnung2_2_xml', 'xrechnung2_3_xml', 'xrechnung3_0_xml']):
raise ValueError("must be one of enum values ('default', 'zugferd1', 'zugferd2_2', 'zugferd2_4_en16931', 'zugferd2_4_extended', 'xrechnung2_1_xml', 'xrechnung2_2_xml', 'xrechnung2_3_xml', 'xrechnung3_0_xml')")
return value
model_config = ConfigDict(
validate_by_name=True,
validate_by_alias=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
return json.dumps(to_jsonable_python(self.to_dict()))
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of CustomerSnapshot from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:
* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
* OpenAPI `readOnly` fields are excluded.
* OpenAPI `readOnly` fields are excluded.
* OpenAPI `readOnly` fields are excluded.
* OpenAPI `readOnly` fields are excluded.
"""
excluded_fields: Set[str] = set([
"created_at",
"updated_at",
"display_name",
"id",
])
_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
# set to None if acquire_options (nullable) is None
# and model_fields_set contains the field
if self.acquire_options is None and "acquire_options" in self.model_fields_set:
_dict['acquire_options'] = None
# set to None if bank_account (nullable) is None
# and model_fields_set contains the field
if self.bank_account is None and "bank_account" in self.model_fields_set:
_dict['bank_account'] = None
# set to None if bank_account_owner (nullable) is None
# and model_fields_set contains the field
if self.bank_account_owner is None and "bank_account_owner" in self.model_fields_set:
_dict['bank_account_owner'] = None
# set to None if bank_bic (nullable) is None
# and model_fields_set contains the field
if self.bank_bic is None and "bank_bic" in self.model_fields_set:
_dict['bank_bic'] = None
# set to None if bank_code (nullable) is None
# and model_fields_set contains the field
if self.bank_code is None and "bank_code" in self.model_fields_set:
_dict['bank_code'] = None
# set to None if bank_iban (nullable) is None
# and model_fields_set contains the field
if self.bank_iban is None and "bank_iban" in self.model_fields_set:
_dict['bank_iban'] = None
# set to None if bank_name (nullable) is None
# and model_fields_set contains the field
if self.bank_name is None and "bank_name" in self.model_fields_set:
_dict['bank_name'] = None
# set to None if birth_date (nullable) is None
# and model_fields_set contains the field
if self.birth_date is None and "birth_date" in self.model_fields_set:
_dict['birth_date'] = None
# set to None if cash_allowance (nullable) is None
# and model_fields_set contains the field
if self.cash_allowance is None and "cash_allowance" in self.model_fields_set:
_dict['cash_allowance'] = None
# set to None if cash_discount (nullable) is None
# and model_fields_set contains the field
if self.cash_discount is None and "cash_discount" in self.model_fields_set:
_dict['cash_discount'] = None
# set to None if cash_discount_type (nullable) is None
# and model_fields_set contains the field
if self.cash_discount_type is None and "cash_discount_type" in self.model_fields_set:
_dict['cash_discount_type'] = None
# set to None if city (nullable) is None
# and model_fields_set contains the field
if self.city is None and "city" in self.model_fields_set:
_dict['city'] = None
# set to None if company_name (nullable) is None
# and model_fields_set contains the field
if self.company_name is None and "company_name" in self.model_fields_set:
_dict['company_name'] = None
# set to None if delivery_city (nullable) is None
# and model_fields_set contains the field
if self.delivery_city is None and "delivery_city" in self.model_fields_set:
_dict['delivery_city'] = None
# set to None if delivery_company_name (nullable) is None
# and model_fields_set contains the field
if self.delivery_company_name is None and "delivery_company_name" in self.model_fields_set:
_dict['delivery_company_name'] = None
# set to None if delivery_country (nullable) is None
# and model_fields_set contains the field
if self.delivery_country is None and "delivery_country" in self.model_fields_set:
_dict['delivery_country'] = None
# set to None if delivery_first_name (nullable) is None
# and model_fields_set contains the field
if self.delivery_first_name is None and "delivery_first_name" in self.model_fields_set:
_dict['delivery_first_name'] = None
# set to None if delivery_last_name (nullable) is None
# and model_fields_set contains the field
if self.delivery_last_name is None and "delivery_last_name" in self.model_fields_set:
_dict['delivery_last_name'] = None
# set to None if delivery_street (nullable) is None
# and model_fields_set contains the field
if self.delivery_street is None and "delivery_street" in self.model_fields_set:
_dict['delivery_street'] = None
# set to None if delivery_suffix_1 (nullable) is None
# and model_fields_set contains the field
if self.delivery_suffix_1 is None and "delivery_suffix_1" in self.model_fields_set:
_dict['delivery_suffix_1'] = None
# set to None if delivery_suffix_2 (nullable) is None
# and model_fields_set contains the field
if self.delivery_suffix_2 is None and "delivery_suffix_2" in self.model_fields_set:
_dict['delivery_suffix_2'] = None
# set to None if delivery_zip_code (nullable) is None
# and model_fields_set contains the field
if self.delivery_zip_code is None and "delivery_zip_code" in self.model_fields_set:
_dict['delivery_zip_code'] = None
# set to None if fax (nullable) is None
# and model_fields_set contains the field
if self.fax is None and "fax" in self.model_fields_set:
_dict['fax'] = None
# set to None if first_name (nullable) is None
# and model_fields_set contains the field
if self.first_name is None and "first_name" in self.model_fields_set:
_dict['first_name'] = None
# set to None if grace_period (nullable) is None
# and model_fields_set contains the field
if self.grace_period is None and "grace_period" in self.model_fields_set:
_dict['grace_period'] = None
# set to None if due_in_days (nullable) is None
# and model_fields_set contains the field
if self.due_in_days is None and "due_in_days" in self.model_fields_set:
_dict['due_in_days'] = None
# set to None if group_id (nullable) is None
# and model_fields_set contains the field
if self.group_id is None and "group_id" in self.model_fields_set:
_dict['group_id'] = None
# set to None if info_1 (nullable) is None
# and model_fields_set contains the field
if self.info_1 is None and "info_1" in self.model_fields_set:
_dict['info_1'] = None
# set to None if info_2 (nullable) is None
# and model_fields_set contains the field
if self.info_2 is None and "info_2" in self.model_fields_set:
_dict['info_2'] = None
# set to None if internet (nullable) is None
# and model_fields_set contains the field
if self.internet is None and "internet" in self.model_fields_set:
_dict['internet'] = None
# set to None if last_name (nullable) is None
# and model_fields_set contains the field
if self.last_name is None and "last_name" in self.model_fields_set:
_dict['last_name'] = None
# set to None if mobile (nullable) is None
# and model_fields_set contains the field
if self.mobile is None and "mobile" in self.model_fields_set:
_dict['mobile'] = None
# set to None if note (nullable) is None
# and model_fields_set contains the field
if self.note is None and "note" in self.model_fields_set:
_dict['note'] = None
# set to None if payment_options (nullable) is None
# and model_fields_set contains the field
if self.payment_options is None and "payment_options" in self.model_fields_set:
_dict['payment_options'] = None
# set to None if phone_1 (nullable) is None
# and model_fields_set contains the field
if self.phone_1 is None and "phone_1" in self.model_fields_set:
_dict['phone_1'] = None
# set to None if phone_2 (nullable) is None
# and model_fields_set contains the field
if self.phone_2 is None and "phone_2" in self.model_fields_set:
_dict['phone_2'] = None
# set to None if postbox (nullable) is None
# and model_fields_set contains the field
if self.postbox is None and "postbox" in self.model_fields_set:
_dict['postbox'] = None
# set to None if postbox_city (nullable) is None
# and model_fields_set contains the field
if self.postbox_city is None and "postbox_city" in self.model_fields_set:
_dict['postbox_city'] = None
# set to None if postbox_country (nullable) is None
# and model_fields_set contains the field
if self.postbox_country is None and "postbox_country" in self.model_fields_set:
_dict['postbox_country'] = None
# set to None if postbox_zip_code (nullable) is None
# and model_fields_set contains the field
if self.postbox_zip_code is None and "postbox_zip_code" in self.model_fields_set:
_dict['postbox_zip_code'] = None
# set to None if sale_price_level (nullable) is None
# and model_fields_set contains the field
if self.sale_price_level is None and "sale_price_level" in self.model_fields_set:
_dict['sale_price_level'] = None
# set to None if sepa_agreement (nullable) is None
# and model_fields_set contains the field
if self.sepa_agreement is None and "sepa_agreement" in self.model_fields_set:
_dict['sepa_agreement'] = None
# set to None if sepa_agreement_date (nullable) is None
# and model_fields_set contains the field
if self.sepa_agreement_date is None and "sepa_agreement_date" in self.model_fields_set:
_dict['sepa_agreement_date'] = None
# set to None if sepa_mandate_reference (nullable) is None
# and model_fields_set contains the field
if self.sepa_mandate_reference is None and "sepa_mandate_reference" in self.model_fields_set:
_dict['sepa_mandate_reference'] = None
# set to None if since_date (nullable) is None
# and model_fields_set contains the field
if self.since_date is None and "since_date" in self.model_fields_set:
_dict['since_date'] = None
# set to None if street (nullable) is None
# and model_fields_set contains the field
if self.street is None and "street" in self.model_fields_set:
_dict['street'] = None
# set to None if suffix_1 (nullable) is None
# and model_fields_set contains the field
if self.suffix_1 is None and "suffix_1" in self.model_fields_set:
_dict['suffix_1'] = None
# set to None if suffix_2 (nullable) is None
# and model_fields_set contains the field
if self.suffix_2 is None and "suffix_2" in self.model_fields_set:
_dict['suffix_2'] = None
# set to None if tax_number (nullable) is None
# and model_fields_set contains the field
if self.tax_number is None and "tax_number" in self.model_fields_set:
_dict['tax_number'] = None
# set to None if court (nullable) is None
# and model_fields_set contains the field
if self.court is None and "court" in self.model_fields_set:
_dict['court'] = None
# set to None if court_registry_number (nullable) is None
# and model_fields_set contains the field
if self.court_registry_number is None and "court_registry_number" in self.model_fields_set:
_dict['court_registry_number'] = None
# set to None if tax_options (nullable) is None
# and model_fields_set contains the field
if self.tax_options is None and "tax_options" in self.model_fields_set:
_dict['tax_options'] = None
# set to None if title (nullable) is None
# and model_fields_set contains the field
if self.title is None and "title" in self.model_fields_set:
_dict['title'] = None
# set to None if vat_identifier (nullable) is None
# and model_fields_set contains the field
if self.vat_identifier is None and "vat_identifier" in self.model_fields_set:
_dict['vat_identifier'] = None
# set to None if zip_code (nullable) is None
# and model_fields_set contains the field
if self.zip_code is None and "zip_code" in self.model_fields_set:
_dict['zip_code'] = None
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of CustomerSnapshot from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"acquire_options": obj.get("acquire_options"),
"additional_groups_ids": obj.get("additional_groups_ids"),
"bank_account": obj.get("bank_account"),
"bank_account_owner": obj.get("bank_account_owner"),
"bank_bic": obj.get("bank_bic"),
"bank_code": obj.get("bank_code"),
"bank_iban": obj.get("bank_iban"),
"bank_name": obj.get("bank_name"),
"birth_date": obj.get("birth_date"),
"cash_allowance": obj.get("cash_allowance"),
"cash_allowance_days": obj.get("cash_allowance_days"),
"cash_discount": obj.get("cash_discount"),
"cash_discount_type": obj.get("cash_discount_type"),
"city": obj.get("city"),
"state": obj.get("state"),
"company_name": obj.get("company_name"),
"country": obj.get("country"),
"created_at": obj.get("created_at"),
"updated_at": obj.get("updated_at"),
"delivery_title": obj.get("delivery_title"),
"delivery_city": obj.get("delivery_city"),
"delivery_state": obj.get("delivery_state"),
"delivery_company_name": obj.get("delivery_company_name"),
"delivery_country": obj.get("delivery_country"),
"delivery_first_name": obj.get("delivery_first_name"),
"delivery_last_name": obj.get("delivery_last_name"),
"delivery_personal": obj.get("delivery_personal"),
"delivery_salutation": obj.get("delivery_salutation"),
"delivery_street": obj.get("delivery_street"),
"delivery_suffix_1": obj.get("delivery_suffix_1"),
"delivery_suffix_2": obj.get("delivery_suffix_2"),
"delivery_zip_code": obj.get("delivery_zip_code"),
"display_name": obj.get("display_name"),
"emails": obj.get("emails"),
"fax": obj.get("fax"),
"first_name": obj.get("first_name"),
"grace_period": obj.get("grace_period"),
"due_in_days": obj.get("due_in_days"),
"group_id": obj.get("group_id"),
"id": obj.get("id"),
"info_1": obj.get("info_1"),
"info_2": obj.get("info_2"),
"internet": obj.get("internet"),
"last_name": obj.get("last_name"),
"login_id": obj.get("login_id"),
"mobile": obj.get("mobile"),
"note": obj.get("note"),
"number": obj.get("number"),
"supplier_number": obj.get("supplier_number"),
"payment_options": obj.get("payment_options"),
"personal": obj.get("personal") if obj.get("personal") is not None else False,
"phone_1": obj.get("phone_1"),
"phone_2": obj.get("phone_2"),
"postbox": obj.get("postbox"),
"postbox_city": obj.get("postbox_city"),
"postbox_state": obj.get("postbox_state"),
"postbox_country": obj.get("postbox_country"),
"postbox_zip_code": obj.get("postbox_zip_code"),
"sale_price_level": obj.get("sale_price_level"),
"salutation": obj.get("salutation"),
"sepa_agreement": obj.get("sepa_agreement"),
"sepa_agreement_date": obj.get("sepa_agreement_date"),
"sepa_mandate_reference": obj.get("sepa_mandate_reference"),
"since_date": obj.get("since_date"),
"street": obj.get("street"),
"suffix_1": obj.get("suffix_1"),
"suffix_2": obj.get("suffix_2"),
"tax_number": obj.get("tax_number"),
"court": obj.get("court"),
"court_registry_number": obj.get("court_registry_number"),
"tax_options": obj.get("tax_options"),
"title": obj.get("title"),
"archived": obj.get("archived"),
"vat_identifier": obj.get("vat_identifier"),
"zip_code": obj.get("zip_code"),
"document_pdf_type": obj.get("document_pdf_type") if obj.get("document_pdf_type") is not None else 'default',
"buyer_reference": obj.get("buyer_reference"),
"foreign_supplier_number": obj.get("foreign_supplier_number")
})
return _obj