lib/truelayer/authentication_repository.rb in truelayer-0.1.3 vs lib/truelayer/authentication_repository.rb in truelayer-0.1.4

- old
+ new

@@ -1,9 +1,8 @@ # frozen_string_literal: true require 'faraday' -require 'multi_json' require 'truelayer/configuration' require 'truelayer/errors' require 'truelayer/version' require 'truelayer/token' require 'truelayer/auth_link' @@ -25,11 +24,11 @@ params[:tracking_id] = tracking_id if tracking_id params[:data_use_description] = data_use_description if data_use_description result = post('/v1/authuri', params: nil) do |req| req.headers[:content_type] = 'application/json' - req.body = MultiJson.dump(params) + req.body = JSON.generate(params) end AuthLink.build(json: result.body) end @@ -97,10 +96,10 @@ conn.request :url_encoded conn.headers.merge!( user_agent: "finpoint/#{Truelayer::VERSION}" ) - conn.response :multi_json, symbolize_keys: true + conn.response :json, parser_options: { symbolize_names: true } if Truelayer.configuration.debug conn.response :logger, nil, { headers: true, bodies: Truelayer.configuration.verbose } end conn.adapter Faraday.default_adapter end