-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* create tollfree verification api integration * Update unitTests.yml * Update unitTests.yml * Added support for additional tollfree verification apis * Added tf verification fields in list rented numbers function * added updated_at in tf verification * renamed created filters * renamed created lastmodified and error message * reverted local changes * bump version --------- Co-authored-by: kalyan-plivo <[email protected]>
- Loading branch information
1 parent
b07ae29
commit 3440b97
Showing
21 changed files
with
1,210 additions
and
20 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
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,6 @@ | ||
namespace Plivo.Resource.TollfreeVerification | ||
{ | ||
public class AsyncResponse : BaseResponse | ||
{ | ||
} | ||
} |
164 changes: 164 additions & 0 deletions
164
src/Plivo/Resource/TollfreeVerification/TollfreeVerification.cs
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,164 @@ | ||
using System; | ||
using System.Threading.Tasks; | ||
|
||
namespace Plivo.Resource.TollfreeVerification | ||
{ | ||
/// <summary> | ||
/// TollfreeVerification. | ||
/// </summary> | ||
public class TollfreeVerification : Resource | ||
{ | ||
public string Uuid { get; set; } | ||
public string ProfileUuid { get; set; } | ||
public string Number { get; set; } | ||
public string Usecase { get; set; } | ||
public string UsecaseSummary { get; set; } | ||
public string MessageSample { get; set; } | ||
public string OptinImageUrl { get; set; } | ||
public string OptinType { get; set; } | ||
public string Volume { get; set; } | ||
public string AdditionalInformation { get; set; } | ||
public string ExtraData { get; set; } | ||
public string CallbackUrl { get; set; } | ||
public string CallbackMethod { get; set; } | ||
public string Status { get; set; } | ||
public string ErrorMessage { get; set; } | ||
public string Created { get; set; } | ||
public string LastModified { get; set; } | ||
|
||
public TollfreeVerification() | ||
{ | ||
} | ||
|
||
#region Delete | ||
|
||
/// <summary> | ||
/// Delete this instance. | ||
/// </summary> | ||
/// <returns>The delete.</returns> | ||
public DeleteResponse<TollfreeVerification> Delete() | ||
{ | ||
return ((TollfreeVerificationInterface)Interface).Delete(Uuid); | ||
} | ||
|
||
/// <summary> | ||
/// Asynchronously delete this instance. | ||
/// </summary> | ||
/// <returns>The delete.</returns> | ||
public async Task<AsyncResponse> DeleteAsync() | ||
{ | ||
return await ((TollfreeVerificationInterface)Interface).DeleteAsync(Uuid); | ||
} | ||
|
||
#endregion | ||
|
||
#region Update | ||
|
||
/// <summary> | ||
/// Update Tollfree Verification request with the specified profileUuid, usecase, usecaseSummary, messageSample, optinImageUrl, | ||
/// optinType, volume, additionalInformation, extraData, callbackUrl, callbackMethod. | ||
/// </summary> | ||
/// <returns>The update.</returns> | ||
/// <param name="profileUuid">The profile UUID.</param> | ||
/// <param name="usecase">The use case, e.g., "2FA, App Notifications".</param> | ||
/// <param name="usecaseSummary">The summary of the use case.</param> | ||
/// <param name="messageSample">Sample messages associated with the use case.</param> | ||
/// <param name="optinImageUrl">The URL of the opt-in image.</param> | ||
/// <param name="optinType">The type of opt-in.</param> | ||
/// <param name="volume">The message volume.</param> | ||
/// <param name="additionalInformation">Additional information.</param> | ||
/// <param name="extraData">Extra data.</param> | ||
/// <param name="callbackUrl">The callback URL.</param> | ||
/// <param name="callbackMethod">The callback method.</param> | ||
public UpdateResponse<TollfreeVerification> Update( | ||
string profileUuid = null, string usecase = null, string usecaseSummary = null, | ||
string messageSample = null, string optinImageUrl = null, string optinType = null, string volume = null, | ||
string additionalInformation = null, string extraData = null, string callbackUrl = null, | ||
string callbackMethod = null) | ||
{ | ||
var updateResponse = ((TollfreeVerificationInterface)Interface).Update( | ||
Uuid, profileUuid, usecase, usecaseSummary, messageSample, | ||
optinImageUrl, optinType, volume, additionalInformation, | ||
extraData, callbackUrl, callbackMethod); | ||
|
||
if (profileUuid != null) ProfileUuid = profileUuid; | ||
if (usecase != null) Usecase = usecase; | ||
if (usecaseSummary != null) UsecaseSummary = usecaseSummary; | ||
if (messageSample != null) MessageSample = messageSample; | ||
if (optinImageUrl != null) OptinImageUrl = optinImageUrl; | ||
if (optinType != null) OptinType = optinType; | ||
if (volume != null) Volume = volume; | ||
if (additionalInformation != null) AdditionalInformation = additionalInformation; | ||
if (extraData != null) ExtraData = extraData; | ||
if (callbackUrl != null) CallbackUrl = callbackUrl; | ||
if (callbackMethod != null) CallbackMethod = callbackMethod; | ||
|
||
return updateResponse; | ||
} | ||
|
||
/// <summary> | ||
/// Asynchronously Update Tollfree Verification request with the specified profileUuid, usecase, usecaseSummary, messageSample, optinImageUrl, | ||
/// optinType, volume, additionalInformation, extraData, callbackUrl, callbackMethod. | ||
/// </summary> | ||
/// <returns>The update.</returns> | ||
/// <param name="profileUuid">The profile UUID.</param> | ||
/// <param name="usecase">The use case, e.g., "2FA, App Notifications".</param> | ||
/// <param name="usecaseSummary">The summary of the use case.</param> | ||
/// <param name="messageSample">Sample messages associated with the use case.</param> | ||
/// <param name="optinImageUrl">The URL of the opt-in image.</param> | ||
/// <param name="optinType">The type of opt-in.</param> | ||
/// <param name="volume">The message volume.</param> | ||
/// <param name="additionalInformation">Additional information.</param> | ||
/// <param name="extraData">Extra data.</param> | ||
/// <param name="callbackUrl">The callback URL.</param> | ||
/// <param name="callbackMethod">The callback method.</param> | ||
public async Task<AsyncResponse> UpdateAsync( | ||
string profileUuid = null, string usecase = null, string usecaseSummary = null, | ||
string messageSample = null, string optinImageUrl = null, string optinType = null, string volume = null, | ||
string additionalInformation = null, string extraData = null, string callbackUrl = null, | ||
string callbackMethod = null) | ||
{ | ||
var updateResponse = await ((TollfreeVerificationInterface)Interface).UpdateAsync( | ||
Uuid, profileUuid, usecase, usecaseSummary, messageSample, optinImageUrl, optinType, volume, | ||
additionalInformation, extraData, callbackUrl, callbackMethod); | ||
|
||
if (profileUuid != null) ProfileUuid = profileUuid; | ||
if (usecase != null) Usecase = usecase; | ||
if (usecaseSummary != null) UsecaseSummary = usecaseSummary; | ||
if (messageSample != null) MessageSample = messageSample; | ||
if (optinImageUrl != null) OptinImageUrl = optinImageUrl; | ||
if (optinType != null) OptinType = optinType; | ||
if (volume != null) Volume = volume; | ||
if (additionalInformation != null) AdditionalInformation = additionalInformation; | ||
if (extraData != null) ExtraData = extraData; | ||
if (callbackUrl != null) CallbackUrl = callbackUrl; | ||
if (callbackMethod != null) CallbackMethod = callbackMethod; | ||
|
||
return updateResponse; | ||
} | ||
|
||
#endregion | ||
|
||
public override string ToString() | ||
{ | ||
return "\n" + | ||
"UUID: " + Uuid + "\n" + | ||
"ProfileUuid: " + ProfileUuid + "\n" + | ||
"Number: " + Number + "\n" + | ||
"Usecase: " + Usecase + "\n" + | ||
"UsecaseSummary: " + UsecaseSummary + "\n" + | ||
"MessageSample: " + MessageSample + "\n" + | ||
"OptinImageUrl: " + OptinImageUrl + "\n" + | ||
"OptinType: " + OptinType + "\n" + | ||
"Volume: " + Volume + "\n" + | ||
"AdditionalInformation: " + AdditionalInformation + "\n" + | ||
"ExtraData: " + ExtraData + "\n" + | ||
"CallbackUrl: " + CallbackUrl + "\n" + | ||
"CallbackMethod: " + CallbackMethod + "\n" + | ||
"Status: " + Status + "\n" + | ||
"ErrorMessage: " + ErrorMessage + "\n" + | ||
"Created: " + Created + "\n" + | ||
"LastModified: " + LastModified + "\n"; | ||
} | ||
} | ||
} |
20 changes: 20 additions & 0 deletions
20
src/Plivo/Resource/TollfreeVerification/TollfreeVerificationCreateResponse.cs
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,20 @@ | ||
namespace Plivo.Resource.TollfreeVerification | ||
{ | ||
public class TollfreeVerificationCreateResponse : CreateResponse | ||
{ | ||
/// <summary> | ||
/// Gets or sets the request uuid. | ||
/// </summary> | ||
/// <value>The tollfree verification request identifier.</value> | ||
public string Uuid { get; set; } | ||
/// <summary> | ||
/// Returns a <see cref="T:System.String"/> that represents the current <see cref="T:plivo.Resource.TollfreeVerification.TollfreeVerificationCreateResponse"/>. | ||
/// </summary> | ||
/// <returns>A <see cref="T:System.String"/> that represents the current <see cref="T:plivo.Resource.TollfreeVerification.TollfreeVerificationCreateResponse"/>.</returns> | ||
public override string ToString() | ||
{ | ||
return base.ToString() + | ||
"UUID: " + Uuid + "\n"; | ||
} | ||
} | ||
} |
Oops, something went wrong.