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
Possible Models: | |
Healthplan | |
Claim | |
Conditions | |
Workflow: | |
1) Client creates a new healthplan where they are presented with a list of conditions. The user then ticks which conditions are excluded. They then save the healthplan record. |
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
payments GET /payments(.:format) payments#index | |
POST /payments(.:format) payments#create | |
new_payment GET /payments/new(.:format) payments#new | |
edit_payment GET /payments/:id/edit(.:format) payments#edit | |
payment GET /payments/:id(.:format) payments#show | |
PUT /payments/:id(.:format) payments#update | |
DELETE /payments/:id(.:format) payments#destroy | |
claims GET /claims(.:format) claims#index | |
POST /claims(.:format) claims#create | |
new_claim GET /claims/new(.:format) claims#new |
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
Danny M. I can find the first subscription using the API, and I can list all of the subscriptions in my local table. | |
11:20 AM | |
Danny M. What I can't do is list all of the local subscriptions and get the missing information from the API. | |
My subscription table has resource_id which I would like to then lookup the amount and interval details etc. | |
Tim R. Liviu - The customer does make an account, but ti's only a very quick process at the end of setting up the payment | |
You should be able to do GoCardless::Subscription.find(subscription_record.resource_id) | |
where subscription_record is an item from the table | |
Liviu P. ok, thanks Tim | |
Danny M. I'm a little confused as to where that should be? In my subscriptions controller? | |
I don't seem to be able to find any records unless I set the merchant ID in the controller |
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
def deploy_receive | |
if request.get? | |
render :text => "hello" | |
elsif request.post? | |
deploy_payload = JSON.parse(params[:payload]) | |
Activity.create(:action => 'deployed a change', :details => "deploy_payload['identifier'] and deploy_payload['name']", :user_id => '1') | |
render :text => "success" | |
else | |
render :text => "error" | |
end |
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
def deploy_receive | |
if request.get? | |
render :text => "hello" | |
elsif request.post? | |
deploy_payload = JSON.parse(params[:payload]) | |
Activity.create(:action => 'deployed a change', :details => deploy_payload['identifier'], :user_id => '1') | |
render :text => "success" | |
else | |
render :text => "error" | |
end |
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
Parameters: {"payload"=>"{\"date\":\"Mon, 29 Oct 2012 15:09:31 +0000\",\"from\":\"root <[email protected]>\",\"identifier\":6056760,\"message_id\":\"[email protected]\",\"from_name\":\"root\",\"from_address\":\"[email protected]\",\"to\":\"[email protected]\",\"delivered_to\":\"[email protected]\",\"address_identifier\":null,\"cc\":null,\"subject\":\"Incoming fax\",\"in_reply_to\":null,\"references\":null,\"plain_body\":\"A fax has arrived from 01257232632. It is attached.\",\"html_body\":null,\"rule\":\"[email protected]\",\"priority\":3,\"attachments\":[[\"11-1351523332.47071.tiff\",\"image/tiff\",34372,\"http://api.deliverhq.com/api/incoming/attachment/7gdd71wo75/6056760/0\"]],\"spam_status\":0}", "signature"=>"hVWY3u98xklZGvD3/U0RKA/CAhJqcLnjzIGLLk67JiOYMPCNMcRPh8r/Ybpo\n2T0wdh6aOGFctEfbrbhZqgCrn/li5/6LIiOjn3E52YNUCwDNuKWPtcK1Xl6K\nh86Q59mgCxRIfHxqoxAOd+5QizJDgCRLtFiK1WL3c9VPP0uzgWk=\n"} |
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
Activity.create( | |
hash = JSON.parse(params[:payload]) | |
:action => "deployed the intranet", | |
:details => params["identifier"], | |
:user_id => "1", | |
) |
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
def deploy_receive | |
@activity = Activity.new | |
if @activity.save | |
render json: @activity | |
else | |
@activity = "error" | |
render json: @activity | |
end | |
end |
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
respond_to do |format| | |
format.html # index.html.erb | |
format.json { render :json => @faults.limit(5).to_json(:except => [ :created_at, :updated_at, :id]) } | |
end |
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
Call Load (0.3ms) SELECT `calls`.* FROM `calls` LIMIT 1 | |
ActionView::Template::Error: undefined method `each' for nil:NilClass |