meldeschein

package module
v0.0.0-...-64c6d9f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 28, 2021 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	BaseURL = url.URL{
		Scheme: "https",
		Host:   "meldeschein.avs.de",
		Path:   "/meldeschein-ws-prod/JMeldescheinWebservices",
	}
)

Functions

func CheckResponse

func CheckResponse(r *http.Response) error

CheckResponse checks the Client response for errors, and returns them if present. A response is considered an error if it has a status code outside the 200 range. Client error responses are expected to have either no response body, or a xml response body that maps to ErrorResponse. Any other response body will be silently ignored.

Types

type ActionBody

type ActionBody interface{}

type Begleitperson

type Begleitperson struct {
	AnredeID     int    `xml:"anredeid"`
	Name         string `xml:"name"`
	Vorname      string `xml:"vorname"`
	Geburtsdatum Date   `xml:"geburtsdatum"`
	KategorieID  int    `xml:"kategorieid"`
	Anreise      Date   `xml:"anreise"`
	Abreise      Date   `xml:"abreise"`
	Ausweisnr    string `xml:"ausweisnr"`
}

func (Begleitperson) MarshalJSON

func (b Begleitperson) MarshalJSON() ([]byte, error)

func (Begleitperson) MarshalXML

func (b Begleitperson) MarshalXML(e *xml.Encoder, start xml.StartElement) error

type Begleitpersonen

type Begleitpersonen []Begleitperson

type Body

type Body struct {
	Action     string      `xml:"-"`
	ActionBody interface{} `xml:",any"`
}

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client manages communication with Exact Globe Client

func NewClient

func NewClient(httpClient *http.Client, username, password string) *Client

NewClient returns a new Exact Globe Client client

func (Client) BaseURL

func (c Client) BaseURL() url.URL

func (Client) Charset

func (c Client) Charset() string

func (Client) Debug

func (c Client) Debug() bool

func (*Client) Do

func (c *Client) Do(req *http.Request, body interface{}) (*http.Response, error)

Do sends an Client request and returns the Client response. The Client response is xml decoded and stored in the value pointed to by v, or returned as an error if an Client error has occurred. If v implements the io.Writer interface, the raw response will be written to v, without attempting to decode it.

func (*Client) GetEndpointURL

func (c *Client) GetEndpointURL(p string, pathParams PathParams) url.URL

func (Client) MediaType

func (c Client) MediaType() string

func (*Client) NewGetConfigurationList

func (c *Client) NewGetConfigurationList() GetConfigurationList

func (*Client) NewGetMeldeschein

func (c *Client) NewGetMeldeschein() GetMeldeschein

func (*Client) NewGetMeldescheine

func (c *Client) NewGetMeldescheine() GetMeldescheine

func (*Client) NewPostMeldeschein

func (c *Client) NewPostMeldeschein() PostMeldeschein

func (*Client) NewRequest

func (c *Client) NewRequest(ctx context.Context, req Request) (*http.Request, error)

func (Client) Password

func (c Client) Password() string

func (*Client) SetBaseURL

func (c *Client) SetBaseURL(baseURL url.URL)

func (*Client) SetCharset

func (c *Client) SetCharset(charset string)

func (*Client) SetDebug

func (c *Client) SetDebug(debug bool)

func (*Client) SetHTTPClient

func (c *Client) SetHTTPClient(client *http.Client)

func (*Client) SetMediaType

func (c *Client) SetMediaType(mediaType string)

func (*Client) SetPassword

func (c *Client) SetPassword(password string)

func (*Client) SetUserAgent

func (c *Client) SetUserAgent(userAgent string)

func (*Client) SetUsername

func (c *Client) SetUsername(username string)

func (*Client) Unmarshal

func (c *Client) Unmarshal(r io.Reader, vv ...interface{}) error

func (Client) UserAgent

func (c Client) UserAgent() string

func (Client) Username

func (c Client) Username() string

type Date

type Date struct {
	time.Time
}

func (Date) IsEmpty

func (d Date) IsEmpty() bool

func (Date) MarshalJSON

func (d Date) MarshalJSON() ([]byte, error)

func (Date) MarshalSchema

func (d Date) MarshalSchema() string

func (Date) MarshalXML

func (d Date) MarshalXML(e *xml.Encoder, start xml.StartElement) error

func (*Date) UnmarshalJSON

func (d *Date) UnmarshalJSON(text []byte) (err error)

