radar-api 0.13.0 → 0.14.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA256:
3
- metadata.gz: ecd9424b9f71dd58c588200543ee973bfd0c5d9f370bcc892ce0f7a86e944399
4
- data.tar.gz: '080f7ee28eba452da1824ad66a2a740a55bfc06aa422485f76d937c95d1229a7'
2
+ SHA1:
3
+ metadata.gz: 503a7ed00d90724eeaefab64de1590d78daaa160
4
+ data.tar.gz: 6cfc3d8c4207a6e80a2274e8a404f0a65e8fa7c2
5
5
  SHA512:
6
- metadata.gz: 1ce87bb6f2d0145ce249083fa182e9249c4bc2c59c97d08aea80b6b133df326e2119976ec706f1022f85370a01f8555a8a6ed49ba3a4895dba89b2ae7be52577
7
- data.tar.gz: a8364bd348c0eec81a6d272ed3911d75a0dc8bb00d766c1412262371e730da36bf924f7c81375886b6c8e566ad9bea7d82713291591d852f15534a1f9b5e2431
6
+ metadata.gz: beeadad7bf90c06aa46647109c2576b743e8ac40220bc352c3bdbbcf78cec64c78eaa5302a02cf7008c90661e67c118323fb564ddc21c51bdb076f516db49d20
7
+ data.tar.gz: 5a20aaa332e9385b7468f24e3adf494e51e42fa7652c6663774655262906127fea6279aa1defc755b97fd0005475ee479fce83d4813ed5a713daf73cef0b43e6
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- radar-api (0.13.0)
4
+ radar-api (0.14.0)
5
5
  thrift (~> 0.9.0)
6
6
 
7
7
  GEM
@@ -8,7 +8,7 @@ require 'thrift'
8
8
 
9
9
  module Radar
10
10
  module Api
11
- class StockId; end
11
+ class EquityId; end
12
12
 
13
13
  class IndexId; end
14
14
 
@@ -26,7 +26,7 @@ module Radar
26
26
 
27
27
  class ApplicationError < ::Thrift::Exception; end
28
28
 
29
- class StockId
29
+ class EquityId
30
30
  include ::Thrift::Struct, ::Thrift::Struct_Union
31
31
  SYMBOL = 1
32
32
 
@@ -165,7 +165,7 @@ module Radar
165
165
  CUSTOM_SECURITY = 5
166
166
 
167
167
  FIELDS = {
168
- STOCK => {:type => ::Thrift::Types::STRUCT, :name => 'stock', :class => ::Radar::Api::StockId, :optional => true},
168
+ STOCK => {:type => ::Thrift::Types::STRUCT, :name => 'stock', :class => ::Radar::Api::EquityId, :optional => true},
169
169
  FUND => {:type => ::Thrift::Types::STRUCT, :name => 'fund', :class => ::Radar::Api::FundId, :optional => true},
170
170
  CORPORATE_BOND => {:type => ::Thrift::Types::STRUCT, :name => 'corporate_bond', :class => ::Radar::Api::CorporateBondId, :optional => true},
171
171
  GOVERNMENT_BOND => {:type => ::Thrift::Types::STRUCT, :name => 'government_bond', :class => ::Radar::Api::GovernmentBondId, :optional => true},
@@ -10,20 +10,6 @@ require 'radar/api/common_types'
10
10
 
11
11
  module Radar
12
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
13
  module SecurityLendingAndBorrowingType
28
14
  LENDER = 1
29
15
  BORROWER = 2
@@ -38,20 +24,11 @@ module Radar
38
24
  VALID_VALUES = Set.new([IN, OUT]).freeze
39
25
  end
40
26
 
41
- module OptionExerciseType
42
- BUY = 1
43
- SELL = 2
44
- VALUE_MAP = {1 => "BUY", 2 => "SELL"}
45
- VALID_VALUES = Set.new([BUY, SELL]).freeze
46
- end
47
-
48
- class StockSell; end
49
-
50
- class StockBuy; end
27
+ class EquityBuy; end
51
28
 
52
- class Subscription; end
29
+ class EquitySell; end
53
30
 
54
- class StockOption; end
31
+ class EquityPositionSnapshot; end
55
32
 
56
33
  class SecurityLendingAndBorrowing; end
57
34
 
@@ -61,26 +38,20 @@ module Radar
61
38
 
62
39
  class Transfer; end
63
40
 
64
- class StockPositionSnapshot; end
65
-
66
- class OptionPositionSnapshot; end
67
-
68
- class OptionExercisePositionSnapshot; end
69
-
70
41
  class OptionExercise; end
71
42
 
72
43
  class Transaction < ::Thrift::Union; end
73
44
 
74
- class StockSell
45
+ class EquityBuy
75
46
  include ::Thrift::Struct, ::Thrift::Struct_Union
76
47
  DATE = 1
77
- STOCK = 2
48
+ EQUITY = 2
78
49
  SHARES = 3
79
50
  PRICE = 4
80
51
 
81
52
  FIELDS = {
82
53
  DATE => {:type => ::Thrift::Types::I64, :name => 'date'},
83
- STOCK => {:type => ::Thrift::Types::STRUCT, :name => 'stock', :class => ::Radar::Api::StockId},
54
+ EQUITY => {:type => ::Thrift::Types::STRUCT, :name => 'equity', :class => ::Radar::Api::EquityId},
84
55
  SHARES => {:type => ::Thrift::Types::I32, :name => 'shares'},
85
56
  PRICE => {:type => ::Thrift::Types::DOUBLE, :name => 'price'}
86
57
  }
@@ -93,43 +64,18 @@ module Radar
93
64
  ::Thrift::Struct.generate_accessors self
94
65
  end
95
66
 
96
- class StockBuy
67
+ class EquitySell
97
68
  include ::Thrift::Struct, ::Thrift::Struct_Union
98
69
  DATE = 1
99
- STOCK = 2
70
+ EQUITY = 2
100
71
  SHARES = 3
101
72
  PRICE = 4
102
- TYPE = 5
103
73
 
104
74
  FIELDS = {
105
75
  DATE => {:type => ::Thrift::Types::I64, :name => 'date'},
106
- STOCK => {:type => ::Thrift::Types::STRUCT, :name => 'stock', :class => ::Radar::Api::StockId},
76
+ EQUITY => {:type => ::Thrift::Types::STRUCT, :name => 'equity', :class => ::Radar::Api::EquityId},
107
77
  SHARES => {:type => ::Thrift::Types::I32, :name => 'shares'},
108
- PRICE => {:type => ::Thrift::Types::DOUBLE, :name => 'price'},
109
- TYPE => {:type => ::Thrift::Types::I32, :name => 'type', :default => 1, :enum_class => ::Radar::Api::StockBuyTransactionType}
110
- }
111
-
112
- def struct_fields; FIELDS; end
113
-
114
- def validate
115
- unless @type.nil? || ::Radar::Api::StockBuyTransactionType::VALID_VALUES.include?(@type)
116
- raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field type!')
117
- end
118
- end
119
-
120
- ::Thrift::Struct.generate_accessors self
121
- end
122
-
123
- class Subscription
124
- include ::Thrift::Struct, ::Thrift::Struct_Union
125
- DATE = 1
126
- STOCK = 2
127
- SHARES = 3
128
-
129
- FIELDS = {
130
- DATE => {:type => ::Thrift::Types::I64, :name => 'date'},
131
- STOCK => {:type => ::Thrift::Types::STRUCT, :name => 'stock', :class => ::Radar::Api::StockId},
132
- SHARES => {:type => ::Thrift::Types::I32, :name => 'shares'}
78
+ PRICE => {:type => ::Thrift::Types::DOUBLE, :name => 'price'}
133
79
  }
134
80
 
135
81
  def struct_fields; FIELDS; end
@@ -140,35 +86,23 @@ module Radar
140
86
  ::Thrift::Struct.generate_accessors self
141
87
  end
142
88
 
143
- class StockOption
89
+ class EquityPositionSnapshot
144
90
  include ::Thrift::Struct, ::Thrift::Struct_Union
145
91
  DATE = 1
146
- STOCK = 2
92
+ EQUITY = 2
147
93
  SHARES = 3
148
94
  PRICE = 4
149
- MATURITY = 5
150
- TRANSACTION_TYPE = 6
151
- TYPE = 7
152
95
 
153
96
  FIELDS = {
154
97
  DATE => {:type => ::Thrift::Types::I64, :name => 'date'},
155
- STOCK => {:type => ::Thrift::Types::STRUCT, :name => 'stock', :class => ::Radar::Api::StockId},
98
+ EQUITY => {:type => ::Thrift::Types::STRUCT, :name => 'equity', :class => ::Radar::Api::EquityId},
156
99
  SHARES => {:type => ::Thrift::Types::I32, :name => 'shares'},
157
- PRICE => {:type => ::Thrift::Types::DOUBLE, :name => 'price'},
158
- MATURITY => {:type => ::Thrift::Types::I64, :name => 'maturity'},
159
- TRANSACTION_TYPE => {:type => ::Thrift::Types::I32, :name => 'transaction_type', :enum_class => ::Radar::Api::StockOptionTransactionType},
160
- TYPE => {:type => ::Thrift::Types::I32, :name => 'type', :default => 1, :enum_class => ::Radar::Api::StockBuyTransactionType}
100
+ PRICE => {:type => ::Thrift::Types::DOUBLE, :name => 'price'}
161
101
  }
162
102
 
163
103
  def struct_fields; FIELDS; end
164
104
 
165
105
  def validate
166
- unless @transaction_type.nil? || ::Radar::Api::StockOptionTransactionType::VALID_VALUES.include?(@transaction_type)
167
- raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field transaction_type!')
168
- end
169
- unless @type.nil? || ::Radar::Api::StockBuyTransactionType::VALID_VALUES.include?(@type)
170
- raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field type!')
171
- end
172
106
  end
173
107
 
174
108
  ::Thrift::Struct.generate_accessors self
@@ -186,7 +120,7 @@ module Radar
186
120
 
187
121
  FIELDS = {
188
122
  DATE => {:type => ::Thrift::Types::I64, :name => 'date'},
189
- STOCK => {:type => ::Thrift::Types::STRUCT, :name => 'stock', :class => ::Radar::Api::StockId},
123
+ STOCK => {:type => ::Thrift::Types::STRUCT, :name => 'stock', :class => ::Radar::Api::EquityId},
190
124
  SHARES => {:type => ::Thrift::Types::I32, :name => 'shares'},
191
125
  RATE => {:type => ::Thrift::Types::DOUBLE, :name => 'rate'},
192
126
  DUE => {:type => ::Thrift::Types::I64, :name => 'due'},
@@ -215,7 +149,7 @@ module Radar
215
149
 
216
150
  FIELDS = {
217
151
  DATE => {:type => ::Thrift::Types::I64, :name => 'date'},
218
- STOCK => {:type => ::Thrift::Types::STRUCT, :name => 'stock', :class => ::Radar::Api::StockId},
152
+ STOCK => {:type => ::Thrift::Types::STRUCT, :name => 'stock', :class => ::Radar::Api::EquityId},
219
153
  SHARES => {:type => ::Thrift::Types::I32, :name => 'shares'},
220
154
  VALUE => {:type => ::Thrift::Types::DOUBLE, :name => 'value'},
221
155
  TYPE => {:type => ::Thrift::Types::I32, :name => 'type', :enum_class => ::Radar::Api::SecurityLendingAndBorrowingType}
@@ -261,7 +195,7 @@ module Radar
261
195
 
262
196
  FIELDS = {
263
197
  DATE => {:type => ::Thrift::Types::I64, :name => 'date'},
264
- STOCK => {:type => ::Thrift::Types::STRUCT, :name => 'stock', :class => ::Radar::Api::StockId},
198
+ STOCK => {:type => ::Thrift::Types::STRUCT, :name => 'stock', :class => ::Radar::Api::EquityId},
265
199
  SHARES => {:type => ::Thrift::Types::I32, :name => 'shares'},
266
200
  TYPE => {:type => ::Thrift::Types::I32, :name => 'type', :enum_class => ::Radar::Api::TransferType}
267
201
  }
@@ -277,81 +211,6 @@ module Radar
277
211
  ::Thrift::Struct.generate_accessors self
278
212
  end
279
213
 
280
- class StockPositionSnapshot
281
- include ::Thrift::Struct, ::Thrift::Struct_Union
282
- DATE = 1
283
- STOCK = 2
284
- SHARES = 3
285
- PRICE = 4
286
-
287
- FIELDS = {
288
- DATE => {:type => ::Thrift::Types::I64, :name => 'date'},
289
- STOCK => {:type => ::Thrift::Types::STRUCT, :name => 'stock', :class => ::Radar::Api::StockId},
290
- SHARES => {:type => ::Thrift::Types::I32, :name => 'shares'},
291
- PRICE => {:type => ::Thrift::Types::DOUBLE, :name => 'price'}
292
- }
293
-
294
- def struct_fields; FIELDS; end
295
-
296
- def validate
297
- end
298
-
299
- ::Thrift::Struct.generate_accessors self
300
- end
301
-
302
- class OptionPositionSnapshot
303
- include ::Thrift::Struct, ::Thrift::Struct_Union
304
- DATE = 1
305
- STOCK = 2
306
- SHARES = 3
307
- PRICE = 4
308
- MATURITY = 5
309
-
310
- FIELDS = {
311
- DATE => {:type => ::Thrift::Types::I64, :name => 'date'},
312
- STOCK => {:type => ::Thrift::Types::STRUCT, :name => 'stock', :class => ::Radar::Api::StockId},
313
- SHARES => {:type => ::Thrift::Types::I32, :name => 'shares'},
314
- PRICE => {:type => ::Thrift::Types::DOUBLE, :name => 'price'},
315
- MATURITY => {:type => ::Thrift::Types::I64, :name => 'maturity'}
316
- }
317
-
318
- def struct_fields; FIELDS; end
319
-
320
- def validate
321
- end
322
-
323
- ::Thrift::Struct.generate_accessors self
324
- end
325
-
326
- class OptionExercisePositionSnapshot
327
- include ::Thrift::Struct, ::Thrift::Struct_Union
328
- DATE = 1
329
- STOCK = 2
330
- SHARES = 3
331
- PRICE = 4
332
- MATURITY = 5
333
- TYPE = 7
334
-
335
- FIELDS = {
336
- DATE => {:type => ::Thrift::Types::I64, :name => 'date'},
337
- STOCK => {:type => ::Thrift::Types::STRUCT, :name => 'stock', :class => ::Radar::Api::StockId},
338
- SHARES => {:type => ::Thrift::Types::I32, :name => 'shares'},
339
- PRICE => {:type => ::Thrift::Types::DOUBLE, :name => 'price'},
340
- MATURITY => {:type => ::Thrift::Types::I64, :name => 'maturity'},
341
- TYPE => {:type => ::Thrift::Types::I32, :name => 'type', :enum_class => ::Radar::Api::OptionExerciseType}
342
- }
343
-
344
- def struct_fields; FIELDS; end
345
-
346
- def validate
347
- unless @type.nil? || ::Radar::Api::OptionExerciseType::VALID_VALUES.include?(@type)
348
- raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field type!')
349
- end
350
- end
351
-
352
- ::Thrift::Struct.generate_accessors self
353
- end
354
-
355
214
  class OptionExercise
356
215
  include ::Thrift::Struct, ::Thrift::Struct_Union
357
216
  DATE = 1
@@ -361,7 +220,7 @@ module Radar
361
220
 
362
221
  FIELDS = {
363
222
  DATE => {:type => ::Thrift::Types::I64, :name => 'date'},
364
- OPTION => {:type => ::Thrift::Types::STRUCT, :name => 'option', :class => ::Radar::Api::StockId},
223
+ OPTION => {:type => ::Thrift::Types::STRUCT, :name => 'option', :class => ::Radar::Api::EquityId},
365
224
  SHARES => {:type => ::Thrift::Types::I32, :name => 'shares'},
366
225
  STRIKE => {:type => ::Thrift::Types::DOUBLE, :name => 'strike'}
367
226
  }
@@ -377,12 +236,16 @@ module Radar
377
236
  class Transaction < ::Thrift::Union
378
237
  include ::Thrift::Struct_Union
379
238
  class << self
380
- def stock_buy(val)
381
- Transaction.new(:stock_buy, val)
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)
382
245
  end
383
246
 
384
- def stock_sell(val)
385
- Transaction.new(:stock_sell, val)
247
+ def equity_position_snapshot(val)
248
+ Transaction.new(:equity_position_snapshot, val)
386
249
  end
387
250
 
388
251
  def slb(val)
@@ -397,60 +260,32 @@ module Radar
397
260
  Transaction.new(:stock_commission_expense, val)
398
261
  end
399
262
 
400
- def stock_option(val)
401
- Transaction.new(:stock_option, val)
402
- end
403
-
404
- def subscription(val)
405
- Transaction.new(:subscription, val)
406
- end
407
-
408
263
  def transfer(val)
409
264
  Transaction.new(:transfer, val)
410
265
  end
411
266
 
412
- def stock_position_snapshot(val)
413
- Transaction.new(:stock_position_snapshot, val)
414
- end
415
-
416
- def option_position_snapshot(val)
417
- Transaction.new(:option_position_snapshot, val)
418
- end
419
-
420
- def option_exercise_position_snapshot(val)
421
- Transaction.new(:option_exercise_position_snapshot, val)
422
- end
423
-
424
267
  def option_exercise(val)
425
268
  Transaction.new(:option_exercise, val)
426
269
  end
427
270
  end
428
271
 
429
- STOCK_BUY = 1
430
- STOCK_SELL = 2
431
- SLB = 3
432
- SLBR = 4
433
- STOCK_COMMISSION_EXPENSE = 5
434
- STOCK_OPTION = 6
435
- SUBSCRIPTION = 7
436
- TRANSFER = 8
437
- STOCK_POSITION_SNAPSHOT = 9
438
- OPTION_POSITION_SNAPSHOT = 10
439
- OPTION_EXERCISE_POSITION_SNAPSHOT = 11
440
- OPTION_EXERCISE = 12
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
441
280
 
442
281
  FIELDS = {
443
- STOCK_BUY => {:type => ::Thrift::Types::STRUCT, :name => 'stock_buy', :class => ::Radar::Api::StockBuy, :optional => true},
444
- STOCK_SELL => {:type => ::Thrift::Types::STRUCT, :name => 'stock_sell', :class => ::Radar::Api::StockSell, :optional => true},
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},
445
285
  SLB => {:type => ::Thrift::Types::STRUCT, :name => 'slb', :class => ::Radar::Api::SecurityLendingAndBorrowing, :optional => true},
446
286
  SLBR => {:type => ::Thrift::Types::STRUCT, :name => 'slbr', :class => ::Radar::Api::SecurityLendingAndBorrowingReturning, :optional => true},
447
287
  STOCK_COMMISSION_EXPENSE => {:type => ::Thrift::Types::STRUCT, :name => 'stock_commission_expense', :class => ::Radar::Api::CommissionExpense, :optional => true},
448
- STOCK_OPTION => {:type => ::Thrift::Types::STRUCT, :name => 'stock_option', :class => ::Radar::Api::StockOption, :optional => true},
449
- SUBSCRIPTION => {:type => ::Thrift::Types::STRUCT, :name => 'subscription', :class => ::Radar::Api::Subscription, :optional => true},
450
288
  TRANSFER => {:type => ::Thrift::Types::STRUCT, :name => 'transfer', :class => ::Radar::Api::Transfer, :optional => true},
451
- STOCK_POSITION_SNAPSHOT => {:type => ::Thrift::Types::STRUCT, :name => 'stock_position_snapshot', :class => ::Radar::Api::StockPositionSnapshot, :optional => true},
452
- OPTION_POSITION_SNAPSHOT => {:type => ::Thrift::Types::STRUCT, :name => 'option_position_snapshot', :class => ::Radar::Api::OptionPositionSnapshot, :optional => true},
453
- OPTION_EXERCISE_POSITION_SNAPSHOT => {:type => ::Thrift::Types::STRUCT, :name => 'option_exercise_position_snapshot', :class => ::Radar::Api::OptionExercisePositionSnapshot, :optional => true},
454
289
  OPTION_EXERCISE => {:type => ::Thrift::Types::STRUCT, :name => 'option_exercise', :class => ::Radar::Api::OptionExercise, :optional => true}
455
290
  }
456
291
 
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.13.0
4
+ version: 0.14.0
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: 2019-12-16 00:00:00.000000000 Z
11
+ date: 2020-02-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -113,7 +113,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
113
113
  - !ruby/object:Gem::Version
114
114
  version: '0'
115
115
  requirements: []
116
- rubygems_version: 3.0.6
116
+ rubyforge_project:
117
+ rubygems_version: 2.6.14.4
117
118
  signing_key:
118
119
  specification_version: 4
119
120
  summary: Radar API