GET | /GetDefinitionKeysAsync | An asynchronous service to retrieve keys for the identification of VAT properties. |
---|
import datetime
import decimal
from marshmallow.fields import *
from servicestack import *
from typing import *
from dataclasses import dataclass, field
from dataclasses_json import dataclass_json, LetterCase, Undefined, config
from enum import Enum, IntEnum
class VatType(str, Enum):
U_ST_V_A = 'UStVA'
U_ST_D_V = 'UStDV'
U_ST_S_V = 'UStSV'
U_ST = 'USt'
ZM = 'ZM'
# @Api(Description="Create a VAT return from a Return Builder definition.\n Use the retrieved values as keys for the dictionary of properties that Return Builder provides.")
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class GetDefinitionKeysBase(IReturn[List[DefinitionKey]], IGet):
"""
Create a VAT return from a Return Builder definition. Use the retrieved values as keys for the dictionary of properties that Return Builder provides.
"""
# @ApiMember(Description="The year of the assessment (Veranlagungsjahr).")
year: int = 0
"""
The year of the assessment (Veranlagungsjahr).
"""
# @ApiMember(Description="The type of VAT return.")
vat_type: Optional[VatType] = None
"""
The type of VAT return.
"""
@staticmethod
def response_type(): return List[DefinitionKey]
# @Api(Description="An asynchronous service to retrieve keys for the identification of VAT properties.")
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class GetDefinitionKeysAsync(GetDefinitionKeysBase):
"""
An asynchronous service to retrieve keys for the identification of VAT properties.
"""
# @ApiMember(Description="The year of the assessment (Veranlagungsjahr).")
year: int = 0
"""
The year of the assessment (Veranlagungsjahr).
"""
# @ApiMember(Description="The type of VAT return.")
vat_type: Optional[VatType] = None
"""
The type of VAT return.
"""
Python GetDefinitionKeysAsync DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /GetDefinitionKeysAsync HTTP/1.1 Host: taxfiling.pwc.de Accept: application/xml
HTTP/1.1 200 OK Content-Type: application/xml Content-Length: length <ArrayOfDefinitionKey xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/PwC.xEric.Core.Services.Contracts.Umsatzsteuer.ReturnBuilder.Helpers"> <DefinitionKey> <Description>String</Description> <Mandatory>String</Mandatory> <Name>String</Name> <Type>String</Type> </DefinitionKey> </ArrayOfDefinitionKey>