func (*Date) UnmarshalXML

func (d *Date) UnmarshalXML(dec *xml.Decoder, start xml.StartElement) error

type DateTime

type DateTime struct {
	time.Time
}

type ErrorResponse

type ErrorResponse struct {
	// HTTP response that caused this error
	Response *http.Response

	// HTTP status code
	Err error
}

func (*ErrorResponse) Error

func (r *ErrorResponse) Error() string

type ExceptionBlock

type ExceptionBlock struct {
	ExceptionCode        string `xml:"ExceptionCode"`
	ExceptionDescription string `xml:"ExceptionDescription"`
}

type Fehler

type Fehler struct {
	Code         string `xml:"code"`
	Beschreibung string `xml:"beschreibung"`
	Bezug        string `xml:"bezug"`
}

func (Fehler) Error

func (f Fehler) Error() string

type Fehlermeldungen

type Fehlermeldungen []Fehler

func (Fehlermeldungen) Error

func (ff Fehlermeldungen) Error() string

type GetConfigurationList

type GetConfigurationList struct {
	// contains filtered or unexported fields
}

func (*GetConfigurationList) Do

func (*GetConfigurationList) Method

func (r *GetConfigurationList) Method() string

func (GetConfigurationList) NewPathParams

func (GetConfigurationList) NewQueryParams

func (GetConfigurationList) NewRequestBody

func (*GetConfigurationList) NewResponseBody

func (*GetConfigurationList) PathParams

func (r *GetConfigurationList) PathParams() PathParams

func (*GetConfigurationList) QueryParams

func (r *GetConfigurationList) QueryParams() QueryParams

func (*GetConfigurationList) RequestBody

func (*GetConfigurationList) RequestBodyInterface

func (r *GetConfigurationList) RequestBodyInterface() interface{}

func (*GetConfigurationList) SetMethod

func (r *GetConfigurationList) SetMethod(method string)

func (*GetConfigurationList) SetRequestBody

func (r *GetConfigurationList) SetRequestBody(body GetConfigurationListBody)

func (*GetConfigurationList) URL

func (r *GetConfigurationList) URL() *url.URL

type GetConfigurationListBody

type GetConfigurationListBody struct {
	XMLName        xml.Name       `xml:"ns:configuration-lists"`
	Identifikation Identifikation `xml:"identifikation"`
}

type GetConfigurationListPathParams

type GetConfigurationListPathParams struct {
}

func (*GetConfigurationListPathParams) Params

type GetConfigurationListQueryParams

type GetConfigurationListQueryParams struct {
}

func (GetConfigurationListQueryParams) ToURLValues

func (p GetConfigurationListQueryParams) ToURLValues() (url.Values, error)

type GetConfigurationListResponseBody

type GetConfigurationListResponseBody struct {
	XMLName xml.Name `xml:"configuration-lists"`

	Identifikation struct {
		Erzeugung     string `xml:"erzeugung"`
		Schnittstelle string `xml:"schnittstelle"`
		Kurverwaltung string `xml:"kurverwaltung"`
		Benutzerid    string `xml:"benutzerid"`
		Verarbeitung  string `xml:"verarbeitung"`
		Version       string `xml:"version"`
	} `xml:"identifikation"`
	Fehlermeldungen struct {
		Fehler struct {
			Code         string `xml:"code"`
			Beschreibung string `xml:"beschreibung"`
		} `xml:"fehler"`
	} `xml:"fehlermeldungen"`
	Konfigliste struct {
		Konfigdatensatz []struct {
			ID    string `xml:"id"`
			Text1 string `xml:"text1"`
			Text2 string `xml:"text2"`
			Text3 string `xml:"text3"`
		} `xml:"konfigdatensatz"`
	} `xml:"konfigliste"`
}

type GetMeldeschein

type GetMeldeschein struct {
	// contains filtered or unexported fields
}

func (*GetMeldeschein) Do

func (*GetMeldeschein) Method

func (r *GetMeldeschein) Method() string

func (GetMeldeschein) NewPathParams

func (r GetMeldeschein) NewPathParams() *GetMeldescheinPathParams

func (GetMeldeschein) NewQueryParams

func (r GetMeldeschein) NewQueryParams() *GetMeldescheinQueryParams

func (GetMeldeschein) NewRequestBody

func (r GetMeldeschein) NewRequestBody() GetMeldescheinRequestBody

