Skip to content

Commit

Permalink
Added tf verification fields in list rented numbers function
Browse files Browse the repository at this point in the history
  • Loading branch information
kapilp93 committed Oct 26, 2023
1 parent a0780d5 commit 826a423
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 13 deletions.
22 changes: 14 additions & 8 deletions src/Plivo/Resource/RentedNumber/RentedNumber.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,16 @@ public class RentedNumber : Resource
public bool VoiceEnabled { get; set; }
public string VoiceRate { get; set; }

public string ComplianceApplicationId {get; set;}
public string ComplianceStatus {get; set;}
public string TendlcCampaignId {get; set;}
public string TendlcRegistrationStatus {get; set;}
public string TollFreeSmsVerification {get; set;}
public string RenewalDate {get; set;}
public string CnamLookup {get; set;}

public string ComplianceApplicationId { get; set; }
public string ComplianceStatus { get; set; }
public string TendlcCampaignId { get; set; }
public string TendlcRegistrationStatus { get; set; }
public string TollFreeSmsVerification { get; set; }
public string RenewalDate { get; set; }
public string CnamLookup { get; set; }
public string TollFreeSmsVerificationOrderStatus { get; set; }
public string TollFreeSmsVerificationId { get; set; }

public override string ToString()
{
if (string.Compare(Carrier, "Plivo", StringComparison.Ordinal) == 0)
Expand Down Expand Up @@ -69,6 +71,8 @@ public override string ToString()
"TendlcCampaignId: " + TendlcCampaignId + "\n" +
"TendlcRegistrationStatus: " + TendlcRegistrationStatus + "\n" +
"TollFreeSMSVerification: " + TollFreeSmsVerification + "\n" +
"TollFreeSmsVerificationOrderStatus: " + TollFreeSmsVerificationOrderStatus + "\n" +
"TollFreeSmsVerificationId: " + TollFreeSmsVerificationId + "\n" +
"VoiceRate: " + VoiceRate + "\n";
}
return
Expand All @@ -92,6 +96,8 @@ public override string ToString()
"TendlcCampaignId: " + TendlcCampaignId + "\n" +
"TendlcRegistrationStatus: " + TendlcRegistrationStatus + "\n" +
"TollFreeSMSVerification: " + TollFreeSmsVerification + "\n" +
"TollFreeSmsVerificationOrderStatus: " + TollFreeSmsVerificationOrderStatus + "\n" +
"TollFreeSmsVerificationId: " + TollFreeSmsVerificationId + "\n" +
"VoiceRate: " + VoiceRate + "\n";
}

Expand Down
4 changes: 3 additions & 1 deletion src/Plivo/Resource/RentedNumber/RentedNumberInterface.cs
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ public async Task<RentedNumber> GetAsync(string number)
/// <param name="renewalDate_Gt">Renewal Date Greater Than</param>
/// <param name="renewalDate_Gte">Renewal Date Greater Than or Equal</param>
/// <param name="cnamLookup">Cnam Lookup configuration</param>
/// <param name="tollFreeSmsVerificationOrderStatus">TollFree SMS Verification Order Status</param>
public ListResponse<RentedNumber> List(
string type = null, string numberStartswith = null,
string subaccount = null, string alias = null,
Expand All @@ -81,7 +82,7 @@ public ListResponse<RentedNumber> List(
string renewalDate = null,
string renewalDate_Lt = null, string renewalDate_Lte = null,
string renewalDate_Gt = null, string renewalDate_Gte = null,
string cnamLookup = null,
string cnamLookup = null, string tollFreeSmsVerificationOrderStatus = null,
uint? limit = null, uint? offset = null)
{
var mandatoryParams = new List<string> {""};
Expand All @@ -103,6 +104,7 @@ public ListResponse<RentedNumber> List(
renewalDate_Gte,
renewalDate_Gt,
cnamLookup,
tollFreeSmsVerificationOrderStatus,
limit,
offset
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,7 @@
"tendlc_registration_status": "COMPLETED",
"toll_free_sms_verification": null,
"renewal_date": "2023-05-01",
"cnam_lookup": "enabled"
"cnam_lookup": "enabled",
"toll_free_sms_verification_order_status": "REJECTED",
"toll_free_sms_verification_id": "28f736dc-680c-5ae4-6765-01732884e41e"
}
12 changes: 9 additions & 3 deletions tests_netcore/Plivo.NetCore.Test/Mocks/numberListResponse.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@
"tendlc_registration_status": "completed",
"toll_free_sms_verification": null,
"renewal_date": "2023-05-01",
"cnam_lookup": "enabled"
"cnam_lookup": "enabled",
"toll_free_sms_verification_order_status": "REJECTED",
"toll_free_sms_verification_id": "28f736dc-680c-5ae4-6765-01732884e41e"
},
{
"added_on": "2013-01-01",
Expand All @@ -48,7 +50,9 @@
"tendlc_registration_status": "completed",
"toll_free_sms_verification": null,
"renewal_date": "2023-05-01",
"cnam_lookup": "enabled"
"cnam_lookup": "enabled",
"toll_free_sms_verification_order_status": null,
"toll_free_sms_verification_id": null
},
{
"added_on": "2013-03-25",
Expand All @@ -69,7 +73,9 @@
"tendlc_registration_status": null,
"toll_free_sms_verification": "verified",
"renewal_date": "2023-05-01",
"cnam_lookup": "enabled"
"cnam_lookup": "enabled",
"toll_free_sms_verification_order_status": null,
"toll_free_sms_verification_id": null
}
]
}

0 comments on commit 826a423

Please sign in to comment.