|
| 1 | +// !!! |
| 2 | +// WARNING: This file is autogenerated |
| 3 | +// Only modify code within MANUAL() sections |
| 4 | +// or your changes may be overwritten later! |
| 5 | +// !!! |
| 6 | + |
| 7 | +using System; |
| 8 | +using System.Collections.Generic; |
| 9 | +using System.Runtime.Serialization; |
| 10 | +using Newtonsoft.Json; |
| 11 | +using Newtonsoft.Json.Converters; |
| 12 | + |
| 13 | +namespace Stytch.net.Models |
| 14 | +{ |
| 15 | + /// <summary> |
| 16 | + /// Request type for <see cref="Stytch.net.Clients.Consumer.Fraud.Email.Risk"/>.. |
| 17 | + /// </summary> |
| 18 | + public class FraudEmailRiskRequest |
| 19 | + { |
| 20 | + /// <summary> |
| 21 | + /// The email address to check. |
| 22 | + /// </summary> |
| 23 | + [JsonProperty("email_address")] |
| 24 | + public string EmailAddress { get; set; } |
| 25 | + public FraudEmailRiskRequest(string emailAddress) |
| 26 | + { |
| 27 | + this.EmailAddress = emailAddress; |
| 28 | + } |
| 29 | + } |
| 30 | + /// <summary> |
| 31 | + /// Response type for <see cref="Stytch.net.Clients.Consumer.Fraud.Email.Risk"/>.. |
| 32 | + /// </summary> |
| 33 | + public class FraudEmailRiskResponse |
| 34 | + { |
| 35 | + /// <summary> |
| 36 | + /// Globally unique UUID that is returned with every API call. This value is important to log for debugging |
| 37 | + /// purposes; we may ask for this value to help identify a specific API call when helping you debug an issue. |
| 38 | + /// </summary> |
| 39 | + [JsonProperty("request_id")] |
| 40 | + public string RequestId { get; set; } |
| 41 | + /// <summary> |
| 42 | + /// Information about the email address. |
| 43 | + /// </summary> |
| 44 | + [JsonProperty("address_information")] |
| 45 | + public AddressInformation AddressInformation { get; set; } |
| 46 | + /// <summary> |
| 47 | + /// Information about the email domain. |
| 48 | + /// </summary> |
| 49 | + [JsonProperty("domain_information")] |
| 50 | + public DomainInformation DomainInformation { get; set; } |
| 51 | + /// <summary> |
| 52 | + /// The suggested action based on the attributes of the email address. The available actions are: |
| 53 | + /// * `ALLOW` - This email is most likely safe to send to and not fraudulent. |
| 54 | + /// * `BLOCK` - This email is invalid or exhibits signs of fraud. We recommend blocking the end user. |
| 55 | + /// * `CHALLENGE` - This email has some potentially fraudulent attributes. We recommend increased friction |
| 56 | + /// such as 2FA or other forms of extended user verification before allowing the privileged action to |
| 57 | + /// proceed. |
| 58 | + /// |
| 59 | + /// </summary> |
| 60 | + [JsonProperty("action")] |
| 61 | + public RiskResponseAction Action { get; set; } |
| 62 | + /// <summary> |
| 63 | + /// A score from 0 to 100 indicating how risky the email is. 100 is the most risky. |
| 64 | + /// </summary> |
| 65 | + [JsonProperty("risk_score")] |
| 66 | + public int RiskScore { get; set; } |
| 67 | + /// <summary> |
| 68 | + /// The HTTP status code of the response. Stytch follows standard HTTP response status code patterns, e.g. |
| 69 | + /// 2XX values equate to success, 3XX values are redirects, 4XX are client errors, and 5XX are server errors. |
| 70 | + /// </summary> |
| 71 | + [JsonProperty("status_code")] |
| 72 | + public int StatusCode { get; set; } |
| 73 | + } |
| 74 | + |
| 75 | + [JsonConverter(typeof(StringEnumConverter))] |
| 76 | + public enum RiskResponseAction |
| 77 | + { |
| 78 | + [EnumMember(Value = "ALLOW")] |
| 79 | + ALLOW, |
| 80 | + [EnumMember(Value = "CHALLENGE")] |
| 81 | + CHALLENGE, |
| 82 | + [EnumMember(Value = "BLOCK")] |
| 83 | + BLOCK, |
| 84 | + } |
| 85 | +} |
0 commit comments