| POST | /provider/import |
|---|
import 'package:servicestack/servicestack.dart';
class ImportProviderRowError implements IConvertible
{
int? row;
String? column;
String? message;
ImportProviderRowError({this.row,this.column,this.message});
ImportProviderRowError.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
row = json['row'];
column = json['column'];
message = json['message'];
return this;
}
Map<String, dynamic> toJson() => {
'row': row,
'column': column,
'message': message
};
getTypeName() => "ImportProviderRowError";
TypeContext? context = _ctx;
}
class ImportProviderResponse implements IConvertible
{
int? code;
String? message;
int? inserted;
int? updated;
int? skipped;
List<ImportProviderRowError>? errors;
ImportProviderResponse({this.code,this.message,this.inserted,this.updated,this.skipped,this.errors});
ImportProviderResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
code = json['code'];
message = json['message'];
inserted = json['inserted'];
updated = json['updated'];
skipped = json['skipped'];
errors = JsonConverters.fromJson(json['errors'],'List<ImportProviderRowError>',context!);
return this;
}
Map<String, dynamic> toJson() => {
'code': code,
'message': message,
'inserted': inserted,
'updated': updated,
'skipped': skipped,
'errors': JsonConverters.toJson(errors,'List<ImportProviderRowError>',context!)
};
getTypeName() => "ImportProviderResponse";
TypeContext? context = _ctx;
}
class ImportProviderRequest implements IConvertible
{
String? mode;
ImportProviderRequest({this.mode});
ImportProviderRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
mode = json['mode'];
return this;
}
Map<String, dynamic> toJson() => {
'mode': mode
};
getTypeName() => "ImportProviderRequest";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'etc_api.vsmlab.vn', types: <String, TypeInfo> {
'ImportProviderRowError': TypeInfo(TypeOf.Class, create:() => ImportProviderRowError()),
'ImportProviderResponse': TypeInfo(TypeOf.Class, create:() => ImportProviderResponse()),
'List<ImportProviderRowError>': TypeInfo(TypeOf.Class, create:() => <ImportProviderRowError>[]),
'ImportProviderRequest': TypeInfo(TypeOf.Class, create:() => ImportProviderRequest()),
});
Dart ImportProviderRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /provider/import HTTP/1.1
Host: etc-api.vsmlab.vn
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<ImportProviderRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/tvpl.api.ServiceModel">
<Mode>String</Mode>
</ImportProviderRequest>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<ImportProviderResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/tvpl.api.ServiceModel">
<Code>0</Code>
<Errors>
<ImportProviderRowError>
<Column>String</Column>
<Message>String</Message>
<Row>0</Row>
</ImportProviderRowError>
</Errors>
<Inserted>0</Inserted>
<Message>String</Message>
<Skipped>0</Skipped>
<Updated>0</Updated>
</ImportProviderResponse>