Class: FundAmerica::Investor
- Inherits:
-
Object
- Object
- FundAmerica::Investor
- Defined in:
- lib/fund_america/investor.rb
Class Method Summary collapse
-
.create(options) ⇒ Object
End point: apps.fundamerica.com/api/investors (POST) Usage: FundAmerica::Investor.create(options) Output: Creates a new investor - proxy, joint, ira.
-
.details(investor_id) ⇒ Object
End point: apps.fundamerica.com/api/entities/:id (GET) Usage: FundAmerica::Investor.details(entity_id) Output: Returns the details of an investor with matching id.
-
.list ⇒ Object
End point: apps.fundamerica.com/api/investors (GET) Usage: FundAmerica::Investor.list Output: Returns list of investors.
-
.update(investor_id, options) ⇒ Object
End point: apps.fundamerica.com/api/investors/:id (PATCH) Usage: FundAmerica::Investor.update(entity_id, options) Output: Updates an investor - proxy, joint, irc Uses test_mode update when used in sandbox mode.
Class Method Details
.create(options) ⇒ Object
End point: apps.fundamerica.com/api/investors (POST) Usage: FundAmerica::Investor.create(options) Output: Creates a new investor - proxy, joint, ira
15 16 17 |
# File 'lib/fund_america/investor.rb', line 15 def create() API::request(:post, 'investors', ) end |
.details(investor_id) ⇒ Object
End point: apps.fundamerica.com/api/entities/:id (GET) Usage: FundAmerica::Investor.details(entity_id) Output: Returns the details of an investor with matching id
31 32 33 |
# File 'lib/fund_america/investor.rb', line 31 def details(investor_id) API::request(:get, "investors/#{investor_id}") end |
.list ⇒ Object
End point: apps.fundamerica.com/api/investors (GET) Usage: FundAmerica::Investor.list Output: Returns list of investors
8 9 10 |
# File 'lib/fund_america/investor.rb', line 8 def list API::request(:get, 'investors') end |
.update(investor_id, options) ⇒ Object
End point: apps.fundamerica.com/api/investors/:id (PATCH) Usage: FundAmerica::Investor.update(entity_id, options) Output: Updates an investor - proxy, joint, irc Uses test_mode update when used in sandbox mode
23 24 25 26 |
# File 'lib/fund_america/investor.rb', line 23 def update(investor_id, ) end_point_url = FundAmerica.base_uri + "#{FundAmerica.mode == 'sandbox' ? 'test_mode/' : ''}" + "investors/#{investor_id}" API::request(:patch, end_point_url, ) end |