src/PayPalRestApiClient/Builder/AuthorizationBuilder.php
public function build(array $data)
    {
        $this->validateArrayKeys(
            array('amount', 'create_time', 'update_time', 'state', 'parent_payment', 'id', 'valid_until', 'links'),
            $data
        );

        $links = array();
        foreach ($data['links'] as $link) {
            $links[] = $this->linkBuilder->build($link);
        }

        $authorization = new Authorization(
            $data['id'],
            $data['create_time'],
            $data['update_time'],
            $this->amountBuilder->build($data['amount']),
            $data['state'],
            $data['parent_payment'],
            $data['valid_until'],
            $links
        );

        return $authorization;
    }
public function build(array $data)
    {
        $this->validateArrayKeys(
            array('amount', 'create_time', 'update_time', 'state', 'parent_payment', 'id', 'valid_until', 'links'),
            $data
        );

        $links = array();
        foreach ($data['links'] as $link) {
            $links[] = $this->linkBuilder->build($link);
        }

        $authorization = new Authorization(
            $data['id'],
            $data['create_time'],
            $data['update_time'],
            $this->amountBuilder->build($data['amount']),
            $data['state'],
            $data['parent_payment'],
            $data['valid_until'],
            $links
        );

        return $authorization;
    }
Build an instance of PayPalRestApiClient\Model\Authorization given an array

@param array $data The array should contains the following keys:
amount, create_time, state, parent_payment, id, valid_until, links.

@return PayPalRestApiClient\Model\Authorization

@throws PayPalRestApiClient\Exception\BuilderException

@see https://developer.paypal.com/docs/api/#authorization-object