Module: Bancbox
- Defined in:
- lib/bancbox.rb,
lib/bancbox/escrow.rb,
lib/bancbox/issuer.rb,
lib/bancbox/version.rb,
lib/bancbox/investor.rb,
lib/bancbox/angel_fund.rb,
lib/bancbox/fund_escrow.rb,
lib/bancbox/fund_account.rb,
lib/bancbox/withdraw_funds.rb,
lib/bancbox/proceeds_scheduler.rb
Defined Under Namespace
Classes: AngelFund, Escrow, FundAccount, FundEscrow, Investor, Issuer, ProceedsScheduler, WithdrawFunds
Constant Summary collapse
- VERSION =
"1.0.0"
Class Method Summary collapse
- .cancel_escrow(apikey, secret, url, escrow_id, reason) ⇒ Object
- .close_escrow(apikey, secret, url, escrow_id, reason) ⇒ Object
- .create_fund_account(apikey, secret, account_number, client_ip, routing_number, type_account, amount, memo, holder_name, fund_text, investor_id, url, agreement_type, document_name, document_version, sign) ⇒ Object
- .create_fund_escrow(apikey, secret, url, investor_id, client_ip, escrow_id, amount, fund_text) ⇒ Object
- .create_investor(apikey, secret, url, fname, lname, email, phone, address_1, address_2, city, state, zip, dob, created) ⇒ Object
- .create_investor_with_ssn(apikey, secret, url, fname, lname, email, phone, address_1, address_2, city, state, zip, dob, created, ssn) ⇒ Object
- .create_issuer(apikey, secret, url, fname, lname, email, phone, address_1, address_2, city, state, zip, dob, ssn, internal, created) ⇒ Object
- .create_llc_investor(apikey, secret, url, fname, lname, email, phone, address_1, address_2, city, state, zip, created, llc) ⇒ Object
- .create_llc_investor_with_ssn(apikey, secret, url, fname, lname, email, phone, address_1, address_2, city, state, zip, created, ssn, llc) ⇒ Object
- .create_proceeds_scheduler(apikey, secret, url, escrow_id, close_date, over_funding_amount, funding_goal) ⇒ Object
- .get_angel_investor(apikey, secret, url, id) ⇒ Object
- .get_escrow(apikey, secret, url, id) ⇒ Object
- .get_investor(apikey, secret, url, id) ⇒ Object
- .get_issuer(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
- .withdraw_funds(apikey, secret, url, account_number, client_ip, routing_number, type_account, amount, memo, holder_name, fund_text, method, inv_id) ⇒ Object
Class Method Details
.cancel_escrow(apikey, secret, url, escrow_id, reason) ⇒ Object
144 145 146 147 148 149 150 151 152 153 |
# File 'lib/bancbox.rb', line 144 def self.cancel_escrow(apikey,secret,url,escrow_id,reason) escrow = Escrow.new() @escrow = escrow.cancel_escrow(apikey,secret,url,escrow_id,reason) obj = JSON.parse(@escrow.body) if !obj['error'].nil? obj['error']['message'] else obj end end |
.close_escrow(apikey, secret, url, escrow_id, reason) ⇒ Object
155 156 157 158 159 160 161 162 163 164 |
# File 'lib/bancbox.rb', line 155 def self.close_escrow(apikey,secret,url,escrow_id,reason) escrow = Escrow.new() @escrow = escrow.close_escrow(apikey,secret,url,escrow_id,reason) obj = JSON.parse(@escrow.body) if !obj['error'].nil? obj['error']['message'] else obj end end |
.create_fund_account(apikey, secret, account_number, client_ip, routing_number, type_account, amount, memo, holder_name, fund_text, investor_id, url, agreement_type, document_name, document_version, sign) ⇒ Object
100 101 102 103 104 105 106 107 108 109 |
# File 'lib/bancbox.rb', line 100 def self.create_fund_account(apikey,secret,account_number,client_ip,routing_number,type_account,amount,memo,holder_name,fund_text,investor_id,url,agreement_type,document_name,document_version,sign) fund_obj = FundAccount.new() @fund_obj = fund_obj.create_fund_account(apikey,secret,account_number,client_ip,routing_number,type_account,amount,memo,holder_name,fund_text,investor_id,url,agreement_type,document_name,document_version,sign) obj = JSON.parse(@fund_obj.body) if !obj['error'].nil? obj['error']['message'] else obj end end |
.create_fund_escrow(apikey, secret, url, investor_id, client_ip, escrow_id, amount, fund_text) ⇒ Object
111 112 113 114 115 116 117 118 119 120 |
# File 'lib/bancbox.rb', line 111 def self.create_fund_escrow(apikey,secret,url,investor_id,client_ip,escrow_id,amount,fund_text) fund_esc_obj = FundEscrow.new() @fund_esc_obj = fund_esc_obj.create_fund_escrow(apikey,secret,url,investor_id,client_ip,escrow_id,amount,fund_text) obj = JSON.parse(@fund_esc_obj.body) if !obj['error'].nil? obj['error']['message'] else obj end end |
.create_investor(apikey, secret, url, fname, lname, email, phone, address_1, address_2, city, state, zip, dob, created) ⇒ Object
24 25 26 27 28 29 30 31 32 33 |
# File 'lib/bancbox.rb', line 24 def self.create_investor(apikey,secret,url,fname,lname,email,phone,address_1,address_2,city,state,zip,dob,created) investor_obj = Investor.new() @investor = investor_obj.create_investor(apikey,secret,url,fname,lname,email,phone,address_1,address_2,city,state,zip,dob,created) obj = JSON.parse(@investor.body) if !obj['error'].nil? obj['error']['message'] else obj end end |
.create_investor_with_ssn(apikey, secret, url, fname, lname, email, phone, address_1, address_2, city, state, zip, dob, created, ssn) ⇒ Object
13 14 15 16 17 18 19 20 21 22 |
# File 'lib/bancbox.rb', line 13 def self.create_investor_with_ssn(apikey,secret,url,fname,lname,email,phone,address_1,address_2,city,state,zip,dob,created,ssn) investor_obj = Investor.new() @investor = investor_obj.create_investor_with_ssn(apikey,secret,url,fname,lname,email,phone,address_1,address_2,city,state,zip,dob,created,ssn) obj = JSON.parse(@investor.body) if !obj['error'].nil? obj['error']['message'] else obj end end |
.create_issuer(apikey, secret, url, fname, lname, email, phone, address_1, address_2, city, state, zip, dob, ssn, internal, created) ⇒ Object
46 47 48 49 50 51 52 53 54 55 |
# File 'lib/bancbox.rb', line 46 def self.create_issuer(apikey,secret,url,fname,lname,email,phone,address_1,address_2,city,state,zip,dob,ssn,internal,created) issuer_obj = Issuer.new() @issuer = issuer_obj.create_issuer(apikey,secret,url,fname,lname,email,phone,address_1,address_2,city,state,zip,dob,ssn,internal,created) obj = JSON.parse(@issuer.body) if !obj['error'].nil? obj['error']['message'] else obj end end |
.create_llc_investor(apikey, secret, url, fname, lname, email, phone, address_1, address_2, city, state, zip, created, llc) ⇒ Object
78 79 80 81 82 83 84 85 86 87 |
# File 'lib/bancbox.rb', line 78 def self.create_llc_investor(apikey,secret,url,fname,lname,email,phone,address_1,address_2,city,state,zip,created,llc) investor_obj = AngelFund.new() @investor = investor_obj.create_investor(apikey,secret,url,fname,lname,email,phone,address_1,address_2,city,state,zip,created,llc) obj = JSON.parse(@investor.body) if !obj['error'].nil? obj['error']['message'] else obj end end |
.create_llc_investor_with_ssn(apikey, secret, url, fname, lname, email, phone, address_1, address_2, city, state, zip, created, ssn, llc) ⇒ Object
68 69 70 71 72 73 74 75 76 77 |
# File 'lib/bancbox.rb', line 68 def self.create_llc_investor_with_ssn(apikey,secret,url,fname,lname,email,phone,address_1,address_2,city,state,zip,created,ssn,llc) investor_obj = AngelFund.new() @investor = investor_obj.create_investor_with_ssn(apikey,secret,url,fname,lname,email,phone,address_1,address_2,city,state,zip,created,ssn,llc) obj = JSON.parse(@investor.body) if !obj['error'].nil? obj['error']['message'] else obj end end |
.create_proceeds_scheduler(apikey, secret, url, escrow_id, close_date, over_funding_amount, funding_goal) ⇒ Object
188 189 190 191 192 193 194 195 196 197 |
# File 'lib/bancbox.rb', line 188 def self.create_proceeds_scheduler(apikey,secret,url,escrow_id,close_date,over_funding_amount,funding_goal) proceeds = ProceedsScheduler.new() @proceeds = proceeds.create_proceeds_scheduler(apikey,secret,url,escrow_id,close_date,over_funding_amount,funding_goal) obj = JSON.parse(@proceeds.body) if !obj['error'].nil? obj['error']['message'] else obj end end |
.get_angel_investor(apikey, secret, url, id) ⇒ Object
89 90 91 92 93 94 95 96 97 98 |
# File 'lib/bancbox.rb', line 89 def self.get_angel_investor(apikey,secret,url,id) investor_obj = AngelFund.new() @investor = investor_obj.get_investor(apikey,secret,url,id) obj = JSON.parse(@investor.body) if !obj['error'].nil? obj['error']['message'] else obj end end |
.get_escrow(apikey, secret, url, id) ⇒ Object
166 167 168 169 170 171 172 173 174 175 |
# File 'lib/bancbox.rb', line 166 def self.get_escrow(apikey,secret,url,id) escrow = Escrow.new() @escrow = escrow.get_escrow(apikey,secret,url,id) obj = JSON.parse(@escrow.body) if !obj['error'].nil? obj['error']['message'] else obj end end |
.get_investor(apikey, secret, url, id) ⇒ Object
35 36 37 38 39 40 41 42 43 44 |
# File 'lib/bancbox.rb', line 35 def self.get_investor(apikey,secret,url,id) investor_obj = Investor.new() @investor = investor_obj.get_investor(apikey,secret,url,id) obj = JSON.parse(@investor.body) if !obj['error'].nil? obj['error']['message'] else obj end end |
.get_issuer(apikey, secret, url, id) ⇒ Object
57 58 59 60 61 62 63 64 65 66 |
# File 'lib/bancbox.rb', line 57 def self.get_issuer(apikey,secret,url,id) issuer_obj = Issuer.new() @issuer = issuer_obj.get_issuer(apikey,secret,url,id) obj = JSON.parse(@issuer.body) if !obj['error'].nil? obj['error']['message'] else obj end end |
.modify_escrow(apikey, secret, url, escrow_id, close_date, over_funding_amount, funding_goal) ⇒ Object
177 178 179 180 181 182 183 184 185 186 |
# File 'lib/bancbox.rb', line 177 def self.modify_escrow(apikey,secret,url,escrow_id,close_date,over_funding_amount,funding_goal) escrow = Escrow.new() @escrow = escrow.modify_escrow(apikey,secret,url,escrow_id,close_date,over_funding_amount,funding_goal) obj = JSON.parse(@escrow.body) if !obj['error'].nil? obj['error']['message'] else obj end 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
133 134 135 136 137 138 139 140 141 142 |
# File 'lib/bancbox.rb', line 133 def self.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) escrow = Escrow.new() @escrow = escrow.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) obj = JSON.parse(@escrow.body) if !obj['error'].nil? obj['error']['message'] else obj end end |
.withdraw_funds(apikey, secret, url, account_number, client_ip, routing_number, type_account, amount, memo, holder_name, fund_text, method, inv_id) ⇒ Object
122 123 124 125 126 127 128 129 130 131 |
# File 'lib/bancbox.rb', line 122 def self.withdraw_funds(apikey,secret,url,account_number,client_ip,routing_number,type_account,amount,memo,holder_name,fund_text,method,inv_id) fund_obj = WithdrawFunds.new() @fund_obj = fund_obj.create_withdraw_fund(apikey,secret,url,account_number,client_ip,routing_number,type_account,amount,memo,holder_name,fund_text,method,inv_id) obj = JSON.parse(@fund_obj.body) if !obj['error'].nil? obj['error']['message'] else obj end end |