Class: Bancbox::ProceedsScheduler

Inherits:
Object
  • Object
show all
Defined in:
lib/bancbox/proceeds_scheduler.rb

Instance Method Summary collapse

Instance Method Details

#create_proceeds_scheduler(apikey, secret, url, schedule_date, investor_id, amount, escrow_id) ⇒ Object



7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# File 'lib/bancbox/proceeds_scheduler.rb', line 7

def create_proceeds_scheduler(apikey,secret,url,schedule_date,investor_id,amount,escrow_id)

 params = {
          :api_key => apikey,
          :secret => secret,
          :escrow_id => escrow_id,
          'schedule_date[0]' => schedule_date,
          'amount[0]' => amount,
          'investor_id[0]' => investor_id , 
          :schedule_count => 1
          
         }
 
  uri = URI.parse(url)
  req = Net::HTTP::Post.new(uri.path)
  req.set_form_data(params)
  http = Net::HTTP.new(uri.host, uri.port)
  http.use_ssl = true 
  http.verify_mode = OpenSSL::SSL::VERIFY_NONE
  response = http.request(req)
  response 
  
end