Skip to content

Instantly share code, notes, and snippets.

@trobrock
Created August 5, 2012 15:21
Show Gist options
  • Save trobrock/3265378 to your computer and use it in GitHub Desktop.
Save trobrock/3265378 to your computer and use it in GitHub Desktop.
require 'rest-client'
req = RestClient::Request.new(
:method => :post,
:url => "https://snapi.sincerely.com/shiplib/create",
:payload => {
:appkey => ENV["SINCERELY_APP_KEY"],
:debugMode => true,
:frontPhotoId => image["id"],
:recipients => [
{
:name => params["name"],
:email => params["email"]
}
].to_json,
:sender => {
:name => "Trae Robrock",
:email => "[email protected]",
:street1 => "800 Fake St",
:city => "Mountain View",
:state => "CA",
:postalcode => "00000",
:country => "USA"
}.to_json
}
)
ap req.payload.to_s
p req.execute
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment