radar-api-legacy 0.14.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (36) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +4 -0
  3. data/Gemfile.lock +57 -0
  4. data/Guardfile +3 -0
  5. data/LICENSE.txt +22 -0
  6. data/README.md +29 -0
  7. data/Rakefile +1 -0
  8. data/gen/radar/api/analyzer_controller.rb +605 -0
  9. data/gen/radar/api/calendar_service.rb +200 -0
  10. data/gen/radar/api/common_constants.rb +13 -0
  11. data/gen/radar/api/common_types.rb +223 -0
  12. data/gen/radar/api/data_server_constants.rb +13 -0
  13. data/gen/radar/api/data_server_types.rb +97 -0
  14. data/gen/radar/api/fund_service.rb +192 -0
  15. data/gen/radar/api/healthz.rb +84 -0
  16. data/gen/radar/api/healthz_constants.rb +13 -0
  17. data/gen/radar/api/healthz_types.rb +19 -0
  18. data/gen/radar/api/index_service.rb +200 -0
  19. data/gen/radar/api/integration_status_service.rb +74 -0
  20. data/gen/radar/api/portfolio_analyzer_constants.rb +13 -0
  21. data/gen/radar/api/portfolio_analyzer_types.rb +661 -0
  22. data/gen/radar/api/portfolio_service.rb +194 -0
  23. data/gen/radar/api/security_service.rb +370 -0
  24. data/gen/radar/api/transaction_constants.rb +13 -0
  25. data/gen/radar/api/transaction_file_importer.rb +94 -0
  26. data/gen/radar/api/transaction_file_importer_constants.rb +13 -0
  27. data/gen/radar/api/transaction_file_importer_types.rb +38 -0
  28. data/gen/radar/api/transaction_importer.rb +252 -0
  29. data/gen/radar/api/transaction_importer_constants.rb +13 -0
  30. data/gen/radar/api/transaction_importer_types.rb +60 -0
  31. data/gen/radar/api/transaction_types.rb +302 -0
  32. data/gen/radar_constants.rb +9 -0
  33. data/gen/radar_types.rb +14 -0
  34. data/lib/radar-api-legacy.rb +13 -0
  35. data/radar-api.gemspec +23 -0
  36. metadata +120 -0
