lib/payment/manager/request.rb in payment-manager-client-0.2.0 vs lib/payment/manager/request.rb in payment-manager-client-0.3.0
- old
+ new
@@ -1,9 +1,15 @@
# frozen_string_literal: true
module Payment
module Manager
module Request
+ def self.get_from_api(path, params)
+ api_url = Payment::Manager::Config.api_url
+ final_url = api_url + path
+ get(final_url, params)
+ end
+
def self.get(url, params)
uri = URI(url)
uri.query = URI.encode_www_form(params)
conn(uri).get(uri)
end
@@ -14,6 +20,5 @@
http
end
end
end
end
-