GET | /user/{supplieruserid}/contract/{contractid} |
---|
import java.math.*
import java.util.*
import net.servicestack.client.*
open class BrowseContract : ContractBase(), IGet
{
}
open class ContractBase
{
var SupplierUserId:Int? = null
var ContractId:Int? = null
}
open class BrowseContractResponse : ResponseBase()
{
var Contract:ContractDetails? = null
}
open class ResponseBase
{
var ResponseStatus:ResponseStatus? = null
}
open class ContractDetails : ModifyContractBase()
{
var Id:Int? = null
var CancellationDateTime:Date? = null
var IsCancelled:Boolean? = null
var Meta:HashMap<String,String> = HashMap<String,String>()
var ContractVersions:ArrayList<ContractVersionSimple> = ArrayList<ContractVersionSimple>()
var Tender:TenderDetails? = null
}
open class ModifyContractBase : ModifyRequestBase()
{
var TenderUserId:Int? = null
var ContractIdentifier:String? = null
var SupplierUserId:Int? = null
var Buyer:String? = null
var Subject:String? = null
var ConfirmationDeadline:Date? = null
}
open class ModifyRequestBase : IConcurrencyStamp
{
var ConcurrencyStamp:String? = null
}
open class ContractVersionSimple
{
var Id:Int? = null
var ContractId:Int? = null
var Version:Int? = null
var IsViewed:Boolean? = null
var Status:ReviewStatus? = null
}
enum class ReviewStatus(val value:Int)
{
@SerializedName("0") Draft(0),
@SerializedName("1") Commented(1),
@SerializedName("2") Accepted(2),
}
open class TenderDetails : TenderBase(), IConcurrencyStamp
{
var Id:Int? = null
var StarterTenderRoundId:Int? = null
var ProcedureType:ProcedureType? = null
var Meta:HashMap<String,String> = HashMap<String,String>()
var TenderFiles:ArrayList<TenderFileDetails> = ArrayList<TenderFileDetails>()
var TenderRounds:ArrayList<TenderRoundSimple> = ArrayList<TenderRoundSimple>()
var ConcurrencyStamp:String? = null
var IsProcurementEnabled:Boolean? = null
var IsComplianceEnabled:Boolean? = null
}
open class TenderBase
{
var TenderIdentifier:String? = null
var TenderType:TenderType? = null
var Subject:String? = null
var ProcurementContact:String? = null
var ProcurementContactEmail:String? = null
var ProcurementContactPhone:String? = null
var ProfessionalContact:String? = null
var ProfessionalContactEmail:String? = null
var ProfessionalContactPhone:String? = null
var Result:String? = null
var Status:TenderStatus? = null
}
enum class TenderType(val value:Int)
{
@SerializedName("0") Private(0),
@SerializedName("1") Public(1),
}
enum class TenderStatus(val value:Int)
{
@SerializedName("0") FirstRound(0),
@SerializedName("1") SecondRound(1),
@SerializedName("2") ThirdRound(2),
@SerializedName("3") Successful(3),
@SerializedName("4") UnSuccessful(4),
@SerializedName("5") Revoked(5),
}
enum class ProcedureType(val value:Int)
{
@SerializedName("0") Competition(0),
@SerializedName("1") Simplified(1),
}
open class TenderFileDetails : BrowseFileResponseBase()
{
var TenderId:Int? = null
var DocumentType:String? = null
var IsTenderAnnouncement:Boolean? = null
}
open class BrowseFileResponseBase
{
var Id:Int? = null
var FileContentId:Int? = null
var FileName:String? = null
var Size:Long? = null
}
open class TenderRoundSimple
{
var Id:Int? = null
var Name:String? = null
var IsQuestionEnabled:Boolean? = null
var QuestionDeadline:Date? = null
var AnswerDeadline:Date? = null
var SubmissionDeadline:Date? = null
var IsSupplementaryEnabled:Boolean? = null
var SupplementaryRequestDeadline:Date? = null
var SupplementaryDeadline:Date? = null
var AnnouncementDateTime:Date? = null
var Status:Int? = null
}
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 /user/{supplieruserid}/contract/{contractid} HTTP/1.1 Host: szallitoiportal-be.veolia.hu Accept: text/jsv
HTTP/1.1 200 OK Content-Type: text/jsv Content-Length: length { Contract: { Id: 0, CancellationDateTime: 0001-01-01, IsCancelled: False, Meta: { String: String }, ContractVersions: [ { Id: 0, ContractId: 0, Version: 0, IsViewed: False, Status: 0 } ], Tender: { Id: 0, StarterTenderRoundId: 0, ProcedureType: 0, Meta: { String: String }, TenderFiles: [ { TenderId: 0, DocumentType: String, IsTenderAnnouncement: False, Id: 0, FileContentId: 0, FileName: String, Size: 0 } ], TenderRounds: [ { Id: 0, Name: String, IsQuestionEnabled: False, QuestionDeadline: 0001-01-01, AnswerDeadline: 0001-01-01, SubmissionDeadline: 0001-01-01, IsSupplementaryEnabled: False, SupplementaryRequestDeadline: 0001-01-01, SupplementaryDeadline: 0001-01-01, AnnouncementDateTime: 0001-01-01, Status: 0 } ], ConcurrencyStamp: String, IsProcurementEnabled: False, IsComplianceEnabled: False, TenderIdentifier: String, TenderType: 0, Subject: String, ProcurementContact: String, ProcurementContactEmail: String, ProcurementContactPhone: String, ProfessionalContact: String, ProfessionalContactEmail: String, ProfessionalContactPhone: String, Result: String, Status: 0 }, TenderUserId: 0, ContractIdentifier: String, SupplierUserId: 0, Buyer: String, Subject: String, ConfirmationDeadline: 0001-01-01, ConcurrencyStamp: String }, ResponseStatus: { ErrorCode: String, Message: String, StackTrace: String, Errors: [ { ErrorCode: String, FieldName: String, Message: String, Meta: { String: String } } ], Meta: { String: String } } }