All Verbs | /integrations/{integrationId}/customers |
---|
import 'package:servicestack/servicestack.dart';
import 'dart:typed_data';
class CrmCustomerInfo implements IConvertible
{
String? id;
String? displayName;
CrmCustomerInfo({this.id,this.displayName});
CrmCustomerInfo.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
id = json['id'];
displayName = json['displayName'];
return this;
}
Map<String, dynamic> toJson() => {
'id': id,
'displayName': displayName
};
getTypeName() => "CrmCustomerInfo";
TypeContext? context = _ctx;
}
class ListCrmCustomersResponse implements IConvertible
{
List<CrmCustomerInfo>? customers;
ListCrmCustomersResponse({this.customers});
ListCrmCustomersResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
customers = JsonConverters.fromJson(json['customers'],'List<CrmCustomerInfo>',context!);
return this;
}
Map<String, dynamic> toJson() => {
'customers': JsonConverters.toJson(customers,'List<CrmCustomerInfo>',context!)
};
getTypeName() => "ListCrmCustomersResponse";
TypeContext? context = _ctx;
}
class ListCrmCustomers implements IConvertible
{
String? integrationId;
String? query;
ListCrmCustomers({this.integrationId,this.query});
ListCrmCustomers.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
integrationId = json['integrationId'];
query = json['query'];
return this;
}
Map<String, dynamic> toJson() => {
'integrationId': integrationId,
'query': query
};
getTypeName() => "ListCrmCustomers";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'team.evovoice.io', types: <String, TypeInfo> {
'CrmCustomerInfo': TypeInfo(TypeOf.Class, create:() => CrmCustomerInfo()),
'ListCrmCustomersResponse': TypeInfo(TypeOf.Class, create:() => ListCrmCustomersResponse()),
'List<CrmCustomerInfo>': TypeInfo(TypeOf.Class, create:() => <CrmCustomerInfo>[]),
'ListCrmCustomers': TypeInfo(TypeOf.Class, create:() => ListCrmCustomers()),
});
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 /integrations/{integrationId}/customers HTTP/1.1
Host: team.evovoice.io
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<ListCrmCustomers xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Voice.Api.Integrations">
<IntegrationId>String</IntegrationId>
<Query>String</Query>
</ListCrmCustomers>
HTTP/1.1 200 OK Content-Type: application/xml Content-Length: length <ListCrmCustomersResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Voice.Api.Integrations"> <Customers> <CrmCustomerInfo> <DisplayName>String</DisplayName> <Id>String</Id> </CrmCustomerInfo> </Customers> </ListCrmCustomersResponse>