Class: BancboxInvest

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

Constant Summary collapse

METHODS =
%w[create_investor submit_agreement verify_identity create_issuer create_escrow_account fund_account fund_escrow
cge_investor_contr cancel_escrow close_escrow get_escrow_details get_escrow_list get_activity_details get_investor_list
get_investor_details get_issuer_list get_issuer_details disburse_escrow disburse_escrow get_investment_ledger update_investment_ledger
freeze_investment_ledger create_proceeds_schedules get_proceeds_schedules cancel_proceeds_schedules withdraw_funds
update_escrow_account transfer_funds link_external_account confirm_wire_transfer verify_income accredit_investor_3rd_party
get_verification_status get_activity get_ledger create_challenge_deposit verify_challenge_deposit get_challenge_deposit_status
update_investor update_issuer]

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) {|_self| ... } ⇒ BancboxInvest

Returns a new instance of BancboxInvest.

Yields:

  • (_self)

Yield Parameters:

  • _self (BancboxInvest)

    the object that the method was called on



16
17
18
19
20
21
22
# File 'lib/bancbox_invest.rb', line 16

def initialize(options = {})
  options.each do |key, value|
    send(:"#{key}=", value)
  end
  yield(self) if block_given?
  @options = credentials
end

Instance Attribute Details

#bancbox_api_keyObject

Returns the value of attribute bancbox_api_key.



6
7
8
# File 'lib/bancbox_invest.rb', line 6

def bancbox_api_key
  @bancbox_api_key
end

#bancbox_api_secretObject

Returns the value of attribute bancbox_api_secret.



6
7
8
# File 'lib/bancbox_invest.rb', line 6

def bancbox_api_secret
  @bancbox_api_secret
end

#bancbox_api_urlObject

Returns the value of attribute bancbox_api_url.



6
7
8
# File 'lib/bancbox_invest.rb', line 6

def bancbox_api_url
  @bancbox_api_url
end

Instance Method Details

#credentialsObject



24
25
26
27
28
29
# File 'lib/bancbox_invest.rb', line 24

def credentials
  {
    api_key: bancbox_api_key,
    secret:  bancbox_api_secret,
  }
end

#post(url, options) ⇒ Object



31
32
33
# File 'lib/bancbox_invest.rb', line 31

def post(url, options)
  HTTParty.post(bancbox_api_url+url, query: options)
end