GET | /tender/{tenderid}/user/{userid}/round/{tenderroundid}/supplementary/{supplementaryid} |
---|
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using ServiceStack;
using ServiceStack.DataAnnotations;
using Portal.ServiceDto;
using Portal.Common;
namespace Portal.Common
{
public enum SupplementaryFileDirection
{
Request = 0,
Response = 1,
}
}
namespace Portal.ServiceDto
{
public partial class BrowseFileResponseBase
{
public virtual int Id { get; set; }
public virtual int FileContentId { get; set; }
public virtual string FileName { get; set; }
public virtual long Size { get; set; }
}
public partial class BrowseSupplementary
: SupplementaryBase, IGet
{
}
public partial class BrowseSupplementaryResponse
: ResponseBase
{
public virtual SupplementaryDetails Supplementary { get; set; }
}
public partial class ResponseBase
{
public virtual ResponseStatus ResponseStatus { get; set; }
}
public partial class SupplementaryBase
: TenderUserTenderRoundBase
{
public virtual int SupplementaryId { get; set; }
}
public partial class SupplementaryDetails
: SupplementarySimple
{
public SupplementaryDetails()
{
Meta = new Dictionary<string, string>{};
SupplementaryFiles = new List<SupplementaryFileDetails>{};
}
public virtual int TenderId { get; set; }
public virtual int TenderUserId { get; set; }
public virtual int UserId { get; set; }
public virtual int TenderRoundId { get; set; }
public virtual int? ViewedById { get; set; }
public virtual int? SubmittedById { get; set; }
public virtual Dictionary<string, string> Meta { get; set; }
public virtual List<SupplementaryFileDetails> SupplementaryFiles { get; set; }
}
public partial class SupplementaryFileDetails
: BrowseFileResponseBase
{
public virtual int SupplementaryId { get; set; }
public virtual int SupplementaryDocumentTypeId { get; set; }
public virtual string SupplementaryDocumentType { get; set; }
public virtual SupplementaryFileDirection Direction { get; set; }
}
public partial class SupplementarySimple
{
public virtual int Id { get; set; }
public virtual int TenderUserTenderRoundId { get; set; }
public virtual bool IsViewed { get; set; }
public virtual DateTime? ViewingDateTime { get; set; }
public virtual bool IsSubmitted { get; set; }
public virtual DateTime? SubmissionDateTime { get; set; }
}
public partial class TenderUserTenderRoundBase
{
public virtual int TenderId { get; set; }
public virtual int UserId { get; set; }
public virtual int TenderRoundId { get; set; }
}
}
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.
GET /tender/{tenderid}/user/{userid}/round/{tenderroundid}/supplementary/{supplementaryid} HTTP/1.1 Host: szallitoiportal-be.veolia.hu Accept: text/jsv
HTTP/1.1 200 OK Content-Type: text/jsv Content-Length: length { Supplementary: { TenderId: 0, TenderUserId: 0, UserId: 0, TenderRoundId: 0, ViewedById: 0, SubmittedById: 0, Meta: { String: String }, SupplementaryFiles: [ { SupplementaryId: 0, SupplementaryDocumentTypeId: 0, SupplementaryDocumentType: String, Direction: 0, Id: 0, FileContentId: 0, FileName: String, Size: 0 } ], Id: 0, TenderUserTenderRoundId: 0, IsViewed: False, ViewingDateTime: 0001-01-01, IsSubmitted: False, SubmissionDateTime: 0001-01-01 }, ResponseStatus: { ErrorCode: String, Message: String, StackTrace: String, Errors: [ { ErrorCode: String, FieldName: String, Message: String, Meta: { String: String } } ], Meta: { String: String } } }