func (*GetMeldeschein) NewResponseBody

func (r *GetMeldeschein) NewResponseBody() *GetMeldescheinResponseBody

func (*GetMeldeschein) PathParams

func (r *GetMeldeschein) PathParams() PathParams

func (*GetMeldeschein) QueryParams

func (r *GetMeldeschein) QueryParams() QueryParams

func (*GetMeldeschein) RequestBody

func (r *GetMeldeschein) RequestBody() *GetMeldescheinRequestBody

func (*GetMeldeschein) RequestBodyInterface

func (r *GetMeldeschein) RequestBodyInterface() interface{}

func (*GetMeldeschein) SetMethod

func (r *GetMeldeschein) SetMethod(method string)

func (*GetMeldeschein) SetRequestBody

func (r *GetMeldeschein) SetRequestBody(body GetMeldescheinRequestBody)

func (*GetMeldeschein) URL

func (r *GetMeldeschein) URL() *url.URL

type GetMeldescheinPathParams

type GetMeldescheinPathParams struct {
}

func (*GetMeldescheinPathParams) Params

func (p *GetMeldescheinPathParams) Params() map[string]string

type GetMeldescheinQueryParams

type GetMeldescheinQueryParams struct {
}

func (GetMeldescheinQueryParams) ToURLValues

func (p GetMeldescheinQueryParams) ToURLValues() (url.Values, error)

type GetMeldescheinRequestBody

type GetMeldescheinRequestBody struct {
	XMLName        xml.Name       `xml:"ns:holeMeldeschein"`
	Identifikation Identifikation `xml:"identifikation"`
	AnfrageDaten   struct {
		// You have a CHOICE of the next 3 items at this level
		Buchungsnummer    string `xml:"buchungsnummer,omitempty"`
		Meldescheinnummer string `xml:"meldescheinnummer,omitempty"`
		OrtID             int    `xml:"ort-id,omitempty"`
	} `xml:"anfragedaten"`
}

type GetMeldescheinResponseBody

type GetMeldescheinResponseBody struct {
	XMLName xml.Name `xml:"holeMeldeschein"`

	Identifikation  Identifikation  `xml:"identifikation"`
	Fehlermeldungen Fehlermeldungen `xml:"fehlermeldungen"`
	Meldeschein     Meldeschein     `xml:"meldeschein"`
}

type GetMeldescheine

type GetMeldescheine struct {
	// contains filtered or unexported fields
}

func (*GetMeldescheine) Do

func (*GetMeldescheine) Method

func (r *GetMeldescheine) Method() string

func (GetMeldescheine) NewPathParams

func (r GetMeldescheine) NewPathParams() *GetMeldescheinePathParams

func (GetMeldescheine) NewQueryParams

func (r GetMeldescheine) NewQueryParams() *GetMeldescheineQueryParams

func (GetMeldescheine) NewRequestBody

func (r GetMeldescheine) NewRequestBody() GetMeldescheineBody

func (*GetMeldescheine) NewResponseBody

func (r *GetMeldescheine) NewResponseBody() *GetMeldescheineResponseBody

func (*GetMeldescheine) PathParams

func (r *GetMeldescheine) PathParams() PathParams

func (*GetMeldescheine) QueryParams

func (r *GetMeldescheine) QueryParams() QueryParams

func (*GetMeldescheine) RequestBody

func (r *GetMeldescheine) RequestBody() *GetMeldescheineBody

func (*GetMeldescheine) RequestBodyInterface

func (r *GetMeldescheine) RequestBodyInterface() interface{}

func (*GetMeldescheine) SetMethod

func (r *GetMeldescheine) SetMethod(method string)

func (*GetMeldescheine) SetRequestBody

func (r *GetMeldescheine) SetRequestBody(body GetMeldescheineBody)

func (*GetMeldescheine) URL

func (r *GetMeldescheine) URL() *url.URL

type GetMeldescheineBody

type GetMeldescheineBody struct {
	XMLName        xml.Name       `xml:"ns:holeMeldescheineRequest"`
	Identifikation Identifikation `xml:"identifikation"`
	AnfrageDaten   struct {
		// You have a CHOICE of the next 3 items at this level
		Buchungsnummer    string `xml:"buchungsnummer,omitempty"`
		Meldescheinnummer string `xml:"meldescheinnummer,omitempty"`
		OrtID             int    `xml:"ort-id,omitempty"`
	} `xml:"anfragedaten"`
}

