tvpl.api

<back to all web services

GetLegalApprovalConfigRequest

Requires Authentication
The following routes are available for this service:
GET/WorkflowStep/legal-approval-config
import 'package:servicestack/servicestack.dart';

class StampClerkOption implements IConvertible
{
    int? id;
    String? fullName;
    String? departmentName;

    StampClerkOption({this.id,this.fullName,this.departmentName});
    StampClerkOption.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        id = json['id'];
        fullName = json['fullName'];
        departmentName = json['departmentName'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'id': id,
        'fullName': fullName,
        'departmentName': departmentName
    };

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

class GetLegalApprovalConfigResponse implements IResponseRequest, IConvertible
{
    int? code;
    String? message;
    bool? enabled;
    List<StampClerkOption>? approvers;

    GetLegalApprovalConfigResponse({this.code,this.message,this.enabled,this.approvers});
    GetLegalApprovalConfigResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        code = json['code'];
        message = json['message'];
        enabled = json['enabled'];
        approvers = JsonConverters.fromJson(json['approvers'],'List<StampClerkOption>',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'code': code,
        'message': message,
        'enabled': enabled,
        'approvers': JsonConverters.toJson(approvers,'List<StampClerkOption>',context!)
    };

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

class GetLegalApprovalConfigRequest implements IConvertible
{
    int? workflowId;

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

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

    Map<String, dynamic> toJson() => {
        'workflowId': workflowId
    };

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

TypeContext _ctx = TypeContext(library: 'etc_api.vsmlab.vn', types: <String, TypeInfo> {
    'StampClerkOption': TypeInfo(TypeOf.Class, create:() => StampClerkOption()),
    'GetLegalApprovalConfigResponse': TypeInfo(TypeOf.Class, create:() => GetLegalApprovalConfigResponse()),
    'List<StampClerkOption>': TypeInfo(TypeOf.Class, create:() => <StampClerkOption>[]),
    'GetLegalApprovalConfigRequest': TypeInfo(TypeOf.Class, create:() => GetLegalApprovalConfigRequest()),
});

Dart GetLegalApprovalConfigRequest 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.

GET /WorkflowStep/legal-approval-config HTTP/1.1 
Host: etc-api.vsmlab.vn 
Accept: text/csv
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length

{"code":0,"message":"String","enabled":false,"approvers":[{"id":0,"fullName":"String","departmentName":"String"}]}