PayPal\Common\PayPalModel::__construct PHP Method

__construct() public method

You can pass data as a json representation or array object. This argument eliminates the need to do $obj->fromJson($data) later after creating the object.
public __construct ( null $data = null )
$data null
    public function __construct($data = null)
    {
        switch (gettype($data)) {
            case "NULL":
                break;
            case "string":
                JsonValidator::validate($data);
                $this->fromJson($data);
                break;
            case "array":
                $this->fromArray($data);
                break;
            default:
        }
    }