Skip to content

Instantly share code, notes, and snippets.

@davidlesches
Last active January 1, 2016 08:39
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 davidlesches/d09a1d56fd88d1abe8bc to your computer and use it in GitHub Desktop.
Save davidlesches/d09a1d56fd88d1abe8bc to your computer and use it in GitHub Desktop.
Yodlee and Rails Implementation, Part 3: Forms - app/models/yodlee/bank.rb
module Yodlee
class Bank < Base
def initialize bank
@bank = bank
end
def content_service_id
@bank.content_service_id
end
def form opts = {}
@form ||= Yodlee::Form.new(opts.merge({ fields: login_requirements })).render
end
def login_requirements token
query({
:endpoint => '/jsonsdk/ItemManagement/getLoginFormForContentService',
:method => :POST,
:params => {
:cobSessionToken => cobrand_token,
:contentServiceId => content_service_id
}
})
end
end
end
Copy link

ghost commented Apr 7, 2014

  def login_requirements token
   ..
  end

shouldn't have a parameter as the token is auto loaded (and this will throw an exception as the forms will call it without the token parameter).

  def login_requirements
   ..
  end

PS: Love the posts!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment