using Microsoft.AspNetCore.Http; using Newtonsoft.Json; namespace Nop.Plugin.Misc.Zettle.Domain.Api.Pusher; /// /// Represents request to create the webhook subscriptions /// public class CreateSubscriptionRequest : PusherApiRequest { /// /// Gets or sets the unique identifier as UUID version 1 /// [JsonProperty(PropertyName = "uuid")] public string Uuid { get; set; } /// /// Gets or sets the message option (currently only WEBHOOK is supported) /// [JsonProperty(PropertyName = "transportName")] public string TransportName { get; set; } /// /// Gets or sets the event names to subscribe /// [JsonProperty(PropertyName = "eventNames")] public List EventNames { get; set; } /// /// Gets or sets the publicly exposed service URL /// [JsonProperty(PropertyName = "destination")] public string Destination { get; set; } /// /// Gets or sets the email address used to notify in case of any errors in subscription or the destination /// [JsonProperty(PropertyName = "contactEmail")] public string ContactEmail { get; set; } /// /// Gets the request path /// public override string Path => "organizations/self/subscriptions"; /// /// Gets the request method /// public override string Method => HttpMethods.Post; }