using Microsoft.AspNetCore.Http; using Newtonsoft.Json; namespace Nop.Plugin.Payments.PayPalCommerce.Services.Api.Webhooks; /// /// Represents the request to get all webhooks for an app /// public class GetWebhooksRequest : IAuthorizedRequest { #region Properties /// /// Gets or sets the anchor type ("APPLICATION" (default) or "ACCOUNT") /// [JsonIgnore] public string AnchorType { get; set; } /// /// Gets the request path /// [JsonIgnore] public string Path => $"v1/notifications/webhooks?{(!string.IsNullOrEmpty(AnchorType) ? $"anchor_type={Uri.EscapeDataString(AnchorType)}" : null)}"; /// /// Gets the request method /// [JsonIgnore] public string Method => HttpMethods.Get; #endregion }