Added can_buy method to the magic_api lib