Trendsic Platform Service

<back to all web services

ContactSayNameAsRequest

Requires Authentication
Requires any of the roles:Agent, Administrator
The following routes are available for this service:
PUT,OPTIONS/v1/contact/{ContactId}/say-name-as
import 'package:servicestack/servicestack.dart';

class ContactQueueVisit implements IConvertible
{
    String? CheckinId;
    String? BranchId;
    String? BranchName;
    String? LineId;
    String? ServiceName;
    int? Outcome;
    String? OutcomeLabel;
    bool? IsAppointment;
    DateTime? SignInUtc;
    DateTime? CalledUtc;
    DateTime? FirstStartUtc;
    DateTime? CompletedTime;
    int? WaitMinutes;
    int? ServiceMinutes;
    String? WindowName;
    String? TicketLabel;
    String? HoldReason;
    DateTime? ReturnedTime;
    int? PausedMinutes;

    ContactQueueVisit({this.CheckinId,this.BranchId,this.BranchName,this.LineId,this.ServiceName,this.Outcome,this.OutcomeLabel,this.IsAppointment,this.SignInUtc,this.CalledUtc,this.FirstStartUtc,this.CompletedTime,this.WaitMinutes,this.ServiceMinutes,this.WindowName,this.TicketLabel,this.HoldReason,this.ReturnedTime,this.PausedMinutes});
    ContactQueueVisit.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        CheckinId = json['CheckinId'];
        BranchId = json['BranchId'];
        BranchName = json['BranchName'];
        LineId = json['LineId'];
        ServiceName = json['ServiceName'];
        Outcome = json['Outcome'];
        OutcomeLabel = json['OutcomeLabel'];
        IsAppointment = json['IsAppointment'];
        SignInUtc = JsonConverters.fromJson(json['SignInUtc'],'DateTime',context!);
        CalledUtc = JsonConverters.fromJson(json['CalledUtc'],'DateTime',context!);
        FirstStartUtc = JsonConverters.fromJson(json['FirstStartUtc'],'DateTime',context!);
        CompletedTime = JsonConverters.fromJson(json['CompletedTime'],'DateTime',context!);
        WaitMinutes = json['WaitMinutes'];
        ServiceMinutes = json['ServiceMinutes'];
        WindowName = json['WindowName'];
        TicketLabel = json['TicketLabel'];
        HoldReason = json['HoldReason'];
        ReturnedTime = JsonConverters.fromJson(json['ReturnedTime'],'DateTime',context!);
        PausedMinutes = json['PausedMinutes'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'CheckinId': CheckinId,
        'BranchId': BranchId,
        'BranchName': BranchName,
        'LineId': LineId,
        'ServiceName': ServiceName,
        'Outcome': Outcome,
        'OutcomeLabel': OutcomeLabel,
        'IsAppointment': IsAppointment,
        'SignInUtc': JsonConverters.toJson(SignInUtc,'DateTime',context!),
        'CalledUtc': JsonConverters.toJson(CalledUtc,'DateTime',context!),
        'FirstStartUtc': JsonConverters.toJson(FirstStartUtc,'DateTime',context!),
        'CompletedTime': JsonConverters.toJson(CompletedTime,'DateTime',context!),
        'WaitMinutes': WaitMinutes,
        'ServiceMinutes': ServiceMinutes,
        'WindowName': WindowName,
        'TicketLabel': TicketLabel,
        'HoldReason': HoldReason,
        'ReturnedTime': JsonConverters.toJson(ReturnedTime,'DateTime',context!),
        'PausedMinutes': PausedMinutes
    };

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

class ContactQueueVisitSummary implements IConvertible
{
    int? Visits;
    int? Completed;
    int? NoShows;
    int? NoShows90d;
    int? Cancelled;
    int? Unfulfilled;
    int? Appointments;
    DateTime? LastVisitUtc;
    DateTime? LastNoShowUtc;
    double? AvgWaitMinutes;
    bool? SmsOptIn;
    int? TextsSent90d;
    String? SayNameAs;

