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

Subaccounts API #414

Closed SecondeJK closed 1 year ago

SecondeJK commented 1 year ago

This feature adds the subaccounts API to the base Client.

Description

See documentation changes in the README for usage. You can now access the subaccounts API using $client->subaccount()

Motivation and Context

Evolution of Vonage API/SDKs

How Has This Been Tested?

Full unit test suite has been added. Run it: ./vendor/bin/phpunit --testsuite subaccount

Note: does not contain error handling from the API, as this is tested within the test class for ApiResource.

Types of changes

Checklist:

codecov-commenter commented 1 year ago

Codecov Report

Merging #414 (5fd62e0) into main (fd72359) will increase coverage by 0.35%. The diff coverage is 81.55%.

@@             Coverage Diff              @@
##               main     #414      +/-   ##
============================================
+ Coverage     77.61%   77.97%   +0.35%     
- Complexity     1963     2116     +153     
============================================
  Files           191      200       +9     
  Lines          5223     5634     +411     
============================================
+ Hits           4054     4393     +339     
- Misses         1169     1241      +72     
Impacted Files Coverage Δ
src/Subaccount/ClientFactory.php 0.00% <0.00%> (ø)
src/Client.php 21.49% <50.00%> (+0.36%) :arrow_up:
...c/Subaccount/SubaccountObjects/BalanceTransfer.php 60.37% <60.37%> (ø)
...rc/Subaccount/SubaccountObjects/CreditTransfer.php 60.37% <60.37%> (ø)
src/Subaccount/Request/TransferBalanceRequest.php 76.92% <76.92%> (ø)
src/Subaccount/Request/TransferCreditRequest.php 76.92% <76.92%> (ø)
src/Subaccount/Client.php 92.30% <92.30%> (ø)
src/Subaccount/Request/NumberTransferRequest.php 92.50% <92.50%> (ø)
src/Subaccount/SubaccountObjects/Account.php 97.64% <97.64%> (ø)
src/Entity/IterableAPICollection.php 73.09% <100.00%> (+1.32%) :arrow_up:
... and 1 more

... and 1 file with indirect coverage changes

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