1 require 'rubygems' 2 require 'active_resource' 3 4 # Define the ActiveResource class for communication with the API 5 class Contact < ActiveResource::Base 6 self.site = "http://bluetools.moneybird.local" 7 self.user = "admin" 8 self.password = "testtest" 9 end 10 11 # Your customer id 12 customer_id = 1 13 14 # Fetch information from the contact 15 contact = Contact.find(:one, :from => "/api/v1.0/contacts/customer_id/#{customer_id}.xml") 16 puts contact.inspect