    ContactQueueVisitSummary({this.Visits,this.Completed,this.NoShows,this.NoShows90d,this.Cancelled,this.Unfulfilled,this.Appointments,this.LastVisitUtc,this.LastNoShowUtc,this.AvgWaitMinutes,this.SmsOptIn,this.TextsSent90d,this.SayNameAs});
    ContactQueueVisitSummary.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Visits = json['Visits'];
        Completed = json['Completed'];
        NoShows = json['NoShows'];
        NoShows90d = json['NoShows90d'];
        Cancelled = json['Cancelled'];
        Unfulfilled = json['Unfulfilled'];
        Appointments = json['Appointments'];
        LastVisitUtc = JsonConverters.fromJson(json['LastVisitUtc'],'DateTime',context!);
        LastNoShowUtc = JsonConverters.fromJson(json['LastNoShowUtc'],'DateTime',context!);
        AvgWaitMinutes = JsonConverters.toDouble(json['AvgWaitMinutes']);
        SmsOptIn = json['SmsOptIn'];
        TextsSent90d = json['TextsSent90d'];
        SayNameAs = json['SayNameAs'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Visits': Visits,
        'Completed': Completed,
        'NoShows': NoShows,
        'NoShows90d': NoShows90d,
        'Cancelled': Cancelled,
        'Unfulfilled': Unfulfilled,
        'Appointments': Appointments,
        'LastVisitUtc': JsonConverters.toJson(LastVisitUtc,'DateTime',context!),
        'LastNoShowUtc': JsonConverters.toJson(LastNoShowUtc,'DateTime',context!),
        'AvgWaitMinutes': AvgWaitMinutes,
        'SmsOptIn': SmsOptIn,
        'TextsSent90d': TextsSent90d,
        'SayNameAs': SayNameAs
    };

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

class ContactVisitsResponse implements IConvertible
{
    ResponseStatus? ResponseStatus;
    List<ContactQueueVisit>? Visits = [];
    ContactQueueVisitSummary? Summary;

    ContactVisitsResponse({this.ResponseStatus,this.Visits,this.Summary});
    ContactVisitsResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

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

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

class ContactSayNameAsRequest implements IConvertible
{
    int? ContactId;
    String? SayNameAs;

    ContactSayNameAsRequest({this.ContactId,this.SayNameAs});
    ContactSayNameAsRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        ContactId = json['ContactId'];
        SayNameAs = json['SayNameAs'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'ContactId': ContactId,
        'SayNameAs': SayNameAs
    };

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

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

Dart ContactSayNameAsRequest 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.

PUT /v1/contact/{ContactId}/say-name-as HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: application/xml
Content-Type: application/xml
Content-Length: length

<ContactSayNameAsRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
  <ContactId>0</ContactId>
  <SayNameAs>String</SayNameAs>
</ContactSayNameAsRequest>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<ContactVisitsResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
  <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>
  <Summary>
    <Appointments>0</Appointments>
    <AvgWaitMinutes>0</AvgWaitMinutes>
    <Cancelled>0</Cancelled>
    <Completed>0</Completed>
    <LastNoShowUtc>0001-01-01T00:00:00</LastNoShowUtc>
    <LastVisitUtc>0001-01-01T00:00:00</LastVisitUtc>
    <NoShows>0</NoShows>
    <NoShows90d>0</NoShows90d>
    <SayNameAs>String</SayNameAs>
    <SmsOptIn>false</SmsOptIn>
    <TextsSent90d>0</TextsSent90d>
    <Unfulfilled>0</Unfulfilled>
    <Visits>0</Visits>
  </Summary>
  <Visits>
    <ContactQueueVisit>
      <BranchId>00000000-0000-0000-0000-000000000000</BranchId>
      <BranchName>String</BranchName>
      <CalledUtc>0001-01-01T00:00:00</CalledUtc>
      <CheckinId>00000000-0000-0000-0000-000000000000</CheckinId>
      <CompletedTime>0001-01-01T00:00:00</CompletedTime>
      <FirstStartUtc>0001-01-01T00:00:00</FirstStartUtc>
      <HoldReason>String</HoldReason>
      <IsAppointment>false</IsAppointment>
      <LineId>00000000-0000-0000-0000-000000000000</LineId>
      <Outcome>0</Outcome>
      <OutcomeLabel>String</OutcomeLabel>
      <PausedMinutes>0</PausedMinutes>
      <ReturnedTime>0001-01-01T00:00:00</ReturnedTime>
      <ServiceMinutes>0</ServiceMinutes>
      <ServiceName>String</ServiceName>
      <SignInUtc>0001-01-01T00:00:00</SignInUtc>
      <TicketLabel>String</TicketLabel>
      <WaitMinutes>0</WaitMinutes>
      <WindowName>String</WindowName>
    </ContactQueueVisit>
  </Visits>
</ContactVisitsResponse>