Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/verification dedicated report for each method #40

Merged
merged 7 commits into from
Feb 13, 2024

Conversation

Dovchik
Copy link
Contributor

@Dovchik Dovchik commented Feb 9, 2024

Adds dedicated for each method ReportById and ReportByIdentity

@@ -2,7 +2,7 @@

namespace Sinch.Verification.Report.Request
{
public class PhoneCallVerificationReportRequest : VerifyReportRequest
public class ReportPhoneCallVerificationRequest : VerifyReportRequest

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Various options for naming this one:

  • phone call
  • PSTN call
  • callout

In the Node.js SDK, I've chosen callout because:

  1. it's the method name in the request body
  2. it's consistent with the Voice API which also uses this term

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, makes sense

@Dovchik Dovchik requested a review from asein-sinch February 12, 2024 16:25
Copy link

@650elx 650elx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good 👌
btw. Do we have this in other languages already?

@@ -80,17 +80,17 @@ public async Task ReportFlashCallByIdentity()
[Fact]
public async Task ReportPhoneCallByIdentity()

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test title needs to be updated too

@@ -115,14 +115,14 @@ public async Task StartPhoneCallVerification()
Identity = _identity,
Method = VerificationMethodEx.Callout
};
var startPhoneCallVerificationResponse = new StartPhoneCallVerificationResponse
var startPhoneCallVerificationResponse = new StartCalloutVerificationResponse

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The variable needs to be updated as the function name

@@ -88,8 +88,8 @@ public async Task ByIdentityPhoneCall()
await VerificationClient.VerificationStatus.GetByIdentity("+49342432",
VerificationMethod.Callout);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's for verification status, which will be a separate PR

@Dovchik Dovchik requested a review from asein-sinch February 12, 2024 16:36

var response = await VerificationClient.Verification.StartCallout(new StartCalloutVerificationRequest
{
Identity = startVerificationRequest.Identity,
Reference = startVerificationRequest.Reference,
Custom = startVerificationRequest.Custom
});
response.Should().BeEquivalentTo(startPhoneCallVerificationResponse);
response.Should().BeEquivalentTo(new StartCalloutVerificationResponse

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: you may recreate a variable startCalloutVerificationResponse as it used to be and as it is in the other tests for consistent reading

@Dovchik Dovchik added enhancement New feature or request Api-Verification labels Feb 13, 2024
@Dovchik Dovchik merged commit 0f794f6 into main Feb 13, 2024
3 checks passed
@Dovchik Dovchik deleted the feat/verification-dedicated-report-for-each-method branch February 13, 2024 10:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Api-Verification enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants