Trendsic Platform Service

<back to all web services

MessagingTestRequest

Requires Authentication
The following routes are available for this service:
POST/v1/messaging/test
import 'package:servicestack/servicestack.dart';

class MessagingTestSend implements IConvertible
{
    String? StepId;
    String? Status;
    String? Output;
    String? Body;
    int? Segments;
    int? SmsMessageId;

    MessagingTestSend({this.StepId,this.Status,this.Output,this.Body,this.Segments,this.SmsMessageId});
    MessagingTestSend.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        StepId = json['StepId'];
        Status = json['Status'];
        Output = json['Output'];
        Body = json['Body'];
        Segments = json['Segments'];
        SmsMessageId = json['SmsMessageId'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'StepId': StepId,
        'Status': Status,
        'Output': Output,
        'Body': Body,
        'Segments': Segments,
        'SmsMessageId': SmsMessageId
    };

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

class MessagingTestResponse implements IConvertible
{
    ResponseStatus? ResponseStatus;
    List<MessagingTestSend>? Sent = [];

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

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

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

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

class MessagingTestRequest implements IConvertible
{
    String? RuleKey;
    String? BranchId;
    String? LineId;
    List<String>? StepIds = [];
    String? ToPhone;
    bool? Remember;

    MessagingTestRequest({this.RuleKey,this.BranchId,this.LineId,this.StepIds,this.ToPhone,this.Remember});
    MessagingTestRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        RuleKey = json['RuleKey'];
        BranchId = json['BranchId'];
        LineId = json['LineId'];
        StepIds = JsonConverters.fromJson(json['StepIds'],'List<String>',context!);
        ToPhone = json['ToPhone'];
        Remember = json['Remember'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'RuleKey': RuleKey,
        'BranchId': BranchId,
        'LineId': LineId,
        'StepIds': JsonConverters.toJson(StepIds,'List<String>',context!),
        'ToPhone': ToPhone,
        'Remember': Remember
    };

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

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

Dart MessagingTestRequest 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/messaging/test HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: application/xml
Content-Type: application/xml
Content-Length: length

<MessagingTestRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
  <BranchId>00000000-0000-0000-0000-000000000000</BranchId>
  <LineId>00000000-0000-0000-0000-000000000000</LineId>
  <Remember>false</Remember>
  <RuleKey>String</RuleKey>
  <StepIds xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:string>String</d2p1:string>
  </StepIds>
  <ToPhone>String</ToPhone>
</MessagingTestRequest>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<MessagingTestResponse 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>
  <Sent>
    <MessagingTestSend>
      <Body>String</Body>
      <Output>String</Output>
      <Segments>0</Segments>
      <SmsMessageId>0</SmsMessageId>
      <Status>String</Status>
      <StepId>String</StepId>
    </MessagingTestSend>
  </Sent>
</MessagingTestResponse>