Cochrane+ App API

<back to all web services

DeleteThunderBoltActions

Requires Authentication
The following routes are available for this service:
DELETE/thunderbolt/delete
import 'package:servicestack/servicestack.dart';

class ApiServiceRequest implements IServiceRequest, IHasApiKey, IHasDeviceInfo, IConvertible
{
    /**
    * The API Key required for authentication
    */
    // @ApiMember(DataType="string", Description="The API Key required for authentication", IsRequired=true)
    String? apiKey;

    /**
    * Latitude of the user making this request
    */
    // @ApiMember(DataType="double", Description="Latitude of the user making this request")
    double? latitude;

    /**
    * Longitude of the user making this request
    */
    // @ApiMember(DataType="double", Description="Longitude of the user making this request")
    double? longitude;

    ApiServiceRequest({this.apiKey,this.latitude,this.longitude});
    ApiServiceRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        apiKey = json['apiKey'];
        latitude = JsonConverters.toDouble(json['latitude']);
        longitude = JsonConverters.toDouble(json['longitude']);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'apiKey': apiKey,
        'latitude': latitude,
        'longitude': longitude
    };

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

class ApiServiceResponse implements IServiceResponse, IConvertible
{
    String? description;
    String? heading;
    bool? wasSuccessful;
    dynamic? modelState;

    ApiServiceResponse({this.description,this.heading,this.wasSuccessful,this.modelState});
    ApiServiceResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        description = json['description'];
        heading = json['heading'];
        wasSuccessful = json['wasSuccessful'];
        modelState = JsonConverters.fromJson(json['modelState'],'dynamic',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'description': description,
        'heading': heading,
        'wasSuccessful': wasSuccessful,
        'modelState': JsonConverters.toJson(modelState,'dynamic',context!)
    };

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

class EnumOption implements IConvertible
{
    int? value;
    String? label;

    EnumOption({this.value,this.label});
    EnumOption.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

    Map<String, dynamic> toJson() => {
        'value': value,
        'label': label
    };

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

class ThunderBoltActionData implements IConvertible
{
    int? id;
    String? actionName;
    String? color;
    int? dailyActionCount;
    bool? showNumberInput;
    bool? showEmailInput;
    bool? showPlatformInput;
    bool? showDateTimeInput;
    List<EnumOption>? contactInteractionPlatforms;

    ThunderBoltActionData({this.id,this.actionName,this.color,this.dailyActionCount,this.showNumberInput,this.showEmailInput,this.showPlatformInput,this.showDateTimeInput,this.contactInteractionPlatforms});
    ThunderBoltActionData.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        id = json['id'];
        actionName = json['actionName'];
        color = json['color'];
        dailyActionCount = json['dailyActionCount'];
        showNumberInput = json['showNumberInput'];
        showEmailInput = json['showEmailInput'];
        showPlatformInput = json['showPlatformInput'];
        showDateTimeInput = json['showDateTimeInput'];
        contactInteractionPlatforms = JsonConverters.fromJson(json['contactInteractionPlatforms'],'List<EnumOption>',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'id': id,
        'actionName': actionName,
        'color': color,
        'dailyActionCount': dailyActionCount,
        'showNumberInput': showNumberInput,
        'showEmailInput': showEmailInput,
        'showPlatformInput': showPlatformInput,
        'showDateTimeInput': showDateTimeInput,
        'contactInteractionPlatforms': JsonConverters.toJson(contactInteractionPlatforms,'List<EnumOption>',context!)
    };

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

class ThunderBoltActionEventData implements IConvertible
{
    int? id;
    String? createdDate;
    int? actionId;
    String? actionName;
    String? color;
    String? notes;

