protected function getClient($auth = 'wsse', $authenticate = true)
 {
     switch ($auth) {
         case 'wsse':
             $this->initializeWsseFromGlobals();
             $options = $this->getOptionsFromGlobals();
             $client = new Client(new Curl($options));
             if ($authenticate) {
                 $client->authenticate($options['username'], $options['secret']);
             }
             break;
         case 'soap':
             $this->initializeWsseFromGlobals();
             $options = $this->getOptionsFromGlobals();
             $client = new Client(new SoapClient($options));
             if ($authenticate) {
                 $client->authenticate($options['username'], $options['secret']);
             }
             break;
         case 'oauth':
             $this->initializeOAuthFromGlobals();
             $options = $this->getOptionsFromGlobals();
             $client = new Client(new Curl($options));
             if ($authenticate) {
                 $client->setAuthService(new OAuth2())->authenticate($options['client_id'], $options['client_secret']);
             }
             break;
     }
     return $client;
 }