radar-api 0.8.0 → 0.8.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.
- checksums.yaml +4 -4
- data/Gemfile.lock +2 -2
- data/gen/radar/api/analyzer_controller.rb +1 -1
- data/gen/radar/api/calendar_service.rb +115 -1
- data/gen/radar/api/common_constants.rb +1 -1
- data/gen/radar/api/common_types.rb +20 -6
- data/gen/radar/api/data_server_constants.rb +1 -1
- data/gen/radar/api/data_server_types.rb +46 -1
- data/gen/radar/api/fund_service.rb +1 -1
- data/gen/radar/api/index_service.rb +1 -1
- data/gen/radar/api/integration_status_service.rb +74 -0
- data/gen/radar/api/portfolio_analyzer_constants.rb +1 -1
- data/gen/radar/api/portfolio_analyzer_types.rb +115 -22
- data/gen/radar/api/portfolio_service.rb +140 -0
- data/gen/radar/api/security_service.rb +1 -1
- data/gen/radar/api/transaction_constants.rb +13 -0
- data/gen/radar/api/transaction_file_importer.rb +89 -0
- data/gen/radar/api/transaction_file_importer_constants.rb +13 -0
- data/gen/radar/api/transaction_file_importer_types.rb +37 -0
- data/gen/radar/api/transaction_importer.rb +18 -130
- data/gen/radar/api/transaction_importer_constants.rb +1 -1
- data/gen/radar/api/transaction_importer_types.rb +10 -92
- data/gen/radar/api/transaction_types.rb +331 -0
- data/gen/radar_constants.rb +1 -1
- data/gen/radar_types.rb +2 -1
- data/lib/radar-api.rb +3 -0
- metadata +10 -3
@@ -0,0 +1,331 @@
|
|
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 StockBuyTransactionType
|
14
|
+
REGULAR = 1
|
15
|
+
IPO = 2
|
16
|
+
VALUE_MAP = {1 => "REGULAR", 2 => "IPO"}
|
17
|
+
VALID_VALUES = Set.new([REGULAR, IPO]).freeze
|
18
|
+
end
|
19
|
+
|
20
|
+
module StockOptionTransactionType
|
21
|
+
BUY = 1
|
22
|
+
SELL = 2
|
23
|
+
VALUE_MAP = {1 => "BUY", 2 => "SELL"}
|
24
|
+
VALID_VALUES = Set.new([BUY, SELL]).freeze
|
25
|
+
end
|
26
|
+
|
27
|
+
module SecurityLendingAndBorrowingType
|
28
|
+
LENDER = 1
|
29
|
+
BORROWER = 2
|
30
|
+
VALUE_MAP = {1 => "LENDER", 2 => "BORROWER"}
|
31
|
+
VALID_VALUES = Set.new([LENDER, BORROWER]).freeze
|
32
|
+
end
|
33
|
+
|
34
|
+
module TransferType
|
35
|
+
IN = 1
|
36
|
+
OUT = 2
|
37
|
+
VALUE_MAP = {1 => "IN", 2 => "OUT"}
|
38
|
+
VALID_VALUES = Set.new([IN, OUT]).freeze
|
39
|
+
end
|
40
|
+
|
41
|
+
class StockSell; end
|
42
|
+
|
43
|
+
class StockBuy; end
|
44
|
+
|
45
|
+
class Subscription; end
|
46
|
+
|
47
|
+
class StockOption; end
|
48
|
+
|
49
|
+
class SecurityLendingAndBorrowing; end
|
50
|
+
|
51
|
+
class SecurityLendingAndBorrowingReturning; end
|
52
|
+
|
53
|
+
class CommissionExpense; end
|
54
|
+
|
55
|
+
class Transfer; end
|
56
|
+
|
57
|
+
class Transaction < ::Thrift::Union; end
|
58
|
+
|
59
|
+
class StockSell
|
60
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
61
|
+
DATE = 1
|
62
|
+
STOCK = 2
|
63
|
+
SHARES = 3
|
64
|
+
PRICE = 4
|
65
|
+
|
66
|
+
FIELDS = {
|
67
|
+
DATE => {:type => ::Thrift::Types::I64, :name => 'date'},
|
68
|
+
STOCK => {:type => ::Thrift::Types::STRUCT, :name => 'stock', :class => ::Radar::Api::StockId},
|
69
|
+
SHARES => {:type => ::Thrift::Types::I32, :name => 'shares'},
|
70
|
+
PRICE => {:type => ::Thrift::Types::DOUBLE, :name => 'price'}
|
71
|
+
}
|
72
|
+
|
73
|
+
def struct_fields; FIELDS; end
|
74
|
+
|
75
|
+
def validate
|
76
|
+
end
|
77
|
+
|
78
|
+
::Thrift::Struct.generate_accessors self
|
79
|
+
end
|
80
|
+
|
81
|
+
class StockBuy
|
82
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
83
|
+
DATE = 1
|
84
|
+
STOCK = 2
|
85
|
+
SHARES = 3
|
86
|
+
PRICE = 4
|
87
|
+
TYPE = 5
|
88
|
+
|
89
|
+
FIELDS = {
|
90
|
+
DATE => {:type => ::Thrift::Types::I64, :name => 'date'},
|
91
|
+
STOCK => {:type => ::Thrift::Types::STRUCT, :name => 'stock', :class => ::Radar::Api::StockId},
|
92
|
+
SHARES => {:type => ::Thrift::Types::I32, :name => 'shares'},
|
93
|
+
PRICE => {:type => ::Thrift::Types::DOUBLE, :name => 'price'},
|
94
|
+
TYPE => {:type => ::Thrift::Types::I32, :name => 'type', :default => 1, :enum_class => ::Radar::Api::StockBuyTransactionType}
|
95
|
+
}
|
96
|
+
|
97
|
+
def struct_fields; FIELDS; end
|
98
|
+
|
99
|
+
def validate
|
100
|
+
unless @type.nil? || ::Radar::Api::StockBuyTransactionType::VALID_VALUES.include?(@type)
|
101
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field type!')
|
102
|
+
end
|
103
|
+
end
|
104
|
+
|
105
|
+
::Thrift::Struct.generate_accessors self
|
106
|
+
end
|
107
|
+
|
108
|
+
class Subscription
|
109
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
110
|
+
DATE = 1
|
111
|
+
STOCK = 2
|
112
|
+
SHARES = 3
|
113
|
+
|
114
|
+
FIELDS = {
|
115
|
+
DATE => {:type => ::Thrift::Types::I64, :name => 'date'},
|
116
|
+
STOCK => {:type => ::Thrift::Types::STRUCT, :name => 'stock', :class => ::Radar::Api::StockId},
|
117
|
+
SHARES => {:type => ::Thrift::Types::I32, :name => 'shares'}
|
118
|
+
}
|
119
|
+
|
120
|
+
def struct_fields; FIELDS; end
|
121
|
+
|
122
|
+
def validate
|
123
|
+
end
|
124
|
+
|
125
|
+
::Thrift::Struct.generate_accessors self
|
126
|
+
end
|
127
|
+
|
128
|
+
class StockOption
|
129
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
130
|
+
DATE = 1
|
131
|
+
STOCK = 2
|
132
|
+
SHARES = 3
|
133
|
+
PRICE = 4
|
134
|
+
MATURITY = 5
|
135
|
+
TRANSACTION_TYPE = 6
|
136
|
+
TYPE = 7
|
137
|
+
|
138
|
+
FIELDS = {
|
139
|
+
DATE => {:type => ::Thrift::Types::I64, :name => 'date'},
|
140
|
+
STOCK => {:type => ::Thrift::Types::STRUCT, :name => 'stock', :class => ::Radar::Api::StockId},
|
141
|
+
SHARES => {:type => ::Thrift::Types::I32, :name => 'shares'},
|
142
|
+
PRICE => {:type => ::Thrift::Types::DOUBLE, :name => 'price'},
|
143
|
+
MATURITY => {:type => ::Thrift::Types::I64, :name => 'maturity'},
|
144
|
+
TRANSACTION_TYPE => {:type => ::Thrift::Types::I32, :name => 'transaction_type', :enum_class => ::Radar::Api::StockOptionTransactionType},
|
145
|
+
TYPE => {:type => ::Thrift::Types::I32, :name => 'type', :default => 1, :enum_class => ::Radar::Api::StockBuyTransactionType}
|
146
|
+
}
|
147
|
+
|
148
|
+
def struct_fields; FIELDS; end
|
149
|
+
|
150
|
+
def validate
|
151
|
+
unless @transaction_type.nil? || ::Radar::Api::StockOptionTransactionType::VALID_VALUES.include?(@transaction_type)
|
152
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field transaction_type!')
|
153
|
+
end
|
154
|
+
unless @type.nil? || ::Radar::Api::StockBuyTransactionType::VALID_VALUES.include?(@type)
|
155
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field type!')
|
156
|
+
end
|
157
|
+
end
|
158
|
+
|
159
|
+
::Thrift::Struct.generate_accessors self
|
160
|
+
end
|
161
|
+
|
162
|
+
class SecurityLendingAndBorrowing
|
163
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
164
|
+
DATE = 1
|
165
|
+
STOCK = 2
|
166
|
+
SHARES = 3
|
167
|
+
RATE = 4
|
168
|
+
DUE = 5
|
169
|
+
TYPE = 6
|
170
|
+
CONTRACT = 7
|
171
|
+
|
172
|
+
FIELDS = {
|
173
|
+
DATE => {:type => ::Thrift::Types::I64, :name => 'date'},
|
174
|
+
STOCK => {:type => ::Thrift::Types::STRUCT, :name => 'stock', :class => ::Radar::Api::StockId},
|
175
|
+
SHARES => {:type => ::Thrift::Types::I32, :name => 'shares'},
|
176
|
+
RATE => {:type => ::Thrift::Types::DOUBLE, :name => 'rate'},
|
177
|
+
DUE => {:type => ::Thrift::Types::I64, :name => 'due'},
|
178
|
+
TYPE => {:type => ::Thrift::Types::I32, :name => 'type', :enum_class => ::Radar::Api::SecurityLendingAndBorrowingType},
|
179
|
+
CONTRACT => {:type => ::Thrift::Types::STRING, :name => 'contract'}
|
180
|
+
}
|
181
|
+
|
182
|
+
def struct_fields; FIELDS; end
|
183
|
+
|
184
|
+
def validate
|
185
|
+
unless @type.nil? || ::Radar::Api::SecurityLendingAndBorrowingType::VALID_VALUES.include?(@type)
|
186
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field type!')
|
187
|
+
end
|
188
|
+
end
|
189
|
+
|
190
|
+
::Thrift::Struct.generate_accessors self
|
191
|
+
end
|
192
|
+
|
193
|
+
class SecurityLendingAndBorrowingReturning
|
194
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
195
|
+
DATE = 1
|
196
|
+
STOCK = 2
|
197
|
+
SHARES = 3
|
198
|
+
VALUE = 4
|
199
|
+
TYPE = 5
|
200
|
+
|
201
|
+
FIELDS = {
|
202
|
+
DATE => {:type => ::Thrift::Types::I64, :name => 'date'},
|
203
|
+
STOCK => {:type => ::Thrift::Types::STRUCT, :name => 'stock', :class => ::Radar::Api::StockId},
|
204
|
+
SHARES => {:type => ::Thrift::Types::I32, :name => 'shares'},
|
205
|
+
VALUE => {:type => ::Thrift::Types::DOUBLE, :name => 'value'},
|
206
|
+
TYPE => {:type => ::Thrift::Types::I32, :name => 'type', :enum_class => ::Radar::Api::SecurityLendingAndBorrowingType}
|
207
|
+
}
|
208
|
+
|
209
|
+
def struct_fields; FIELDS; end
|
210
|
+
|
211
|
+
def validate
|
212
|
+
unless @type.nil? || ::Radar::Api::SecurityLendingAndBorrowingType::VALID_VALUES.include?(@type)
|
213
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field type!')
|
214
|
+
end
|
215
|
+
end
|
216
|
+
|
217
|
+
::Thrift::Struct.generate_accessors self
|
218
|
+
end
|
219
|
+
|
220
|
+
class CommissionExpense
|
221
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
222
|
+
DATE = 1
|
223
|
+
AMOUNT = 2
|
224
|
+
DESCRIPTION = 3
|
225
|
+
|
226
|
+
FIELDS = {
|
227
|
+
DATE => {:type => ::Thrift::Types::I64, :name => 'date'},
|
228
|
+
AMOUNT => {:type => ::Thrift::Types::DOUBLE, :name => 'amount'},
|
229
|
+
DESCRIPTION => {:type => ::Thrift::Types::STRING, :name => 'description'}
|
230
|
+
}
|
231
|
+
|
232
|
+
def struct_fields; FIELDS; end
|
233
|
+
|
234
|
+
def validate
|
235
|
+
end
|
236
|
+
|
237
|
+
::Thrift::Struct.generate_accessors self
|
238
|
+
end
|
239
|
+
|
240
|
+
class Transfer
|
241
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
242
|
+
DATE = 1
|
243
|
+
STOCK = 2
|
244
|
+
SHARES = 3
|
245
|
+
TYPE = 4
|
246
|
+
|
247
|
+
FIELDS = {
|
248
|
+
DATE => {:type => ::Thrift::Types::I64, :name => 'date'},
|
249
|
+
STOCK => {:type => ::Thrift::Types::STRUCT, :name => 'stock', :class => ::Radar::Api::StockId},
|
250
|
+
SHARES => {:type => ::Thrift::Types::I32, :name => 'shares'},
|
251
|
+
TYPE => {:type => ::Thrift::Types::I32, :name => 'type', :enum_class => ::Radar::Api::TransferType}
|
252
|
+
}
|
253
|
+
|
254
|
+
def struct_fields; FIELDS; end
|
255
|
+
|
256
|
+
def validate
|
257
|
+
unless @type.nil? || ::Radar::Api::TransferType::VALID_VALUES.include?(@type)
|
258
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field type!')
|
259
|
+
end
|
260
|
+
end
|
261
|
+
|
262
|
+
::Thrift::Struct.generate_accessors self
|
263
|
+
end
|
264
|
+
|
265
|
+
class Transaction < ::Thrift::Union
|
266
|
+
include ::Thrift::Struct_Union
|
267
|
+
class << self
|
268
|
+
def stock_buy(val)
|
269
|
+
Transaction.new(:stock_buy, val)
|
270
|
+
end
|
271
|
+
|
272
|
+
def stock_sell(val)
|
273
|
+
Transaction.new(:stock_sell, val)
|
274
|
+
end
|
275
|
+
|
276
|
+
def slb(val)
|
277
|
+
Transaction.new(:slb, val)
|
278
|
+
end
|
279
|
+
|
280
|
+
def slbr(val)
|
281
|
+
Transaction.new(:slbr, val)
|
282
|
+
end
|
283
|
+
|
284
|
+
def stock_commission_expense(val)
|
285
|
+
Transaction.new(:stock_commission_expense, val)
|
286
|
+
end
|
287
|
+
|
288
|
+
def stock_option(val)
|
289
|
+
Transaction.new(:stock_option, val)
|
290
|
+
end
|
291
|
+
|
292
|
+
def subscription(val)
|
293
|
+
Transaction.new(:subscription, val)
|
294
|
+
end
|
295
|
+
|
296
|
+
def transfer(val)
|
297
|
+
Transaction.new(:transfer, val)
|
298
|
+
end
|
299
|
+
end
|
300
|
+
|
301
|
+
STOCK_BUY = 1
|
302
|
+
STOCK_SELL = 2
|
303
|
+
SLB = 3
|
304
|
+
SLBR = 4
|
305
|
+
STOCK_COMMISSION_EXPENSE = 5
|
306
|
+
STOCK_OPTION = 6
|
307
|
+
SUBSCRIPTION = 7
|
308
|
+
TRANSFER = 8
|
309
|
+
|
310
|
+
FIELDS = {
|
311
|
+
STOCK_BUY => {:type => ::Thrift::Types::STRUCT, :name => 'stock_buy', :class => ::Radar::Api::StockBuy, :optional => true},
|
312
|
+
STOCK_SELL => {:type => ::Thrift::Types::STRUCT, :name => 'stock_sell', :class => ::Radar::Api::StockSell, :optional => true},
|
313
|
+
SLB => {:type => ::Thrift::Types::STRUCT, :name => 'slb', :class => ::Radar::Api::SecurityLendingAndBorrowing, :optional => true},
|
314
|
+
SLBR => {:type => ::Thrift::Types::STRUCT, :name => 'slbr', :class => ::Radar::Api::SecurityLendingAndBorrowingReturning, :optional => true},
|
315
|
+
STOCK_COMMISSION_EXPENSE => {:type => ::Thrift::Types::STRUCT, :name => 'stock_commission_expense', :class => ::Radar::Api::CommissionExpense, :optional => true},
|
316
|
+
STOCK_OPTION => {:type => ::Thrift::Types::STRUCT, :name => 'stock_option', :class => ::Radar::Api::StockOption, :optional => true},
|
317
|
+
SUBSCRIPTION => {:type => ::Thrift::Types::STRUCT, :name => 'subscription', :class => ::Radar::Api::Subscription, :optional => true},
|
318
|
+
TRANSFER => {:type => ::Thrift::Types::STRUCT, :name => 'transfer', :class => ::Radar::Api::Transfer, :optional => true}
|
319
|
+
}
|
320
|
+
|
321
|
+
def struct_fields; FIELDS; end
|
322
|
+
|
323
|
+
def validate
|
324
|
+
raise(StandardError, 'Union fields are not set.') if get_set_field.nil? || get_value.nil?
|
325
|
+
end
|
326
|
+
|
327
|
+
::Thrift::Union.generate_accessors self
|
328
|
+
end
|
329
|
+
|
330
|
+
end
|
331
|
+
end
|
data/gen/radar_constants.rb
CHANGED
data/gen/radar_types.rb
CHANGED
@@ -1,11 +1,12 @@
|
|
1
1
|
#
|
2
|
-
# Autogenerated by Thrift Compiler (0.
|
2
|
+
# Autogenerated by Thrift Compiler (0.12.0)
|
3
3
|
#
|
4
4
|
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
|
5
5
|
#
|
6
6
|
|
7
7
|
require 'thrift'
|
8
8
|
require 'radar/api/transaction_importer_types'
|
9
|
+
require 'radar/api/transaction_file_importer_types'
|
9
10
|
require 'radar/api/portfolio_analyzer_types'
|
10
11
|
require 'radar/api/data_server_types'
|
11
12
|
|
data/lib/radar-api.rb
CHANGED
@@ -1,9 +1,12 @@
|
|
1
1
|
require 'radar/api/analyzer_controller'
|
2
2
|
require 'radar/api/transaction_importer'
|
3
|
+
require 'radar/api/transaction_file_importer'
|
3
4
|
require 'radar/api/fund_service'
|
4
5
|
require 'radar/api/security_service'
|
5
6
|
require 'radar/api/fund_service'
|
6
7
|
require 'radar/api/index_service'
|
7
8
|
require 'radar/api/calendar_service'
|
9
|
+
require 'radar/api/portfolio_service'
|
10
|
+
require 'radar/api/integration_status_service'
|
8
11
|
|
9
12
|
Radar::API = Radar::Api
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: radar-api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- André Aizim Kelmanson
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-03-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -73,12 +73,19 @@ files:
|
|
73
73
|
- gen/radar/api/data_server_types.rb
|
74
74
|
- gen/radar/api/fund_service.rb
|
75
75
|
- gen/radar/api/index_service.rb
|
76
|
+
- gen/radar/api/integration_status_service.rb
|
76
77
|
- gen/radar/api/portfolio_analyzer_constants.rb
|
77
78
|
- gen/radar/api/portfolio_analyzer_types.rb
|
79
|
+
- gen/radar/api/portfolio_service.rb
|
78
80
|
- gen/radar/api/security_service.rb
|
81
|
+
- gen/radar/api/transaction_constants.rb
|
82
|
+
- gen/radar/api/transaction_file_importer.rb
|
83
|
+
- gen/radar/api/transaction_file_importer_constants.rb
|
84
|
+
- gen/radar/api/transaction_file_importer_types.rb
|
79
85
|
- gen/radar/api/transaction_importer.rb
|
80
86
|
- gen/radar/api/transaction_importer_constants.rb
|
81
87
|
- gen/radar/api/transaction_importer_types.rb
|
88
|
+
- gen/radar/api/transaction_types.rb
|
82
89
|
- gen/radar_constants.rb
|
83
90
|
- gen/radar_types.rb
|
84
91
|
- lib/radar-api.rb
|
@@ -104,7 +111,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
104
111
|
version: '0'
|
105
112
|
requirements: []
|
106
113
|
rubyforge_project:
|
107
|
-
rubygems_version: 2.
|
114
|
+
rubygems_version: 2.6.14
|
108
115
|
signing_key:
|
109
116
|
specification_version: 4
|
110
117
|
summary: Radar API
|