Module: Xfers::Connect

Defined in:
lib/xfers/connect.rb

Constant Summary collapse

RESOUCE_URL =
'/authorize'

Class Method Summary collapse

Class Method Details

.authorize(params, connect_key = nil) ⇒ Object



5
6
7
8
# File 'lib/xfers/connect.rb', line 5

def self.authorize(params, connect_key=nil)
  raise InvalidRequestError.new 'Params cannot be empty', 400 if params.nil? or params == ''
  Xfers::APIOperations.post params, "#{RESOUCE_URL}/signup_login", connect_key
end

.get_token(params, connect_key = nil) ⇒ Object



10
11
12
13
# File 'lib/xfers/connect.rb', line 10

def self.get_token(params, connect_key=nil)
  raise InvalidRequestError.new 'Params cannot be empty', 400 if params.nil? or params == ''
  Xfers::APIOperations.get params, "#{RESOUCE_URL}/get_token", connect_key
end