2727use RuntimeException ;
2828use Vonage \Account \ClientFactory ;
2929use Vonage \Application \ClientFactory as ApplicationClientFactory ;
30- use Vonage \Call \Collection ;
3130use Vonage \Client \APIResource ;
3231use Vonage \Client \Credentials \Basic ;
3332use Vonage \Client \Credentials \Container ;
4645use Vonage \Client \Exception \Exception as ClientException ;
4746use Vonage \Client \Factory \FactoryInterface ;
4847use Vonage \Client \Factory \MapFactory ;
49- use Vonage \Client \Signature ;
50- use Vonage \Conversations \ClientFactory as ConversationsClientFactory ;
5148use Vonage \Conversion \ClientFactory as ConversionClientFactory ;
5249use Vonage \Entity \EntityInterface ;
5350use Vonage \Insights \ClientFactory as InsightsClientFactory ;
54- use Vonage \Logger \LoggerAwareInterface ;
55- use Vonage \Message \Client as MessageClient ;
5651use Vonage \Numbers \ClientFactory as NumbersClientFactory ;
5752use Vonage \Redact \ClientFactory as RedactClientFactory ;
5853use Vonage \Secrets \ClientFactory as SecretsClientFactory ;
5954use Vonage \SMS \ClientFactory as SMSClientFactory ;
6055use Vonage \Verify \ClientFactory as VerifyClientFactory ;
6156use Vonage \Verify \Verification ;
6257use Vonage \Voice \ClientFactory as VoiceClientFactory ;
58+ use Vonage \Logger \{LoggerAwareInterface , LoggerTrait };
6359
6460use function array_key_exists ;
6561use function array_merge ;
66- use function base64_encode ;
6762use function call_user_func_array ;
6863use function get_class ;
6964use function http_build_query ;
7065use function implode ;
7166use function is_null ;
72- use function is_string ;
73- use function json_decode ;
7467use function json_encode ;
7568use function method_exists ;
76- use function parse_str ;
7769use function set_error_handler ;
7870use function str_replace ;
7971use function strpos ;
80- use function unserialize ;
81- use Vonage \Logger \LoggerTrait ;
82- use Vonage \User \ClientFactory as UserClientFactory ;
8372
8473/**
8574 * Vonage API Client, allows access to the API from PHP.
8675 *
8776 * @method Account\Client account()
88- * @method Message\Client message()
8977 * @method Application\Client applications()
9078 * @method Conversion\Client conversion()
9179 * @method Insights\Client insights()
9583 * @method SMS\Client sms()
9684 * @method Verify\Client verify()
9785 * @method Voice\Client voice()
98- * @method User\Collection user()
99- * @method Conversation\Collection conversation()
10086 *
10187 * @property string restUrl
10288 * @property string apiUrl
@@ -105,7 +91,6 @@ class Client implements LoggerAwareInterface
10591{
10692 use LoggerTrait;
10793
108- public const VERSION = '2.9.2 ' ;
10994 public const BASE_API = 'https://api.nexmo.com ' ;
11095 public const BASE_REST = 'https://rest.nexmo.com ' ;
11196
@@ -210,12 +195,6 @@ public function __construct(CredentialsInterface $credentials, $options = [], ?C
210195 $ this ->setFactory (
211196 new MapFactory (
212197 [
213- // Legacy Namespaces
214- 'message ' => MessageClient::class,
215- 'calls ' => Collection::class,
216- 'conversation ' => ConversationsClientFactory::class,
217- 'user ' => UserClientFactory::class,
218-
219198 // Registered Services by name
220199 'account ' => ClientFactory::class,
221200 'applications ' => ApplicationClientFactory::class,
@@ -564,24 +543,6 @@ public function serialize(EntityInterface $entity): string
564543 throw new RuntimeException ('unknown class ` ' . get_class ($ entity ) . '`` ' );
565544 }
566545
567- /**
568- * @param string|Verification $entity
569- *
570- * @deprecated
571- */
572- public function unserialize ($ entity ): Verification
573- {
574- if (is_string ($ entity )) {
575- $ entity = unserialize ($ entity );
576- }
577-
578- if ($ entity instanceof Verification) {
579- return $ this ->verify ()->unserialize ($ entity );
580- }
581-
582- throw new RuntimeException ('unknown class ` ' . get_class ($ entity ) . '`` ' );
583- }
584-
585546 public function __call ($ name , $ args )
586547 {
587548 if (!$ this ->factory ->hasApi ($ name )) {
0 commit comments