Skip to content

Instantly share code, notes, and snippets.

@Saidbek
Created April 29, 2012 18:26
Show Gist options
  • Save Saidbek/45f422bcc972a9b93bea to your computer and use it in GitHub Desktop.
Save Saidbek/45f422bcc972a9b93bea to your computer and use it in GitHub Desktop.
api step to reverse transfer
When(/^#{capture_model} requests via the API a (reverse_transfer) for transaction_number "([^"]*)"$/) do |console_user_name, type, reverse_trans|
console_user = model(console_user_name)
params = {
:console_user_id => console_user.id,
:reverse_transaction_number => reverse_trans
}.to_json
post "#{resource(type)}.json", params, "CONTENT_TYPE" => "application/json"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment