Module: Xfers::Payout

Defined in:
lib/xfers/payout.rb

Constant Summary collapse

RESOUCE_URL =
'/payouts'

Class Method Summary collapse

Class Method Details

.create(params, connect_key = nil) ⇒ Object



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

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

.list_all(params = nil, connect_key = nil) ⇒ Object



15
16
17
# File 'lib/xfers/payout.rb', line 15

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

.retrieve(payout_id, connect_key = nil) ⇒ Object



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

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