| | | 1 | | namespace Estud.Back.Features.Webhooks.GetWebhookSubscription; |
| | | 2 | | |
| | | 3 | | public class GetWebhookSubscriptionOut : IApiDto<GetWebhookSubscriptionOut> |
| | | 4 | | { |
| | 14 | 5 | | public int Id { get; set; } |
| | 16 | 6 | | public string Name { get; set; } |
| | 16 | 7 | | public string Url { get; set; } |
| | 16 | 8 | | public bool IsActive { get; set; } |
| | 20 | 9 | | public List<WebhookEventType> Events { get; set; } |
| | 24 | 10 | | public Dictionary<string, string> CustomHeaders { get; set; } = []; |
| | 12 | 11 | | public DateTime CreatedAt { get; set; } |
| | | 12 | | |
| | | 13 | | public static IEnumerable<(string, GetWebhookSubscriptionOut)> GetExamples() => |
| | 0 | 14 | | [ |
| | 0 | 15 | | ("Exemplo", |
| | 0 | 16 | | new GetWebhookSubscriptionOut |
| | 0 | 17 | | { |
| | 0 | 18 | | Id = 1, |
| | 0 | 19 | | Name = "Aluno criado", |
| | 0 | 20 | | Url = "https://webhook.site/my-webhook", |
| | 0 | 21 | | IsActive = true, |
| | 0 | 22 | | Events = [WebhookEventType.StudentCreated], |
| | 0 | 23 | | CustomHeaders = new() { ["Estud-AuthToken"] = "6r4g654rs6g4we6f4qw684f68qwf4" }, |
| | 0 | 24 | | CreatedAt = DateTime.UtcNow, |
| | 0 | 25 | | }), |
| | 0 | 26 | | ]; |
| | | 27 | | } |