Server

<back to all web services

GetCustomerOnlineStatus

Requires Authentication
The following routes are available for this service:
GET/CustomerOnlineStatus/{Guid}
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


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class CustomerAddress:
    address_guid: Optional[str] = None
    is_primary: bool = False
    address_kind_label: Optional[str] = None
    address_kind_typ: Optional[str] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class CustomerObjekt:
    guid: Optional[str] = None
    range_from: datetime.datetime = datetime.datetime(1, 1, 1)
    range_to: Optional[datetime.datetime] = None
    is_customer: bool = False
    is_owner: bool = False
    is_owner_pseudo: bool = False
    objekt_guid: Optional[str] = None
    customer_guid: Optional[str] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class Customer:
    guid: Optional[str] = None
    name1: Optional[str] = None
    name2: Optional[str] = None
    name3: Optional[str] = None
    number: Optional[str] = None
    salutation: Optional[str] = None
    customer_addresses: Optional[List[CustomerAddress]] = None
    customer_objekte: Optional[List[CustomerObjekt]] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class Objekt:
    guid: Optional[str] = None
    number: Optional[str] = None
    is_completed: Optional[str] = None
    uvi: Optional[str] = None
    is_uvi_disabled: Optional[str] = None
    completed_date: Optional[datetime.datetime] = None
    address_guid: Optional[str] = None
    anmerkung_kundenportal: Optional[str] = None
    kundenportal_marked_done: bool = False
    marked_done_at: Optional[datetime.datetime] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class BillingInformation:
    guid: Optional[str] = None
    from_: datetime.datetime = field(metadata=config(field_name='from'), default=datetime.datetime(1, 1, 1))
    to: datetime.datetime = datetime.datetime(1, 1, 1)
    is_completed: bool = False
    has_nebenkosten: bool = False
    objekt_guid: Optional[str] = None
    anmerkung_kundenportal: Optional[str] = None
    kundenportal_marked_done: bool = False
    marked_done_at: Optional[datetime.datetime] = None
    kundenportal_marked_closed: bool = False
    marked_closed_at: Optional[datetime.datetime] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class GetCustomerOnlineStatusResponse:
    kunde: Optional[Customer] = None
    objekte: Optional[List[Objekt]] = None
    billing_information: Optional[List[BillingInformation]] = None
    response_status: Optional[ResponseStatus] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class GetCustomerOnlineStatus:
    guid: Optional[str] = None

Python GetCustomerOnlineStatus DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml

HTTP + XML

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

