Portal

<back to all web services

EditStatement

Requires Authentication
Required role:VeoliaAdmin
The following routes are available for this service:
PUT/statement/{statementtype}
import 'package:servicestack/servicestack.dart';

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;
}

class StatementType
{
    static const StatementType PrivacyStatement = const StatementType._(0);
    static const StatementType VeoliaSupplierCharter = const StatementType._(1);
    static const StatementType VeoliaCoreStandards = const StatementType._(2);

    final int _value;
    const StatementType._(this._value);
    int get value => _value;
    static List<StatementType> get values => const [PrivacyStatement,VeoliaSupplierCharter,VeoliaCoreStandards];
}

abstract class StatementBase extends ModifyRequestBase
{
    StatementType? StatementType;
    String? Url;

    StatementBase({this.StatementType,this.Url});
    StatementBase.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

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

    getTypeName() => "StatementBase";
    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 EditStatement extends StatementBase implements IPut, IConvertible
{
    EditStatement();
    EditStatement.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() => "EditStatement";
    TypeContext? context = _ctx;
}

TypeContext _ctx = TypeContext(library: 'szallitoiportal_be.veolia.hu', types: <String, TypeInfo> {
    'ModifyRequestBase': TypeInfo(TypeOf.AbstractClass),
    'StatementType': TypeInfo(TypeOf.Enum, enumValues:StatementType.values),
    'StatementBase': TypeInfo(TypeOf.AbstractClass),
    'ResponseBase': TypeInfo(TypeOf.AbstractClass),
    'ModifyEntityResponse': TypeInfo(TypeOf.Class, create:() => ModifyEntityResponse()),
    'EditStatement': TypeInfo(TypeOf.Class, create:() => EditStatement()),
});

Dart EditStatement DTOs

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

HTTP + CSV

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

PUT /statement/{statementtype} HTTP/1.1 
Host: szallitoiportal-be.veolia.hu 
Accept: text/csv
Content-Type: text/csv
Content-Length: length

{"StatementType":0,"Url":"String","ConcurrencyStamp":"String"}
HTTP/1.1 200 OK
Content-Type: text/csv
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"}}}