Class: Bancbox::AngelFund

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

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.get_investor(apikey, secret, url, id) ⇒ Object



68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
# File 'lib/bancbox/angel_fund.rb', line 68

def self.get_investor(apikey,secret,url,id)
    params = {
          :api_key => apikey,
          :secret => secret,
          :investor_id => id
          }
  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

Instance Method Details

#create_investor(apikey, secret, url, fname, lname, email, phone, address_1, address_2, city, state, zip, created, llc) ⇒ Object



38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# File 'lib/bancbox/angel_fund.rb', line 38

def create_investor(apikey,secret,url,fname,lname,email,phone,address_1,address_2,city,state,zip,created,llc)
     
 params = {
          :api_key => apikey,
          :secret => secret,
          :first_name => fname,
          :last_name => lname,
          :email => email,
          :phone => phone,
          :address_1 => address_1,
          :address_2 => address_2,
          :created_by => created,
          :type => llc,
          :internal => '1',
          :state => state,
          :city => city,
          :zip => zip
          }
    
  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

#create_investor_with_ssn(apikey, secret, url, fname, lname, email, phone, address_1, address_2, city, state, zip, created, ssn, llc) ⇒ Object



8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# File 'lib/bancbox/angel_fund.rb', line 8

def create_investor_with_ssn(apikey,secret,url,fname,lname,email,phone,address_1,address_2,city,state,zip,created,ssn,llc)
     
 params = {
          :api_key => apikey,
          :secret => secret,
          :first_name => fname,
          :last_name => lname,
          :email => email,
          :phone => phone,
          :address_1 => address_1,
          :address_2 => address_2,
          :created_by => created,
          :type => llc,
          :internal => '0',
          :state => state,
          :city => city,
          :zip => zip,
          :ssn => ssn}
    
  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