type GetMeldescheinePathParams

type GetMeldescheinePathParams struct {
}

func (*GetMeldescheinePathParams) Params

func (p *GetMeldescheinePathParams) Params() map[string]string

type GetMeldescheineQueryParams

type GetMeldescheineQueryParams struct {
}

func (GetMeldescheineQueryParams) ToURLValues

func (p GetMeldescheineQueryParams) ToURLValues() (url.Values, error)

type GetMeldescheineResponseBody

type GetMeldescheineResponseBody struct {
	XMLName xml.Name `xml:"holeMeldescheineResponse"`

	Fehlermeldungen Fehlermeldungen `xml:"fehlermeldungen>fehler"`
	Meldescheine    HoleMeldeschein `xml:"meldescheine"`
}
type Header interface{}

type HoleMeldeschein

type HoleMeldeschein struct {
	OrtID             string `xml:"ort-id"`
	Buchungsnummer    string `xml:"buchungsnummer"`
	Meldescheinnummer int    `xml:"meldescheinnummer"`
	Firmaid           string `xml:"firmaid"`
	Objektid          string `xml:"objektid"`
	Hauptperson       struct {
		Personid string `xml:"personid"`
		Adresse  struct {
			Adressartid string `xml:"adressartid"`
			Vorname     string `xml:"vorname"`
			Name        string `xml:"name"`
			Land        struct {
				LandID  string `xml:"land-id"`
				LandIso string `xml:"land-iso"`
			} `xml:"land"`
		} `xml:"adresse"`
		Geburtsdatum           string `xml:"geburtsdatum"`
		Staatsangehoerigkeitid struct {
			LandID  string `xml:"land-id"`
			LandIso string `xml:"land-iso"`
		} `xml:"staatsangehoerigkeitid"`
		Kategorieid string `xml:"kategorieid"`
		Anreise     string `xml:"anreise"`
		Abreise     string `xml:"abreise"`
		Barcode     string `xml:"barcode"`
	} `xml:"hauptperson"`
	Betrag             string `xml:"betrag"`
	Abrechnungstatusid string `xml:"abrechnungstatusid"`
}

type Identifikation

type Identifikation struct {
	Erzeugung     Date   `xml:"erzeugung"`
	Schnittstelle string `xml:"schnittstelle"`
	Kurverwaltung int    `xml:"kurverwaltung"`
	BenutzerID    int    `xml:"benutzerid"`
	Verarbeitung  string `xml:"verarbeitung"`
}

type Land

type Land struct {
	Text    string `xml:",chardata"`
	LandID  string `xml:"land-id"`
	LandIso string `xml:"land-iso"`
}

type Meldeschein

type Meldeschein struct {
	Buchungsnummer    string `xml:"buchungsnummer,omitempty"`
	Meldescheinnummer int    `xml:"meldescheinnummer,omitempty"`
	FirmaID           int    `xml:"firmaid,omitempty"`
	ObjektID          int    `xml:"objektid,omitempty"`
	Anreise           Date   `xml:"anreise"`
	Abreise           Date   `xml:"abreise"`
	KategorieID       int    `xml:"kategorieid,omitempty"`
	AnredeID          int    `xml:"anredeid,omitempty"`
	Name              string `xml:"name"`
	Vorname           string `xml:"vorname"`
	Strasse           string `xml:"strasse"`
	Hausnummer        string `xml:"hausnummer"`
	Plz               string `xml:"plz"`
	Ort               string `xml:"ort"`
	LandID            int    `xml:"landid"`
	// Land                   Land   `xml:"land"`
	StaatsangehoerigkeitID int `xml:"staatsangehoerigkeitid"`
	// Staatsangehoerigkeit   Staatsangehoerigkeit `xml:"staatsangehoerigkeit"`
	WeitereAngaben     string          `xml:"weitere_angaben"`
	Ausweisnr          string          `xml:"ausweisnr"`
	Kfzkennzeichen     string          `xml:"kfzkennzeichen"`
	Geburtsdatum       Date            `xml:"geburtsdatum"`
	Begleitperson      Begleitpersonen `xml:"begleitperson"`
	Abrechnungstatusid string          `xml:"abrechnungstatusid"`
}

func (Meldeschein) MarshalJSON

func (m Meldeschein) MarshalJSON() ([]byte, error)

