Trendsic Platform Service

<back to all web services

CrewContactRequest

Requires Authentication
The following routes are available for this service:
GET,POST,PUT,DELETE,OPTIONS/v1/CrewContact/{CrewContactID}
GET,POST,PUT,DELETE,OPTIONS/v1/CrewContact
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 CrewContactRequest implements IConvertible
{
    int? CrewContactID;
    List<CrewContact>? CrewContact = [];

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

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

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

    getTypeName() => "CrewContactRequest";
    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>[]),
    'CrewContactRequest': TypeInfo(TypeOf.Class, create:() => CrewContactRequest()),
});

Dart CrewContactRequest DTOs

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

HTTP + XML

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

POST /v1/CrewContact/{CrewContactID} HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: application/xml
Content-Type: application/xml
Content-Length: length

<CrewContactRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
  <CrewContact>
    <CrewContact>
      <Active>false</Active>
      <ContactID>0</ContactID>
      <ContactImage>String</ContactImage>
      <ContactName>String</ContactName>
      <CreatedByUID>00000000-0000-0000-0000-000000000000</CreatedByUID>
      <CrewContactID>0</CrewContactID>
      <CrewID>0</CrewID>
      <CrewName>String</CrewName>
      <Deleted>false</Deleted>
      <DeletedDate>0001-01-01T00:00:00</DeletedDate>
      <FirstName>String</FirstName>
      <Initials>String</Initials>
      <LastName>String</LastName>
      <RecordCreatedDate>0001-01-01T00:00:00</RecordCreatedDate>
    </CrewContact>
  </CrewContact>
  <CrewContactID>0</CrewContactID>
</CrewContactRequest>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<CrewContactResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
  <CrewContact>
    <CrewContact>
      <Active>false</Active>
      <ContactID>0</ContactID>
      <ContactImage>String</ContactImage>
      <ContactName>String</ContactName>
      <CreatedByUID>00000000-0000-0000-0000-000000000000</CreatedByUID>
      <CrewContactID>0</CrewContactID>
      <CrewID>0</CrewID>
      <CrewName>String</CrewName>
      <Deleted>false</Deleted>
      <DeletedDate>0001-01-01T00:00:00</DeletedDate>
      <FirstName>String</FirstName>
      <Initials>String</Initials>
      <LastName>String</LastName>
      <RecordCreatedDate>0001-01-01T00:00:00</RecordCreatedDate>
    </CrewContact>
  </CrewContact>
  <ResponseStatus xmlns:d2p1="http://schemas.servicestack.net/types">
    <d2p1:ErrorCode>String</d2p1:ErrorCode>
    <d2p1:Message>String</d2p1:Message>
    <d2p1:StackTrace>String</d2p1:StackTrace>
    <d2p1:Errors>
      <d2p1:ResponseError>
        <d2p1:ErrorCode>String</d2p1:ErrorCode>
        <d2p1:FieldName>String</d2p1:FieldName>
        <d2p1:Message>String</d2p1:Message>
        <d2p1:Meta xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
          <d5p1:KeyValueOfstringstring>
            <d5p1:Key>String</d5p1:Key>
            <d5p1:Value>String</d5p1:Value>
          </d5p1:KeyValueOfstringstring>
        </d2p1:Meta>
      </d2p1:ResponseError>
    </d2p1:Errors>
    <d2p1:Meta xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
      <d3p1:KeyValueOfstringstring>
        <d3p1:Key>String</d3p1:Key>
        <d3p1:Value>String</d3p1:Value>
      </d3p1:KeyValueOfstringstring>
    </d2p1:Meta>
  </ResponseStatus>
</CrewContactResponse>