tvpl.api

<back to all web services

AddProcurementAssigneeRequest

Requires Authentication
The following routes are available for this service:
POST/procurement/batch/{BatchId}/assignees
import 'package:servicestack/servicestack.dart';

class ProcurementBatchAssignee implements IConvertible
{
    int? id;
    int? batchId;
    int? userId;
    DateTime? createdAt;
    int? createdBy;
    // @ignore()
    String? userName;

    // @ignore()
    String? userFullName;

    ProcurementBatchAssignee({this.id,this.batchId,this.userId,this.createdAt,this.createdBy,this.userName,this.userFullName});
    ProcurementBatchAssignee.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        id = json['id'];
        batchId = json['batchId'];
        userId = json['userId'];
        createdAt = JsonConverters.fromJson(json['createdAt'],'DateTime',context!);
        createdBy = json['createdBy'];
        userName = json['userName'];
        userFullName = json['userFullName'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'id': id,
        'batchId': batchId,
        'userId': userId,
        'createdAt': JsonConverters.toJson(createdAt,'DateTime',context!),
        'createdBy': createdBy,
        'userName': userName,
        'userFullName': userFullName
    };

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

class AddProcurementAssigneeRequest implements IConvertible
{
    int? batchId;
    int? userId;

    AddProcurementAssigneeRequest({this.batchId,this.userId});
    AddProcurementAssigneeRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

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

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

TypeContext _ctx = TypeContext(library: 'etc_api.vsmlab.vn', types: <String, TypeInfo> {
    'ProcurementBatchAssignee': TypeInfo(TypeOf.Class, create:() => ProcurementBatchAssignee()),
    'AddProcurementAssigneeRequest': TypeInfo(TypeOf.Class, create:() => AddProcurementAssigneeRequest()),
});

Dart AddProcurementAssigneeRequest DTOs

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

HTTP + XML

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

POST /procurement/batch/{BatchId}/assignees HTTP/1.1 
Host: etc-api.vsmlab.vn 
Accept: application/xml
Content-Type: application/xml
Content-Length: length

<AddProcurementAssigneeRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/tvpl.api.ServiceModel">
  <BatchId>0</BatchId>
  <UserId>0</UserId>
</AddProcurementAssigneeRequest>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<ProcurementBatchAssignee xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/tvpl.data.Models">
  <BatchId>0</BatchId>
  <CreatedAt>0001-01-01T00:00:00</CreatedAt>
  <CreatedBy>0</CreatedBy>
  <Id>0</Id>
  <UserFullName>String</UserFullName>
  <UserId>0</UserId>
  <UserName>String</UserName>
</ProcurementBatchAssignee>