digitaluapi

<back to all web services

ClickatellWebhook

The following routes are available for this service:
POST GET/communication/message/clickatell/webhook
import 'package:servicestack/servicestack.dart';
import 'dart:collection';

class ClickatellMesageStatusUpdateObject implements IConvertible
{
    String? Channel;
    int? Timestamp;
    int? StatusCode;
    String? Status;
    String? MessageId;
    String? ClientMessageId;

    ClickatellMesageStatusUpdateObject({this.Channel,this.Timestamp,this.StatusCode,this.Status,this.MessageId,this.ClientMessageId});
    ClickatellMesageStatusUpdateObject.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Channel = json['Channel'];
        Timestamp = json['Timestamp'];
        StatusCode = json['StatusCode'];
        Status = json['Status'];
        MessageId = json['MessageId'];
        ClientMessageId = json['ClientMessageId'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Channel': Channel,
        'Timestamp': Timestamp,
        'StatusCode': StatusCode,
        'Status': Status,
        'MessageId': MessageId,
        'ClientMessageId': ClientMessageId
    };

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

class ClickatellMesageStatusUpdateEvent implements IConvertible
{
    List<ClickatellMesageStatusUpdateObject>? MessageStatusUpdate;

    ClickatellMesageStatusUpdateEvent({this.MessageStatusUpdate});
    ClickatellMesageStatusUpdateEvent.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

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

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

class ClickatellWebhook implements IConvertible
{
    String? IntegrationId;
    String? IntegrationName;
    ClickatellMesageStatusUpdateEvent? Event;

    ClickatellWebhook({this.IntegrationId,this.IntegrationName,this.Event});
    ClickatellWebhook.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        IntegrationId = json['IntegrationId'];
        IntegrationName = json['IntegrationName'];
        Event = JsonConverters.fromJson(json['Event'],'ClickatellMesageStatusUpdateEvent',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'IntegrationId': IntegrationId,
        'IntegrationName': IntegrationName,
        'Event': JsonConverters.toJson(Event,'ClickatellMesageStatusUpdateEvent',context!)
    };

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

TypeContext _ctx = TypeContext(library: 'duengageapi.uat.scadsoftware.com', types: <String, TypeInfo> {
    'ClickatellMesageStatusUpdateObject': TypeInfo(TypeOf.Class, create:() => ClickatellMesageStatusUpdateObject()),
    'ClickatellMesageStatusUpdateEvent': TypeInfo(TypeOf.Class, create:() => ClickatellMesageStatusUpdateEvent()),
    'List<ClickatellMesageStatusUpdateObject>': TypeInfo(TypeOf.Class, create:() => <ClickatellMesageStatusUpdateObject>[]),
    'ClickatellWebhook': TypeInfo(TypeOf.Class, create:() => ClickatellWebhook()),
});

Dart ClickatellWebhook DTOs

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

To embed the response in a jsonp callback, append ?callback=myCallback

HTTP + JSON

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

POST /communication/message/clickatell/webhook HTTP/1.1 
Host: duengageapi.uat.scadsoftware.com 
Accept: application/json
Content-Type: application/json
Content-Length: length

{"IntegrationId":"String","IntegrationName":"String","Event":{"MessageStatusUpdate":[{"Channel":"String","Timestamp":0,"StatusCode":0,"Status":"String","MessageId":"String","ClientMessageId":"String"}]}}