Evo Voice

<back to all web services

ListCrmCustomers

The following routes are available for this service:
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: '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()),
});

Dart ListCrmCustomers DTOs

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

HTTP + CSV

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: evovoice.io 
Accept: text/csv
Content-Type: text/csv
Content-Length: length

{"integrationId":"String","query":"String"}
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length

{"customers":[{"id":"String","displayName":"String"}]}