-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #102 from Riskified/Otp
TIS-775 Otp
- Loading branch information
Showing
10 changed files
with
139 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
using Newtonsoft.Json; | ||
|
||
namespace Riskified.SDK.Model.OrderElements | ||
{ | ||
public class ChannelMethod | ||
{ | ||
public ChannelMethod(ChannelType channelType, string senderName) | ||
{ | ||
ChannelType = channelType; | ||
SenderName = senderName; | ||
} | ||
|
||
[JsonProperty(PropertyName = "channel_type")] | ||
public ChannelType ChannelType { get; set; } | ||
|
||
[JsonProperty(PropertyName = "sender_name")] | ||
public string SenderName { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
using System.Runtime.Serialization; | ||
|
||
namespace Riskified.SDK.Model.OrderElements | ||
{ | ||
public enum ChannelType | ||
{ | ||
[EnumMember(Value = "Sms")] | ||
sms | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
using System; | ||
using Newtonsoft.Json; | ||
using Riskified.SDK.Utils; | ||
|
||
namespace Riskified.SDK.Model.OrderElements | ||
{ | ||
public class OtpInitiate : IJsonSerializable | ||
{ | ||
public OtpInitiate(string id, string challengeAccessToken, string localizationLanguage, string contactDetails, ChannelMethod channelMethod) | ||
{ | ||
Id = id; | ||
ChallengeAccesstoken = challengeAccessToken; | ||
LocalizationLanguage = localizationLanguage; | ||
ContactDetails = contactDetails; | ||
ChannelMethod = channelMethod; | ||
} | ||
|
||
[JsonProperty(PropertyName = "id")] | ||
public string Id { get; set; } | ||
|
||
[JsonProperty(PropertyName = "challenge_access_token")] | ||
public string ChallengeAccesstoken { get; set; } | ||
|
||
[JsonProperty(PropertyName = "localization_language")] | ||
public string LocalizationLanguage { get; set; } | ||
|
||
[JsonProperty(PropertyName = "contact_details")] | ||
public string ContactDetails { get; set; } | ||
|
||
[JsonProperty(PropertyName = "channel_method")] | ||
public ChannelMethod ChannelMethod { get; set; } | ||
|
||
public void Validate(Validations validationType = Validations.Weak) | ||
{ | ||
InputValidators.ValidateValuedString(Id, "Merchant Order ID"); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
using System; | ||
using Newtonsoft.Json; | ||
using Riskified.SDK.Utils; | ||
|
||
namespace Riskified.SDK.Model.OrderElements | ||
{ | ||
public class RecoveryEligibility : IJsonSerializable | ||
{ | ||
public RecoveryEligibility(string id, string status, string verifiedAt, string challengeType) | ||
{ | ||
Id = id; | ||
Status = status; | ||
VerifiedAt = verifiedAt; | ||
ChallengeType = challengeType; | ||
|
||
} | ||
|
||
public void Validate(Validations validationType = Validations.Weak) | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
|
||
[JsonProperty(PropertyName = "id")] | ||
public string Id { get; set; } | ||
|
||
[JsonProperty(PropertyName = "status")] | ||
public string Status { get; set; } | ||
|
||
[JsonProperty(PropertyName = "verified_at")] | ||
public string VerifiedAt { get; set; } | ||
|
||
[JsonProperty(PropertyName = "challenge_type")] | ||
public string ChallengeType { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters