Skip to content

Instantly share code, notes, and snippets.

@marlonmantilla
Created October 8, 2014 17:11
Show Gist options
  • Save marlonmantilla/746d8c07be8cfed7937a to your computer and use it in GitHub Desktop.
Save marlonmantilla/746d8c07be8cfed7937a to your computer and use it in GitHub Desktop.
Click2Mail Add Address List
def add_address_list
RestClient.post("#{@uri}/addressLists",address_list_xml,{:content_type => :xml})
end
def address_list_xml
"<addressList><addressListName>Best Customers</addressListName><addressMappingId>2</addressMappingId><addresses><address><First_name>John</First_name><Last_name>Smith</Last_Name><Organization>My Business</Organization><Address1>123 Some Street</><Address1><Address2>Suite 210</>Address2><Address3></Address3><City>Somewhere</City><State>Va</State><Zip>12345</Zip><Country_non-US></Country_non-US></address></addresses></addressList>"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment