< Summary - Syki

Information
Class: Syki.Back.Features.Webhooks.CreateWebhookSubscription.CreateWebhookSubscriptionIn
Assembly: Back
File(s): /home/runner/work/syki/syki/Back/Features/Webhooks/CreateWebhookSubscription/CreateWebhookSubscriptionIn.cs
Tag: 97_27801654829
Line coverage
0%
Covered lines: 0
Uncovered lines: 19
Coverable lines: 19
Total lines: 37
Line coverage: 0%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
get_Name()100%210%
get_Url()100%210%
get_Events()100%210%
GetExamples()100%210%

File(s)

/home/runner/work/syki/syki/Back/Features/Webhooks/CreateWebhookSubscription/CreateWebhookSubscriptionIn.cs

#LineLine coverage
 1namespace Syki.Back.Features.Webhooks.CreateWebhookSubscription;
 2
 3public class CreateWebhookSubscriptionIn : IApiDto<CreateWebhookSubscriptionIn>
 4{
 5    /// <summary>
 6    /// Nome descritivo para o Webhook.
 7    /// </summary>
 08    public string Name { get; set; }
 9
 10    /// <summary>
 11    /// Url do Webhook.
 12    /// </summary>
 013    public string Url { get; set; }
 14
 15    /// <summary>
 16    /// Lista de eventos que serão enviados para o Webhook.
 17    /// </summary>
 018    public List<WebhookEventType> Events { get; set; }
 19
 20    public static IEnumerable<(string, CreateWebhookSubscriptionIn)> GetExamples() =>
 021    [
 022        ("Aluno criado",
 023        new CreateWebhookSubscriptionIn
 024        {
 025            Name = "Aluno criado",
 026            Url = "https://webhook.site/my-webhook",
 027            Events = [WebhookEventType.StudentCreated]
 028        }),
 029        ("Atividade publicada",
 030        new CreateWebhookSubscriptionIn
 031        {
 032            Name = "Atividade publicada",
 033            Url = "https://webhook.site/my-other-webhook",
 034            Events = [WebhookEventType.ClassActivityCreated]
 035        }),
 036    ];
 37}