Exemple #1
0
        internal NumberConfigurationResponse(PstnConfiguration pstnConfiguration)
        {
            if (pstnConfiguration == null)
            {
                throw new ArgumentNullException(nameof(pstnConfiguration));
            }

            PstnConfiguration = pstnConfiguration;
        }
        internal static NumberConfigurationResponse DeserializeNumberConfigurationResponse(JsonElement element)
        {
            PstnConfiguration pstnConfiguration = default;

            foreach (var property in element.EnumerateObject())
            {
                if (property.NameEquals("pstnConfiguration"))
                {
                    pstnConfiguration = PstnConfiguration.DeserializePstnConfiguration(property.Value);
                    continue;
                }
            }
            return(new NumberConfigurationResponse(pstnConfiguration));
        }
        public NumberConfiguration(PstnConfiguration pstnConfiguration, string phoneNumber)
        {
            if (pstnConfiguration == null)
            {
                throw new ArgumentNullException(nameof(pstnConfiguration));
            }
            if (phoneNumber == null)
            {
                throw new ArgumentNullException(nameof(phoneNumber));
            }

            PstnConfiguration = pstnConfiguration;
            PhoneNumber       = phoneNumber;
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="NumberConfigurationResponse"/> class.
 /// </summary>
 /// <param name="pstnConfiguration"> Definition for pstn number configuration. </param>
 /// <returns>A new <see cref="NumberConfigurationResponse"/> instance for mocking.</returns>
 public static NumberConfigurationResponse NumberConfigurationResponse(PstnConfiguration pstnConfiguration)
 => new NumberConfigurationResponse(pstnConfiguration);