Module: Xfers::User

Defined in:
lib/xfers/user.rb

Constant Summary collapse

RESOUCE_URL =
'/user'

Class Method Summary collapse

Class Method Details

.activities(connect_key = nil) ⇒ Object



18
19
20
# File 'lib/xfers/user.rb', line 18

def self.activities(connect_key=nil)
  Xfers::APIOperations.get(nil, "#{RESOUCE_URL}/activities", connect_key)[:activities]
end

.retrieve(connect_key = nil) ⇒ Object



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

def self.retrieve(connect_key=nil)
  Xfers::APIOperations.get nil, RESOUCE_URL, connect_key
end

.transfer_info(connect_key = nil) ⇒ Object



14
15
16
# File 'lib/xfers/user.rb', line 14

def self.transfer_info(connect_key=nil)
  Xfers::APIOperations.get nil, "#{RESOUCE_URL}/transfer_info", connect_key
end

.update(params, connect_key = nil) ⇒ Object



9
10
11
12
# File 'lib/xfers/user.rb', line 9

def self.update(params, connect_key=nil)
  raise InvalidRequestError.new 'Params cannot be empty', 400 if params.nil?
  Xfers::APIOperations.put params, RESOUCE_URL, connect_key
end