Where did you define a variable named sevensegment? Nowhere. That is why the compiler is telling you that you can't use that name before the . in:
sevensegment.pinn(2,3,4,5,6,7,8,9);
sevensegment.type(1);
Did you look at the supplied examples?