BokaMera.API.Host

<back to all web services

GetStripeWebhooks

Requires Authentication
Requires any of the roles:bookingsupplier-administrator-write, bookingsupplier-administrator-read, superadmin
The following routes are available for this service:
GET/payment/stripe/v1/webhookGet stripe api webhooksReturns webhooks for bokamera
import 'package:servicestack/servicestack.dart';

class StripeWebhookResponse implements IConvertible
{
    String? Id;
    List<String>? Events;
    String? Url;

    StripeWebhookResponse({this.Id,this.Events,this.Url});
    StripeWebhookResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

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

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

class StripeWebhooksResponse implements IConvertible
{
    List<StripeWebhookResponse>? StripeWebhooks;

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

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

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

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

// @ValidateRequest(Validator="IsAuthenticated")
class GetStripeWebhooks 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.")
    String? CompanyId;

    /**
    * Webhook Id to update events
    */
    // @ApiMember(Description="Webhook Id to update events")
    String? WebhookId;

    GetStripeWebhooks({this.CompanyId,this.WebhookId});
    GetStripeWebhooks.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

    Map<String, dynamic> toJson() => {
        'CompanyId': CompanyId,
        'WebhookId': WebhookId
    };

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

TypeContext _ctx = TypeContext(library: 'testapi.bokamera.se', types: <String, TypeInfo> {
    'StripeWebhookResponse': TypeInfo(TypeOf.Class, create:() => StripeWebhookResponse()),
    'StripeWebhooksResponse': TypeInfo(TypeOf.Class, create:() => StripeWebhooksResponse()),
    'List<StripeWebhookResponse>': TypeInfo(TypeOf.Class, create:() => <StripeWebhookResponse>[]),
    'GetStripeWebhooks': TypeInfo(TypeOf.Class, create:() => GetStripeWebhooks()),
});

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

GET /payment/stripe/v1/webhook HTTP/1.1 
Host: testapi.bokamera.se 
Accept: application/json
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"StripeWebhooks":[{"Id":"String","Events":["String"],"Url":"String"}]}