cardmagic/shipping ? reverse-engineered prompt
Reverse engineered prompt
Build me a simple Ruby shipping library that lets me talk to UPS and FedEx from one place.
I want to be able to set my carrier details once in a .shipping.yml file in the user’s home folder, then create a shipping object with basic info like zip, state, sender zip, and weight. From there I should be able to ask for a price, check whether an address looks valid, and also handle shipping tasks like labels and voiding shipments. If possible, make it work through a base shipping class with separate UPS and FedEx access too, so I can do something like one object for both carriers.
Please keep the API easy to use and close to the old Ruby style from the README, and make it work with the XML based APIs for those carriers. I’d also like a few tests and a clean way to load defaults and override them per request. If you need current carrier docs, look them up online first.