Convert Whole Account Info into XML



I'm trying to convert Recurly return data into XML. If I use the following, all I get is the account code within XML tags.



acct_data = Recurly::Account.find("account_UUID_here").to_xml
puts #{acct_data}
# => "<account><account_code>code</account_code></account>"


If I use the code below, I get the following.



acct_data = Recurly::Account.find("account_UUID_here")
puts #{acct_data}
# => "#<Recurly::Account accept_language: "...", account_code: "...", address: #<Recurly::Address address1: "..." ...>

No comments:

Post a Comment