Evo Voice

<back to all web services

PatchAddress

Update a business address to be used with e911

Requires Authentication
Requires any of the roles:SystemAdministrator, Manager, Customer
The following routes are available for this service:
POST/addresses/{addressId}
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;
}

/**
* Update a business address to be used with e911
*/
// @Api(Description="Update a business address to be used with e911")
class PatchAddress implements IConvertible
{
    String? accountId;
    String? addressId;
    String? friendlyName;
    bool? emergencyEnabled;
    String? customerName;
    String? street;
    String? city;
    String? region;
    String? postalCode;
    String? isoCountry;

    PatchAddress({this.accountId,this.addressId,this.friendlyName,this.emergencyEnabled,this.customerName,this.street,this.city,this.region,this.postalCode,this.isoCountry});
    PatchAddress.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        accountId = json['accountId'];
        addressId = json['addressId'];
        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() => {
        'accountId': accountId,
        'addressId': addressId,
        'friendlyName': friendlyName,
        'emergencyEnabled': emergencyEnabled,
        'customerName': customerName,
        'street': street,
        'city': city,
        'region': region,
        'postalCode': postalCode,
        'isoCountry': isoCountry
    };

    getTypeName() => "PatchAddress";
    TypeContext? context = _ctx;
}

TypeContext _ctx = TypeContext(library: 'evovoice.io', types: <String, TypeInfo> {
    'AddressInfo': TypeInfo(TypeOf.Class, create:() => AddressInfo()),
    'PatchAddress': TypeInfo(TypeOf.Class, create:() => PatchAddress()),
});

Dart PatchAddress DTOs

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

To embed the response in a jsonp callback, append ?callback=myCallback

HTTP + JSON

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /addresses/{addressId} HTTP/1.1 
Host: evovoice.io 
Accept: application/json
Content-Type: application/json
Content-Length: length

{"accountId":"String","addressId":"String","friendlyName":"String","emergencyEnabled":false,"customerName":"String","street":"String","city":"String","region":"String","postalCode":"String","isoCountry":"String"}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"id":"String","friendlyName":"String","emergencyEnabled":false,"customerName":"String","street":"String","city":"String","region":"String","postalCode":"String","isoCountry":"String"}