PayPal REST SDK for Ruby:

Just for the record: I saw on some official PayPal site the use of “PayPal::SDK::Merchant” encouraged. Don’t do that, it’s highly outdated.

If you’ve successfully executed a payment, you can get the shipping address by loading the payment object once again and then calling @payment.payer.payer_info.shipping_address. The “inspect” method is your friend here!