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,200 @@
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/data_server_types'
9
+
10
+ module Radar
11
+ module Api
12
+ module CalendarService
13
+ class Client
14
+ include ::Thrift::Client
15
+
16
+ def advance(calendar, date, n)
17
+ send_advance(calendar, date, n)
18
+ return recv_advance()
19
+ end
20
+
21
+ def send_advance(calendar, date, n)
22
+ send_message('advance', Advance_args, :calendar => calendar, :date => date, :n => n)
23
+ end
24
+
25
+ def recv_advance()
26
+ result = receive_message(Advance_result)
27
+ return result.success unless result.success.nil?
28
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'advance failed: unknown result')
29
+ end
30
+
31
+ def back(calendar, date, n)
32
+ send_back(calendar, date, n)
33
+ return recv_back()
34
+ end
35
+
36
+ def send_back(calendar, date, n)
37
+ send_message('back', Back_args, :calendar => calendar, :date => date, :n => n)
38
+ end
39
+
40
+ def recv_back()
41
+ result = receive_message(Back_result)
42
+ return result.success unless result.success.nil?
43
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'back failed: unknown result')
44
+ end
45
+
46
+ def first_business_day(calendar, date)
47
+ send_first_business_day(calendar, date)
48
+ return recv_first_business_day()
49
+ end
50
+
51
+ def send_first_business_day(calendar, date)
52
+ send_message('first_business_day', First_business_day_args, :calendar => calendar, :date => date)
53
+ end
54
+
55
+ def recv_first_business_day()
56
+ result = receive_message(First_business_day_result)
57
+ return result.success unless result.success.nil?
58
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'first_business_day failed: unknown result')
59
+ end
60
+
61
+ end
62
+
63
+ class Processor
64
+ include ::Thrift::Processor
65
+
66
+ def process_advance(seqid, iprot, oprot)
67
+ args = read_args(iprot, Advance_args)
68
+ result = Advance_result.new()
69
+ result.success = @handler.advance(args.calendar, args.date, args.n)
70
+ write_result(result, oprot, 'advance', seqid)
71
+ end
72
+
73
+ def process_back(seqid, iprot, oprot)
74
+ args = read_args(iprot, Back_args)
75
+ result = Back_result.new()
76
+ result.success = @handler.back(args.calendar, args.date, args.n)
77
+ write_result(result, oprot, 'back', seqid)
78
+ end
79
+
80
+ def process_first_business_day(seqid, iprot, oprot)
81
+ args = read_args(iprot, First_business_day_args)
82
+ result = First_business_day_result.new()
83
+ result.success = @handler.first_business_day(args.calendar, args.date)
84
+ write_result(result, oprot, 'first_business_day', seqid)
85
+ end
86
+
87
+ end
88
+
89
+ # HELPER FUNCTIONS AND STRUCTURES
90
+
91
+ class Advance_args
92
+ include ::Thrift::Struct, ::Thrift::Struct_Union
93
+ CALENDAR = 1
94
+ DATE = 2
95
+ N = 3
96
+
97
+ FIELDS = {
98
+ CALENDAR => {:type => ::Thrift::Types::STRING, :name => 'calendar'},
99
+ DATE => {:type => ::Thrift::Types::I64, :name => 'date'},
100
+ N => {:type => ::Thrift::Types::I16, :name => 'n'}
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 Advance_result
112
+ include ::Thrift::Struct, ::Thrift::Struct_Union
113
+ SUCCESS = 0
114
+
115
+ FIELDS = {
116
+ SUCCESS => {:type => ::Thrift::Types::I64, :name => 'success'}
117
+ }
118
+
119
+ def struct_fields; FIELDS; end
120
+
121
+ def validate
122
+ end
123
+
124
+ ::Thrift::Struct.generate_accessors self
125
+ end
126
+
127
+ class Back_args
128
+ include ::Thrift::Struct, ::Thrift::Struct_Union
129
+ CALENDAR = 1
130
+ DATE = 2
131
+ N = 3
132
+
133
+ FIELDS = {
134
+ CALENDAR => {:type => ::Thrift::Types::STRING, :name => 'calendar'},
135
+ DATE => {:type => ::Thrift::Types::I64, :name => 'date'},
136
+ N => {:type => ::Thrift::Types::I16, :name => 'n'}
137
+ }
138
+
139
+ def struct_fields; FIELDS; end
140
+
141
+ def validate
142
+ end
143
+
144
+ ::Thrift::Struct.generate_accessors self
145
+ end
146
+
147
+ class Back_result
148
+ include ::Thrift::Struct, ::Thrift::Struct_Union
149
+ SUCCESS = 0
150
+
151
+ FIELDS = {
152
+ SUCCESS => {:type => ::Thrift::Types::I64, :name => 'success'}
153
+ }
154
+
155
+ def struct_fields; FIELDS; end
156
+
157
+ def validate
158
+ end
159
+
160
+ ::Thrift::Struct.generate_accessors self
161
+ end
162
+
163
+ class First_business_day_args
164
+ include ::Thrift::Struct, ::Thrift::Struct_Union
165
+ CALENDAR = 1
166
+ DATE = 2
167
+
168
+ FIELDS = {
169
+ CALENDAR => {:type => ::Thrift::Types::STRING, :name => 'calendar'},
170
+ DATE => {:type => ::Thrift::Types::I64, :name => 'date'}
171
+ }
172
+
173
+ def struct_fields; FIELDS; end
174
+
175
+ def validate
176
+ end
177
+
178
+ ::Thrift::Struct.generate_accessors self
179
+ end
180
+
181
+ class First_business_day_result
182
+ include ::Thrift::Struct, ::Thrift::Struct_Union
183
+ SUCCESS = 0
184
+
185
+ FIELDS = {
186
+ SUCCESS => {:type => ::Thrift::Types::I64, :name => 'success'}
187
+ }
188
+
189
+ def struct_fields; FIELDS; end
190
+
191
+ def validate
192
+ end
193
+
194
+ ::Thrift::Struct.generate_accessors self
195
+ end
196
+
197
+ end
198
+
199
+ end
200
+ end
@@ -0,0 +1,13 @@
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
+ module Radar
11
+ module Api
12
+ end
13
+ end
@@ -0,0 +1,223 @@
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
+
9
+ module Radar
10
+ module Api
11
+ class EquityId; end
12
+
13
+ class IndexId; end
14
+
15
+ class FundId; end
16
+
17
+ class CorporateBondId; end
18
+
19
+ class GovernmentBondId; end
20
+
21
+ class CustomSecurityId; end
22
+
23
+ class SecurityId < ::Thrift::Union; end
24
+
25
+ class Broker; end
26
+
27
+ class ApplicationError < ::Thrift::Exception; end
28
+
29
+ class EquityId
30
+ include ::Thrift::Struct, ::Thrift::Struct_Union
31
+ SYMBOL = 1
32
+
33
+ FIELDS = {
34
+ SYMBOL => {:type => ::Thrift::Types::STRING, :name => 'symbol'}
35
+ }
36
+
37
+ def struct_fields; FIELDS; end
38
+
39
+ def validate
40
+ end
41
+
42
+ ::Thrift::Struct.generate_accessors self
43
+ end
44
+
45
+ class IndexId
46
+ include ::Thrift::Struct, ::Thrift::Struct_Union
47
+ SYMBOL = 1
48
+
49
+ FIELDS = {
50
+ SYMBOL => {:type => ::Thrift::Types::STRING, :name => 'symbol'}
51
+ }
52
+
53
+ def struct_fields; FIELDS; end
54
+
55
+ def validate
56
+ end
57
+
58
+ ::Thrift::Struct.generate_accessors self
59
+ end
60
+
61
+ class FundId
62
+ include ::Thrift::Struct, ::Thrift::Struct_Union
63
+ CNPJ = 1
64
+
65
+ FIELDS = {
66
+ CNPJ => {:type => ::Thrift::Types::STRING, :name => 'cnpj'}
67
+ }
68
+
69
+ def struct_fields; FIELDS; end
70
+
71
+ def validate
72
+ end
73
+
74
+ ::Thrift::Struct.generate_accessors self
75
+ end
76
+
77
+ class CorporateBondId
78
+ include ::Thrift::Struct, ::Thrift::Struct_Union
79
+ INDEX = 1
80
+ FACTOR = 2
81
+ RATE = 5
82
+ BASE_DATE = 3
83
+ MATURITY_DATE = 4
84
+
85
+ FIELDS = {
86
+ INDEX => {:type => ::Thrift::Types::STRUCT, :name => 'index', :class => ::Radar::Api::IndexId},
87
+ FACTOR => {:type => ::Thrift::Types::DOUBLE, :name => 'factor'},
88
+ RATE => {:type => ::Thrift::Types::DOUBLE, :name => 'rate'},
89
+ BASE_DATE => {:type => ::Thrift::Types::I64, :name => 'base_date'},
90
+ MATURITY_DATE => {:type => ::Thrift::Types::I64, :name => 'maturity_date'}
91
+ }
92
+
93
+ def struct_fields; FIELDS; end
94
+
95
+ def validate
96
+ end
97
+
98
+ ::Thrift::Struct.generate_accessors self
99
+ end
100
+
101
+ class GovernmentBondId
102
+ include ::Thrift::Struct, ::Thrift::Struct_Union
103
+ NAME = 1
104
+ MATURITY_DATE = 2
105
+
106
+ FIELDS = {
107
+ NAME => {:type => ::Thrift::Types::STRING, :name => 'name'},
108
+ MATURITY_DATE => {:type => ::Thrift::Types::I64, :name => 'maturity_date'}
109
+ }
110
+
111
+ def struct_fields; FIELDS; end
112
+
113
+ def validate
114
+ end
115
+
116
+ ::Thrift::Struct.generate_accessors self
117
+ end
118
+
119
+ class CustomSecurityId
120
+ include ::Thrift::Struct, ::Thrift::Struct_Union
121
+ USER_ID = 1
122
+ ID = 2
123
+
124
+ FIELDS = {
125
+ USER_ID => {:type => ::Thrift::Types::STRING, :name => 'user_id'},
126
+ ID => {:type => ::Thrift::Types::STRING, :name => 'id'}
127
+ }
128
+
129
+ def struct_fields; FIELDS; end
130
+
131
+ def validate
132
+ end
133
+
134
+ ::Thrift::Struct.generate_accessors self
135
+ end
136
+
137
+ class SecurityId < ::Thrift::Union
138
+ include ::Thrift::Struct_Union
139
+ class << self
140
+ def stock(val)
141
+ SecurityId.new(:stock, val)
142
+ end
143
+
144
+ def fund(val)
145
+ SecurityId.new(:fund, val)
146
+ end
147
+
148
+ def corporate_bond(val)
149
+ SecurityId.new(:corporate_bond, val)
150
+ end
151
+
152
+ def government_bond(val)
153
+ SecurityId.new(:government_bond, val)
154
+ end
155
+
156
+ def custom_security(val)
157
+ SecurityId.new(:custom_security, val)
158
+ end
159
+ end
160
+
161
+ STOCK = 1
162
+ FUND = 2
163
+ CORPORATE_BOND = 3
164
+ GOVERNMENT_BOND = 4
165
+ CUSTOM_SECURITY = 5
166
+
167
+ FIELDS = {
168
+ STOCK => {:type => ::Thrift::Types::STRUCT, :name => 'stock', :class => ::Radar::Api::EquityId, :optional => true},
169
+ FUND => {:type => ::Thrift::Types::STRUCT, :name => 'fund', :class => ::Radar::Api::FundId, :optional => true},
170
+ CORPORATE_BOND => {:type => ::Thrift::Types::STRUCT, :name => 'corporate_bond', :class => ::Radar::Api::CorporateBondId, :optional => true},
171
+ GOVERNMENT_BOND => {:type => ::Thrift::Types::STRUCT, :name => 'government_bond', :class => ::Radar::Api::GovernmentBondId, :optional => true},
172
+ CUSTOM_SECURITY => {:type => ::Thrift::Types::STRUCT, :name => 'custom_security', :class => ::Radar::Api::CustomSecurityId, :optional => true}
173
+ }
174
+
175
+ def struct_fields; FIELDS; end
176
+
177
+ def validate
178
+ raise(StandardError, 'Union fields are not set.') if get_set_field.nil? || get_value.nil?
179
+ end
180
+
181
+ ::Thrift::Union.generate_accessors self
182
+ end
183
+
184
+ class Broker
185
+ include ::Thrift::Struct, ::Thrift::Struct_Union
186
+ CODE = 1
187
+ NAME = 2
188
+ SEGMENT = 3
189
+
190
+ FIELDS = {
191
+ CODE => {:type => ::Thrift::Types::STRING, :name => 'code'},
192
+ NAME => {:type => ::Thrift::Types::STRING, :name => 'name'},
193
+ SEGMENT => {:type => ::Thrift::Types::STRING, :name => 'segment'}
194
+ }
195
+
196
+ def struct_fields; FIELDS; end
197
+
198
+ def validate
199
+ end
200
+
201
+ ::Thrift::Struct.generate_accessors self
202
+ end
203
+
204
+ class ApplicationError < ::Thrift::Exception
205
+ include ::Thrift::Struct, ::Thrift::Struct_Union
206
+ MESSAGE = 1
207
+ STACKTRACE = 2
208
+
209
+ FIELDS = {
210
+ MESSAGE => {:type => ::Thrift::Types::STRING, :name => 'message'},
211
+ STACKTRACE => {:type => ::Thrift::Types::LIST, :name => 'stacktrace', :element => {:type => ::Thrift::Types::STRING}}
212
+ }
213
+
214
+ def struct_fields; FIELDS; end
215
+
216
+ def validate
217
+ end
218
+
219
+ ::Thrift::Struct.generate_accessors self
220
+ end
221
+
222
+ end
223
+ end
@@ -0,0 +1,13 @@
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/data_server_types'
9
+
10
+ module Radar
11
+ module Api
12
+ end
13
+ end