Trendsic Platform Service

<back to all web services

CrewContactsRequest

Requires Authentication
The following routes are available for this service:
GET,OPTIONS/v1/CrewContacts/{CrewID}
import 'package:servicestack/servicestack.dart';
import 'dart:typed_data';

class CrewContact implements IConvertible
{
    int? CrewContactID;
    int? CrewID;
    String? CrewName;
    int? ContactID;
    String? ContactName;
    bool? Active;
    bool? Deleted;
    DateTime? DeletedDate;
    DateTime? RecordCreatedDate;
    String? CreatedByUID;
    String? ContactImage;
    String? FirstName;
    String? LastName;
    String? Initials;

    CrewContact({this.CrewContactID,this.CrewID,this.CrewName,this.ContactID,this.ContactName,this.Active,this.Deleted,this.DeletedDate,this.RecordCreatedDate,this.CreatedByUID,this.ContactImage,this.FirstName,this.LastName,this.Initials});
    CrewContact.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        CrewContactID = json['CrewContactID'];
        CrewID = json['CrewID'];
        CrewName = json['CrewName'];
        ContactID = json['ContactID'];
        ContactName = json['ContactName'];
        Active = json['Active'];
        Deleted = json['Deleted'];
        DeletedDate = JsonConverters.fromJson(json['DeletedDate'],'DateTime',context!);
        RecordCreatedDate = JsonConverters.fromJson(json['RecordCreatedDate'],'DateTime',context!);
        CreatedByUID = json['CreatedByUID'];
        ContactImage = json['ContactImage'];
        FirstName = json['FirstName'];
        LastName = json['LastName'];
        Initials = json['Initials'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'CrewContactID': CrewContactID,
        'CrewID': CrewID,
        'CrewName': CrewName,
        'ContactID': ContactID,
        'ContactName': ContactName,
        'Active': Active,
        'Deleted': Deleted,
        'DeletedDate': JsonConverters.toJson(DeletedDate,'DateTime',context!),
        'RecordCreatedDate': JsonConverters.toJson(RecordCreatedDate,'DateTime',context!),
        'CreatedByUID': CreatedByUID,
        'ContactImage': ContactImage,
        'FirstName': FirstName,
        'LastName': LastName,
        'Initials': Initials
    };

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

class CrewContactResponse implements IConvertible
{
    ResponseStatus? ResponseStatus;
    List<CrewContact>? CrewContact = [];

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

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

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

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

class CrewContactsRequest implements IConvertible
{
    int? CrewID;
    List<CrewContact>? CrewContact = [];

    CrewContactsRequest({this.CrewID,this.CrewContact});
    CrewContactsRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

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

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

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

Dart CrewContactsRequest DTOs

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

HTTP + OTHER

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

GET /v1/CrewContacts/{CrewID} HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: text/jsonl
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length

{"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}},"CrewContact":[{"CrewContactID":0,"CrewID":0,"CrewName":"String","ContactID":0,"ContactName":"String","Active":false,"Deleted":false,"DeletedDate":"0001-01-01T00:00:00.0000000","RecordCreatedDate":"0001-01-01T00:00:00.0000000","CreatedByUID":"00000000000000000000000000000000","ContactImage":"String","FirstName":"String","LastName":"String","Initials":"String"}]}