Vonage / vonage-php-sdk-core

Vonage REST API client for PHP. API support for SMS, Voice, Text-to-Speech, Numbers, Verify (2FA) and more.
https://developer.vonage.com/
Apache License 2.0
916 stars 180 forks source link

Feature/voice machine detection #404

Closed SecondeJK closed 1 year ago

SecondeJK commented 1 year ago

This PR adds Advanced Machine Detection to the Connect NCCO and Outbound Call method.

Description

This has been done as a value object for better developer experience. The value object, Vonage\Voice\VoiceObjects\AdvancedMachineDetection also has API validation baked-in.

How Has This Been Tested?

Relevent tests have been written.

Types of changes

Checklist:

codecov-commenter commented 1 year ago

Codecov Report

Merging #404 (acbb29a) into main (8dc0f5b) will decrease coverage by 0.02%. The diff coverage is 75.86%.

@@             Coverage Diff              @@
##               main     #404      +/-   ##
============================================
- Coverage     77.58%   77.56%   -0.02%     
- Complexity     1934     1958      +24     
============================================
  Files           190      191       +1     
  Lines          5153     5211      +58     
============================================
+ Hits           3998     4042      +44     
- Misses         1155     1169      +14     
Impacted Files Coverage Δ
...rc/Voice/VoiceObjects/AdvancedMachineDetection.php 68.18% <68.18%> (ø)
src/Voice/Client.php 100.00% <100.00%> (ø)
src/Voice/NCCO/Action/Connect.php 100.00% <100.00%> (ø)
src/Voice/OutboundCall.php 95.65% <100.00%> (+0.53%) :arrow_up:

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

SecondeJK commented 1 year ago

Yep, this serialization is correct. NCCO is advancedMachineDetection, outbound call is advanced_machine_detection