Requires any of the roles: | SystemAdministrator, Manager, Customer |
All Verbs | /endpoints/duplicates |
---|
import 'package:servicestack/servicestack.dart';
class FindDuplicateEntry implements IConvertible
{
String? fieldValue;
List<String>? endpoints;
FindDuplicateEntry({this.fieldValue,this.endpoints});
FindDuplicateEntry.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
fieldValue = json['fieldValue'];
endpoints = JsonConverters.fromJson(json['endpoints'],'List<String>',context!);
return this;
}
Map<String, dynamic> toJson() => {
'fieldValue': fieldValue,
'endpoints': JsonConverters.toJson(endpoints,'List<String>',context!)
};
getTypeName() => "FindDuplicateEntry";
TypeContext? context = _ctx;
}
class FindDuplicatesResponse implements IConvertible
{
List<FindDuplicateEntry>? duplicates;
FindDuplicatesResponse({this.duplicates});
FindDuplicatesResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
duplicates = JsonConverters.fromJson(json['duplicates'],'List<FindDuplicateEntry>',context!);
return this;
}
Map<String, dynamic> toJson() => {
'duplicates': JsonConverters.toJson(duplicates,'List<FindDuplicateEntry>',context!)
};
getTypeName() => "FindDuplicatesResponse";
TypeContext? context = _ctx;
}
class FindDuplicates implements IConvertible
{
/**
* The account ID to check
*/
// @ApiMember(Description="The account ID to check")
String? accountId;
/**
* The field name to search for
*/
// @ApiMember(Description="The field name to search for")
String? endpointFieldName;
FindDuplicates({this.accountId,this.endpointFieldName});
FindDuplicates.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
accountId = json['accountId'];
endpointFieldName = json['endpointFieldName'];
return this;
}
Map<String, dynamic> toJson() => {
'accountId': accountId,
'endpointFieldName': endpointFieldName
};
getTypeName() => "FindDuplicates";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'evovoice.io', types: <String, TypeInfo> {
'FindDuplicateEntry': TypeInfo(TypeOf.Class, create:() => FindDuplicateEntry()),
'FindDuplicatesResponse': TypeInfo(TypeOf.Class, create:() => FindDuplicatesResponse()),
'List<FindDuplicateEntry>': TypeInfo(TypeOf.Class, create:() => <FindDuplicateEntry>[]),
'FindDuplicates': TypeInfo(TypeOf.Class, create:() => FindDuplicates()),
});
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 /endpoints/duplicates HTTP/1.1
Host: evovoice.io
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<FindDuplicates xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Voice.Api.Endpoints">
<AccountId>String</AccountId>
<EndpointFieldName>String</EndpointFieldName>
</FindDuplicates>
HTTP/1.1 200 OK Content-Type: application/xml Content-Length: length <FindDuplicatesResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Voice.Api.Endpoints"> <Duplicates> <FindDuplicateEntry> <Endpoints xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d4p1:string>String</d4p1:string> </Endpoints> <FieldValue>String</FieldValue> </FindDuplicateEntry> </Duplicates> </FindDuplicatesResponse>