Required role: | VeoliaAdmin |
PUT | /tender/{tenderid}/round/{tenderroundid} |
---|
import 'package:servicestack/servicestack.dart';
abstract class TenderRoundBase
{
String? Name;
bool? IsQuestionEnabled;
DateTime? QuestionDeadline;
DateTime? AnswerDeadline;
DateTime? SubmissionDeadline;
bool? IsSupplementaryEnabled;
DateTime? SupplementaryRequestDeadline;
DateTime? SupplementaryDeadline;
DateTime? AnnouncementDateTime;
TenderRoundBase({this.Name,this.IsQuestionEnabled,this.QuestionDeadline,this.AnswerDeadline,this.SubmissionDeadline,this.IsSupplementaryEnabled,this.SupplementaryRequestDeadline,this.SupplementaryDeadline,this.AnnouncementDateTime});
TenderRoundBase.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
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!);
return this;
}
Map<String, dynamic> toJson() => {
'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!)
};
getTypeName() => "TenderRoundBase";
TypeContext? context = _ctx;
}
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;
}
class ModifyEntityResponse extends ResponseBase implements IConvertible
{
int? Id;
ModifyEntityResponse({this.Id});
ModifyEntityResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
super.fromMap(json);
Id = json['Id'];
return this;
}
Map<String, dynamic> toJson() => super.toJson()..addAll({
'Id': Id
});
getTypeName() => "ModifyEntityResponse";
TypeContext? context = _ctx;
}
class EditTenderRound extends TenderRoundBase implements IPut, IConvertible
{
int? TenderId;
int? TenderRoundId;
EditTenderRound({this.TenderId,this.TenderRoundId});
EditTenderRound.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
super.fromMap(json);
TenderId = json['TenderId'];
TenderRoundId = json['TenderRoundId'];
return this;
}
Map<String, dynamic> toJson() => super.toJson()..addAll({
'TenderId': TenderId,
'TenderRoundId': TenderRoundId
});
getTypeName() => "EditTenderRound";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'szallitoiportal_be.veolia.hu', types: <String, TypeInfo> {
'TenderRoundBase': TypeInfo(TypeOf.AbstractClass),
'ResponseBase': TypeInfo(TypeOf.AbstractClass),
'ModifyEntityResponse': TypeInfo(TypeOf.Class, create:() => ModifyEntityResponse()),
'EditTenderRound': TypeInfo(TypeOf.Class, create:() => EditTenderRound()),
});
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.
PUT /tender/{tenderid}/round/{tenderroundid} HTTP/1.1
Host: szallitoiportal-be.veolia.hu
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
TenderId: 0,
TenderRoundId: 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
}
HTTP/1.1 200 OK Content-Type: text/jsv Content-Length: length { Id: 0, ResponseStatus: { ErrorCode: String, Message: String, StackTrace: String, Errors: [ { ErrorCode: String, FieldName: String, Message: String, Meta: { String: String } } ], Meta: { String: String } } }