Exemple #1
0
        public MessagingProfileServiceTest(MockHttpClientFixture mockHttpClientFixture)
            : base(mockHttpClientFixture)
        {
            this.service             = new MessagingProfileService();
            this.phoneNumbersService = new MessagingProfilePhoneNumbersService();

            this.createOptions = new NewMessagingProfile
            {
                Name               = "Summer Campaign",
                Enabled            = true,
                NumberPoolSettings = new NumberPoolSettings()
                {
                    Geomatch       = false,
                    LongCodeWeight = new decimal(0.62),
                    SkipUnhealthy  = true,
                    StickySender   = false,
                    TollFreeWeight = new decimal(25),
                },
                UrlShortenerSettings = new UrlShortenerSettings()
                {
                    Domain = "example.ex",
                    Prefix = "abc",
                    ReplaceBlackListOnly = true,
                    SendWebhooks         = false,
                },
                ResourceGroupId    = Guid.NewGuid(),
                WebhookApiVersion  = Telnyx.net.Entities.Enum.WebhookAPIVersion.V2,
                WebhookUrl         = "webhookurl.com",
                WebhookFailoverUrl = "failureurl.com",
            };
            this.updateOptions = new MessagingProfileUpdate
            {
                Name               = "Summer Campaign 2",
                Enabled            = false,
                NumberPoolSettings = new NumberPoolSettings()
                {
                    Geomatch       = false,
                    LongCodeWeight = new decimal(0.63),
                    SkipUnhealthy  = true,
                    StickySender   = false,
                    TollFreeWeight = new decimal(26),
                },
                UrlShortenerSettings = new UrlShortenerSettings()
                {
                    Domain = "example.px",
                    Prefix = "xyz",
                    ReplaceBlackListOnly = false,
                    SendWebhooks         = true,
                },
                WhitelistedDestinations = new List <string>()
                {
                    "US", "CA"
                },
                WebhookApiVersion  = Telnyx.net.Entities.Enum.WebhookAPIVersion.V2,
                WebhookUrl         = "webhookurlupdate.com",
                WebhookFailoverUrl = "failureurlupdate.com",
            };
            this.cancellationToken         = default(CancellationToken);
            this._mockServiceForListMethod = new MockMessagingProfilePhoneNumbersService();
        }
        public MessagingProfileServiceTest(MockHttpClientFixture mockHttpClientFixture)
            : base(mockHttpClientFixture)
        {
            this.service             = new MessagingProfileService();
            this.phoneNumbersService = new MessagingProfilePhoneNumbersService();

            this.createOptions = new NewMessagingProfile
            {
                Name = "Summer Campaign"
            };
            this.updateOptions = new MessagingProfileUpdate
            {
                Name = "Summer Campaign"
            };
            this.cancellationToken = default(CancellationToken);
        }
 public MessagingProfilePhoneNumbersServiceTest(MockHttpClientFixture mockHttpClientFixture)
     : base(mockHttpClientFixture)
 {
     this.service = new MessagingProfilePhoneNumbersService();
 }