The Digital Deluxe version of any game does not come with a code that can be applied to another account. In order to receive the pet from a Digital Deluxe purchase, you need to add the game specifically to your account. Your friend can't give you the pet once he's added the Digital Deluxe to his account, but he can purchase another copy and gift that to you instead.
Feel free to browse through Perks N Peeves
, my vanity pet collecting blog!