GET | /user/{supplieruserid}/contract/{contractid} |
---|
import 'package:servicestack/servicestack.dart';
abstract class ContractBase
{
int? SupplierUserId;
int? ContractId;
ContractBase({this.SupplierUserId,this.ContractId});
ContractBase.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
SupplierUserId = json['SupplierUserId'];
ContractId = json['ContractId'];
return this;
}
Map<String, dynamic> toJson() => {
'SupplierUserId': SupplierUserId,
'ContractId': ContractId
};
getTypeName() => "ContractBase";
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;
}
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 BrowseContract extends ContractBase implements IGet, IConvertible
{
BrowseContract();
BrowseContract.fromJson(Map<String, dynamic> json) : super.fromJson(json);
fromMap(Map<String, dynamic> json) {
super.fromMap(json);
return this;
}
Map<String, dynamic> toJson() => super.toJson();
getTypeName() => "BrowseContract";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'szallitoiportal_be.veolia.hu', types: <String, TypeInfo> {
'ContractBase': TypeInfo(TypeOf.AbstractClass),
'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()),
'BrowseContract': TypeInfo(TypeOf.Class, create:() => BrowseContract()),
});
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
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: application/xml
HTTP/1.1 200 OK Content-Type: application/xml Content-Length: length <BrowseContractResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Portal.ServiceDto"> <ResponseStatus xmlns:d2p1="http://schemas.servicestack.net/types"> <d2p1:ErrorCode>String</d2p1:ErrorCode> <d2p1:Message>String</d2p1:Message> <d2p1:StackTrace>String</d2p1:StackTrace> <d2p1:Errors> <d2p1:ResponseError> <d2p1:ErrorCode>String</d2p1:ErrorCode> <d2p1:FieldName>String</d2p1:FieldName> <d2p1:Message>String</d2p1:Message> <d2p1:Meta xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d5p1:KeyValueOfstringstring> <d5p1:Key>String</d5p1:Key> <d5p1:Value>String</d5p1:Value> </d5p1:KeyValueOfstringstring> </d2p1:Meta> </d2p1:ResponseError> </d2p1:Errors> <d2p1:Meta xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d3p1:KeyValueOfstringstring> <d3p1:Key>String</d3p1:Key> <d3p1:Value>String</d3p1:Value> </d3p1:KeyValueOfstringstring> </d2p1:Meta> </ResponseStatus> <Contract> <ConcurrencyStamp>String</ConcurrencyStamp> <Buyer>String</Buyer> <ConfirmationDeadline>0001-01-01T00:00:00</ConfirmationDeadline> <ContractIdentifier>String</ContractIdentifier> <Subject>String</Subject> <SupplierUserId>0</SupplierUserId> <TenderUserId>0</TenderUserId> <CancellationDateTime>0001-01-01T00:00:00</CancellationDateTime> <ContractVersions> <ContractVersionSimple> <ContractId>0</ContractId> <Id>0</Id> <IsViewed>false</IsViewed> <Status>Draft</Status> <Version>0</Version> </ContractVersionSimple> </ContractVersions> <Id>0</Id> <IsCancelled>false</IsCancelled> <Meta xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d3p1:KeyValueOfstringstring> <d3p1:Key>String</d3p1:Key> <d3p1:Value>String</d3p1:Value> </d3p1:KeyValueOfstringstring> </Meta> <Tender> <ProcurementContact>String</ProcurementContact> <ProcurementContactEmail>String</ProcurementContactEmail> <ProcurementContactPhone>String</ProcurementContactPhone> <ProfessionalContact>String</ProfessionalContact> <ProfessionalContactEmail>String</ProfessionalContactEmail> <ProfessionalContactPhone>String</ProfessionalContactPhone> <Result>String</Result> <Status>FirstRound</Status> <Subject>String</Subject> <TenderIdentifier>String</TenderIdentifier> <TenderType>Private</TenderType> <ConcurrencyStamp>String</ConcurrencyStamp> <Id>0</Id> <IsComplianceEnabled>false</IsComplianceEnabled> <IsProcurementEnabled>false</IsProcurementEnabled> <Meta xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d4p1:KeyValueOfstringstring> <d4p1:Key>String</d4p1:Key> <d4p1:Value>String</d4p1:Value> </d4p1:KeyValueOfstringstring> </Meta> <ProcedureType>Competition</ProcedureType> <StarterTenderRoundId>0</StarterTenderRoundId> <TenderFiles> <TenderFileDetails> <FileContentId>0</FileContentId> <FileName>String</FileName> <Id>0</Id> <Size>0</Size> <DocumentType>String</DocumentType> <IsTenderAnnouncement>false</IsTenderAnnouncement> <TenderId>0</TenderId> </TenderFileDetails> </TenderFiles> <TenderRounds> <TenderRoundSimple> <AnnouncementDateTime>0001-01-01T00:00:00</AnnouncementDateTime> <AnswerDeadline>0001-01-01T00:00:00</AnswerDeadline> <Id>0</Id> <IsQuestionEnabled>false</IsQuestionEnabled> <IsSupplementaryEnabled>false</IsSupplementaryEnabled> <Name>String</Name> <QuestionDeadline>0001-01-01T00:00:00</QuestionDeadline> <Status>0</Status> <SubmissionDeadline>0001-01-01T00:00:00</SubmissionDeadline> <SupplementaryDeadline>0001-01-01T00:00:00</SupplementaryDeadline> <SupplementaryRequestDeadline>0001-01-01T00:00:00</SupplementaryRequestDeadline> </TenderRoundSimple> </TenderRounds> </Tender> </Contract> </BrowseContractResponse>