I have an Apple Magic Keyboard with Numeric Keypad that does not have the cable. I'm not an Apple person so I don't have a cable to sell with it but I can confirm that it charges and works, as I took it to a friend's house and tried it on their Mac. Worked perfectly.
This can be used plugged in, wirelessly, or via Bluetooth. It's fully charged now, but you'll definitely want a Lightning cable to charge/use it with for yourself.