func (Meldeschein) MarshalXML

func (m Meldeschein) MarshalXML(e *xml.Encoder, start xml.StartElement) error

type PathParams

type PathParams interface {
	Params() map[string]string
}

type PostMeldeschein

type PostMeldeschein struct {
	// contains filtered or unexported fields
}

func (*PostMeldeschein) Do

func (*PostMeldeschein) Method

func (r *PostMeldeschein) Method() string

func (PostMeldeschein) NewPathParams

func (r PostMeldeschein) NewPathParams() *PostMeldescheinPathParams

func (PostMeldeschein) NewQueryParams

func (r PostMeldeschein) NewQueryParams() *PostMeldescheinQueryParams

func (PostMeldeschein) NewRequestBody

func (r PostMeldeschein) NewRequestBody() PostMeldescheinRequestBody

func (*PostMeldeschein) NewResponseBody

func (r *PostMeldeschein) NewResponseBody() *PostMeldescheinResponseBody

func (*PostMeldeschein) PathParams

func (r *PostMeldeschein) PathParams() PathParams

func (*PostMeldeschein) QueryParams

func (r *PostMeldeschein) QueryParams() QueryParams

func (*PostMeldeschein) RequestBody

func (r *PostMeldeschein) RequestBody() *PostMeldescheinRequestBody

func (*PostMeldeschein) RequestBodyInterface

func (r *PostMeldeschein) RequestBodyInterface() interface{}

func (*PostMeldeschein) SetMethod

func (r *PostMeldeschein) SetMethod(method string)

func (*PostMeldeschein) SetRequestBody

func (r *PostMeldeschein) SetRequestBody(body PostMeldescheinRequestBody)

func (*PostMeldeschein) URL

func (r *PostMeldeschein) URL() *url.URL

type PostMeldescheinPathParams

type PostMeldescheinPathParams struct {
}

func (*PostMeldescheinPathParams) Params

func (p *PostMeldescheinPathParams) Params() map[string]string

type PostMeldescheinQueryParams

type PostMeldescheinQueryParams struct {
}

func (PostMeldescheinQueryParams) ToURLValues

func (p PostMeldescheinQueryParams) ToURLValues() (url.Values, error)

type PostMeldescheinRequestBody

type PostMeldescheinRequestBody struct {
	XMLName        xml.Name       `xml:"ns:meldescheine"`
	Identifikation Identifikation `xml:"identifikation"`
	Meldeschein    Meldeschein    `xml:"ns:meldeschein"`
}

type PostMeldescheinResponseBody

type PostMeldescheinResponseBody struct {
	XMLName xml.Name `xml:"meldescheine"`

	Identifikation  Identifikation  `xml:"identifikation"`
	Fehlermeldungen Fehlermeldungen `xml:"fehlermeldungen>fehler"`
}

type QueryParams

type QueryParams interface {
	ToURLValues() (url.Values, error)
}

type Request

type Request interface {
	Method() string
	QueryParams() QueryParams
	PathParams() PathParams
	RequestBodyInterface() interface{}
	URL() *url.URL
}

type RequestCompletionCallback

type RequestCompletionCallback func(*http.Request, *http.Response)

RequestCompletionCallback defines the type of the request callback function

type RequestEnvelope

type RequestEnvelope struct {
	XMLName    xml.Name
	Namespaces []xml.Attr `xml:"-"`

	Header Header `xml:"soap:Header"`
	Body   Body   `xml:"soap:Body"`
}

func (RequestEnvelope) MarshalXML

func (env RequestEnvelope) MarshalXML(e *xml.Encoder, start xml.StartElement) error

type ResponseEnvelope

type ResponseEnvelope struct {
	XMLName    xml.Name
	Namespaces []xml.Attr `xml:"-"`

	Header Header `xml:"Header"`
	Body   Body   `xml:"Body"`
}

type SoapError

type SoapError struct {
	XMLName xml.Name `xml:"Envelope"`
	Body    struct {
		Fault struct {
			FaultCode   string `xml:"faultcode"`
			FaultString string `xml:"faultstring"`
		} `xml:"Fault"`
	} `xml:"Body"`
}

func (SoapError) Error

func (e SoapError) Error() string

type Staatsangehoerigkeit

type Staatsangehoerigkeit struct {
	Text    string `xml:",chardata"`
	LandID  string `xml:"land-id"`
	LandIso string `xml:"land-iso"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL