forked from Vonage/vonage-dotnet-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
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 Vonage#207 from Nexmo/psd2
Adding Psd2 functionality
- Loading branch information
Showing
9 changed files
with
167 additions
and
52 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
using Newtonsoft.Json; | ||
|
||
namespace Nexmo.Api.Verify | ||
{ | ||
public class Psd2Request : VerifyRequestBase | ||
{ | ||
public enum Workflow | ||
{ | ||
SMS_TTS_TTS = 1, | ||
SMS_SMS_TTS = 1, | ||
TTS_TTS = 3, | ||
SMS_SMS = 4, | ||
SMS_TTS = 5, | ||
SMS = 6, | ||
TTS = 7 | ||
} | ||
|
||
/// <summary> | ||
/// An alphanumeric string to indicate to the user the | ||
/// name of the recipient that they are confirming a payment to. | ||
/// </summary> | ||
[JsonProperty("payee")] | ||
public string Payee { get; set; } | ||
|
||
/// <summary> | ||
/// The Decimal amount of the payment to be confirmed, in Euros | ||
/// </summary> | ||
[JsonProperty("amount")] | ||
public double? Amount { get; set; } | ||
|
||
/// <summary> | ||
/// Selects the predefined sequence of SMS and TTS (Text To Speech) actions to use in order to convey the PIN to your user. | ||
/// For example, an id of 1 identifies the workflow SMS - TTS - TTS. | ||
/// For a list of all workflows and their associated ids, please visit the developer portal. | ||
/// </summary> | ||
[JsonProperty("workflow_id")] | ||
public Workflow? WorkflowId { 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
using Newtonsoft.Json; | ||
|
||
namespace Nexmo.Api.Verify | ||
{ | ||
public class VerifyRequestBase | ||
{ | ||
/// <summary> | ||
/// The mobile or landline phone number to verify. Unless you are setting country explicitly, this number must be in E.164 format. | ||
/// </summary> | ||
[JsonProperty("number")] | ||
public string Number { get; set; } | ||
|
||
/// <summary> | ||
/// If you do not provide number in international format or you are not sure if number is correctly formatted, specify the two-character country code in country. Verify will then format the number for you. | ||
/// </summary> | ||
[JsonProperty("country")] | ||
public string Country { get; set; } | ||
|
||
/// <summary> | ||
/// The length of the verification code. Must be 4 or 6 | ||
/// </summary> | ||
[JsonProperty("code_length")] | ||
public int CodeLength { get; set; } | ||
|
||
/// <summary> | ||
/// By default, the SMS or text-to-speech (TTS) message is generated in the locale that matches the number. | ||
/// For example, the text message or TTS message for a 33* number is sent in French. | ||
/// Use this parameter to explicitly control the language used for the Verify request. | ||
/// A list of languages is available: https://developer.nexmo.com/verify/guides/verify-languages | ||
/// </summary> | ||
[JsonProperty("lg")] | ||
public string Lg { get; set; } | ||
|
||
/// <summary> | ||
/// How long the generated verification code is valid for, in seconds. | ||
/// When you specify both pin_expiry and next_event_wait then pin_expiry must be an integer | ||
/// multiple of next_event_wait otherwise pin_expiry is defaulted to equal next_event_wait. | ||
/// See changing the event timings: https://developer.nexmo.com/verify/guides/changing-default-timings. | ||
/// </summary> | ||
[JsonProperty("pin_expiry")] | ||
public int PinExpiry { get; set; } | ||
|
||
/// <summary> | ||
/// Specifies the wait time in seconds between attempts to deliver the verification code. | ||
/// Must be between 60 and 900 | ||
/// </summary> | ||
[JsonProperty("next_event_wait")] | ||
public int NextEventWait { get; set; } | ||
} | ||
} |