Requires any of the roles: | bookingsupplier-administrator-write, superadmin |
PUT | /webhook/settings | Enable or disable webhook feature for the company | Sets the webhook feature flag for the company identified by the API key in the header |
---|
import 'package:servicestack/servicestack.dart';
class WebhookSettingsResponse implements IConvertible
{
bool? Enabled;
String? Message;
String? CompanyId;
WebhookSettingsResponse({this.Enabled,this.Message,this.CompanyId});
WebhookSettingsResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Enabled = json['Enabled'];
Message = json['Message'];
CompanyId = json['CompanyId'];
return this;
}
Map<String, dynamic> toJson() => {
'Enabled': Enabled,
'Message': Message,
'CompanyId': CompanyId
};
getTypeName() => "WebhookSettingsResponse";
TypeContext? context = _ctx;
}
class UpdateWebhookSettingsRequest implements ICompany, IConvertible
{
/**
* The company id, if empty will use the company id for the user you are logged in with.
*/
// @ApiMember(Description="The company id, if empty will use the company id for the user you are logged in with.", IsRequired=true, ParameterType="query")
String? CompanyId;
// @Required()
// @ApiMember()
bool? Enabled;
UpdateWebhookSettingsRequest({this.CompanyId,this.Enabled});
UpdateWebhookSettingsRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
CompanyId = json['CompanyId'];
Enabled = json['Enabled'];
return this;
}
Map<String, dynamic> toJson() => {
'CompanyId': CompanyId,
'Enabled': Enabled
};
getTypeName() => "UpdateWebhookSettingsRequest";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'api.bokamera.se', types: <String, TypeInfo> {
'WebhookSettingsResponse': TypeInfo(TypeOf.Class, create:() => WebhookSettingsResponse()),
'UpdateWebhookSettingsRequest': TypeInfo(TypeOf.Class, create:() => UpdateWebhookSettingsRequest()),
});
Dart UpdateWebhookSettingsRequest 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
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
PUT /webhook/settings HTTP/1.1
Host: api.bokamera.se
Accept: application/json
Content-Type: application/json
Content-Length: length
{"CompanyId":"00000000-0000-0000-0000-000000000000","Enabled":false}
HTTP/1.1 200 OK Content-Type: application/json Content-Length: length {"Enabled":false,"Message":"String"}