Skip to content

Commit

Permalink
Merge pull request #41 from FromDoppler/DD-1257-fix-bounce-type-deser…
Browse files Browse the repository at this point in the history
…ialization

fix: deserialize chat to enum value for bounce type
  • Loading branch information
RodrigoPereyraDiaz authored Sep 29, 2023
2 parents 65a4a8b + e730f55 commit d3988bf
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion GreenArrow.Engine/Model/Events/BounceType.cs
Original file line number Diff line number Diff line change
@@ -1,21 +1,31 @@
namespace GreenArrow.Engine.Model.Events
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using System.Runtime.Serialization;

namespace GreenArrow.Engine.Model.Events
{
/// <summary>
/// The type of bounce. h for hard, s for soft, and o for other.
/// </summary>
[JsonConverter(typeof(StringEnumConverter))]
public enum BounceType
{
/// <summary>
/// Bounce for message that not be retried
/// </summary>
[EnumMember(Value = "h")]
Hard = 'h',

/// <summary>
/// Bounce for message that can be retried
/// </summary>
[EnumMember(Value = "s")]
Soft = 's',

/// <summary>
/// Other type of bounce
/// </summary>
[EnumMember(Value = "o")]
Other = 'o',
}
}

0 comments on commit d3988bf

Please sign in to comment.