fund_america 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: f3e837f7354c9bac5f104e48c50e02f5282cf644
4
+ data.tar.gz: 559d34a2abd723b06e624d0d4bd48a6d9bf47ab6
5
+ SHA512:
6
+ metadata.gz: ef2714f2b8125a6cfce60c4c52d4e908173c9045804807b1d9f2edbfa8c991995061811e72e6ad4420efc5e346e764922cfccbfb46c01e1acd05e9041257e357
7
+ data.tar.gz: 2f6a7d8ae39bba23a4ae98f040906adb075d36af516ee91074c6cd6f87094eab49005409470f1489f8e4ee5ad2115c54d2381c4952c0749c860287515c547838
@@ -0,0 +1,11 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /Gemfile.lock
4
+ /_yardoc/
5
+ /coverage/
6
+ /doc/
7
+ /pkg/
8
+ /spec/reports/
9
+ /tmp/
10
+ /.ruby-version
11
+ /.ruby-gemset
data/.rspec ADDED
@@ -0,0 +1,2 @@
1
+ --format documentation
2
+ --color
@@ -0,0 +1,3 @@
1
+ language: ruby
2
+ rvm:
3
+ - 2.2.2
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in fund_america.gemspec
4
+ gemspec
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2015 RubyEffect Software Solutions Pvt. Ltd.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
@@ -0,0 +1,44 @@
1
+ # FundAmerica
2
+
3
+ This is a ruby gem to provide easy implementation of FundAmerica API
4
+
5
+ ## Installation
6
+
7
+ Add this line to your application's Gemfile:
8
+
9
+ ```ruby
10
+ gem 'fund_america'
11
+ ```
12
+
13
+ And then execute:
14
+
15
+ $ bundle
16
+
17
+ Or install it yourself as:
18
+
19
+ $ gem install fund_america
20
+
21
+ ## Usage
22
+
23
+ The details on usage are present at: http://www.rubyeffect.com/blog/category/fundamerica. If you wish to see FundAmerica's API documentation, please visit the url: https://apps.fundamerica.com/support/documentation
24
+
25
+ ## TODO
26
+
27
+ 1. Addition of new end points as per the latest FundAmerica latest changelog
28
+ 2. Addition of paginated results fetch, sorting and hide options for resource_list responses
29
+ 3. Support for ruby versions < 2.2.2
30
+ 4. More test cases
31
+
32
+ ## Development
33
+
34
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `bin/console` for an interactive prompt that will allow you to experiment.
35
+
36
+ To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release` to create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
37
+
38
+ ## Contributing
39
+
40
+ 1. Fork it ( https://github.com/[my-github-username]/fund_america/fork )
41
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
42
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
43
+ 4. Push to the branch (`git push origin my-new-feature`)
44
+ 5. Create a new Pull Request
@@ -0,0 +1 @@
1
+ require "bundler/gem_tasks"
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "bundler/setup"
4
+ require "fund_america"
5
+
6
+ # You can add fixtures and/or initialization code here to make experimenting
7
+ # with your gem easier. You can also use a different console, if you like.
8
+
9
+ # (If you use this, don't forget to add pry to your Gemfile!)
10
+ require "pry"
11
+ Pry.start
12
+
13
+ # require "irb"
14
+ # IRB.start
@@ -0,0 +1,7 @@
1
+ #!/bin/bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+
5
+ bundle install
6
+
7
+ # Do any other automated setup that you need to do here
@@ -0,0 +1,39 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'fund_america/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "fund_america"
8
+ spec.version = FundAmerica::VERSION
9
+ spec.authors = ["Sanjay Vedula"]
10
+ spec.email = ["opensource@rubyeffect.com"]
11
+
12
+ spec.summary = %q{Ruby gem for easy implementation of FundAmerica API in ruby, rails, sinatra apps}
13
+ spec.description = %q{This is a ruby gem to use the FundAmerica (http://www.fundamerica.com) API easily in your ruby, rails and sinatra apps built by RubyEffect (http://www.rubyeffect.com)}
14
+ spec.homepage = "http://www.rubyeffect.com/blog/category/fundamerica"
15
+ spec.license = "MIT"
16
+
17
+ # Prevent pushing this gem to RubyGems.org by setting 'allowed_push_host', or
18
+ # delete this section to allow pushing this gem to any host.
19
+ # if spec.respond_to?(:metadata)
20
+ # spec.metadata['allowed_push_host'] = "TODO: Set to 'http://mygemserver.com'"
21
+ # else
22
+ # raise "RubyGems 2.0 or newer is required to protect against public gem pushes."
23
+ # end
24
+
25
+ spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
26
+ spec.bindir = "exe"
27
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
28
+ spec.require_paths = ["lib"]
29
+
30
+ # Development Dependencies
31
+ spec.add_development_dependency "bundler", "~> 1.9"
32
+ spec.add_development_dependency "rake", "~> 10.0"
33
+ spec.add_development_dependency 'pry'
34
+ spec.add_development_dependency 'rspec'
35
+
36
+ # Runtime Dependencies
37
+ spec.add_runtime_dependency 'httparty'
38
+ spec.add_runtime_dependency 'json'
39
+ end
@@ -0,0 +1,55 @@
1
+ require 'httparty'
2
+ require 'json'
3
+ require 'fund_america/all'
4
+
5
+ module FundAmerica
6
+ class << self
7
+ # Returns API key or raises exception
8
+ def api_key
9
+ # TODO - Uncomment below line for production
10
+ defined? @api_key and @api_key or raise "FundAmerica.api_key not configured"
11
+
12
+ # Sandbox test API key is used for development
13
+ # defined? @api_key and @api_key or @api_key = test_api_key
14
+ end
15
+ attr_writer :api_key
16
+
17
+ # Returns mode and if mode is not set, it takes sandbox as mode
18
+ # Mode is either sandbox or production
19
+ def mode
20
+ defined? @mode and @mode or @mode='sandbox'
21
+ end
22
+ attr_writer :mode
23
+
24
+ # Sets the API endpoint based on mode
25
+ # The base uri here has the common url part in end points
26
+ # For each API request, the request specific element must be added
27
+ # An example for entities is: base_uri + 'entities'
28
+ def base_uri
29
+ if mode == 'sandbox'
30
+ @base_uri = 'https://sandbox.fundamerica.com/api/'
31
+ else
32
+ @base_uri = 'https://apps.fundamerica.com/api/'
33
+ end
34
+ end
35
+
36
+ # Returns basic authentication hash
37
+ # While making a request, merge this hash into options hash of request
38
+ # Request specific hash has to be merged into this hash with key as body
39
+ # The options hash would look like
40
+ # {:basic_auth => {:username => 'someapikey'}}, :body => request_specific_options_hash}
41
+ def basic_auth
42
+ {
43
+ :basic_auth => {
44
+ :username => api_key
45
+ }
46
+ }
47
+ end
48
+
49
+ # Sandbox API key - Only for development purpose
50
+ # TODO - Remove this method for production
51
+ # def test_api_key
52
+ # "sandbox-key-here"
53
+ # end
54
+ end
55
+ end
@@ -0,0 +1,54 @@
1
+ module FundAmerica
2
+ class AchAuthorization
3
+ class << self
4
+
5
+ # End point: https://apps.fundamerica.com/api/ach_authorizations (GET)
6
+ # Usage: FundAmerica::AchAuthorization.list
7
+ # Output: Returns list of ach_authorizations
8
+ def list
9
+ API::request(:get, FundAmerica.base_uri + 'ach_authorizations')
10
+ end
11
+
12
+ # End point: https://apps.fundamerica.com/api/ach_authorizations (POST)
13
+ # Usage: FundAmerica::AchAuthorization.create(options)
14
+ # Output: Creates a new ach_authorization
15
+ def create(options)
16
+ API::request(:post, FundAmerica.base_uri + 'ach_authorizations', options)
17
+ end
18
+
19
+ # End point: https://apps.fundamerica.com/api/ach_authorizations/:id (GET)
20
+ # Usage: FundAmerica::AchAuthorization.details(ach_authorization_id)
21
+ # Output: Returns the details of an ach_authorization with matching id
22
+ def details(ach_authorization_id)
23
+ API::request(:get, FundAmerica.base_uri + "ach_authorizations/#{ach_authorization_id}")
24
+ end
25
+
26
+ # End point: https://apps.fundamerica.com/api/ach_authorizations/:id (DELETE)
27
+ # Usage: FundAmerica::AchAuthorization.delete(ach_authorization_id)
28
+ # Output: Deletes an ach_authorization with matching id
29
+ def delete(ach_authorization_id)
30
+ API::request(:delete, FundAmerica.base_uri + "ach_authorizations/#{ach_authorization_id}")
31
+ end
32
+
33
+ # End point: https://apps.fundamerica.com/api/ach_authorizations/agreement_html (GET)
34
+ # Usage: FundAmerica::AchAuthorization.agreement_html
35
+ # Output: Returns the ACH authorization HTML
36
+ def agreement_html
37
+ API::request(:get, FundAmerica.base_uri + "ach_authorizations/agreement_html")
38
+ end
39
+
40
+ # End point: https://apps.fundamerica.com/api/ach_tokens (POST)
41
+ # Usage: FundAmerica::AchAuthorization.ach_tokens(options)
42
+ # Output: Returns ACH token
43
+
44
+ # TODO - As ACH token has a single end point it has been clubbed with
45
+ # ACH authorizations. Either all end points that are single methods
46
+ # have to be taken in a common file separately or clubbed with related
47
+ # end point set. To be discussed further on approach
48
+ def ach_tokens(options)
49
+ API::request(:post, FundAmerica.base_uri + 'ach_tokens', options)
50
+ end
51
+
52
+ end
53
+ end
54
+ end
@@ -0,0 +1,29 @@
1
+ # Instead of adding all require statements in lib/fund_america.rb
2
+ # require 'fund_america/all' is used
3
+ # In this all.rb file all require statements for files in lib/fund_america
4
+ # directory must be given
5
+ require 'fund_america/version'
6
+ require 'fund_america/api'
7
+ require 'fund_america/error'
8
+
9
+ # API end points below
10
+ require 'fund_america/api_info'
11
+ require 'fund_america/ach_authorization'
12
+ require 'fund_america/background_check'
13
+ require 'fund_america/bank_info'
14
+ require 'fund_america/billing_log'
15
+ require 'fund_america/cancel_offering_request'
16
+ require 'fund_america/close_offering_request'
17
+ require 'fund_america/electronic_signature'
18
+ require 'fund_america/entity_relationship'
19
+ require 'fund_america/entity'
20
+ require 'fund_america/escrow_agreement'
21
+ require 'fund_america/escrow_service_application'
22
+ require 'fund_america/investment_payment'
23
+ require 'fund_america/investment'
24
+ require 'fund_america/offering'
25
+ require 'fund_america/plaid_authentication'
26
+ require 'fund_america/subscription_agreement'
27
+ require 'fund_america/subscription_agreement_template'
28
+ require 'fund_america/trade_review'
29
+ require 'fund_america/webhook_log'
@@ -0,0 +1,44 @@
1
+ module FundAmerica
2
+ class API
3
+ class << self
4
+
5
+ # This method is called from each end point method to make API requests
6
+ # using HTTParty gem. Takes the method, uri and options as input
7
+ # Handles response and errors
8
+ def request method, uri, options={}
9
+ options = FundAmerica.basic_auth.merge!({:body => options})
10
+ response = HTTParty.send(method, uri, options)
11
+ parsed_response = JSON.parse(response.body)
12
+ if response.code.to_i == 200
13
+ puts parsed_response.inspect
14
+ # Returns parsed_response - a hash of response body
15
+ # if response is successful
16
+ parsed_response
17
+ else
18
+ # Raises error if the response is not sucessful
19
+ raise FundAmerica::Error.new(parsed_response, response.code.to_i)
20
+ end
21
+ end
22
+
23
+ # End point: https://sandbox.fundamerica.com/api/test_mode/clear_data (POST)
24
+ # Usage: FundAmerica::API.clear_data
25
+ # Output: Clears all test data created in sandbox mode
26
+ # Important: Sandbox mode only method
27
+ def clear_data
28
+ API::request(:post, 'https://sandbox.fundamerica.com/api/test_mode/clear_data')
29
+ end
30
+
31
+ # End point: https://apps.fundamerica.com/api/investorsuitabilitytokens (POST)
32
+ # Usage: FundAmerica::API.investor_suitabilitytokens(options)
33
+ def investor_suitabilitytokens(options)
34
+ API::request(:post, FundAmerica.base_uri + 'investorsuitabilitytokens', options)
35
+ end
36
+
37
+ # End point: https://apps.fundamerica.com/api/ledger_entries/:id (GET)
38
+ # Usage: FundAmerica::API.ledger_entry(ledger_entry_id)
39
+ def ledger_entry(ledger_entry_id)
40
+ API::request(:get, FundAmerica.base_uri + "ledger_entries/#{ledger_entry_id}")
41
+ end
42
+ end
43
+ end
44
+ end
@@ -0,0 +1,16 @@
1
+ module FundAmerica
2
+ class ApiInfo
3
+ class << self
4
+
5
+ # End point: https://apps.fundamerica.com/api/info (GET)
6
+ # Usage: FundAmerica::ApiInfo.info
7
+ # Output: Gives the account name, user name and api version details
8
+ # Description: This method makes a call to request method
9
+ # The API class request method is a common method that takes care of
10
+ # making API request, handling response and errors
11
+ def info
12
+ API::request(:get, FundAmerica.base_uri + 'info')
13
+ end
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,28 @@
1
+ module FundAmerica
2
+ class BackgroundCheck
3
+ class << self
4
+
5
+ # End point: https://apps.fundamerica.com/api/background_checks (GET)
6
+ # Usage: FundAmerica::BackgroundCheck.list
7
+ # Output: Returns list of background_checks
8
+ def list
9
+ API::request(:get, FundAmerica.base_uri + 'background_checks')
10
+ end
11
+
12
+ # End point: https://apps.fundamerica.com/api/background_checks (POST)
13
+ # Usage: FundAmerica::BackgroundCheck.create(options)
14
+ # Output: Creates a new background_check
15
+ def create(options)
16
+ API::request(:post, FundAmerica.base_uri + 'background_checks', options)
17
+ end
18
+
19
+ # End point: https://apps.fundamerica.com/api/background_checks/:id (GET)
20
+ # Usage: FundAmerica::BackgroundCheck.details(background_check_id)
21
+ # Output: Returns the details of an background_check with matching id
22
+ def details(background_check_id)
23
+ API::request(:get, FundAmerica.base_uri + "background_checks/#{background_check_id}")
24
+ end
25
+
26
+ end
27
+ end
28
+ end
@@ -0,0 +1,12 @@
1
+ module FundAmerica
2
+ class BankInfo
3
+ class << self
4
+
5
+ # End point: https://apps.fundamerica.com/api/bank_info/:routing_number (GET)
6
+ # Usage: FundAmerica::BankInfo.info(routing_number)
7
+ def info(routing_number)
8
+ API::request(:get, FundAmerica.base_uri + "bank_info/#{routing_number}")
9
+ end
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,21 @@
1
+ module FundAmerica
2
+ class BillingLog
3
+ class << self
4
+
5
+ # End point: https://apps.fundamerica.com/api/billing_logs (GET)
6
+ # Usage: FundAmerica::BillingLog.list
7
+ # Output: Returns list of billing_logs
8
+ def list
9
+ API::request(:get, FundAmerica.base_uri + 'billing_logs')
10
+ end
11
+
12
+ # End point: https://apps.fundamerica.com/api/billing_logs/:id (GET)
13
+ # Usage: FundAmerica::BillingLog.details(billing_log_id)
14
+ # Output: Returns the details of an billing_log with matching id
15
+ def details(billing_log_id)
16
+ API::request(:get, FundAmerica.base_uri + "billing_logs/#{billing_log_id}")
17
+ end
18
+
19
+ end
20
+ end
21
+ end
@@ -0,0 +1,37 @@
1
+ module FundAmerica
2
+ class CancelOfferingRequest
3
+ class << self
4
+
5
+ # End point: https://apps.fundamerica.com/api/cancel_offering_requests (GET)
6
+ # Usage: FundAmerica::CancelOfferingRequest.list
7
+ # Output: Returns list of cancel_offering_requests
8
+ def list
9
+ API::request(:get, FundAmerica.base_uri + 'cancel_offering_requests')
10
+ end
11
+
12
+ # End point: https://apps.fundamerica.com/api/cancel_offering_requests (POST)
13
+ # Usage: FundAmerica::CancelOfferingRequest.create(options)
14
+ # Output: Creates a new cancel_offering_request
15
+ def create(options)
16
+ API::request(:post, FundAmerica.base_uri + 'cancel_offering_requests', options)
17
+ end
18
+
19
+ # End point: https://sandbox.fundamerica.com/api/test_mode/cancel_offering_requests/:id (PATCH)
20
+ # Usage: FundAmerica::CancelOfferingRequest.update(cancel_offering_request_id, options)
21
+ # Output: Updates a cancel_offering_request
22
+ # Important: This works only for Sandbox mode
23
+ def update(cancel_offering_request_id, options)
24
+ end_point_url = 'https://sandbox.fundamerica.com/api/test_mode/cancel_offering_requests/' + cancel_offering_request_id
25
+ API::request(:patch, end_point_url, options)
26
+ end
27
+
28
+ # End point: https://apps.fundamerica.com/api/cancel_offering_requests/:id (GET)
29
+ # Usage: FundAmerica::CancelOfferingRequest.details(cancel_offering_request_id)
30
+ # Output: Returns the details of an cancel_offering_request with matching id
31
+ def details(cancel_offering_request_id)
32
+ API::request(:get, FundAmerica.base_uri + "cancel_offering_requests/#{cancel_offering_request_id}")
33
+ end
34
+
35
+ end
36
+ end
37
+ end
@@ -0,0 +1,39 @@
1
+ module FundAmerica
2
+ class CloseOfferingRequest
3
+ class << self
4
+
5
+ # End point: https://apps.fundamerica.com/api/close_offering_requests (GET)
6
+ # Usage: FundAmerica::CloseOfferingRequest.list
7
+ # Output: Returns list of close_offering_requests
8
+ def list
9
+ API::request(:get, FundAmerica.base_uri + 'close_offering_requests')
10
+ end
11
+
12
+ # End point: https://apps.fundamerica.com/api/close_offering_requests (POST)
13
+ # Usage: FundAmerica::CloseOfferingRequest.create(options)
14
+ # Output: Creates a new close_offering_request
15
+
16
+ # TODO - Test creation of close offering once offering has reached goal
17
+ def create(options)
18
+ API::request(:post, FundAmerica.base_uri + 'close_offering_requests', options)
19
+ end
20
+
21
+ # End point: https://sandbox.fundamerica.com/api/test_mode/close_offering_requests/:id (PATCH)
22
+ # Usage: FundAmerica::CloseOfferingRequest.update(close_offering_request_id, options)
23
+ # Output: Updates a close_offering_request
24
+ # Important: This works only for Sandbox mode
25
+ def update(close_offering_request_id, options)
26
+ end_point_url = 'https://sandbox.fundamerica.com/api/test_mode/close_offering_requests/' + close_offering_request_id
27
+ API::request(:patch, end_point_url, options)
28
+ end
29
+
30
+ # End point: https://apps.fundamerica.com/api/close_offering_requests/:id (GET)
31
+ # Usage: FundAmerica::CloseOfferingRequest.details(close_offering_request_id)
32
+ # Output: Returns the details of an close_offering_request with matching id
33
+ def details(close_offering_request_id)
34
+ API::request(:get, FundAmerica.base_uri + "close_offering_requests/#{close_offering_request_id}")
35
+ end
36
+
37
+ end
38
+ end
39
+ end
@@ -0,0 +1,21 @@
1
+ module FundAmerica
2
+ class ElectronicSignature
3
+ class << self
4
+
5
+ # End point: https://apps.fundamerica.com/api/electronic_signatures/:id (GET)
6
+ # Usage: FundAmerica::ElectronicSignature.details(electronic_signature_id)
7
+ # Output: Returns details of electronic_signature with matching id
8
+ def details(electronic_signature_id)
9
+ API::request(:get, FundAmerica.base_uri + "electronic_signatures/#{electronic_signature_id}")
10
+ end
11
+
12
+ # End point: https://apps.fundamerica.com/api/electronic_signatures/:id (PATCH)
13
+ # Usage: FundAmerica::ElectronicSignature.update(electronic_signature_id, options)
14
+ # Output: Updates an electronic_signature
15
+ def update(electronic_signature_id, options)
16
+ API::request(:patch, FundAmerica.base_uri + "electronic_signatures/#{electronic_signature_id}", options)
17
+ end
18
+
19
+ end
20
+ end
21
+ end
@@ -0,0 +1,76 @@
1
+ module FundAmerica
2
+ class Entity
3
+ class << self
4
+
5
+ # End point: https://apps.fundamerica.com/api/entities (GET)
6
+ # Usage: FundAmerica::Entity.list
7
+ # Output: Returns list of entities
8
+ def list
9
+ API::request(:get, FundAmerica.base_uri + 'entities')
10
+ end
11
+
12
+ # End point: https://apps.fundamerica.com/api/entities (POST)
13
+ # Usage: FundAmerica::Entity.create(options)
14
+ # Output: Creates a new entity - person or company
15
+ def create(options)
16
+ API::request(:post, FundAmerica.base_uri + 'entities', options)
17
+ end
18
+
19
+ # End point: https://apps.fundamerica.com/api/entities/:id (PATCH)
20
+ # Usage: FundAmerica::Entity.update(entity_id, options)
21
+ # Output: Updates an entity - person or company
22
+ # Uses test_mode update when used in sandbox mode
23
+ def update(entity_id, options)
24
+ end_point_url = FundAmerica.base_uri + "#{FundAmerica.mode == 'sandbox' ? 'test_mode/' : ''}" + "entities/#{entity_id}"
25
+ API::request(:patch, end_point_url, options)
26
+ end
27
+
28
+ # End point: https://apps.fundamerica.com/api/entities/:id (GET)
29
+ # Usage: FundAmerica::Entity.details(entity_id)
30
+ # Output: Returns the details of an entity with matching id
31
+ def details(entity_id)
32
+ API::request(:get, FundAmerica.base_uri + "entities/#{entity_id}")
33
+ end
34
+
35
+ # End point: https://apps.fundamerica.com/api/entities/:id (DELETE)
36
+ # Usage: FundAmerica::Entity.delete(entity_id)
37
+ # Output: Deletes an entity with matching id
38
+
39
+ # TODO - The delete option from sandbox mode gives the error message
40
+ # FundAmerica::Error: Not authorized.
41
+ # You don't have permission to take action on a particular resource.
42
+ # It may not be owned by your account or it may be in a state
43
+ # where you action cannot be taken (such as attempting to cancel an invested investment)
44
+ # This request has to be tested with production mode in final testing phase
45
+ def delete(entity_id)
46
+ API::request(:delete, FundAmerica.base_uri + "entities/#{entity_id}")
47
+ end
48
+
49
+ # End point: https://apps.fundamerica.com/api/entities/:entity_id/ach_authorizations (GET)
50
+ # Usage: FundAmerica::Entity.ach_authorizations(entity_id)
51
+ # Output: Returns ACH authorizations of an entity
52
+ def ach_authorizations(entity_id)
53
+ API::request(:get, FundAmerica.base_uri + "entities/#{entity_id}/ach_authorizations")
54
+ end
55
+
56
+ # End point: https://apps.fundamerica.com/api/entities/:id/cash_blotter (GET)
57
+ # Usage: FundAmerica::Entity.cash_blotter(entity_id)
58
+ def cash_blotter(entity_id)
59
+ API::request(:get, FundAmerica.base_uri + "entities/#{entity_id}/cash_blotter")
60
+ end
61
+
62
+ # End point: https://apps.fundamerica.com/api/entities/:id/investor_suitability (GET)
63
+ # Usage: FundAmerica::Entity.investor_suitability_details(entity_id)
64
+ def investor_suitability_details(entity_id)
65
+ API::request(:get, FundAmerica.base_uri + "entities/#{entity_id}/investor_suitability")
66
+ end
67
+
68
+ # End point: https://apps.fundamerica.com/api/entities/:id/investor_suitability (PATCH)
69
+ # Usage: FundAmerica::Entity.investor_suitability_update(entity_id, options)
70
+ def investor_suitability_update(entity_id, options)
71
+ API::request(:patch, FundAmerica.base_uri + "entities/#{entity_id}/investor_suitability", options)
72
+ end
73
+
74
+ end
75
+ end
76
+ end
@@ -0,0 +1,43 @@
1
+ module FundAmerica
2
+ class EntityRelationship
3
+ class << self
4
+
5
+ # End point: https://apps.fundamerica.com/api/entity_relationships (GET)
6
+ # Usage: FundAmerica::EntityRelationship.list
7
+ # Output: Returns list of entity_relationships
8
+ def list
9
+ API::request(:get, FundAmerica.base_uri + 'entity_relationships')
10
+ end
11
+
12
+ # End point: https://apps.fundamerica.com/api/entity_relationships (POST)
13
+ # Usage: FundAmerica::EntityRelationship.create(options)
14
+ # Output: Creates a new entity_relationship
15
+ def create(options)
16
+ API::request(:post, FundAmerica.base_uri + 'entity_relationships', options)
17
+ end
18
+
19
+ # End point: https://apps.fundamerica.com/api/entity_relationships/:id (PATCH)
20
+ # Usage: FundAmerica::EntityRelationship.update(entity_relationship_id, options)
21
+ # Output: Updates an entity_relationship
22
+ def update(entity_relationship_id, options)
23
+ end_point_url = FundAmerica.base_uri + "entity_relationships/#{entity_relationship_id}"
24
+ API::request(:patch, end_point_url, options)
25
+ end
26
+
27
+ # End point: https://apps.fundamerica.com/api/entity_relationships/:id (GET)
28
+ # Usage: FundAmerica::EntityRelationship.details(entity_relationship_id)
29
+ # Output: Returns the details of an entity_relationship with matching id
30
+ def details(entity_relationship_id)
31
+ API::request(:get, FundAmerica.base_uri + "entity_relationships/#{entity_relationship_id}")
32
+ end
33
+
34
+ # End point: https://apps.fundamerica.com/api/entity_relationships/:id (DELETE)
35
+ # Usage: FundAmerica::EntityRelationship.delete(entity_relationship_id)
36
+ # Output: Deletes an entity_relationship with matching id
37
+ def delete(entity_relationship_id)
38
+ API::request(:delete, FundAmerica.base_uri + "entity_relationships/#{entity_relationship_id}")
39
+ end
40
+
41
+ end
42
+ end
43
+ end
@@ -0,0 +1,31 @@
1
+ module FundAmerica
2
+ class Error < StandardError
3
+ attr_reader :parsed_response
4
+
5
+ # Contructor method to take response code and parsed_response
6
+ # and give object methods in rescue - e.message and e.parsed_response
7
+ def initialize(parsed_response, code)
8
+ super(FundAmerica::Error.error_message(code))
9
+ @parsed_response = parsed_response
10
+ end
11
+
12
+ # Method to return error message based on the response code
13
+ def self.error_message(code)
14
+ case code
15
+ when 401 then
16
+ 'Authentication error. Your API key is incorrect'
17
+ when 403 then
18
+ "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)"
19
+ when 404 then
20
+ 'Resource was not found'
21
+ when 422 then
22
+ 'This usually means you are missing or have supplied invalid parameters for a request'
23
+ when 500 then
24
+ "Internal server error. Something went wrong. This is a bug. Please report it to support immediately"
25
+ else
26
+ 'An error occured. Please check parsed_response for details'
27
+ end
28
+ end
29
+
30
+ end
31
+ end
@@ -0,0 +1,28 @@
1
+ module FundAmerica
2
+ class EscrowAgreement
3
+ class << self
4
+
5
+ # End point: https://apps.fundamerica.com/api/escrow_agreements (GET)
6
+ # Usage: FundAmerica::EscrowAgreement.list
7
+ # Output: Returns list of escrow_agreements
8
+ def list
9
+ API::request(:get, FundAmerica.base_uri + 'escrow_agreements')
10
+ end
11
+
12
+ # End point: https://apps.fundamerica.com/api/escrow_agreements (POST)
13
+ # Usage: FundAmerica::EscrowAgreement.create(options)
14
+ # Output: Creates a new escrow_agreement
15
+ def create(options)
16
+ API::request(:post, FundAmerica.base_uri + 'escrow_agreements', options)
17
+ end
18
+
19
+ # End point: https://apps.fundamerica.com/api/escrow_agreements/:id (GET)
20
+ # Usage: FundAmerica::EscrowAgreement.details(escrow_agreement_id)
21
+ # Output: Returns the details of an escrow_agreement with matching id
22
+ def details(escrow_agreement_id)
23
+ API::request(:get, FundAmerica.base_uri + "escrow_agreements/#{escrow_agreement_id}")
24
+ end
25
+
26
+ end
27
+ end
28
+ end
@@ -0,0 +1,36 @@
1
+ module FundAmerica
2
+ class EscrowServiceApplication
3
+ class << self
4
+
5
+ # End point: https://apps.fundamerica.com/api/escrow_service_applications (GET)
6
+ # Usage: FundAmerica::EscrowServiceApplication.list
7
+ # Output: Returns list of escrow_service_applications
8
+ def list
9
+ API::request(:get, FundAmerica.base_uri + 'escrow_service_applications')
10
+ end
11
+
12
+ # End point: https://apps.fundamerica.com/api/escrow_service_applications (POST)
13
+ # Usage: FundAmerica::EscrowServiceApplication.create(options)
14
+ # Output: Creates a new escrow_service_application
15
+ def create(options)
16
+ API::request(:post, FundAmerica.base_uri + 'escrow_service_applications', options)
17
+ end
18
+
19
+ # End point: https://sandbox.fundamerica.com/api/test_mode/escrow_service_applications/:id (PATCH)
20
+ # Usage: FundAmerica::EscrowServiceApplication.update(escrow_service_application_id, options)
21
+ # Output: Updates the escrow service application with matching id
22
+ # Important: Sandbox only method
23
+ def update(escrow_service_application_id, options)
24
+ API::request(:patch, "https://sandbox.fundamerica.com/api/test_mode/escrow_service_applications/#{escrow_service_application_id}", options)
25
+ end
26
+
27
+ # End point: https://apps.fundamerica.com/api/escrow_service_applications/:id (GET)
28
+ # Usage: FundAmerica::EscrowServiceApplication.details(escrow_service_application_id)
29
+ # Output: Returns the details of an escrow_service_application with matching id
30
+ def details(escrow_service_application_id)
31
+ API::request(:get, FundAmerica.base_uri + "escrow_service_applications/#{escrow_service_application_id}")
32
+ end
33
+
34
+ end
35
+ end
36
+ end
@@ -0,0 +1,58 @@
1
+ module FundAmerica
2
+ class Investment
3
+ class << self
4
+
5
+ # End point: https://apps.fundamerica.com/api/investments (GET)
6
+ # Usage: FundAmerica::Investment.list
7
+ # Output: Returns list of investments
8
+ def list
9
+ API::request(:get, FundAmerica.base_uri + 'investments')
10
+ end
11
+
12
+ # End point: https://apps.fundamerica.com/api/investments (POST)
13
+ # Usage: FundAmerica::Investment.create(options)
14
+ # Output: Creates a new investment
15
+ def create(options)
16
+ API::request(:post, FundAmerica.base_uri + 'investments', options)
17
+ end
18
+
19
+ # End point: https://apps.fundamerica.com/api/investments/:id (PATCH)
20
+ # Usage: FundAmerica::Investment.update(investment_id, options)
21
+ # Output: Updates an investment
22
+ # In sandbox mode status can be updated to received using test_mode url
23
+ def update(investment_id, options)
24
+ end_point_url = FundAmerica.base_uri + "#{FundAmerica.mode == 'sandbox' ? 'test_mode/' : ''}" + "investments/#{investment_id}"
25
+ API::request(:patch, end_point_url, options)
26
+ end
27
+
28
+ # End point: https://apps.fundamerica.com/api/investments/:id (GET)
29
+ # Usage: FundAmerica::Investment.details(investment_id)
30
+ # Output: Returns the details of an investment with matching id
31
+ def details(investment_id)
32
+ API::request(:get, FundAmerica.base_uri + "investments/#{investment_id}")
33
+ end
34
+
35
+ # End point: https://apps.fundamerica.com/api/investments/:id (DELETE)
36
+ # Usage: FundAmerica::Investment.delete(investment_id)
37
+ # Output: Deletes an investment with matching id
38
+ def delete(investment_id)
39
+ API::request(:delete, FundAmerica.base_uri + "investments/#{investment_id}")
40
+ end
41
+
42
+ # End point: https://apps.fundamerica.com/api/investments/:id/billing_logs (GET)
43
+ # Usage: FundAmerica::Investment.billing_logs(investment_id)
44
+ # Output: Returns billing logs of an investment with matching id
45
+ def billing_logs(investment_id)
46
+ API::request(:get, FundAmerica.base_uri + "investments/#{investment_id}/billing_logs")
47
+ end
48
+
49
+ # End point: https://apps.fundamerica.com/api/investments/:id/investment_payments (GET)
50
+ # Usage: FundAmerica::Investment.investment_payments(investment_id)
51
+ # Output: Returns investment_payments of an investment with matching id
52
+ def investment_payments(investment_id)
53
+ API::request(:get, FundAmerica.base_uri + "investments/#{investment_id}/investment_payments")
54
+ end
55
+
56
+ end
57
+ end
58
+ end
@@ -0,0 +1,21 @@
1
+ module FundAmerica
2
+ class InvestmentPayment
3
+ class << self
4
+
5
+ # End point: https://apps.fundamerica.com/api/investment_payments (GET)
6
+ # Usage: FundAmerica::InvestmentPayment.list
7
+ # Output: Returns list of investment_payments
8
+ def list
9
+ API::request(:get, FundAmerica.base_uri + 'investment_payments')
10
+ end
11
+
12
+ # End point: https://apps.fundamerica.com/api/investment_payments/:id (GET)
13
+ # Usage: FundAmerica::InvestmentPayment.details(investment_payment_id)
14
+ # Output: Returns the details of an investment_payment with matching id
15
+ def details(investment_payment_id)
16
+ API::request(:get, FundAmerica.base_uri + "investment_payments/#{investment_payment_id}")
17
+ end
18
+
19
+ end
20
+ end
21
+ end
@@ -0,0 +1,65 @@
1
+ module FundAmerica
2
+ class Offering
3
+ class << self
4
+
5
+ # End point: https://apps.fundamerica.com/api/offerings (GET)
6
+ # Usage: FundAmerica::Offering.list
7
+ # Output: Returns list of offerings
8
+ def list
9
+ API::request(:get, FundAmerica.base_uri + 'offerings')
10
+ end
11
+
12
+ # End point: https://apps.fundamerica.com/api/offerings (POST)
13
+ # Usage: FundAmerica::Offering.create(options)
14
+ # Output: Creates a new offering
15
+ def create(options)
16
+ API::request(:post, FundAmerica.base_uri + 'offerings', options)
17
+ end
18
+
19
+ # End point: https://apps.fundamerica.com/api/offerings/:id (PATCH)
20
+ # Usage: FundAmerica::Offering.update(offering_id, options)
21
+ # Output: Updates an offering
22
+ # In sandbox mode accept_investments can only be updated
23
+ def update(offering_id, options)
24
+ end_point_url = FundAmerica.base_uri + "#{FundAmerica.mode == 'sandbox' ? 'test_mode/' : ''}" + "offerings/#{offering_id}"
25
+ API::request(:patch, end_point_url, options)
26
+ end
27
+
28
+ # End point: https://apps.fundamerica.com/api/offerings/:id (GET)
29
+ # Usage: FundAmerica::Offering.details(offering_id)
30
+ # Output: Returns the details of an offering with matching id
31
+ def details(offering_id)
32
+ API::request(:get, FundAmerica.base_uri + "offerings/#{offering_id}")
33
+ end
34
+
35
+ # End point: https://apps.fundamerica.com/api/offerings/:id (DELETE)
36
+ # Usage: FundAmerica::Offering.delete(offering_id)
37
+ # Output: Deletes an offering with matching id
38
+ def delete(offering_id)
39
+ API::request(:delete, FundAmerica.base_uri + "offerings/#{offering_id}")
40
+ end
41
+
42
+ # End point: https://apps.fundamerica.com/api/offerings/:id/billing_logs (GET)
43
+ # Usage: FundAmerica::Offering.billing_logs(offering_id)
44
+ # Output: Returns billing logs of an offering with matching id
45
+ def billing_logs(offering_id)
46
+ API::request(:get, FundAmerica.base_uri + "offerings/#{offering_id}/billing_logs")
47
+ end
48
+
49
+ # End point: https://apps.fundamerica.com/api/offerings/:id/escrow_ledger (GET)
50
+ # Usage: FundAmerica::Offering.escrow_ledger(offering_id)
51
+ # Output: Returns escrow_ledger of an offering with matching id
52
+ def escrow_ledger(offering_id)
53
+ API::request(:get, FundAmerica.base_uri + "offerings/#{offering_id}/escrow_ledger")
54
+ end
55
+
56
+ # End point: https://apps.fundamerica.com/api/offerings/:id/investment_payments (GET)
57
+ # Usage: FundAmerica::Offering.investment_payments(offering_id)
58
+ # Output: Returns investment_payments of an offering with matching id
59
+ def investment_payments(offering_id)
60
+ API::request(:get, FundAmerica.base_uri + "offerings/#{offering_id}/investment_payments")
61
+ end
62
+
63
+ end
64
+ end
65
+ end
@@ -0,0 +1,51 @@
1
+ module FundAmerica
2
+ class PlaidAuthentication
3
+ class << self
4
+
5
+ # End point: https://apps.fundamerica.com/api/entities/:id/plaid_authentication (GET)
6
+ # Usage: FundAmerica::PlaidAuthentication.list(entity_id)
7
+ # Output: Returns list of plaid_authentications
8
+ def list(entity_id)
9
+ API::request(:get, FundAmerica.base_uri + "entities/#{entity_id}/plaid_authentication")
10
+ end
11
+
12
+ # End point: https://apps.fundamerica.com/api/entities/:id/plaid_authentication (POST)
13
+ # Usage: FundAmerica::PlaidAuthentication.create(entity_id, options)
14
+ # Output: Creates a new plaid_authentication
15
+ def create(entity_id, options)
16
+ API::request(:post, FundAmerica.base_uri + "entities/#{entity_id}/plaid_authentication", options)
17
+ end
18
+
19
+ # End point: https://apps.fundamerica.com/api/entities/:id/plaid_authentication (DELETE)
20
+ # Usage: FundAmerica::PlaidAuthentication.delete(entity_id)
21
+ def delete(entity_id)
22
+ API::request(:delete, FundAmerica.base_uri + "entities/#{entity_id}/plaid_authentication")
23
+ end
24
+
25
+ # End point: https://apps.fundamerica.com/api/entities/:id/plaid_authentication/institutions (GET)
26
+ # Usage: FundAmerica::PlaidAuthentication.institutions(entity_id)
27
+ def institutions(entity_id)
28
+ API::request(:get, FundAmerica.base_uri + "entities/#{entity_id}/plaid_authentication/institutions")
29
+ end
30
+
31
+ # End point: https://apps.fundamerica.com/api/entities/:id/plaid_authentication/mfa/device (POST)
32
+ # Usage: FundAmerica::PlaidAuthentication.mfa_device(entity_id, options)
33
+ def mfa_device(entity_id, options)
34
+ API::request(:post, FundAmerica.base_uri + "entities/#{entity_id}/plaid_authentication/mfa/device", options)
35
+ end
36
+
37
+ # End point: https://apps.fundamerica.com/api/entities/:id/plaid_authentication/mfa/questions (POST)
38
+ # Usage: FundAmerica::PlaidAuthentication.mfa_questions(entity_id, options)
39
+ def mfa_questions(entity_id, options)
40
+ API::request(:post, FundAmerica.base_uri + "entities/#{entity_id}/plaid_authentication/mfa/questions", options)
41
+ end
42
+
43
+ # End point: https://apps.fundamerica.com/api/entities/:id/plaid_authentication/mfa/selections (POST)
44
+ # Usage: FundAmerica::PlaidAuthentication.mfa_selections(entity_id, options)
45
+ def mfa_selections(entity_id, options)
46
+ API::request(:post, FundAmerica.base_uri + "entities/#{entity_id}/plaid_authentication/mfa/selections", options)
47
+ end
48
+
49
+ end
50
+ end
51
+ end
@@ -0,0 +1,28 @@
1
+ module FundAmerica
2
+ class SubscriptionAgreement
3
+ class << self
4
+
5
+ # End point: https://apps.fundamerica.com/api/subscription_agreements (GET)
6
+ # Usage: FundAmerica::SubscriptionAgreement.list
7
+ # Output: Returns list of subscription_agreements
8
+ def list
9
+ API::request(:get, FundAmerica.base_uri + 'subscription_agreements')
10
+ end
11
+
12
+ # End point: https://apps.fundamerica.com/api/subscription_agreements (POST)
13
+ # Usage: FundAmerica::SubscriptionAgreement.create(options)
14
+ # Output: Creates a new subscription_agreement
15
+ def create(options)
16
+ API::request(:post, FundAmerica.base_uri + 'subscription_agreements', options)
17
+ end
18
+
19
+ # End point: https://apps.fundamerica.com/api/subscription_agreements/:id (GET)
20
+ # Usage: FundAmerica::SubscriptionAgreement.details(subscription_agreement_id)
21
+ # Output: Returns the details of an subscription_agreement with matching id
22
+ def details(subscription_agreement_id)
23
+ API::request(:get, FundAmerica.base_uri + "subscription_agreements/#{subscription_agreement_id}")
24
+ end
25
+
26
+ end
27
+ end
28
+ end
@@ -0,0 +1,49 @@
1
+ module FundAmerica
2
+ class SubscriptionAgreementTemplate
3
+ class << self
4
+
5
+ # End point: https://apps.fundamerica.com/api/subscription_agreement_templates (GET)
6
+ # Usage: FundAmerica::SubscriptionAgreementTemplate.list
7
+ # Output: Returns list of subscription_agreement_templates
8
+ def list
9
+ API::request(:get, FundAmerica.base_uri + 'subscription_agreement_templates')
10
+ end
11
+
12
+ # End point: https://apps.fundamerica.com/api/subscription_agreement_templates (POST)
13
+ # Usage: FundAmerica::SubscriptionAgreementTemplate.create(options)
14
+ # Output: Creates a new subscription_agreement_template
15
+ def create(options)
16
+ API::request(:post, FundAmerica.base_uri + 'subscription_agreement_templates', options)
17
+ end
18
+
19
+ # End point: https://apps.fundamerica.com/api/subscription_agreement_templates/:id (PATCH)
20
+ # Usage: FundAmerica::SubscriptionAgreementTemplate.update(subscription_agreement_template_id, options)
21
+ # Output: Updates an subscription_agreement_template
22
+ def update(subscription_agreement_template_id, options)
23
+ API::request(:patch, FundAmerica.base_uri + "subscription_agreement_templates/#{subscription_agreement_template_id}", options)
24
+ end
25
+
26
+ # End point: https://apps.fundamerica.com/api/subscription_agreement_templates/:id (GET)
27
+ # Usage: FundAmerica::SubscriptionAgreementTemplate.details(subscription_agreement_template_id)
28
+ # Output: Returns the details of an subscription_agreement_template with matching id
29
+ def details(subscription_agreement_template_id)
30
+ API::request(:get, FundAmerica.base_uri + "subscription_agreement_templates/#{subscription_agreement_template_id}")
31
+ end
32
+
33
+ # End point: https://apps.fundamerica.com/api/subscription_agreement_templates/:id (DELETE)
34
+ # Usage: FundAmerica::SubscriptionAgreementTemplate.delete(subscription_agreement_template_id)
35
+ # Output: Deletes an subscription_agreement_template with matching id
36
+ def delete(subscription_agreement_template_id)
37
+ API::request(:delete, FundAmerica.base_uri + "subscription_agreement_templates/#{subscription_agreement_template_id}")
38
+ end
39
+
40
+ # Endpoint: https://apps.fundamerica.com/api/subscription_agreement_templates/boilerplate_html (GET)
41
+ # Usage: FundAmerica::SubscriptionAgreementTemplate.boilerplate_html
42
+ # Output: Returns boiler plate html
43
+ def boilerplate_html
44
+ API::request(:get, FundAmerica.base_uri + 'subscription_agreement_templates/boilerplate_html')
45
+ end
46
+
47
+ end
48
+ end
49
+ end
@@ -0,0 +1,30 @@
1
+ module FundAmerica
2
+ class TradeReview
3
+ class << self
4
+
5
+ # End point: https://apps.fundamerica.com/api/trade_reviews (GET)
6
+ # Usage: FundAmerica::TradeReview.list
7
+ # Output: Returns list of trade_reviews
8
+ def list
9
+ API::request(:get, FundAmerica.base_uri + 'trade_reviews')
10
+ end
11
+
12
+ # End point: https://sandbox.fundamerica.com/api/test_mode/trade_reviews/:id (PATCH)
13
+ # Usage: FundAmerica::TradeReview.update(trade_review_id, options)
14
+ # Output: Updates a trade_review
15
+ # Important: This works only for Sandbox mode
16
+ def update(trade_review_id, options)
17
+ end_point_url = 'https://sandbox.fundamerica.com/api/test_mode/trade_reviews/' + trade_review_id
18
+ API::request(:patch, end_point_url, options)
19
+ end
20
+
21
+ # End point: https://apps.fundamerica.com/api/trade_reviews/:id (GET)
22
+ # Usage: FundAmerica::TradeReview.details(trade_review_id)
23
+ # Output: Returns the details of an trade_review with matching id
24
+ def details(trade_review_id)
25
+ API::request(:get, FundAmerica.base_uri + "trade_reviews/#{trade_review_id}")
26
+ end
27
+
28
+ end
29
+ end
30
+ end
@@ -0,0 +1,7 @@
1
+ module FundAmerica
2
+ # The first version is being given as 0.0.1
3
+ # The format is Major dot Minor dot patch
4
+ # Check the FundAmerica changelog regularly and add changes from it
5
+ # Increase the patch number
6
+ VERSION = "0.0.1"
7
+ end
@@ -0,0 +1,21 @@
1
+ module FundAmerica
2
+ class WebhookLog
3
+ class << self
4
+
5
+ # End point: https://apps.fundamerica.com/api/webhook_logs (GET)
6
+ # Usage: FundAmerica::WebhookLog.list
7
+ # Output: Returns list of webhook_logs
8
+ def list
9
+ API::request(:get, FundAmerica.base_uri + 'webhook_logs')
10
+ end
11
+
12
+ # End point: https://apps.fundamerica.com/api/webhook_logs/:id (GET)
13
+ # Usage: FundAmerica::WebhookLog.details(webhook_log_id)
14
+ # Output: Returns the details of an webhook_log with matching id
15
+ def details(webhook_log_id)
16
+ API::request(:get, FundAmerica.base_uri + "webhook_logs/#{webhook_log_id}")
17
+ end
18
+
19
+ end
20
+ end
21
+ end
metadata ADDED
@@ -0,0 +1,165 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: fund_america
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Sanjay Vedula
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2015-07-07 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.9'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.9'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '10.0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '10.0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: pry
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: rspec
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: httparty
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :runtime
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: json
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ type: :runtime
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
97
+ description: This is a ruby gem to use the FundAmerica (http://www.fundamerica.com)
98
+ API easily in your ruby, rails and sinatra apps built by RubyEffect (http://www.rubyeffect.com)
99
+ email:
100
+ - opensource@rubyeffect.com
101
+ executables: []
102
+ extensions: []
103
+ extra_rdoc_files: []
104
+ files:
105
+ - ".gitignore"
106
+ - ".rspec"
107
+ - ".travis.yml"
108
+ - Gemfile
109
+ - LICENSE.txt
110
+ - README.md
111
+ - Rakefile
112
+ - bin/console
113
+ - bin/setup
114
+ - fund_america.gemspec
115
+ - lib/fund_america.rb
116
+ - lib/fund_america/ach_authorization.rb
117
+ - lib/fund_america/all.rb
118
+ - lib/fund_america/api.rb
119
+ - lib/fund_america/api_info.rb
120
+ - lib/fund_america/background_check.rb
121
+ - lib/fund_america/bank_info.rb
122
+ - lib/fund_america/billing_log.rb
123
+ - lib/fund_america/cancel_offering_request.rb
124
+ - lib/fund_america/close_offering_request.rb
125
+ - lib/fund_america/electronic_signature.rb
126
+ - lib/fund_america/entity.rb
127
+ - lib/fund_america/entity_relationship.rb
128
+ - lib/fund_america/error.rb
129
+ - lib/fund_america/escrow_agreement.rb
130
+ - lib/fund_america/escrow_service_application.rb
131
+ - lib/fund_america/investment.rb
132
+ - lib/fund_america/investment_payment.rb
133
+ - lib/fund_america/offering.rb
134
+ - lib/fund_america/plaid_authentication.rb
135
+ - lib/fund_america/subscription_agreement.rb
136
+ - lib/fund_america/subscription_agreement_template.rb
137
+ - lib/fund_america/trade_review.rb
138
+ - lib/fund_america/version.rb
139
+ - lib/fund_america/webhook_log.rb
140
+ homepage: http://www.rubyeffect.com/blog/category/fundamerica
141
+ licenses:
142
+ - MIT
143
+ metadata: {}
144
+ post_install_message:
145
+ rdoc_options: []
146
+ require_paths:
147
+ - lib
148
+ required_ruby_version: !ruby/object:Gem::Requirement
149
+ requirements:
150
+ - - ">="
151
+ - !ruby/object:Gem::Version
152
+ version: '0'
153
+ required_rubygems_version: !ruby/object:Gem::Requirement
154
+ requirements:
155
+ - - ">="
156
+ - !ruby/object:Gem::Version
157
+ version: '0'
158
+ requirements: []
159
+ rubyforge_project:
160
+ rubygems_version: 2.4.5
161
+ signing_key:
162
+ specification_version: 4
163
+ summary: Ruby gem for easy implementation of FundAmerica API in ruby, rails, sinatra
164
+ apps
165
+ test_files: []