ruby_bancbox 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 9d2bb794457868b0b299508d290ea802669df2e5
4
+ data.tar.gz: 1d3c5e36a45d0194f122cef91971be2da4c4f1b6
5
+ SHA512:
6
+ metadata.gz: b24757f0fdc515700baf2f740da78037b289f388a71e8440004e9c0bb5b31103180427befba701915f2cf33ab1e3898d186d3175fde432c7e9829e67664eed3f
7
+ data.tar.gz: 0fe6020f1bf6539aededa8a52e5610441ce33e0a7196552f2b1cf79ed76f4a96ee0d538d8da32d93ab6b1de3f0241b94df1108739855ac8c267c9213178e4c21
data/.gitignore ADDED
@@ -0,0 +1,17 @@
1
+ *.gem
2
+ *.rbc
3
+ .bundle
4
+ .config
5
+ .yardoc
6
+ Gemfile.lock
7
+ InstalledFiles
8
+ _yardoc
9
+ coverage
10
+ doc/
11
+ lib/bundler/man
12
+ pkg
13
+ rdoc
14
+ spec/reports
15
+ test/tmp
16
+ test/version_tmp
17
+ tmp
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in ruby_bancbox.gemspec
4
+ gemspec
data/LICENSE.txt ADDED
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2014 John Parsons
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,29 @@
1
+ # RubyBancbox
2
+
3
+ TODO: Write a gem description
4
+
5
+ ## Installation
6
+
7
+ Add this line to your application's Gemfile:
8
+
9
+ gem 'ruby_bancbox'
10
+
11
+ And then execute:
12
+
13
+ $ bundle
14
+
15
+ Or install it yourself as:
16
+
17
+ $ gem install ruby_bancbox
18
+
19
+ ## Usage
20
+
21
+ TODO: Write usage instructions here
22
+
23
+ ## Contributing
24
+
25
+ 1. Fork it ( http://github.com/<my-github-username>/ruby_bancbox/fork )
26
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
27
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
28
+ 4. Push to the branch (`git push origin my-new-feature`)
29
+ 5. Create new Pull Request
data/Rakefile ADDED
@@ -0,0 +1,10 @@
1
+ require 'rspec/core/rake_task'
2
+ require 'bundler/gem_tasks'
3
+
4
+ # Default directory to look in is `/specs`
5
+ # Run with `rake spec`
6
+ RSpec::Core::RakeTask.new(:spec) do |task|
7
+ task.rspec_opts = ['--color', '--format', 'nested']
8
+ end
9
+
10
+ task :default => :spec
@@ -0,0 +1,186 @@
1
+ module RubyBancbox
2
+ class Cfp
3
+
4
+ class << self
5
+
6
+ def create_investor(options = {})
7
+ # reference_id
8
+ # first_name
9
+ # last_name
10
+ # phone
11
+ post( '/createInvestor', options )
12
+ end
13
+
14
+ def submit_agreement(options = {})
15
+ post( '/submitAgreemnt', options)
16
+ end
17
+
18
+ def verify_identity(options = {})
19
+ post('/verifyIdentity', options)
20
+ end
21
+
22
+ def create_issuer(options = {})
23
+ post('/createIssuer', options)
24
+ end
25
+
26
+ def open_escrow(options = {})
27
+ post('/createEscrowAccount', options)
28
+ end
29
+
30
+ def fund_account(options = {})
31
+ post('/fundAccount', options)
32
+ end
33
+
34
+ def fund_escrow(options = {})
35
+ post('/fundEscrow', options)
36
+ end
37
+
38
+ def change_investor_contribution(options = {})
39
+ post('/changeInvestorContribution', options)
40
+ end
41
+
42
+ def cancel_escrow(options = {})
43
+ post('/cancelEscrow', options)
44
+ end
45
+
46
+ def close_escrow(options = {})
47
+ post('/closeEscrow', options)
48
+ end
49
+
50
+ def get_escrow(options = {})
51
+ post('/getEscrowDetails', options)
52
+
53
+ end
54
+
55
+ def list_escrow_accounts
56
+ post('/getEscrowList')
57
+
58
+ end
59
+
60
+ def get_escrow_activity(options = {})
61
+ post('/getActivityDetails', options)
62
+ end
63
+
64
+ def list_investors
65
+ post('/getInvestorList')
66
+ end
67
+
68
+ def get_investor(options = {})
69
+ # investor_id
70
+ post('/getInvestorDetails', options)
71
+ end
72
+
73
+ def list_issuers
74
+ post('/getIssuerList')
75
+
76
+ end
77
+
78
+ def get_issuer(options = {})
79
+ post('/getIssuerDetails', options)
80
+ end
81
+
82
+ def disburse_escrow(options = {})
83
+ post('/disburseEscrow', options)
84
+ end
85
+
86
+ def get_investment_ledger(options = {})
87
+ post('/getInvestmentLedger', options)
88
+ end
89
+
90
+ def update_investment_ledger(options = {})
91
+ post('/updateInvestmentLedger', options)
92
+ end
93
+
94
+ def freeze_investment_ledger(options = {})
95
+ post('/freezeInvestmentLedger', options)
96
+ end
97
+
98
+ def create_proceeds_schedules(options = {})
99
+ post('/createProceedsSchedules', options)
100
+ end
101
+
102
+ def get_proceeds_schedules(options = {})
103
+ post('/getProceedsSchedules', options)
104
+ end
105
+
106
+ def cancel_proceeds_schedules(options = {})
107
+ post('/cancelProceedsSchedules', options)
108
+ end
109
+
110
+ def withdraw_funds(options = {})
111
+ post('/withdrawFunds', options)
112
+ end
113
+
114
+ def modify_escrow(options = {})
115
+ post('/updateEscrowAccount', options)
116
+ end
117
+
118
+ def transfer_funds(options = {})
119
+ post('/transferFunds', options)
120
+ end
121
+
122
+ def link_external_account(options = {})
123
+ post('/linkExternalAccount', options)
124
+ end
125
+
126
+ def confirm_wire_transfer(options = {})
127
+ post('/confirmWireTransfer', options)
128
+ end
129
+
130
+ def verify_income(options = {})
131
+ post('/verifyIncome', options)
132
+ end
133
+
134
+ def accredit_investor_3rd_party(options = {})
135
+ post('/accreditInvestor3rdParty', options)
136
+ end
137
+
138
+ def get_verification_status(options = {})
139
+ post('/getVerificationStatus', options)
140
+ end
141
+
142
+ def get_activity(options = {})
143
+ post('/getActivity', options)
144
+ end
145
+
146
+ def get_ledger(options = {})
147
+ post('/getLedger', options)
148
+ end
149
+
150
+ def create_challenge_deposit(options = {})
151
+ post('/createChallengeDeposit', options)
152
+ end
153
+
154
+ def verify_challenge_deposit(options = {})
155
+ post('/verifyChallengeDeposit', options)
156
+ end
157
+
158
+ def get_challenge_deposit_status(options = {})
159
+ post('/getChallengeDepositStatus', options)
160
+ end
161
+
162
+ def update_investor(options = {})
163
+ post('/updateInvestor', options)
164
+ end
165
+
166
+ def update_issuer(options = {})
167
+ post('/updateIssuer', options)
168
+ end
169
+
170
+ private
171
+
172
+ def credentials
173
+ { api_key: RubyBancbox.configuration.api_key, secret: RubyBancbox.configuration.secret }
174
+ end
175
+
176
+ def post(path, options = {})
177
+ JSON.parse(
178
+ RestClient.post(
179
+ RubyBancbox.configuration.base_url + path, options.merge(credentials)
180
+ )
181
+ )
182
+ end
183
+ end
184
+
185
+ end
186
+ end
@@ -0,0 +1,9 @@
1
+ module RubyBancbox
2
+ class Configuration
3
+ attr_accessor :api_key, :secret, :base_url
4
+
5
+ def initialize
6
+ end
7
+
8
+ end
9
+ end
@@ -0,0 +1,3 @@
1
+ module RubyBancbox
2
+ VERSION = "0.0.1"
3
+ end
@@ -0,0 +1,15 @@
1
+ require "ruby_bancbox/version"
2
+
3
+ require 'ruby_bancbox/configuration'
4
+ require 'ruby_bancbox/cfp'
5
+
6
+ module RubyBancbox
7
+ class << self
8
+ attr_accessor :configuration
9
+ end
10
+
11
+ def self.configure
12
+ self.configuration ||= Configuration.new
13
+ yield(configuration)
14
+ end
15
+ end
@@ -0,0 +1,30 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'ruby_bancbox/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "ruby_bancbox"
8
+ spec.version = RubyBancbox::VERSION
9
+ spec.authors = ["John Parsons"]
10
+ spec.email = ["jparsons@klondikefive.com"]
11
+ spec.summary = %q{Implements an interface with the Bancbox Invest API}
12
+ spec.description = %q{Implements an interface with the Bancbox Invest API}
13
+ spec.homepage = 'http://rubygems.org/gems/ruby_bancbox'
14
+ spec.license = "MIT"
15
+
16
+ spec.files = `git ls-files -z`.split("\x0")
17
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
+ spec.require_paths = ["lib"]
20
+ spec.add_dependency "rest_client"
21
+ spec.add_development_dependency "bundler", "~> 1.5"
22
+ spec.add_development_dependency "rake"
23
+ spec.add_development_dependency "rspec"
24
+ spec.add_development_dependency "rspec-nc"
25
+ spec.add_development_dependency "guard"
26
+ spec.add_development_dependency "guard-rspec"
27
+ spec.add_development_dependency "pry"
28
+ spec.add_development_dependency "pry-remote"
29
+ spec.add_development_dependency "pry-nav"
30
+ end
@@ -0,0 +1,7 @@
1
+ require 'spec_helper'
2
+
3
+ describe RubyBancbox do
4
+ it 'does stuff' do
5
+ pending # no code yet
6
+ end
7
+ end
@@ -0,0 +1,2 @@
1
+ require 'pry'
2
+ require 'ruby_bancbox'
metadata ADDED
@@ -0,0 +1,198 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: ruby_bancbox
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - John Parsons
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2014-06-04 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: rest_client
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: bundler
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '1.5'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '1.5'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rake
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: rspec-nc
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :development
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: guard
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
97
+ - !ruby/object:Gem::Dependency
98
+ name: guard-rspec
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - ">="
102
+ - !ruby/object:Gem::Version
103
+ version: '0'
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - ">="
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
111
+ - !ruby/object:Gem::Dependency
112
+ name: pry
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - ">="
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - ">="
123
+ - !ruby/object:Gem::Version
124
+ version: '0'
125
+ - !ruby/object:Gem::Dependency
126
+ name: pry-remote
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - ">="
130
+ - !ruby/object:Gem::Version
131
+ version: '0'
132
+ type: :development
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - ">="
137
+ - !ruby/object:Gem::Version
138
+ version: '0'
139
+ - !ruby/object:Gem::Dependency
140
+ name: pry-nav
141
+ requirement: !ruby/object:Gem::Requirement
142
+ requirements:
143
+ - - ">="
144
+ - !ruby/object:Gem::Version
145
+ version: '0'
146
+ type: :development
147
+ prerelease: false
148
+ version_requirements: !ruby/object:Gem::Requirement
149
+ requirements:
150
+ - - ">="
151
+ - !ruby/object:Gem::Version
152
+ version: '0'
153
+ description: Implements an interface with the Bancbox Invest API
154
+ email:
155
+ - jparsons@klondikefive.com
156
+ executables: []
157
+ extensions: []
158
+ extra_rdoc_files: []
159
+ files:
160
+ - ".gitignore"
161
+ - Gemfile
162
+ - LICENSE.txt
163
+ - README.md
164
+ - Rakefile
165
+ - lib/ruby_bancbox.rb
166
+ - lib/ruby_bancbox/cfp.rb
167
+ - lib/ruby_bancbox/configuration.rb
168
+ - lib/ruby_bancbox/version.rb
169
+ - ruby_bancbox.gemspec
170
+ - spec/ruby_bancbox_spec.rb
171
+ - spec/spec_helper.rb
172
+ homepage: http://rubygems.org/gems/ruby_bancbox
173
+ licenses:
174
+ - MIT
175
+ metadata: {}
176
+ post_install_message:
177
+ rdoc_options: []
178
+ require_paths:
179
+ - lib
180
+ required_ruby_version: !ruby/object:Gem::Requirement
181
+ requirements:
182
+ - - ">="
183
+ - !ruby/object:Gem::Version
184
+ version: '0'
185
+ required_rubygems_version: !ruby/object:Gem::Requirement
186
+ requirements:
187
+ - - ">="
188
+ - !ruby/object:Gem::Version
189
+ version: '0'
190
+ requirements: []
191
+ rubyforge_project:
192
+ rubygems_version: 2.2.2
193
+ signing_key:
194
+ specification_version: 4
195
+ summary: Implements an interface with the Bancbox Invest API
196
+ test_files:
197
+ - spec/ruby_bancbox_spec.rb
198
+ - spec/spec_helper.rb