-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathKnowYourCustomerTasks.cs
33 lines (29 loc) · 1.18 KB
/
KnowYourCustomerTasks.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
using LittleHorse.Sdk.Worker;
namespace QuickStart.Dotnet
{
public class KnowYourCustomerTasks
{
private static readonly Random random = new Random();
[LHTaskMethod("verify-identity")]
public string VerifyIdentity(string firstName, string lastName, int ssn)
{
if (random.NextDouble() < 0.25)
{
throw new Exception("The external identity verification API is down");
}
return "Successfully called external API to request verification for " + firstName + " " + lastName;
}
[LHTaskMethod("notify-customer-not-verified")]
public string NotifyCustomerNotVerified(string firstName, string lastName)
{
return "Notification sent to customer " + firstName + " " + lastName
+ " that their identity has not been verified";
}
[LHTaskMethod("notify-customer-verified")]
public string NotifyCustomerVerified(string firstName, string lastName)
{
return "Notification sent to customer " + firstName + " " + lastName
+ " that their identity has been verified";
}
}
}