tvpl.api

<back to all web services

NotifyProcurementBatchRequest

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

class NotifyProcurementBatchResponse implements IConvertible
{
    int? code;
    String? message;
    int? sentCount;

    NotifyProcurementBatchResponse({this.code,this.message,this.sentCount});
    NotifyProcurementBatchResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

    Map<String, dynamic> toJson() => {
        'code': code,
        'message': message,
        'sentCount': sentCount
    };

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

class NotifyProcurementBatchRequest implements IConvertible
{
    int? id;
    String? targetType;

    NotifyProcurementBatchRequest({this.id,this.targetType});
    NotifyProcurementBatchRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

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

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

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

Dart NotifyProcurementBatchRequest 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/{Id}/notify HTTP/1.1 
Host: etc-api.vsmlab.vn 
Accept: application/xml
Content-Type: application/xml
Content-Length: length

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

<NotifyProcurementBatchResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/tvpl.api.ServiceModel">
  <Code>0</Code>
  <Message>String</Message>
  <SentCount>0</SentCount>
</NotifyProcurementBatchResponse>