    ThunderBoltActionEventData({this.id,this.createdDate,this.actionId,this.actionName,this.color,this.notes});
    ThunderBoltActionEventData.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        id = json['id'];
        createdDate = json['createdDate'];
        actionId = json['actionId'];
        actionName = json['actionName'];
        color = json['color'];
        notes = json['notes'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'id': id,
        'createdDate': createdDate,
        'actionId': actionId,
        'actionName': actionName,
        'color': color,
        'notes': notes
    };

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

class DeleteThunderBoltActionsResponse extends ApiServiceResponse implements IConvertible
{
    int? dailyActionsNumber;
    List<ThunderBoltActionData>? thunderBoltActions;
    List<ThunderBoltActionEventData>? thunderBoltActionEvents;

    DeleteThunderBoltActionsResponse({this.dailyActionsNumber,this.thunderBoltActions,this.thunderBoltActionEvents});
    DeleteThunderBoltActionsResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        super.fromMap(json);
        dailyActionsNumber = json['dailyActionsNumber'];
        thunderBoltActions = JsonConverters.fromJson(json['thunderBoltActions'],'List<ThunderBoltActionData>',context!);
        thunderBoltActionEvents = JsonConverters.fromJson(json['thunderBoltActionEvents'],'List<ThunderBoltActionEventData>',context!);
        return this;
    }

    Map<String, dynamic> toJson() => super.toJson()..addAll({
        'dailyActionsNumber': dailyActionsNumber,
        'thunderBoltActions': JsonConverters.toJson(thunderBoltActions,'List<ThunderBoltActionData>',context!),
        'thunderBoltActionEvents': JsonConverters.toJson(thunderBoltActionEvents,'List<ThunderBoltActionEventData>',context!)
    });

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

class DeleteThunderBoltActions extends ApiServiceRequest implements IConvertible
{
    int? id;

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

    fromMap(Map<String, dynamic> json) {
        super.fromMap(json);
        id = json['id'];
        return this;
    }

    Map<String, dynamic> toJson() => super.toJson()..addAll({
        'id': id
    });

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

TypeContext _ctx = TypeContext(library: 'cochraneplus_api_dev.happen.zone', types: <String, TypeInfo> {
    'ApiServiceRequest': TypeInfo(TypeOf.Class, create:() => ApiServiceRequest()),
    'ApiServiceResponse': TypeInfo(TypeOf.Class, create:() => ApiServiceResponse()),
    'EnumOption': TypeInfo(TypeOf.Class, create:() => EnumOption()),
    'ThunderBoltActionData': TypeInfo(TypeOf.Class, create:() => ThunderBoltActionData()),
    'List<EnumOption>': TypeInfo(TypeOf.Class, create:() => <EnumOption>[]),
    'ThunderBoltActionEventData': TypeInfo(TypeOf.Class, create:() => ThunderBoltActionEventData()),
    'DeleteThunderBoltActionsResponse': TypeInfo(TypeOf.Class, create:() => DeleteThunderBoltActionsResponse()),
    'List<ThunderBoltActionData>': TypeInfo(TypeOf.Class, create:() => <ThunderBoltActionData>[]),
    'List<ThunderBoltActionEventData>': TypeInfo(TypeOf.Class, create:() => <ThunderBoltActionEventData>[]),
    'DeleteThunderBoltActions': TypeInfo(TypeOf.Class, create:() => DeleteThunderBoltActions()),
});

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

DELETE /thunderbolt/delete HTTP/1.1 
Host: cochraneplus-api-dev.happen.zone 
Accept: application/json
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"dailyActionsNumber":0,"thunderBoltActions":[{"id":0,"actionName":"String","color":"String","dailyActionCount":0,"showNumberInput":false,"showEmailInput":false,"showPlatformInput":false,"showDateTimeInput":false,"contactInteractionPlatforms":[{"value":0,"label":"String"}]}],"thunderBoltActionEvents":[{"id":0,"createdDate":"String","actionId":0,"actionName":"String","color":"String","notes":"String"}],"description":"String","heading":"String","wasSuccessful":false,"modelState":{}}