| POST | /files/{UserId}/E898Satz |
|---|
import java.math.*;
import java.util.*;
import net.servicestack.client.*;
import com.google.gson.annotations.*;
import com.google.gson.reflect.*;
public class dtos
{
@DataContract
public static class FileE898Satz extends Eras2FileUpload
{
@DataMember(Name="FileTyp")
@SerializedName("FileTyp")
public Eras2FileType fileType = null;
public Eras2FileType getFileType() { return fileType; }
public FileE898Satz setFileType(Eras2FileType value) { this.fileType = value; return this; }
}
@DataContract
public static class Eras2FileUpload
{
@DataMember(Name="UserId")
@SerializedName("UserId")
public String userId = null;
@DataMember(Name="NutzerId")
@SerializedName("NutzerId")
public String nutzerId = null;
@DataMember(Name="DeviceId")
@SerializedName("DeviceId")
public String deviceId = null;
@DataMember(Name="FileTyp")
@SerializedName("FileTyp")
public Eras2FileType fileType = null;
public String getUserId() { return userId; }
public Eras2FileUpload setUserId(String value) { this.userId = value; return this; }
public String getNutzerId() { return nutzerId; }
public Eras2FileUpload setNutzerId(String value) { this.nutzerId = value; return this; }
public String getDeviceId() { return deviceId; }
public Eras2FileUpload setDeviceId(String value) { this.deviceId = value; return this; }
public Eras2FileType getFileType() { return fileType; }
public Eras2FileUpload setFileType(Eras2FileType value) { this.fileType = value; return this; }
}
public static enum Eras2FileType
{
DSatz,
Hka,
E835Satz,
E898Satz,
Abrechnung,
ArgeSatz,
NutzerFile,
DevicePdf;
}
public static class Eras2FileUploadResponse
{
public ResponseStatus responseStatus = null;
public ResponseStatus getResponseStatus() { return responseStatus; }
public Eras2FileUploadResponse setResponseStatus(ResponseStatus value) { this.responseStatus = value; return this; }
}
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /files/{UserId}/E898Satz HTTP/1.1
Host: messdienstservice-stadtwerke-peine-servdesk.eras-online.de
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
FileTyp: DSatz,
UserId: String,
NutzerId: String,
DeviceId: String
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
responseStatus:
{
errorCode: String,
message: String,
stackTrace: String,
errors:
[
{
errorCode: String,
fieldName: String,
message: String,
meta:
{
String: String
}
}
],
meta:
{
String: String
}
}
}