GET /CustomerOnlineStatus/{Guid} HTTP/1.1 
Host: mi-waerme-servdesk.eras-online.de 
Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<GetCustomerOnlineStatusResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Eras2Web.Service.Desktop.Server.ServiceModel.Eras2Client.Customers">
  <BillingInformation xmlns:d2p1="http://schemas.datacontract.org/2004/07/Eras2Web.Service.Desktop.Server.ServiceModel.Eras2Client.Models">
    <d2p1:BillingInformation>
      <d2p1:AnmerkungKundenportal>String</d2p1:AnmerkungKundenportal>
      <d2p1:Bis>0001-01-01T00:00:00</d2p1:Bis>
      <d2p1:Guid>String</d2p1:Guid>
      <d2p1:HatNebenkosten>false</d2p1:HatNebenkosten>
      <d2p1:IstAbgeschlossen>false</d2p1:IstAbgeschlossen>
      <d2p1:KundenportalMarkedClosed>false</d2p1:KundenportalMarkedClosed>
      <d2p1:KundenportalMarkedDone>false</d2p1:KundenportalMarkedDone>
      <d2p1:MarkedClosedAt>0001-01-01T00:00:00</d2p1:MarkedClosedAt>
      <d2p1:MarkedDoneAt>0001-01-01T00:00:00</d2p1:MarkedDoneAt>
      <d2p1:ObjektGuid>String</d2p1:ObjektGuid>
      <d2p1:Von>0001-01-01T00:00:00</d2p1:Von>
    </d2p1:BillingInformation>
  </BillingInformation>
  <Kunde xmlns:d2p1="http://schemas.datacontract.org/2004/07/Eras2Web.Service.Desktop.Server.ServiceModel.Eras2Client.Models">
    <d2p1:Anrede>String</d2p1:Anrede>
    <d2p1:Guid>String</d2p1:Guid>
    <d2p1:KundenAdressen>
      <d2p1:CustomerAddress>
        <d2p1:AdressTyp>String</d2p1:AdressTyp>
        <d2p1:AdressTypBezeichnung>String</d2p1:AdressTypBezeichnung>
        <d2p1:AdresseGuid>String</d2p1:AdresseGuid>
        <d2p1:IstPrimaer>false</d2p1:IstPrimaer>
      </d2p1:CustomerAddress>
    </d2p1:KundenAdressen>
    <d2p1:KundenObjekte>
      <d2p1:CustomerObjekt>
        <d2p1:Guid>String</d2p1:Guid>
        <d2p1:IstEigentümer>false</d2p1:IstEigentümer>
        <d2p1:IstEigentümerPseudo>false</d2p1:IstEigentümerPseudo>
        <d2p1:IstKunde>false</d2p1:IstKunde>
        <d2p1:KundeGuid>String</d2p1:KundeGuid>
        <d2p1:ObjektGuid>String</d2p1:ObjektGuid>
        <d2p1:ZeitraumBis>0001-01-01T00:00:00</d2p1:ZeitraumBis>
        <d2p1:ZeitraumVon>0001-01-01T00:00:00</d2p1:ZeitraumVon>
      </d2p1:CustomerObjekt>
    </d2p1:KundenObjekte>
    <d2p1:Kundennummer>String</d2p1:Kundennummer>
    <d2p1:Name1>String</d2p1:Name1>
    <d2p1:Name2>String</d2p1:Name2>
    <d2p1:Name3>String</d2p1:Name3>
  </Kunde>
  <Objekte xmlns:d2p1="http://schemas.datacontract.org/2004/07/Eras2Web.Service.Desktop.Server.ServiceModel.Eras2Client.Models">
    <d2p1:Objekt>
      <d2p1:AbgeschlossenDatum>0001-01-01T00:00:00</d2p1:AbgeschlossenDatum>
      <d2p1:AdressGuid>String</d2p1:AdressGuid>
      <d2p1:AnmerkungKundenportal>String</d2p1:AnmerkungKundenportal>
      <d2p1:Guid>String</d2p1:Guid>
      <d2p1:IsUviDisabled>String</d2p1:IsUviDisabled>
      <d2p1:IstAbgeschlossen>String</d2p1:IstAbgeschlossen>
      <d2p1:KundenportalMarkedDone>false</d2p1:KundenportalMarkedDone>
      <d2p1:MarkedDoneAt>0001-01-01T00:00:00</d2p1:MarkedDoneAt>
      <d2p1:Objektnummer>String</d2p1:Objektnummer>
      <d2p1:Uvi>String</d2p1:Uvi>
    </d2p1:Objekt>
  </Objekte>
  <ResponseStatus xmlns:d2p1="http://schemas.servicestack.net/types">
    <d2p1:ErrorCode>String</d2p1:ErrorCode>
    <d2p1:Message>String</d2p1:Message>
    <d2p1:StackTrace>String</d2p1:StackTrace>
    <d2p1:Errors>
      <d2p1:ResponseError>
        <d2p1:ErrorCode>String</d2p1:ErrorCode>
        <d2p1:FieldName>String</d2p1:FieldName>
        <d2p1:Message>String</d2p1:Message>
        <d2p1:Meta xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
          <d5p1:KeyValueOfstringstring>
            <d5p1:Key>String</d5p1:Key>
            <d5p1:Value>String</d5p1:Value>
          </d5p1:KeyValueOfstringstring>
        </d2p1:Meta>
      </d2p1:ResponseError>
    </d2p1:Errors>
    <d2p1:Meta xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
      <d3p1:KeyValueOfstringstring>
        <d3p1:Key>String</d3p1:Key>
        <d3p1:Value>String</d3p1:Value>
      </d3p1:KeyValueOfstringstring>
    </d2p1:Meta>
  </ResponseStatus>
</GetCustomerOnlineStatusResponse>