diff --git a/src/Stripe.net/Entities/StripeOutcome.cs b/src/Stripe.net/Entities/StripeOutcome.cs
index a638e4b825..d93b7cb5a2 100755
--- a/src/Stripe.net/Entities/StripeOutcome.cs
+++ b/src/Stripe.net/Entities/StripeOutcome.cs
@@ -1,4 +1,5 @@
using Newtonsoft.Json;
+using Stripe.Infrastructure;
namespace Stripe
{
@@ -22,12 +23,25 @@ public class StripeOutcome : StripeEntityWithId
[JsonProperty("risk_level")]
public string RiskLevel { get; set; }
+ #region Expandable Rule
///
/// The ID of the Radar rule that matched the payment, if applicable.
///
- [JsonProperty("rule")]
public string RuleId { get; set; }
+ [JsonIgnore]
+ public StripeOutcomeRule Rule { get; set; }
+
+ [JsonProperty("rule")]
+ internal object InternalOutcomeRule
+ {
+ set
+ {
+ StringOrObject.Map(value, s => RuleId = s, o => Rule = o);
+ }
+ }
+ #endregion
+
///
/// A human-readable description of the outcome type and reason, designed for you (the recipient of the payment), not your customer.
///
diff --git a/src/Stripe.net/Entities/StripeOutcomeRule.cs b/src/Stripe.net/Entities/StripeOutcomeRule.cs
new file mode 100644
index 0000000000..eb9a1a1b8d
--- /dev/null
+++ b/src/Stripe.net/Entities/StripeOutcomeRule.cs
@@ -0,0 +1,13 @@
+using Newtonsoft.Json;
+
+namespace Stripe
+{
+ public class StripeOutcomeRule : StripeEntityWithId
+ {
+ [JsonProperty("action")]
+ public string Action { get; set; }
+
+ [JsonProperty("predicate")]
+ public string Predicate { get; set; }
+ }
+}