Created
          August 5, 2012 15:21 
        
      - 
      
- 
        Save trobrock/3265378 to your computer and use it in GitHub Desktop. 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | 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