POST | /webhooks/terms | Webhook from prismic |
---|
import 'package:servicestack/servicestack.dart';
class WebhookAgreements implements IConvertible
{
String? id;
String? label;
List<String>? documents;
WebhookAgreements({this.id,this.label,this.documents});
WebhookAgreements.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
id = json['id'];
label = json['label'];
documents = JsonConverters.fromJson(json['documents'],'List<String>',context!);
return this;
}
Map<String, dynamic> toJson() => {
'id': id,
'label': label,
'documents': JsonConverters.toJson(documents,'List<String>',context!)
};
getTypeName() => "WebhookAgreements";
TypeContext? context = _ctx;
}
class Releases implements IConvertible
{
List<WebhookAgreements>? deletion;
Releases({this.deletion});
Releases.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
deletion = JsonConverters.fromJson(json['deletion'],'List<WebhookAgreements>',context!);
return this;
}
Map<String, dynamic> toJson() => {
'deletion': JsonConverters.toJson(deletion,'List<WebhookAgreements>',context!)
};
getTypeName() => "Releases";
TypeContext? context = _ctx;
}
// @ApiResponse(Description="Returned if there is a validation error on the input parameters", StatusCode=400)
// @ApiResponse(Description="Returned if the current user is not allowed to perform the action", StatusCode=401)
class WebhookCreateAgreement implements IConvertible
{
Releases? releases;
List<String>? documents;
String? secret;
WebhookCreateAgreement({this.releases,this.documents,this.secret});
WebhookCreateAgreement.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
releases = JsonConverters.fromJson(json['releases'],'Releases',context!);
documents = JsonConverters.fromJson(json['documents'],'List<String>',context!);
secret = json['secret'];
return this;
}
Map<String, dynamic> toJson() => {
'releases': JsonConverters.toJson(releases,'Releases',context!),
'documents': JsonConverters.toJson(documents,'List<String>',context!),
'secret': secret
};
getTypeName() => "WebhookCreateAgreement";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'api.bokamera.se', types: <String, TypeInfo> {
'WebhookAgreements': TypeInfo(TypeOf.Class, create:() => WebhookAgreements()),
'Releases': TypeInfo(TypeOf.Class, create:() => Releases()),
'List<WebhookAgreements>': TypeInfo(TypeOf.Class, create:() => <WebhookAgreements>[]),
'WebhookCreateAgreement': TypeInfo(TypeOf.Class, create:() => WebhookCreateAgreement()),
});
Dart WebhookCreateAgreement DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /webhooks/terms HTTP/1.1
Host: api.bokamera.se
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length
{"releases":{"deletion":[{"id":"String","label":"String","documents":["String"]}]},"documents":["String"],"secret":"String"}
HTTP/1.1 200 OK Content-Type: text/jsonl Content-Length: length {}