Portal

<back to all web services

BrowseContractVersion

Requires Authentication
The following routes are available for this service:
GET/user/{supplieruserid}/contract/{contractid}/contractversion/{contractversionid}
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 ContractVersionBase extends ContractBase
{
    int? ContractVersionId;

    ContractVersionBase({this.ContractVersionId});
    ContractVersionBase.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        super.fromMap(json);
        ContractVersionId = json['ContractVersionId'];
        return this;
    }

    Map<String, dynamic> toJson() => super.toJson()..addAll({
        'ContractVersionId': ContractVersionId
    });

    getTypeName() => "ContractVersionBase";
    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 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;
}

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 ContractDocumentType
{
    static const ContractDocumentType Draft = const ContractDocumentType._(0);
    static const ContractDocumentType Comment = const ContractDocumentType._(1);

    final int _value;
    const ContractDocumentType._(this._value);
    int get value => _value;
    static List<ContractDocumentType> get values => const [Draft,Comment];
}

class ContractFileSimple extends BrowseFileResponseBase implements IConvertible
{
    int? ContractVersionId;
    ContractDocumentType? DocumentType;

    ContractFileSimple({this.ContractVersionId,this.DocumentType});
    ContractFileSimple.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        super.fromMap(json);
        ContractVersionId = json['ContractVersionId'];
        DocumentType = JsonConverters.fromJson(json['DocumentType'],'ContractDocumentType',context!);
        return this;
    }

    Map<String, dynamic> toJson() => super.toJson()..addAll({
        'ContractVersionId': ContractVersionId,
        'DocumentType': JsonConverters.toJson(DocumentType,'ContractDocumentType',context!)
    });

    getTypeName() => "ContractFileSimple";
    TypeContext? context = _ctx;
}

class ContractVersionDetails extends ContractVersionSimple implements IConvertible
{
    Map<String,String?>? Meta;
    DateTime? ViewingDateTime;
    DateTime? ReviewingDateTime;
    List<ContractFileSimple>? ContractFiles;

    ContractVersionDetails({this.Meta,this.ViewingDateTime,this.ReviewingDateTime,this.ContractFiles});
    ContractVersionDetails.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        super.fromMap(json);
        Meta = JsonConverters.toStringMap(json['Meta']);
        ViewingDateTime = JsonConverters.fromJson(json['ViewingDateTime'],'DateTime',context!);
        ReviewingDateTime = JsonConverters.fromJson(json['ReviewingDateTime'],'DateTime',context!);
        ContractFiles = JsonConverters.fromJson(json['ContractFiles'],'List<ContractFileSimple>',context!);
        return this;
    }

    Map<String, dynamic> toJson() => super.toJson()..addAll({
        'Meta': Meta,
        'ViewingDateTime': JsonConverters.toJson(ViewingDateTime,'DateTime',context!),
        'ReviewingDateTime': JsonConverters.toJson(ReviewingDateTime,'DateTime',context!),
        'ContractFiles': JsonConverters.toJson(ContractFiles,'List<ContractFileSimple>',context!)
    });

    getTypeName() => "ContractVersionDetails";
    TypeContext? context = _ctx;
}

class BrowseContractVersionResponse extends ResponseBase implements IConvertible
{
    ContractVersionDetails? ContractVersion;

    BrowseContractVersionResponse({this.ContractVersion});
    BrowseContractVersionResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        super.fromMap(json);
        ContractVersion = JsonConverters.fromJson(json['ContractVersion'],'ContractVersionDetails',context!);
        return this;
    }

    Map<String, dynamic> toJson() => super.toJson()..addAll({
        'ContractVersion': JsonConverters.toJson(ContractVersion,'ContractVersionDetails',context!)
    });

    getTypeName() => "BrowseContractVersionResponse";
    TypeContext? context = _ctx;
}

class BrowseContractVersion extends ContractVersionBase implements IGet, IConvertible
{
    BrowseContractVersion();
    BrowseContractVersion.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() => "BrowseContractVersion";
    TypeContext? context = _ctx;
}

TypeContext _ctx = TypeContext(library: 'szallitoiportal_be.veolia.hu', types: <String, TypeInfo> {
    'ContractBase': TypeInfo(TypeOf.AbstractClass),
    'ContractVersionBase': TypeInfo(TypeOf.AbstractClass),
    'ResponseBase': TypeInfo(TypeOf.AbstractClass),
    'ReviewStatus': TypeInfo(TypeOf.Enum, enumValues:ReviewStatus.values),
    'ContractVersionSimple': TypeInfo(TypeOf.Class, create:() => ContractVersionSimple()),
    'BrowseFileResponseBase': TypeInfo(TypeOf.AbstractClass),
    'ContractDocumentType': TypeInfo(TypeOf.Enum, enumValues:ContractDocumentType.values),
    'ContractFileSimple': TypeInfo(TypeOf.Class, create:() => ContractFileSimple()),
    'ContractVersionDetails': TypeInfo(TypeOf.Class, create:() => ContractVersionDetails()),
    'List<ContractFileSimple>': TypeInfo(TypeOf.Class, create:() => <ContractFileSimple>[]),
    'BrowseContractVersionResponse': TypeInfo(TypeOf.Class, create:() => BrowseContractVersionResponse()),
    'BrowseContractVersion': TypeInfo(TypeOf.Class, create:() => BrowseContractVersion()),
});

Dart BrowseContractVersion DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json

To embed the response in a jsonp callback, append ?callback=myCallback

HTTP + JSON

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

GET /user/{supplieruserid}/contract/{contractid}/contractversion/{contractversionid} HTTP/1.1 
Host: szallitoiportal-be.veolia.hu 
Accept: application/json
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"ContractVersion":{"Meta":{"String":"String"},"ViewingDateTime":"0001-01-01T00:00:00.0000000","ReviewingDateTime":"0001-01-01T00:00:00.0000000","ContractFiles":[{"ContractVersionId":0,"DocumentType":0,"Id":0,"FileContentId":0,"FileName":"String","Size":0}],"Id":0,"ContractId":0,"Version":0,"IsViewed":false,"Status":0},"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}}}