| GET | /reports |
|---|
import java.math.*;
import java.util.*;
import java.io.InputStream;
import net.servicestack.client.*;
public class dtos
{
public static class GetReport
{
public ReportType type = null;
public Date dateFrom = null;
public Date dateTo = null;
public ReportFormat format = null;
public Integer documentOrdinal = null;
public String official = null;
public ReportOperation operation = null;
public Date dateOfReceipt = null;
public String authorizedPersonJMBG = null;
public String authorizedPersonFullName = null;
public String authorizedPersonLocation = null;
public Date authorizedPersonStatementDate = null;
public ReportType getType() { return type; }
public GetReport setType(ReportType value) { this.type = value; return this; }
public Date getDateFrom() { return dateFrom; }
public GetReport setDateFrom(Date value) { this.dateFrom = value; return this; }
public Date getDateTo() { return dateTo; }
public GetReport setDateTo(Date value) { this.dateTo = value; return this; }
public ReportFormat getFormat() { return format; }
public GetReport setFormat(ReportFormat value) { this.format = value; return this; }
public Integer getDocumentOrdinal() { return documentOrdinal; }
public GetReport setDocumentOrdinal(Integer value) { this.documentOrdinal = value; return this; }
public String getOfficial() { return official; }
public GetReport setOfficial(String value) { this.official = value; return this; }
public ReportOperation getOperation() { return operation; }
public GetReport setOperation(ReportOperation value) { this.operation = value; return this; }
public Date getDateOfReceipt() { return dateOfReceipt; }
public GetReport setDateOfReceipt(Date value) { this.dateOfReceipt = value; return this; }
public String getAuthorizedPersonJMBG() { return authorizedPersonJMBG; }
public GetReport setAuthorizedPersonJMBG(String value) { this.authorizedPersonJMBG = value; return this; }
public String getAuthorizedPersonFullName() { return authorizedPersonFullName; }
public GetReport setAuthorizedPersonFullName(String value) { this.authorizedPersonFullName = value; return this; }
public String getAuthorizedPersonLocation() { return authorizedPersonLocation; }
public GetReport setAuthorizedPersonLocation(String value) { this.authorizedPersonLocation = value; return this; }
public Date getAuthorizedPersonStatementDate() { return authorizedPersonStatementDate; }
public GetReport setAuthorizedPersonStatementDate(Date value) { this.authorizedPersonStatementDate = value; return this; }
}
public static enum ReportType
{
@SerializedName("0") GeneralReport(0),
@SerializedName("1") SportsReport(1),
@SerializedName("2") RngReport(2);
private final int value;
ReportType(final int intValue) { value = intValue; }
public int getValue() { return value; }
}
public static enum ReportFormat
{
@SerializedName("0") Pdf(0),
@SerializedName("1") Xlsx(1),
@SerializedName("2") Html(2),
@SerializedName("3") Xml(3);
private final int value;
ReportFormat(final int intValue) { value = intValue; }
public int getValue() { return value; }
}
public static enum ReportOperation
{
@SerializedName("0") PrijavaOdStranePoreznogObveznika(0),
@SerializedName("1") PrijavaUImePoreznogObveznika(1),
@SerializedName("2") Izmjena(2),
@SerializedName("3") IzmjenaPrijavaPoreskeUprave(3);
private final int value;
ReportOperation(final int intValue) { value = intValue; }
public int getValue() { return value; }
}
public static interface IHttpResult
{
public Integer status = null;
public HttpStatusCode statusCode = null;
public String statusDescription = null;
public String contentType = null;
public HashMap<String,String> headers = null;
public ArrayList<Cookie> cookies = null;
public Object response = null;
public IContentTypeWriter responseFilter = null;
public IRequest requestContext = null;
public Integer paddingLength = null;
public Func<IDisposable> resultScope = null;
}
public static interface IContentTypeWriter
{
}
public static interface IRequest
{
public Object originalRequest = null;
public IResponse response = null;
public String operationName = null;
public String verb = null;
public RequestAttributes requestAttributes = null;
public IRequestPreferences requestPreferences = null;
public Object dto = null;
public String contentType = null;
public Boolean isLocal = null;
public String userAgent = null;
public HashMap<String,Cookie> cookies = null;
public String responseContentType = null;
public Boolean hasExplicitResponseContentType = null;
public HashMap<String,Object> items = null;
public NameValueCollection headers = null;
public NameValueCollection queryString = null;
public NameValueCollection formData = null;
public Boolean useBufferedStream = null;
public String rawUrl = null;
public String absoluteUri = null;
public String userHostAddress = null;
public String remoteIp = null;
public String authorization = null;
public Boolean isSecureConnection = null;
public ArrayList<String> acceptTypes = null;
public String pathInfo = null;
public String originalPathInfo = null;
public InputStream inputStream = null;
public Long contentLength = null;
public ArrayList<IHttpFile> files = null;
public Uri urlReferrer = null;
}
public static interface IResponse
{
public Object originalResponse = null;
public IRequest request = null;
public Integer statusCode = null;
public String statusDescription = null;
public String contentType = null;
public InputStream outputStream = null;
public Object dto = null;
public Boolean useBufferedStream = null;
public Boolean isClosed = null;
public Boolean keepAlive = null;
public Boolean hasStarted = null;
public HashMap<String,Object> items = null;
}
@Flags()
public static enum RequestAttributes
{
@SerializedName("0") None(0),
@SerializedName("1") Localhost(1),
@SerializedName("2") LocalSubnet(2),
@SerializedName("4") External(4),
@SerializedName("8") Secure(8),
@SerializedName("16") InSecure(16),
@SerializedName("24") AnySecurityMode(24),
@SerializedName("32") HttpHead(32),
@SerializedName("64") HttpGet(64),
@SerializedName("128") HttpPost(128),
@SerializedName("256") HttpPut(256),
@SerializedName("512") HttpDelete(512),
@SerializedName("1024") HttpPatch(1024),
@SerializedName("2048") HttpOptions(2048),
@SerializedName("4096") HttpOther(4096),
@SerializedName("8160") AnyHttpMethod(8160),
@SerializedName("8192") OneWay(8192),
@SerializedName("16384") Reply(16384),
@SerializedName("24576") AnyCallStyle(24576),
@SerializedName("32768") Soap11(32768),
@SerializedName("65536") Soap12(65536),
@SerializedName("131072") Xml(131072),
@SerializedName("262144") Json(262144),
@SerializedName("524288") Jsv(524288),
@SerializedName("1048576") ProtoBuf(1048576),
@SerializedName("2097152") Csv(2097152),
@SerializedName("4194304") Html(4194304),
@SerializedName("8388608") Jsonl(8388608),
@SerializedName("16777216") MsgPack(16777216),
@SerializedName("33554432") FormatOther(33554432),
@SerializedName("67076096") AnyFormat(67076096),
@SerializedName("67108864") Http(67108864),
@SerializedName("134217728") MessageQueue(134217728),
@SerializedName("268435456") Tcp(268435456),
@SerializedName("536870912") Grpc(536870912),
@SerializedName("1073741824") EndpointOther(1073741824),
@SerializedName("2080374784") AnyEndpoint(2080374784),
@SerializedName("-2147483648") InProcess(-2147483648),
@SerializedName("-2147483645") InternalNetworkAccess(-2147483645),
@SerializedName("-2147483641") AnyNetworkAccessType(-2147483641),
@SerializedName("-1") Any(-1);
private final int value;
RequestAttributes(final int intValue) { value = intValue; }
public int getValue() { return value; }
}
public static interface IRequestPreferences
{
public Boolean acceptsBrotli = null;
public Boolean acceptsDeflate = null;
public Boolean acceptsGzip = null;
}
public static interface IHttpFile
{
public String name = null;
public String fileName = null;
public Long contentLength = null;
public String contentType = null;
public InputStream inputStream = null;
}
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /reports HTTP/1.1 Host: fbihtaapi.bettor.webhop.biz Accept: text/csv
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length
{Unable to show example output for type 'IHttpResult' using the custom 'csv' filter}Cannot dynamically create an instance of type 'ServiceStack.Web.IHttpResult'. Reason: Cannot create an instance of an interface.