@@ -0,0 +1,302 @@
1
+ #
2
+ # Autogenerated by Thrift Compiler (0.12.0)
3
+ #
4
+ # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
+ #
6
+
7
+ require 'thrift'
8
+ require 'radar/api/common_types'
9
+
10
+
11
+ module Radar
12
+ module Api
13
+ module SecurityLendingAndBorrowingType
14
+ LENDER = 1
15
+ BORROWER = 2
16
+ VALUE_MAP = {1 => "LENDER", 2 => "BORROWER"}
17
+ VALID_VALUES = Set.new([LENDER, BORROWER]).freeze
18
+ end
19
+
20
+ module TransferType
21
+ IN = 1
22
+ OUT = 2
23
+ VALUE_MAP = {1 => "IN", 2 => "OUT"}
24
+ VALID_VALUES = Set.new([IN, OUT]).freeze
25
+ end
26
+
27
+ class EquityBuy; end
28
+
29
+ class EquitySell; end
30
+
31
+ class EquityPositionSnapshot; end
32
+
33
+ class SecurityLendingAndBorrowing; end
34
+
35
+ class SecurityLendingAndBorrowingReturning; end
36
+
37
+ class CommissionExpense; end
38
+
39
+ class Transfer; end
40
+
41
+ class OptionExercise; end
42
+
43
+ class Transaction < ::Thrift::Union; end
44
+
45
+ class EquityBuy
46
+ include ::Thrift::Struct, ::Thrift::Struct_Union
47
+ DATE = 1
48
+ EQUITY = 2
49
+ SHARES = 3
50
+ PRICE = 4
51
+
52
+ FIELDS = {
53
+ DATE => {:type => ::Thrift::Types::I64, :name => 'date'},
54
+ EQUITY => {:type => ::Thrift::Types::STRUCT, :name => 'equity', :class => ::Radar::Api::EquityId},
55
+ SHARES => {:type => ::Thrift::Types::I32, :name => 'shares'},
56
+ PRICE => {:type => ::Thrift::Types::DOUBLE, :name => 'price'}
57
+ }
58
+
59
+ def struct_fields; FIELDS; end
60
+
61
+ def validate
62
+ end
63
+
64
+ ::Thrift::Struct.generate_accessors self
65
+ end
66
+
67
+ class EquitySell
68
+ include ::Thrift::Struct, ::Thrift::Struct_Union
69
+ DATE = 1
70
+ EQUITY = 2
71
+ SHARES = 3
72
+ PRICE = 4
73
+
74
+ FIELDS = {
75
+ DATE => {:type => ::Thrift::Types::I64, :name => 'date'},
76
+ EQUITY => {:type => ::Thrift::Types::STRUCT, :name => 'equity', :class => ::Radar::Api::EquityId},
77
+ SHARES => {:type => ::Thrift::Types::I32, :name => 'shares'},
78
+ PRICE => {:type => ::Thrift::Types::DOUBLE, :name => 'price'}
79
+ }
80
+
81
+ def struct_fields; FIELDS; end
82
+
83
+ def validate
84
+ end
85
+
86
+ ::Thrift::Struct.generate_accessors self
87
+ end
88
+
89
+ class EquityPositionSnapshot
90
+ include ::Thrift::Struct, ::Thrift::Struct_Union
91
+ DATE = 1
92
+ EQUITY = 2
93
+ SHARES = 3
94
+ PRICE = 4
95
+
96
+ FIELDS = {
97
+ DATE => {:type => ::Thrift::Types::I64, :name => 'date'},
98
+ EQUITY => {:type => ::Thrift::Types::STRUCT, :name => 'equity', :class => ::Radar::Api::EquityId},
99
+ SHARES => {:type => ::Thrift::Types::I32, :name => 'shares'},
100
+ PRICE => {:type => ::Thrift::Types::DOUBLE, :name => 'price'}
101
+ }
102
+
103
+ def struct_fields; FIELDS; end
104
+
105
+ def validate
106
+ end
107
+
108
+ ::Thrift::Struct.generate_accessors self
109
+ end
110
+
111
+ class SecurityLendingAndBorrowing
112
+ include ::Thrift::Struct, ::Thrift::Struct_Union
113
+ DATE = 1
114
+ STOCK = 2
115
+ SHARES = 3
116
+ RATE = 4
117
+ DUE = 5
118
+ TYPE = 6
119
+ CONTRACT = 7
120
+
121
+ FIELDS = {
122
+ DATE => {:type => ::Thrift::Types::I64, :name => 'date'},
123
+ STOCK => {:type => ::Thrift::Types::STRUCT, :name => 'stock', :class => ::Radar::Api::EquityId},
124
+ SHARES => {:type => ::Thrift::Types::I32, :name => 'shares'},
125
+ RATE => {:type => ::Thrift::Types::DOUBLE, :name => 'rate'},
126
+ DUE => {:type => ::Thrift::Types::I64, :name => 'due'},
127
+ TYPE => {:type => ::Thrift::Types::I32, :name => 'type', :enum_class => ::Radar::Api::SecurityLendingAndBorrowingType},
128
+ CONTRACT => {:type => ::Thrift::Types::STRING, :name => 'contract'}
129
+ }
130
+
131
+ def struct_fields; FIELDS; end
132
+
133
+ def validate
134
+ unless @type.nil? || ::Radar::Api::SecurityLendingAndBorrowingType::VALID_VALUES.include?(@type)
135
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field type!')
136
+ end
137
+ end
138
+
139
+ ::Thrift::Struct.generate_accessors self
140
+ end
141
+
142
+ class SecurityLendingAndBorrowingReturning
143
+ include ::Thrift::Struct, ::Thrift::Struct_Union
144
+ DATE = 1
145
+ STOCK = 2
146
+ SHARES = 3
147
+ VALUE = 4
148
+ TYPE = 5
149
+
150
+ FIELDS = {
151
+ DATE => {:type => ::Thrift::Types::I64, :name => 'date'},
152
+ STOCK => {:type => ::Thrift::Types::STRUCT, :name => 'stock', :class => ::Radar::Api::EquityId},
153
+ SHARES => {:type => ::Thrift::Types::I32, :name => 'shares'},
154
+ VALUE => {:type => ::Thrift::Types::DOUBLE, :name => 'value'},
155
+ TYPE => {:type => ::Thrift::Types::I32, :name => 'type', :enum_class => ::Radar::Api::SecurityLendingAndBorrowingType}
156
+ }
157
+
158
+ def struct_fields; FIELDS; end
159
+
160
+ def validate
161
+ unless @type.nil? || ::Radar::Api::SecurityLendingAndBorrowingType::VALID_VALUES.include?(@type)
162
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field type!')
163
+ end
164
+ end
165
+
166
+ ::Thrift::Struct.generate_accessors self
167
+ end
168
+
169
+ class CommissionExpense
170
+ include ::Thrift::Struct, ::Thrift::Struct_Union
171
+ DATE = 1
172
+ AMOUNT = 2
173
+ DESCRIPTION = 3
174
+
175
+ FIELDS = {
176
+ DATE => {:type => ::Thrift::Types::I64, :name => 'date'},
177
+ AMOUNT => {:type => ::Thrift::Types::DOUBLE, :name => 'amount'},
178
+ DESCRIPTION => {:type => ::Thrift::Types::STRING, :name => 'description'}
179
+ }
180
+
181
+ def struct_fields; FIELDS; end
182
+
183
+ def validate
184
+ end
185
+
186
+ ::Thrift::Struct.generate_accessors self
187
+ end
188
+
189
+ class Transfer
190
+ include ::Thrift::Struct, ::Thrift::Struct_Union
191
+ DATE = 1
192
+ STOCK = 2
193
+ SHARES = 3
194
+ TYPE = 4
195
+
196
+ FIELDS = {
197
+ DATE => {:type => ::Thrift::Types::I64, :name => 'date'},
198
+ STOCK => {:type => ::Thrift::Types::STRUCT, :name => 'stock', :class => ::Radar::Api::EquityId},
199
+ SHARES => {:type => ::Thrift::Types::I32, :name => 'shares'},
200
+ TYPE => {:type => ::Thrift::Types::I32, :name => 'type', :enum_class => ::Radar::Api::TransferType}
201
+ }
202
+
203
+ def struct_fields; FIELDS; end
204
+
205
+ def validate
206
+ unless @type.nil? || ::Radar::Api::TransferType::VALID_VALUES.include?(@type)
207
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field type!')
208
+ end
209
+ end
210
+
211
+ ::Thrift::Struct.generate_accessors self
212
+ end
213
+
214
+ class OptionExercise
215
+ include ::Thrift::Struct, ::Thrift::Struct_Union
216
+ DATE = 1
217
+ OPTION = 2
218
+ SHARES = 3
219
+ STRIKE = 4
220
+
221
+ FIELDS = {
222
+ DATE => {:type => ::Thrift::Types::I64, :name => 'date'},
223
+ OPTION => {:type => ::Thrift::Types::STRUCT, :name => 'option', :class => ::Radar::Api::EquityId},
224
+ SHARES => {:type => ::Thrift::Types::I32, :name => 'shares'},
225
+ STRIKE => {:type => ::Thrift::Types::DOUBLE, :name => 'strike'}
226
+ }
227
+
228
+ def struct_fields; FIELDS; end
229
+
230
+ def validate
231
+ end
232
+
233
+ ::Thrift::Struct.generate_accessors self
234
+ end
235
+
236
+ class Transaction < ::Thrift::Union
237
+ include ::Thrift::Struct_Union
238
+ class << self
239
+ def equity_buy(val)
240
+ Transaction.new(:equity_buy, val)
241
+ end
242
+
243
+ def equity_sell(val)
244
+ Transaction.new(:equity_sell, val)
245
+ end
246
+
247
+ def equity_position_snapshot(val)
248
+ Transaction.new(:equity_position_snapshot, val)
249
+ end
250
+
251
+ def slb(val)
252
+ Transaction.new(:slb, val)
253
+ end
254
+
255
+ def slbr(val)
256
+ Transaction.new(:slbr, val)
257
+ end
258
+
259
+ def stock_commission_expense(val)
260
+ Transaction.new(:stock_commission_expense, val)
261
+ end
262
+
263
+ def transfer(val)
264
+ Transaction.new(:transfer, val)
265
+ end
266
+
267
+ def option_exercise(val)
268
+ Transaction.new(:option_exercise, val)
269
+ end
270
+ end
271
+
272
+ EQUITY_BUY = 1
273
+ EQUITY_SELL = 2
274
+ EQUITY_POSITION_SNAPSHOT = 3
275
+ SLB = 4
276
+ SLBR = 5
277
+ STOCK_COMMISSION_EXPENSE = 6
278
+ TRANSFER = 7
279
+ OPTION_EXERCISE = 8
280
+
281
+ FIELDS = {
282
+ EQUITY_BUY => {:type => ::Thrift::Types::STRUCT, :name => 'equity_buy', :class => ::Radar::Api::EquityBuy, :optional => true},
283
+ EQUITY_SELL => {:type => ::Thrift::Types::STRUCT, :name => 'equity_sell', :class => ::Radar::Api::EquitySell, :optional => true},
284
+ EQUITY_POSITION_SNAPSHOT => {:type => ::Thrift::Types::STRUCT, :name => 'equity_position_snapshot', :class => ::Radar::Api::EquityPositionSnapshot, :optional => true},
285
+ SLB => {:type => ::Thrift::Types::STRUCT, :name => 'slb', :class => ::Radar::Api::SecurityLendingAndBorrowing, :optional => true},
286
+ SLBR => {:type => ::Thrift::Types::STRUCT, :name => 'slbr', :class => ::Radar::Api::SecurityLendingAndBorrowingReturning, :optional => true},
287
+ STOCK_COMMISSION_EXPENSE => {:type => ::Thrift::Types::STRUCT, :name => 'stock_commission_expense', :class => ::Radar::Api::CommissionExpense, :optional => true},
288
+ TRANSFER => {:type => ::Thrift::Types::STRUCT, :name => 'transfer', :class => ::Radar::Api::Transfer, :optional => true},
289
+ OPTION_EXERCISE => {:type => ::Thrift::Types::STRUCT, :name => 'option_exercise', :class => ::Radar::Api::OptionExercise, :optional => true}
290
+ }
291
+
292
+ def struct_fields; FIELDS; end
293
+
294
+ def validate
295
+ raise(StandardError, 'Union fields are not set.') if get_set_field.nil? || get_value.nil?
296
+ end
297
+
298
+ ::Thrift::Union.generate_accessors self
299
+ end
300
+
301
+ end
302
+ end
@@ -0,0 +1,9 @@
1
+ #
2
+ # Autogenerated by Thrift Compiler (0.12.0)
3
+ #
4
+ # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
+ #
6
+
7
+ require 'thrift'
8
+ require 'radar_types'
9
+
@@ -0,0 +1,14 @@
1
+ #
2
+ # Autogenerated by Thrift Compiler (0.12.0)
3
+ #
4
+ # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
+ #
6
+
7
+ require 'thrift'
8
+ require 'radar/api/transaction_importer_types'
9
+ require 'radar/api/transaction_file_importer_types'
10
+ require 'radar/api/portfolio_analyzer_types'
11
+ require 'radar/api/data_server_types'
12
+ require 'radar/api/healthz_types'
13
+
14
+
@@ -0,0 +1,13 @@
1
+ require 'radar/api/analyzer_controller'
2
+ require 'radar/api/transaction_importer'
3
+ require 'radar/api/transaction_file_importer'
4
+ require 'radar/api/fund_service'
5
+ require 'radar/api/security_service'
6
+ require 'radar/api/fund_service'
7
+ require 'radar/api/index_service'
8
+ require 'radar/api/calendar_service'
9
+ require 'radar/api/portfolio_service'
10
+ require 'radar/api/integration_status_service'
11
+ require 'radar/api/healthz'
12
+
13
+ Radar::API = Radar::Api
data/radar-api.gemspec ADDED
@@ -0,0 +1,23 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+
5
+ Gem::Specification.new do |spec|
6
+ spec.name = "radar-api-legacy"
7
+ spec.version = File.read(File.expand_path('../../version.txt', __FILE__))
8
+ spec.authors = ["André Aizim Kelmanson"]
9
+ spec.email = ["andre@investtools.com.br"]
10
+ spec.summary = %q{Radar API}
11
+ spec.description = %q{Radar API}
12
+ spec.homepage = "http://www.investtools.com.br/"
13
+ spec.license = "MIT"
14
+
15
+ spec.files = `git ls-files`.split($/)
16
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
17
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
18
+ spec.require_paths = ["lib", "gen"]
19
+
20
+ spec.add_development_dependency "bundler", "~> 1.5"
21
+ spec.add_development_dependency "guard-rake", "0.0.9"
22
+ spec.add_dependency "thrift", "~> 0.9.0"
23
+ end
metadata ADDED
@@ -0,0 +1,120 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: radar-api-legacy
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.14.0
5
+ platform: ruby
6
+ authors:
7
+ - André Aizim Kelmanson
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2020-03-12 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.5'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.5'
27
+ - !ruby/object:Gem::Dependency
28
+ name: guard-rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - '='
32
+ - !ruby/object:Gem::Version
33
+ version: 0.0.9
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - '='
39
+ - !ruby/object:Gem::Version
40
+ version: 0.0.9
41
+ - !ruby/object:Gem::Dependency
42
+ name: thrift
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: 0.9.0
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: 0.9.0
55
+ description: Radar API
56
+ email:
57
+ - andre@investtools.com.br
58
+ executables: []
59
+ extensions: []
60
+ extra_rdoc_files: []
61
+ files:
62
+ - Gemfile
63
+ - Gemfile.lock
64
+ - Guardfile
65
+ - LICENSE.txt
66
+ - README.md
67
+ - Rakefile
68
+ - gen/radar/api/analyzer_controller.rb
69
+ - gen/radar/api/calendar_service.rb
70
+ - gen/radar/api/common_constants.rb
71
+ - gen/radar/api/common_types.rb
72
+ - gen/radar/api/data_server_constants.rb
73
+ - gen/radar/api/data_server_types.rb
74
+ - gen/radar/api/fund_service.rb
75
+ - gen/radar/api/healthz.rb
76
+ - gen/radar/api/healthz_constants.rb
77
+ - gen/radar/api/healthz_types.rb
78
+ - gen/radar/api/index_service.rb
79
+ - gen/radar/api/integration_status_service.rb
80
+ - gen/radar/api/portfolio_analyzer_constants.rb
81
+ - gen/radar/api/portfolio_analyzer_types.rb
82
+ - gen/radar/api/portfolio_service.rb
83
+ - gen/radar/api/security_service.rb
84
+ - gen/radar/api/transaction_constants.rb
85
+ - gen/radar/api/transaction_file_importer.rb
86
+ - gen/radar/api/transaction_file_importer_constants.rb
87
+ - gen/radar/api/transaction_file_importer_types.rb
88
+ - gen/radar/api/transaction_importer.rb
89
+ - gen/radar/api/transaction_importer_constants.rb
90
+ - gen/radar/api/transaction_importer_types.rb
91
+ - gen/radar/api/transaction_types.rb
92
+ - gen/radar_constants.rb
93
+ - gen/radar_types.rb
94
+ - lib/radar-api-legacy.rb
95
+ - radar-api.gemspec
96
+ homepage: http://www.investtools.com.br/
97
+ licenses:
98
+ - MIT
99
+ metadata: {}
100
+ post_install_message:
101
+ rdoc_options: []
102
+ require_paths:
103
+ - lib
104
+ - gen
105
+ required_ruby_version: !ruby/object:Gem::Requirement
106
+ requirements:
107
+ - - ">="
108
+ - !ruby/object:Gem::Version
109
+ version: '0'
110
+ required_rubygems_version: !ruby/object:Gem::Requirement
111
+ requirements:
112
+ - - ">="
113
+ - !ruby/object:Gem::Version
114
+ version: '0'
115
+ requirements: []
116
+ rubygems_version: 3.0.6
117
+ signing_key:
118
+ specification_version: 4
119
+ summary: Radar API
120
+ test_files: []