lib/plaid/upgrade.rb
# This initializes our instance variables, and sets up a new Customer class.
This initializes our instance variables, and sets up a new Customer class.
This initializes our instance variables and sets up a new Customer class .
def parse_response(response)
      case response.code
      when 200
        @parsed_response = Hash.new
        @parsed_response[:code] = response.code
        response = JSON.parse(response)
        @parsed_response[:access_token] = response["access_token"]
        @parsed_response[:accounts] = response["accounts"]
        @parsed_response[:transactions] = response["transactions"]
        return @parsed_response
      else
        @parsed_response = Hash.new
        @parsed_response[:code] = response.code
        @parsed_response[:message] = response
        return @parsed_response
      end
    end
def parse_response ( response ) case response . code when 200 @parsed_response = Hash . new @parsed_response [ :code ] = response . code response = JSON . parse ( response ) @parsed_response [ :access_token ] = response [ "access_token" ] @parsed_response [ :accounts ] = response [ "accounts" ] @parsed_response [ :transactions ] = response [ "transactions" ] return @parsed_response else @parsed_response = Hash . new @parsed_response [ :code ] = response . code @parsed_response [ :message ] = response return @parsed_response end end
This initializes our instance variables, and sets up a new Customer class.
This initializes our instance variables and sets up a new Customer class .
response
<not_specific>