Trendsic Platform Service

<back to all web services

AgentOfficeLocationRequest

Requires Authentication
Requires any of the roles:Worker, Agent, Administrator
The following routes are available for this service:
GET,OPTIONS/v1/AgentCrmGetOfficeLocations
import 'package:servicestack/servicestack.dart';
import 'dart:typed_data';

class AgentOfficeLocation implements IConvertible
{
    int? Id;
    String? City;
    String? State;

    AgentOfficeLocation({this.Id,this.City,this.State});
    AgentOfficeLocation.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Id = json['Id'];
        City = json['City'];
        State = json['State'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Id': Id,
        'City': City,
        'State': State
    };

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

class AgentOfficeLocationResponse implements IConvertible
{
    ResponseStatus? ResponseStatus;
    List<AgentOfficeLocation>? AgentOfficeLocations = [];

    AgentOfficeLocationResponse({this.ResponseStatus,this.AgentOfficeLocations});
    AgentOfficeLocationResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        ResponseStatus = JsonConverters.fromJson(json['ResponseStatus'],'ResponseStatus',context!);
        AgentOfficeLocations = JsonConverters.fromJson(json['AgentOfficeLocations'],'List<AgentOfficeLocation>',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'ResponseStatus': JsonConverters.toJson(ResponseStatus,'ResponseStatus',context!),
        'AgentOfficeLocations': JsonConverters.toJson(AgentOfficeLocations,'List<AgentOfficeLocation>',context!)
    };

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

class AgentOfficeLocationRequest implements IConvertible
{
    AgentOfficeLocationRequest();
    AgentOfficeLocationRequest.fromJson(Map<String, dynamic> json) : super();
    fromMap(Map<String, dynamic> json) {
        return this;
    }

    Map<String, dynamic> toJson() => {};
    getTypeName() => "AgentOfficeLocationRequest";
    TypeContext? context = _ctx;
}

TypeContext _ctx = TypeContext(library: 'api.dev.dynamics.trendsic.com', types: <String, TypeInfo> {
    'AgentOfficeLocation': TypeInfo(TypeOf.Class, create:() => AgentOfficeLocation()),
    'AgentOfficeLocationResponse': TypeInfo(TypeOf.Class, create:() => AgentOfficeLocationResponse()),
    'List<AgentOfficeLocation>': TypeInfo(TypeOf.Class, create:() => <AgentOfficeLocation>[]),
    'AgentOfficeLocationRequest': TypeInfo(TypeOf.Class, create:() => AgentOfficeLocationRequest()),
});

Dart AgentOfficeLocationRequest DTOs

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

HTTP + JSV

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

GET /v1/AgentCrmGetOfficeLocations HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	ResponseStatus: 
	{
		ErrorCode: String,
		Message: String,
		StackTrace: String,
		Errors: 
		[
			{
				ErrorCode: String,
				FieldName: String,
				Message: String,
				Meta: 
				{
					String: String
				}
			}
		],
		Meta: 
		{
			String: String
		}
	},
	AgentOfficeLocations: 
	[
		{
			Id: 0,
			City: String,
			State: String
		}
	]
}