Skip to content

Instantly share code, notes, and snippets.

@jfriedlaender
Created June 6, 2012 04:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jfriedlaender/2879834 to your computer and use it in GitHub Desktop.
Save jfriedlaender/2879834 to your computer and use it in GitHub Desktop.
Chargify migrate preview
def plan_change_preview(new_plan_id)
api_url = "https://#{Chargify.subdomain}.chargify.com/subscriptions/#{subscription_id}/migrations/preview.json"
data = {:migration => {:product_handle => p_handle} }
response = HTTParty.post(api_url, :body => data.as_json, :basic_auth => {:username => Chargify.api_key, :password => 'X'})
response.parsed_response.first[1]
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment