Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible error in MessageMedia.Messages.Models.Message #17

Open
jason-russell opened this issue Feb 25, 2022 · 0 comments
Open

Possible error in MessageMedia.Messages.Models.Message #17

jason-russell opened this issue Feb 25, 2022 · 0 comments

Comments

@jason-russell
Copy link

I think there's an error in the (C#) model for Message
According to the documentation:

Specifying a source number type is only valid when the source_number parameter is specified and is optional

However in the model, this is a non-nullable property:

/// <summary>
/// Type of source address specified
/// </summary>
[JsonProperty("source_number_type", NullValueHandling = NullValueHandling.Ignore)]
[JsonConverter(typeof(StringEnumConverter))]
public NumberType SourceNumberType { get; set; }

I think this needs to be nullable

public NumberType? SourceNumberType { get; set; }  

When I try to submit a message where this is non-nullable, the response fails with an internal error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant