Apple pie box model and animation
So 2 solutions:

I've tried with B-Bones, it works fine. Don't forget to put the Subdivision Surface under the Armature modifier, otherwise you'll have bad shading:



You could also use both bones + shapekeys:


Create your flat object. Give it 3 bones, one main, one for each face hinge:





Give your object a basis shapekey and a second shapekey, modify the object:





Mix both shapekeys and bones animations, use the bones to move and close the object: