Requires any of the roles: | SystemAdministrator, Manager, Customer |
GET | /addresses |
---|
import 'package:servicestack/servicestack.dart';
class AddressInfo implements IConvertible
{
String? id;
String? friendlyName;
bool? emergencyEnabled;
String? customerName;
String? street;
String? city;
String? region;
String? postalCode;
String? isoCountry;
AddressInfo({this.id,this.friendlyName,this.emergencyEnabled,this.customerName,this.street,this.city,this.region,this.postalCode,this.isoCountry});
AddressInfo.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
id = json['id'];
friendlyName = json['friendlyName'];
emergencyEnabled = json['emergencyEnabled'];
customerName = json['customerName'];
street = json['street'];
city = json['city'];
region = json['region'];
postalCode = json['postalCode'];
isoCountry = json['isoCountry'];
return this;
}
Map<String, dynamic> toJson() => {
'id': id,
'friendlyName': friendlyName,
'emergencyEnabled': emergencyEnabled,
'customerName': customerName,
'street': street,
'city': city,
'region': region,
'postalCode': postalCode,
'isoCountry': isoCountry
};
getTypeName() => "AddressInfo";
TypeContext? context = _ctx;
}
class ListAddressesResponse implements IConvertible
{
List<AddressInfo>? addresses;
ListAddressesResponse({this.addresses});
ListAddressesResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
addresses = JsonConverters.fromJson(json['addresses'],'List<AddressInfo>',context!);
return this;
}
Map<String, dynamic> toJson() => {
'addresses': JsonConverters.toJson(addresses,'List<AddressInfo>',context!)
};
getTypeName() => "ListAddressesResponse";
TypeContext? context = _ctx;
}
class ListAddresses implements IConvertible
{
/**
* The account ID whose addresses you want
*/
// @ApiMember(Description="The account ID whose addresses you want")
String? accountId;
ListAddresses({this.accountId});
ListAddresses.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
accountId = json['accountId'];
return this;
}
Map<String, dynamic> toJson() => {
'accountId': accountId
};
getTypeName() => "ListAddresses";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'evovoice.io', types: <String, TypeInfo> {
'AddressInfo': TypeInfo(TypeOf.Class, create:() => AddressInfo()),
'ListAddressesResponse': TypeInfo(TypeOf.Class, create:() => ListAddressesResponse()),
'List<AddressInfo>': TypeInfo(TypeOf.Class, create:() => <AddressInfo>[]),
'ListAddresses': TypeInfo(TypeOf.Class, create:() => ListAddresses()),
});
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.
GET /addresses HTTP/1.1 Host: evovoice.io Accept: application/xml
HTTP/1.1 200 OK Content-Type: application/xml Content-Length: length <ListAddressesResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Voice.Api.Settings"> <Addresses> <AddressInfo> <City>String</City> <CustomerName>String</CustomerName> <EmergencyEnabled>false</EmergencyEnabled> <FriendlyName>String</FriendlyName> <ISOCountry>String</ISOCountry> <Id>String</Id> <PostalCode>String</PostalCode> <Region>String</Region> <Street>String</Street> </AddressInfo> </Addresses> </ListAddressesResponse>