Class: FundAmerica::Entity
- Inherits:
-
Object
- Object
- FundAmerica::Entity
- Defined in:
- lib/fund_america/entity.rb
Class Method Summary collapse
-
.ach_authorizations(entity_id) ⇒ Object
End point: apps.fundamerica.com/api/entities/:entity_id/ach_authorizations (GET) Usage: FundAmerica::Entity.ach_authorizations(entity_id) Output: Returns ACH authorizations of an entity.
-
.bank_transfer_method(entity_id) ⇒ Object
apps.fundamerica.com/api/entities/:id/bank_transfer_methods (GET) Usage: FundAmerica::Entity.bank_transfer_methods Output: Returns Bank Transfer Method informations of an entity.
-
.cash_blotter(entity_id) ⇒ Object
End point: apps.fundamerica.com/api/entities/:id/cash_blotter (GET) Usage: FundAmerica::Entity.cash_blotter(entity_id).
-
.child_entities(entity_id) ⇒ Object
apps.fundamerica.com/api/entities/:id/child_entities (GET) Usage: FundAmerica::Entity.child_entities Output: Returns child entities of an entity.
-
.create(options) ⇒ Object
End point: apps.fundamerica.com/api/entities (POST) Usage: FundAmerica::Entity.create(options) Output: Creates a new entity - person or company.
-
.delete(entity_id) ⇒ Object
TODO - The delete option from sandbox mode gives the error message FundAmerica::Error: Not authorized.
-
.details(entity_id, request_options = "") ⇒ Object
End point: apps.fundamerica.com/api/entities/:id (GET) Usage: FundAmerica::Entity.details(entity_id), request options &_expand=1 Output: Returns the details of an entity with matching id.
-
.investor_accreditation(entity_id) ⇒ Object
apps.fundamerica.com/api/entities/:id/investor_accreditation (GET) Usage: FundAmerica::Entity.investor_accreditation Output: Returns entity specific investor accreditation information.
-
.investor_payments(entity_id) ⇒ Object
End point: apps.fundamerica.com/api/entities/:id/investor_payments (GET) Usage: FundAmerica::Entity.investor_payments(entity_id).
-
.investor_suitability_details(entity_id) ⇒ Object
End point: apps.fundamerica.com/api/entities/:id/investor_suitability (GET) Usage: FundAmerica::Entity.investor_suitability_details(entity_id).
-
.investor_suitability_update(entity_id, options) ⇒ Object
End point: apps.fundamerica.com/api/entities/:id/investor_suitability (PATCH) Usage: FundAmerica::Entity.investor_suitability_update(entity_id, options).
-
.list ⇒ Object
End point: apps.fundamerica.com/api/entities (GET) Usage: FundAmerica::Entity.list Output: Returns list of entities.
-
.parent_entities(entity_id) ⇒ Object
apps.fundamerica.com/api/entities/:id/parent_entities (GET) Usage: FundAmerica::Entity.parent_entities Output: Returns parent entities of an entity.
-
.platform_investor(entity_id) ⇒ Object
apps.fundamerica.com/api/entities/:id/platform_investor (GET) Usage: FundAmerica::Entity.platform_investor Output: Returns entity specific platform_investor information Note: FA platform investor information will also be included with investor information.
-
.relationships_as_child(entity_id) ⇒ Object
apps.fundamerica.com/api/entities/:id/relationships_as_child (GET) Usage: FundAmerica::Entity.relationships_as_child Output: Returns relationships_as_child details for entity.
-
.relationships_as_parent(entity_id) ⇒ Object
apps.fundamerica.com/api/entities/:id/relationships_as_parent (GET) Usage: FundAmerica::Entity.relationships_as_parent Output: Returns relationships_as_parent details for entity.
-
.update(entity_id, options) ⇒ Object
End point: apps.fundamerica.com/api/entities/:id (PATCH) Usage: FundAmerica::Entity.update(entity_id, options) Output: Updates an entity - person or company Uses test_mode update when used in sandbox mode.
Class Method Details
.ach_authorizations(entity_id) ⇒ Object
End point: apps.fundamerica.com/api/entities/:entity_id/ach_authorizations (GET) Usage: FundAmerica::Entity.ach_authorizations(entity_id) Output: Returns ACH authorizations of an entity
52 53 54 |
# File 'lib/fund_america/entity.rb', line 52 def (entity_id) API::request(:get, "entities/#{entity_id}/ach_authorizations") end |
.bank_transfer_method(entity_id) ⇒ Object
apps.fundamerica.com/api/entities/:id/bank_transfer_methods (GET) Usage: FundAmerica::Entity.bank_transfer_methods Output: Returns Bank Transfer Method informations of an entity
83 84 85 |
# File 'lib/fund_america/entity.rb', line 83 def bank_transfer_method(entity_id) API::request(:get, "entities/#{entity_id}/bank_transfer_methods") end |
.cash_blotter(entity_id) ⇒ Object
End point: apps.fundamerica.com/api/entities/:id/cash_blotter (GET) Usage: FundAmerica::Entity.cash_blotter(entity_id)
58 59 60 |
# File 'lib/fund_america/entity.rb', line 58 def cash_blotter(entity_id) API::request(:get, "entities/#{entity_id}/cash_blotter") end |
.child_entities(entity_id) ⇒ Object
apps.fundamerica.com/api/entities/:id/child_entities (GET) Usage: FundAmerica::Entity.child_entities Output: Returns child entities of an entity
90 91 92 |
# File 'lib/fund_america/entity.rb', line 90 def child_entities(entity_id) API::request(:get, "entities/#{entity_id}/child_entities") end |
.create(options) ⇒ Object
End point: apps.fundamerica.com/api/entities (POST) Usage: FundAmerica::Entity.create(options) Output: Creates a new entity - person or company
15 16 17 |
# File 'lib/fund_america/entity.rb', line 15 def create() API::request(:post, 'entities', ) end |
.delete(entity_id) ⇒ Object
TODO - The delete option from sandbox mode gives the error message FundAmerica::Error: Not authorized. You don’t have permission to take action on a particular resource. It may not be owned by your account or it may be in a state where you action cannot be taken (such as attempting to cancel an invested investment) This request has to be tested with production mode in final testing phase
45 46 47 |
# File 'lib/fund_america/entity.rb', line 45 def delete(entity_id) API::request(:delete, "entities/#{entity_id}") end |
.details(entity_id, request_options = "") ⇒ Object
End point: apps.fundamerica.com/api/entities/:id (GET) Usage: FundAmerica::Entity.details(entity_id), request options &_expand=1 Output: Returns the details of an entity with matching id
31 32 33 |
# File 'lib/fund_america/entity.rb', line 31 def details(entity_id, = "") API::request(:get, "entities/#{entity_id}" + ) end |
.investor_accreditation(entity_id) ⇒ Object
apps.fundamerica.com/api/entities/:id/investor_accreditation (GET) Usage: FundAmerica::Entity.investor_accreditation Output: Returns entity specific investor accreditation information
118 119 120 |
# File 'lib/fund_america/entity.rb', line 118 def investor_accreditation(entity_id) API::request(:get, "entities/#{entity_id}/investor_accreditation") end |
.investor_payments(entity_id) ⇒ Object
End point: apps.fundamerica.com/api/entities/:id/investor_payments (GET) Usage: FundAmerica::Entity.investor_payments(entity_id)
76 77 78 |
# File 'lib/fund_america/entity.rb', line 76 def investor_payments(entity_id) API::request(:get, "entities/#{entity_id}/investor_payments") end |
.investor_suitability_details(entity_id) ⇒ Object
End point: apps.fundamerica.com/api/entities/:id/investor_suitability (GET) Usage: FundAmerica::Entity.investor_suitability_details(entity_id)
64 65 66 |
# File 'lib/fund_america/entity.rb', line 64 def investor_suitability_details(entity_id) API::request(:get, "entities/#{entity_id}/investor_suitability") end |
.investor_suitability_update(entity_id, options) ⇒ Object
End point: apps.fundamerica.com/api/entities/:id/investor_suitability (PATCH) Usage: FundAmerica::Entity.investor_suitability_update(entity_id, options)
70 71 72 |
# File 'lib/fund_america/entity.rb', line 70 def investor_suitability_update(entity_id, ) API::request(:patch, "entities/#{entity_id}/investor_suitability", ) end |
.list ⇒ Object
End point: apps.fundamerica.com/api/entities (GET) Usage: FundAmerica::Entity.list Output: Returns list of entities
8 9 10 |
# File 'lib/fund_america/entity.rb', line 8 def list API::request(:get, 'entities') end |
.parent_entities(entity_id) ⇒ Object
apps.fundamerica.com/api/entities/:id/parent_entities (GET) Usage: FundAmerica::Entity.parent_entities Output: Returns parent entities of an entity
97 98 99 |
# File 'lib/fund_america/entity.rb', line 97 def parent_entities(entity_id) API::request(:get, "entities/#{entity_id}/parent_entities") end |
.platform_investor(entity_id) ⇒ Object
apps.fundamerica.com/api/entities/:id/platform_investor (GET) Usage: FundAmerica::Entity.platform_investor Output: Returns entity specific platform_investor information Note: FA platform investor information will also be included with investor information
126 127 128 |
# File 'lib/fund_america/entity.rb', line 126 def platform_investor(entity_id ) API::request(:get, "entities/#{entity_id}/platform_investor") end |
.relationships_as_child(entity_id) ⇒ Object
apps.fundamerica.com/api/entities/:id/relationships_as_child (GET) Usage: FundAmerica::Entity.relationships_as_child Output: Returns relationships_as_child details for entity
104 105 106 |
# File 'lib/fund_america/entity.rb', line 104 def relationships_as_child(entity_id) API::request(:get, "entities/#{entity_id}/relationships_as_child") end |
.relationships_as_parent(entity_id) ⇒ Object
apps.fundamerica.com/api/entities/:id/relationships_as_parent (GET) Usage: FundAmerica::Entity.relationships_as_parent Output: Returns relationships_as_parent details for entity
111 112 113 |
# File 'lib/fund_america/entity.rb', line 111 def relationships_as_parent(entity_id) API::request(:get, "entities/#{entity_id}/relationships_as_parent") end |
.update(entity_id, options) ⇒ Object
End point: apps.fundamerica.com/api/entities/:id (PATCH) Usage: FundAmerica::Entity.update(entity_id, options) Output: Updates an entity - person or company Uses test_mode update when used in sandbox mode
23 24 25 26 |
# File 'lib/fund_america/entity.rb', line 23 def update(entity_id, ) end_point_url = FundAmerica.base_uri + "#{FundAmerica.mode == 'sandbox' ? 'test_mode/' : ''}" + "entities/#{entity_id}" API::request(:patch, end_point_url, ) end |