Required role: | VeoliaAdmin |
GET | /contract/{contractid} |
---|
import 'package:servicestack/servicestack.dart';
abstract class ResponseBase
{
ResponseStatus? ResponseStatus;
ResponseBase({this.ResponseStatus});
ResponseBase.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
ResponseStatus = JsonConverters.fromJson(json['ResponseStatus'],'ResponseStatus',context!);
return this;
}
Map<String, dynamic> toJson() => {
'ResponseStatus': JsonConverters.toJson(ResponseStatus,'ResponseStatus',context!)
};
getTypeName() => "ResponseBase";
TypeContext? context = _ctx;
}
abstract class ModifyRequestBase implements IConcurrencyStamp
{
String? ConcurrencyStamp;
ModifyRequestBase({this.ConcurrencyStamp});
ModifyRequestBase.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
ConcurrencyStamp = json['ConcurrencyStamp'];
return this;
}
Map<String, dynamic> toJson() => {
'ConcurrencyStamp': ConcurrencyStamp
};
getTypeName() => "ModifyRequestBase";
TypeContext? context = _ctx;
}
abstract class ModifyContractBase extends ModifyRequestBase
{
int? TenderUserId;
String? ContractIdentifier;
int? SupplierUserId;
String? Buyer;
String? Subject;
DateTime? ConfirmationDeadline;
ModifyContractBase({this.TenderUserId,this.ContractIdentifier,this.SupplierUserId,this.Buyer,this.Subject,this.ConfirmationDeadline});
ModifyContractBase.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
super.fromMap(json);
TenderUserId = json['TenderUserId'];
ContractIdentifier = json['ContractIdentifier'];
SupplierUserId = json['SupplierUserId'];
Buyer = json['Buyer'];
Subject = json['Subject'];
ConfirmationDeadline = JsonConverters.fromJson(json['ConfirmationDeadline'],'DateTime',context!);
return this;
}
Map<String, dynamic> toJson() => super.toJson()..addAll({
'TenderUserId': TenderUserId,
'ContractIdentifier': ContractIdentifier,
'SupplierUserId': SupplierUserId,
'Buyer': Buyer,
'Subject': Subject,
'ConfirmationDeadline': JsonConverters.toJson(ConfirmationDeadline,'DateTime',context!)
});
getTypeName() => "ModifyContractBase";
TypeContext? context = _ctx;
}
class ReviewStatus
{
static const ReviewStatus Draft = const ReviewStatus._(0);
static const ReviewStatus Commented = const ReviewStatus._(1);
static const ReviewStatus Accepted = const ReviewStatus._(2);
final int _value;
const ReviewStatus._(this._value);
int get value => _value;
static List<ReviewStatus> get values => const [Draft,Commented,Accepted];
}
class ContractVersionSimple implements IConvertible
{
int? Id;
int? ContractId;
int? Version;
bool? IsViewed;
ReviewStatus? Status;
ContractVersionSimple({this.Id,this.ContractId,this.Version,this.IsViewed,this.Status});
ContractVersionSimple.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Id = json['Id'];
ContractId = json['ContractId'];
Version = json['Version'];
IsViewed = json['IsViewed'];
Status = JsonConverters.fromJson(json['Status'],'ReviewStatus',context!);
return this;
}
Map<String, dynamic> toJson() => {
'Id': Id,
'ContractId': ContractId,
'Version': Version,
'IsViewed': IsViewed,
'Status': JsonConverters.toJson(Status,'ReviewStatus',context!)
};
getTypeName() => "ContractVersionSimple";
TypeContext? context = _ctx;
}
class TenderType
{
static const TenderType Private = const TenderType._(0);
static const TenderType Public = const TenderType._(1);
final int _value;
const TenderType._(this._value);
int get value => _value;
static List<TenderType> get values => const [Private,Public];
}
class TenderStatus
{
static const TenderStatus FirstRound = const TenderStatus._(0);
static const TenderStatus SecondRound = const TenderStatus._(1);
static const TenderStatus ThirdRound = const TenderStatus._(2);
static const TenderStatus Successful = const TenderStatus._(3);
static const TenderStatus UnSuccessful = const TenderStatus._(4);
static const TenderStatus Revoked = const TenderStatus._(5);
final int _value;
const TenderStatus._(this._value);
int get value => _value;
static List<TenderStatus> get values => const [FirstRound,SecondRound,ThirdRound,Successful,UnSuccessful,Revoked];
}
abstract class TenderBase
{
String? TenderIdentifier;
TenderType? TenderType;
String? Subject;
String? ProcurementContact;
String? ProcurementContactEmail;
String? ProcurementContactPhone;
String? ProfessionalContact;
String? ProfessionalContactEmail;
String? ProfessionalContactPhone;
String? Result;
TenderStatus? Status;
TenderBase({this.TenderIdentifier,this.TenderType,this.Subject,this.ProcurementContact,this.ProcurementContactEmail,this.ProcurementContactPhone,this.ProfessionalContact,this.ProfessionalContactEmail,this.ProfessionalContactPhone,this.Result,this.Status});
TenderBase.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
TenderIdentifier = json['TenderIdentifier'];
TenderType = JsonConverters.fromJson(json['TenderType'],'TenderType',context!);
Subject = json['Subject'];
ProcurementContact = json['ProcurementContact'];
ProcurementContactEmail = json['ProcurementContactEmail'];
ProcurementContactPhone = json['ProcurementContactPhone'];
ProfessionalContact = json['ProfessionalContact'];
ProfessionalContactEmail = json['ProfessionalContactEmail'];
ProfessionalContactPhone = json['ProfessionalContactPhone'];
Result = json['Result'];
Status = JsonConverters.fromJson(json['Status'],'TenderStatus',context!);
return this;
}
Map<String, dynamic> toJson() => {
'TenderIdentifier': TenderIdentifier,
'TenderType': JsonConverters.toJson(TenderType,'TenderType',context!),
'Subject': Subject,
'ProcurementContact': ProcurementContact,
'ProcurementContactEmail': ProcurementContactEmail,
'ProcurementContactPhone': ProcurementContactPhone,
'ProfessionalContact': ProfessionalContact,
'ProfessionalContactEmail': ProfessionalContactEmail,
'ProfessionalContactPhone': ProfessionalContactPhone,
'Result': Result,
'Status': JsonConverters.toJson(Status,'TenderStatus',context!)
};
getTypeName() => "TenderBase";
TypeContext? context = _ctx;
}
class ProcedureType
{
static const ProcedureType Competition = const ProcedureType._(0);
static const ProcedureType Simplified = const ProcedureType._(1);
final int _value;
const ProcedureType._(this._value);
int get value => _value;
static List<ProcedureType> get values => const [Competition,Simplified];
}
abstract class BrowseFileResponseBase
{
int? Id;
int? FileContentId;
String? FileName;
int? Size;
BrowseFileResponseBase({this.Id,this.FileContentId,this.FileName,this.Size});
BrowseFileResponseBase.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Id = json['Id'];
FileContentId = json['FileContentId'];
FileName = json['FileName'];
Size = json['Size'];
return this;
}
Map<String, dynamic> toJson() => {
'Id': Id,
'FileContentId': FileContentId,
'FileName': FileName,
'Size': Size
};
getTypeName() => "BrowseFileResponseBase";
TypeContext? context = _ctx;
}
class TenderFileDetails extends BrowseFileResponseBase implements IConvertible
{
int? TenderId;
String? DocumentType;
bool? IsTenderAnnouncement;
TenderFileDetails({this.TenderId,this.DocumentType,this.IsTenderAnnouncement});
TenderFileDetails.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
super.fromMap(json);
TenderId = json['TenderId'];
DocumentType = json['DocumentType'];
IsTenderAnnouncement = json['IsTenderAnnouncement'];
return this;
}
Map<String, dynamic> toJson() => super.toJson()..addAll({
'TenderId': TenderId,
'DocumentType': DocumentType,
'IsTenderAnnouncement': IsTenderAnnouncement
});
getTypeName() => "TenderFileDetails";
TypeContext? context = _ctx;
}
class TenderRoundSimple implements IConvertible
{
int? Id;
String? Name;
bool? IsQuestionEnabled;
DateTime? QuestionDeadline;
DateTime? AnswerDeadline;
DateTime? SubmissionDeadline;
bool? IsSupplementaryEnabled;
DateTime? SupplementaryRequestDeadline;
DateTime? SupplementaryDeadline;
DateTime? AnnouncementDateTime;
int? Status;
TenderRoundSimple({this.Id,this.Name,this.IsQuestionEnabled,this.QuestionDeadline,this.AnswerDeadline,this.SubmissionDeadline,this.IsSupplementaryEnabled,this.SupplementaryRequestDeadline,this.SupplementaryDeadline,this.AnnouncementDateTime,this.Status});
TenderRoundSimple.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Id = json['Id'];
Name = json['Name'];
IsQuestionEnabled = json['IsQuestionEnabled'];
QuestionDeadline = JsonConverters.fromJson(json['QuestionDeadline'],'DateTime',context!);
AnswerDeadline = JsonConverters.fromJson(json['AnswerDeadline'],'DateTime',context!);
SubmissionDeadline = JsonConverters.fromJson(json['SubmissionDeadline'],'DateTime',context!);
IsSupplementaryEnabled = json['IsSupplementaryEnabled'];
SupplementaryRequestDeadline = JsonConverters.fromJson(json['SupplementaryRequestDeadline'],'DateTime',context!);
SupplementaryDeadline = JsonConverters.fromJson(json['SupplementaryDeadline'],'DateTime',context!);
AnnouncementDateTime = JsonConverters.fromJson(json['AnnouncementDateTime'],'DateTime',context!);
Status = json['Status'];
return this;
}
Map<String, dynamic> toJson() => {
'Id': Id,
'Name': Name,
'IsQuestionEnabled': IsQuestionEnabled,
'QuestionDeadline': JsonConverters.toJson(QuestionDeadline,'DateTime',context!),
'AnswerDeadline': JsonConverters.toJson(AnswerDeadline,'DateTime',context!),
'SubmissionDeadline': JsonConverters.toJson(SubmissionDeadline,'DateTime',context!),
'IsSupplementaryEnabled': IsSupplementaryEnabled,
'SupplementaryRequestDeadline': JsonConverters.toJson(SupplementaryRequestDeadline,'DateTime',context!),
'SupplementaryDeadline': JsonConverters.toJson(SupplementaryDeadline,'DateTime',context!),
'AnnouncementDateTime': JsonConverters.toJson(AnnouncementDateTime,'DateTime',context!),
'Status': Status
};
getTypeName() => "TenderRoundSimple";
TypeContext? context = _ctx;
}
class TenderDetails extends TenderBase implements IConcurrencyStamp, IConvertible
{
int? Id;
int? StarterTenderRoundId;
ProcedureType? ProcedureType;
Map<String,String?>? Meta;
List<TenderFileDetails>? TenderFiles;
List<TenderRoundSimple>? TenderRounds;
String? ConcurrencyStamp;
bool? IsProcurementEnabled;
bool? IsComplianceEnabled;
TenderDetails({this.Id,this.StarterTenderRoundId,this.ProcedureType,this.Meta,this.TenderFiles,this.TenderRounds,this.ConcurrencyStamp,this.IsProcurementEnabled,this.IsComplianceEnabled});
TenderDetails.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
super.fromMap(json);
Id = json['Id'];
StarterTenderRoundId = json['StarterTenderRoundId'];
ProcedureType = JsonConverters.fromJson(json['ProcedureType'],'ProcedureType',context!);
Meta = JsonConverters.toStringMap(json['Meta']);
TenderFiles = JsonConverters.fromJson(json['TenderFiles'],'List<TenderFileDetails>',context!);
TenderRounds = JsonConverters.fromJson(json['TenderRounds'],'List<TenderRoundSimple>',context!);
ConcurrencyStamp = json['ConcurrencyStamp'];
IsProcurementEnabled = json['IsProcurementEnabled'];
IsComplianceEnabled = json['IsComplianceEnabled'];
return this;
}
Map<String, dynamic> toJson() => super.toJson()..addAll({
'Id': Id,
'StarterTenderRoundId': StarterTenderRoundId,
'ProcedureType': JsonConverters.toJson(ProcedureType,'ProcedureType',context!),
'Meta': Meta,
'TenderFiles': JsonConverters.toJson(TenderFiles,'List<TenderFileDetails>',context!),
'TenderRounds': JsonConverters.toJson(TenderRounds,'List<TenderRoundSimple>',context!),
'ConcurrencyStamp': ConcurrencyStamp,
'IsProcurementEnabled': IsProcurementEnabled,
'IsComplianceEnabled': IsComplianceEnabled
});
getTypeName() => "TenderDetails";
TypeContext? context = _ctx;
}
class ContractDetails extends ModifyContractBase implements IConvertible
{
int? Id;
DateTime? CancellationDateTime;
bool? IsCancelled;
Map<String,String?>? Meta;
List<ContractVersionSimple>? ContractVersions;
TenderDetails? Tender;
ContractDetails({this.Id,this.CancellationDateTime,this.IsCancelled,this.Meta,this.ContractVersions,this.Tender});
ContractDetails.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
super.fromMap(json);
Id = json['Id'];
CancellationDateTime = JsonConverters.fromJson(json['CancellationDateTime'],'DateTime',context!);
IsCancelled = json['IsCancelled'];
Meta = JsonConverters.toStringMap(json['Meta']);
ContractVersions = JsonConverters.fromJson(json['ContractVersions'],'List<ContractVersionSimple>',context!);
Tender = JsonConverters.fromJson(json['Tender'],'TenderDetails',context!);
return this;
}
Map<String, dynamic> toJson() => super.toJson()..addAll({
'Id': Id,
'CancellationDateTime': JsonConverters.toJson(CancellationDateTime,'DateTime',context!),
'IsCancelled': IsCancelled,
'Meta': Meta,
'ContractVersions': JsonConverters.toJson(ContractVersions,'List<ContractVersionSimple>',context!),
'Tender': JsonConverters.toJson(Tender,'TenderDetails',context!)
});
getTypeName() => "ContractDetails";
TypeContext? context = _ctx;
}
class BrowseContractResponse extends ResponseBase implements IConvertible
{
ContractDetails? Contract;
BrowseContractResponse({this.Contract});
BrowseContractResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
super.fromMap(json);
Contract = JsonConverters.fromJson(json['Contract'],'ContractDetails',context!);
return this;
}
Map<String, dynamic> toJson() => super.toJson()..addAll({
'Contract': JsonConverters.toJson(Contract,'ContractDetails',context!)
});
getTypeName() => "BrowseContractResponse";
TypeContext? context = _ctx;
}
class BrowseContractByVeoliaAdmin implements IGet, IConvertible
{
int? ContractId;
BrowseContractByVeoliaAdmin({this.ContractId});
BrowseContractByVeoliaAdmin.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
ContractId = json['ContractId'];
return this;
}
Map<String, dynamic> toJson() => {
'ContractId': ContractId
};
getTypeName() => "BrowseContractByVeoliaAdmin";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'szallitoiportal_be.veolia.hu', types: <String, TypeInfo> {
'ResponseBase': TypeInfo(TypeOf.AbstractClass),
'ModifyRequestBase': TypeInfo(TypeOf.AbstractClass),
'ModifyContractBase': TypeInfo(TypeOf.AbstractClass),
'ReviewStatus': TypeInfo(TypeOf.Enum, enumValues:ReviewStatus.values),
'ContractVersionSimple': TypeInfo(TypeOf.Class, create:() => ContractVersionSimple()),
'TenderType': TypeInfo(TypeOf.Enum, enumValues:TenderType.values),
'TenderStatus': TypeInfo(TypeOf.Enum, enumValues:TenderStatus.values),
'TenderBase': TypeInfo(TypeOf.AbstractClass),
'ProcedureType': TypeInfo(TypeOf.Enum, enumValues:ProcedureType.values),
'BrowseFileResponseBase': TypeInfo(TypeOf.AbstractClass),
'TenderFileDetails': TypeInfo(TypeOf.Class, create:() => TenderFileDetails()),
'TenderRoundSimple': TypeInfo(TypeOf.Class, create:() => TenderRoundSimple()),
'TenderDetails': TypeInfo(TypeOf.Class, create:() => TenderDetails()),
'List<TenderFileDetails>': TypeInfo(TypeOf.Class, create:() => <TenderFileDetails>[]),
'List<TenderRoundSimple>': TypeInfo(TypeOf.Class, create:() => <TenderRoundSimple>[]),
'ContractDetails': TypeInfo(TypeOf.Class, create:() => ContractDetails()),
'List<ContractVersionSimple>': TypeInfo(TypeOf.Class, create:() => <ContractVersionSimple>[]),
'BrowseContractResponse': TypeInfo(TypeOf.Class, create:() => BrowseContractResponse()),
'BrowseContractByVeoliaAdmin': TypeInfo(TypeOf.Class, create:() => BrowseContractByVeoliaAdmin()),
});
Dart BrowseContractByVeoliaAdmin DTOs
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 /contract/{contractid} HTTP/1.1 Host: szallitoiportal-be.veolia.hu Accept: text/csv
HTTP/1.1 200 OK Content-Type: text/csv Content-Length: length {"Contract":{"Id":0,"CancellationDateTime":"0001-01-01T00:00:00.0000000","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-01T00:00:00.0000000","AnswerDeadline":"0001-01-01T00:00:00.0000000","SubmissionDeadline":"0001-01-01T00:00:00.0000000","IsSupplementaryEnabled":false,"SupplementaryRequestDeadline":"0001-01-01T00:00:00.0000000","SupplementaryDeadline":"0001-01-01T00:00:00.0000000","AnnouncementDateTime":"0001-01-01T00:00:00.0000000","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-01T00:00:00.0000000","ConcurrencyStamp":"String"},"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}}}