BokaMera.API.Host

<back to all web services

ListWebhookEventTypesRequest

The following routes are available for this service:
GET/webhook/eventtypesGet all Webhook event typesGet all WebhookEventTypes
import 'package:servicestack/servicestack.dart';

class WebhookEventTypeDto implements IConvertible
{
    String? Name;
    String? Description;
    int? Id;
    String? Value;

    WebhookEventTypeDto({this.Name,this.Description,this.Id,this.Value});
    WebhookEventTypeDto.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Name = json['Name'];
        Description = json['Description'];
        Id = json['Id'];
        Value = json['Value'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Name': Name,
        'Description': Description,
        'Id': Id,
        'Value': Value
    };

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

class WebhookEventTypesResponse implements IConvertible
{
    List<WebhookEventTypeDto>? EventTypes;

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

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

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

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

class ListWebhookEventTypesRequest implements IConvertible
{
    ListWebhookEventTypesRequest();
    ListWebhookEventTypesRequest.fromJson(Map<String, dynamic> json) : super();
    fromMap(Map<String, dynamic> json) {
        return this;
    }

    Map<String, dynamic> toJson() => {};
    getTypeName() => "ListWebhookEventTypesRequest";
    TypeContext? context = _ctx;
}

TypeContext _ctx = TypeContext(library: 'api.bokamera.se', types: <String, TypeInfo> {
    'WebhookEventTypeDto': TypeInfo(TypeOf.Class, create:() => WebhookEventTypeDto()),
    'WebhookEventTypesResponse': TypeInfo(TypeOf.Class, create:() => WebhookEventTypesResponse()),
    'List<WebhookEventTypeDto>': TypeInfo(TypeOf.Class, create:() => <WebhookEventTypeDto>[]),
    'ListWebhookEventTypesRequest': TypeInfo(TypeOf.Class, create:() => ListWebhookEventTypesRequest()),
});

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

GET /webhook/eventtypes HTTP/1.1 
Host: api.bokamera.se 
Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<WebhookEventTypesResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/BokaMera.API.ServiceModel.Dtos">
  <EventTypes i:nil="true" />
</WebhookEventTypesResponse>