Pop\Shipping\Adapter\Ups::__construct PHP Метод

__construct() публичный Метод

Method to instantiate an UPS shipping adapter object
public __construct ( string $accessKey, string $userId, string $password ) : Ups
$accessKey string
$userId string
$password string
Результат Ups
    public function __construct($accessKey, $userId, $password)
    {
        $this->userId = $userId;
        $this->accessRequest = new Dom(Dom::XML);
        $this->rateRequest = new Dom(Dom::XML);
        $access = new Child('AccessRequest');
        $access->setAttributes('xml:lang', 'en-US');
        $key = new Child('AccessLicenseNumber', $accessKey);
        $id = new Child('UserId', $userId);
        $pwd = new Child('Password', $password);
        $access->addChild($key)->addChild($id)->addChild($pwd);
        $this->accessRequest->addChild($access);
    }