Class: Bancbox::Escrow
- Inherits:
-
Object
- Object
- Bancbox::Escrow
- Defined in:
- lib/bancbox/escrow.rb
Instance Method Summary collapse
- #cancel_escrow(apikey, secret, url, escrow_id, reason) ⇒ Object
- #close_escrow(apikey, secret, url, escrow_id, reason) ⇒ Object
- #get_escrow(apikey, secret, url, id) ⇒ Object
- #modify_escrow(apikey, secret, url, escrow_id, close_date, over_funding_amount, funding_goal) ⇒ Object
- #open_escrow(apikey, secret, url, name, issuer_id, start_date, close_date, funding_goal, minimum_funding_amount, maximum_funding_amount, platform_signatory_email, issuer_signatory_email, platform_sign_name, platform_sign_title, issuer_sign_name, issuer_sign_title, created) ⇒ Object
Instance Method Details
#cancel_escrow(apikey, secret, url, escrow_id, reason) ⇒ Object
42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 |
# File 'lib/bancbox/escrow.rb', line 42 def cancel_escrow(apikey,secret,url,escrow_id,reason) params = { :api_key => apikey, :secret => secret, :escrow_id => escrow_id, :reason => reason } 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 |
#close_escrow(apikey, secret, url, escrow_id, reason) ⇒ Object
60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 |
# File 'lib/bancbox/escrow.rb', line 60 def close_escrow(apikey,secret,url,escrow_id,reason) params = { :api_key => apikey, :secret => secret, :escrow_id => escrow_id, :reason => reason } 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 |
#get_escrow(apikey, secret, url, id) ⇒ Object
98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 |
# File 'lib/bancbox/escrow.rb', line 98 def get_escrow(apikey,secret,url,id) params = { :api_key => apikey, :secret => secret, :escrow_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 |
#modify_escrow(apikey, secret, url, escrow_id, close_date, over_funding_amount, funding_goal) ⇒ Object
78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 |
# File 'lib/bancbox/escrow.rb', line 78 def modify_escrow(apikey,secret,url,escrow_id,close_date,over_funding_amount,funding_goal) params = { :api_key => apikey, :secret => secret, :id => escrow_id, :close_date => close_date, :over_funding_amount => over_funding_amount, :funding_goal => funding_goal } 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 |
#open_escrow(apikey, secret, url, name, issuer_id, start_date, close_date, funding_goal, minimum_funding_amount, maximum_funding_amount, platform_signatory_email, issuer_signatory_email, platform_sign_name, platform_sign_title, issuer_sign_name, issuer_sign_title, created) ⇒ Object
7 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 37 38 39 40 |
# File 'lib/bancbox/escrow.rb', line 7 def open_escrow(apikey,secret,url,name,issuer_id,start_date,close_date,funding_goal,minimum_funding_amount,maximum_funding_amount,platform_signatory_email,issuer_signatory_email,platform_sign_name,platform_sign_title,issuer_sign_name,issuer_sign_title,created) params = { :api_key => apikey, :secret => secret, :name => name, :issuer_id => issuer_id, :start_date => start_date, :close_date => close_date, :funding_goal => funding_goal, :minimum_funding_amount => minimum_funding_amount, :created_by => created, :maximum_funding_amount => maximum_funding_amount, :contract_doc_reference_id => 'cod_sdReffes', :securities_offered => 'EQUITY', :platform_signatory_name => platform_sign_name, :platform_signatory_title => platform_sign_title, :platform_signatory_email => platform_signatory_email, :issuer_signatory_name => issuer_sign_name, :issuer_signatory_title => issuer_sign_title, :issuer_signatory_email => issuer_signatory_email } 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 |