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,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/transaction_types'
9
+
10
+ module Radar
11
+ module Api
12
+ end
13
+ end
@@ -0,0 +1,94 @@
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_file_importer_types'
9
+
10
+ module Radar
11
+ module Api
12
+ module TransactionFileImporter
13
+ class Client
14
+ include ::Thrift::Client
15
+
16
+ def extract(data)
17
+ send_extract(data)
18
+ return recv_extract()
19
+ end
20
+
21
+ def send_extract(data)
22
+ send_message('extract', Extract_args, :data => data)
23
+ end
24
+
25
+ def recv_extract()
26
+ result = receive_message(Extract_result)
27
+ return result.success unless result.success.nil?
28
+ raise result.app_error unless result.app_error.nil?
29
+ raise result.col_quantity_error unless result.col_quantity_error.nil?
30
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'extract failed: unknown result')
31
+ end
32
+
33
+ end
34
+
35
+ class Processor
36
+ include ::Thrift::Processor
37
+
38
+ def process_extract(seqid, iprot, oprot)
39
+ args = read_args(iprot, Extract_args)
40
+ result = Extract_result.new()
41
+ begin
42
+ result.success = @handler.extract(args.data)
43
+ rescue ::Radar::Api::ApplicationError => app_error
44
+ result.app_error = app_error
45
+ rescue ::Radar::Api::WrongFileStructure => col_quantity_error
46
+ result.col_quantity_error = col_quantity_error
47
+ end
48
+ write_result(result, oprot, 'extract', seqid)
49
+ end
50
+
51
+ end
52
+
53
+ # HELPER FUNCTIONS AND STRUCTURES
54
+
55
+ class Extract_args
56
+ include ::Thrift::Struct, ::Thrift::Struct_Union
57
+ DATA = 1
58
+
59
+ FIELDS = {
60
+ DATA => {:type => ::Thrift::Types::STRING, :name => 'data'}
61
+ }
62
+
63
+ def struct_fields; FIELDS; end
64
+
65
+ def validate
66
+ end
67
+
68
+ ::Thrift::Struct.generate_accessors self
69
+ end
70
+
71
+ class Extract_result
72
+ include ::Thrift::Struct, ::Thrift::Struct_Union
73
+ SUCCESS = 0
74
+ APP_ERROR = 100
75
+ COL_QUANTITY_ERROR = 1
76
+
77
+ FIELDS = {
78
+ SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRUCT, :class => ::Radar::Api::Transaction}},
79
+ APP_ERROR => {:type => ::Thrift::Types::STRUCT, :name => 'app_error', :class => ::Radar::Api::ApplicationError},
80
+ COL_QUANTITY_ERROR => {:type => ::Thrift::Types::STRUCT, :name => 'col_quantity_error', :class => ::Radar::Api::WrongFileStructure}
81
+ }
82
+
83
+ def struct_fields; FIELDS; end
84
+
85
+ def validate
86
+ end
87
+
88
+ ::Thrift::Struct.generate_accessors self
89
+ end
90
+
91
+ end
92
+
93
+ end
94
+ 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/transaction_file_importer_types'
9
+
10
+ module Radar
11
+ module Api
12
+ end
13
+ end
@@ -0,0 +1,38 @@
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
+ require 'radar/api/transaction_types'
10
+
11
+
12
+ module Radar
13
+ module Api
14
+ class WrongFileStructure < ::Thrift::Exception; end
15
+
16
+ class WrongFileStructure < ::Thrift::Exception
17
+ include ::Thrift::Struct, ::Thrift::Struct_Union
18
+ def initialize(message=nil)
19
+ super()
20
+ self.message = message
21
+ end
22
+
23
+ MESSAGE = 1
24
+
25
+ FIELDS = {
26
+ MESSAGE => {:type => ::Thrift::Types::STRING, :name => 'message'}
27
+ }
28
+
29
+ def struct_fields; FIELDS; end
30
+
31
+ def validate
32
+ end
33
+
34
+ ::Thrift::Struct.generate_accessors self
35
+ end
36
+
37
+ end
38
+ end
@@ -0,0 +1,252 @@
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
+
10
+ module Radar
11
+ module Api
12
+ module TransactionImporter
13
+ class Client
14
+ include ::Thrift::Client
15
+
16
+ def authenticate(username, password, user)
17
+ send_authenticate(username, password, user)
18
+ return recv_authenticate()
19
+ end
20
+
21
+ def send_authenticate(username, password, user)
22
+ send_message('authenticate', Authenticate_args, :username => username, :password => password, :user => user)
23
+ end
24
+
25
+ def recv_authenticate()
26
+ result = receive_message(Authenticate_result)
27
+ return result.success unless result.success.nil?
28
+ raise result.app_error unless result.app_error.nil?
29
+ raise result.auth_error unless result.auth_error.nil?
30
+ raise result.system_unavailable unless result.system_unavailable.nil?
31
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'authenticate failed: unknown result')
32
+ end
33
+
34
+ def fetch(username, password, user, last_transaction_date)
35
+ send_fetch(username, password, user, last_transaction_date)
36
+ recv_fetch()
37
+ end
38
+
39
+ def send_fetch(username, password, user, last_transaction_date)
40
+ send_message('fetch', Fetch_args, :username => username, :password => password, :user => user, :last_transaction_date => last_transaction_date)
41
+ end
42
+
43
+ def recv_fetch()
44
+ result = receive_message(Fetch_result)
45
+ raise result.app_error unless result.app_error.nil?
46
+ raise result.auth_error unless result.auth_error.nil?
47
+ raise result.system_unavailable unless result.system_unavailable.nil?
48
+ return
49
+ end
50
+
51
+ def fetch_portfolio(username, password, date)
52
+ send_fetch_portfolio(username, password, date)
53
+ return recv_fetch_portfolio()
54
+ end
55
+
56
+ def send_fetch_portfolio(username, password, date)
57
+ send_message('fetch_portfolio', Fetch_portfolio_args, :username => username, :password => password, :date => date)
58
+ end
59
+
60
+ def recv_fetch_portfolio()
61
+ result = receive_message(Fetch_portfolio_result)
62
+ return result.success unless result.success.nil?
63
+ raise result.app_error unless result.app_error.nil?
64
+ raise result.auth_error unless result.auth_error.nil?
65
+ raise result.system_unavailable unless result.system_unavailable.nil?
66
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'fetch_portfolio failed: unknown result')
67
+ end
68
+
69
+ end
70
+
71
+ class Processor
72
+ include ::Thrift::Processor
73
+
74
+ def process_authenticate(seqid, iprot, oprot)
75
+ args = read_args(iprot, Authenticate_args)
76
+ result = Authenticate_result.new()
77
+ begin
78
+ result.success = @handler.authenticate(args.username, args.password, args.user)
79
+ rescue ::Radar::Api::ApplicationError => app_error
80
+ result.app_error = app_error
81
+ rescue ::Radar::Api::AuthenticationError => auth_error
82
+ result.auth_error = auth_error
83
+ rescue ::Radar::Api::SystemUnavailableError => system_unavailable
84
+ result.system_unavailable = system_unavailable
85
+ end
86
+ write_result(result, oprot, 'authenticate', seqid)
87
+ end
88
+
89
+ def process_fetch(seqid, iprot, oprot)
90
+ args = read_args(iprot, Fetch_args)
91
+ result = Fetch_result.new()
92
+ begin
93
+ @handler.fetch(args.username, args.password, args.user, args.last_transaction_date)
94
+ rescue ::Radar::Api::ApplicationError => app_error
95
+ result.app_error = app_error
96
+ rescue ::Radar::Api::AuthenticationError => auth_error
97
+ result.auth_error = auth_error
98
+ rescue ::Radar::Api::SystemUnavailableError => system_unavailable
99
+ result.system_unavailable = system_unavailable
100
+ end
101
+ write_result(result, oprot, 'fetch', seqid)
102
+ end
103
+
104
+ def process_fetch_portfolio(seqid, iprot, oprot)
105
+ args = read_args(iprot, Fetch_portfolio_args)
106
+ result = Fetch_portfolio_result.new()
107
+ begin
108
+ result.success = @handler.fetch_portfolio(args.username, args.password, args.date)
109
+ rescue ::Radar::Api::ApplicationError => app_error
110
+ result.app_error = app_error
111
+ rescue ::Radar::Api::AuthenticationError => auth_error
112
+ result.auth_error = auth_error
113
+ rescue ::Radar::Api::SystemUnavailableError => system_unavailable
114
+ result.system_unavailable = system_unavailable
115
+ end
116
+ write_result(result, oprot, 'fetch_portfolio', seqid)
117
+ end
118
+
119
+ end
120
+
121
+ # HELPER FUNCTIONS AND STRUCTURES
122
+
123
+ class Authenticate_args
124
+ include ::Thrift::Struct, ::Thrift::Struct_Union
125
+ USERNAME = 1
126
+ PASSWORD = 2
127
+ USER = 3
128
+
129
+ FIELDS = {
130
+ USERNAME => {:type => ::Thrift::Types::STRING, :name => 'username'},
131
+ PASSWORD => {:type => ::Thrift::Types::STRING, :name => 'password'},
132
+ USER => {:type => ::Thrift::Types::STRING, :name => 'user'}
133
+ }
134
+
135
+ def struct_fields; FIELDS; end
136
+
137
+ def validate
138
+ end
139
+
140
+ ::Thrift::Struct.generate_accessors self
141
+ end
142
+
143
+ class Authenticate_result
144
+ include ::Thrift::Struct, ::Thrift::Struct_Union
145
+ SUCCESS = 0
146
+ APP_ERROR = 100
147
+ AUTH_ERROR = 1
148
+ SYSTEM_UNAVAILABLE = 2
149
+
150
+ FIELDS = {
151
+ SUCCESS => {:type => ::Thrift::Types::BOOL, :name => 'success'},
152
+ APP_ERROR => {:type => ::Thrift::Types::STRUCT, :name => 'app_error', :class => ::Radar::Api::ApplicationError},
153
+ AUTH_ERROR => {:type => ::Thrift::Types::STRUCT, :name => 'auth_error', :class => ::Radar::Api::AuthenticationError},
154
+ SYSTEM_UNAVAILABLE => {:type => ::Thrift::Types::STRUCT, :name => 'system_unavailable', :class => ::Radar::Api::SystemUnavailableError}
155
+ }
156
+
157
+ def struct_fields; FIELDS; end
158
+
159
+ def validate
160
+ end
161
+
162
+ ::Thrift::Struct.generate_accessors self
163
+ end
164
+
165
+ class Fetch_args
166
+ include ::Thrift::Struct, ::Thrift::Struct_Union
167
+ USERNAME = 1
168
+ PASSWORD = 2
169
+ USER = 3
170
+ LAST_TRANSACTION_DATE = 4
171
+
172
+ FIELDS = {
173
+ USERNAME => {:type => ::Thrift::Types::STRING, :name => 'username'},
174
+ PASSWORD => {:type => ::Thrift::Types::STRING, :name => 'password'},
175
+ USER => {:type => ::Thrift::Types::STRING, :name => 'user'},
176
+ LAST_TRANSACTION_DATE => {:type => ::Thrift::Types::I64, :name => 'last_transaction_date'}
177
+ }
178
+
179
+ def struct_fields; FIELDS; end
180
+
181
+ def validate
182
+ end
183
+
184
+ ::Thrift::Struct.generate_accessors self
185
+ end
186
+
187
+ class Fetch_result
188
+ include ::Thrift::Struct, ::Thrift::Struct_Union
189
+ APP_ERROR = 100
190
+ AUTH_ERROR = 1
191
+ SYSTEM_UNAVAILABLE = 2
192
+
193
+ FIELDS = {
194
+ APP_ERROR => {:type => ::Thrift::Types::STRUCT, :name => 'app_error', :class => ::Radar::Api::ApplicationError},
195
+ AUTH_ERROR => {:type => ::Thrift::Types::STRUCT, :name => 'auth_error', :class => ::Radar::Api::AuthenticationError},
196
+ SYSTEM_UNAVAILABLE => {:type => ::Thrift::Types::STRUCT, :name => 'system_unavailable', :class => ::Radar::Api::SystemUnavailableError}
197
+ }
198
+
199
+ def struct_fields; FIELDS; end
200
+
201
+ def validate
202
+ end
203
+
204
+ ::Thrift::Struct.generate_accessors self
205
+ end
206
+
207
+ class Fetch_portfolio_args
208
+ include ::Thrift::Struct, ::Thrift::Struct_Union
209
+ USERNAME = 1
210
+ PASSWORD = 2
211
+ DATE = 3
212
+
213
+ FIELDS = {
214
+ USERNAME => {:type => ::Thrift::Types::STRING, :name => 'username'},
215
+ PASSWORD => {:type => ::Thrift::Types::STRING, :name => 'password'},
216
+ DATE => {:type => ::Thrift::Types::I64, :name => 'date'}
217
+ }
218
+
219
+ def struct_fields; FIELDS; end
220
+
221
+ def validate
222
+ end
223
+
224
+ ::Thrift::Struct.generate_accessors self
225
+ end
226
+
227
+ class Fetch_portfolio_result
228
+ include ::Thrift::Struct, ::Thrift::Struct_Union
229
+ SUCCESS = 0
230
+ APP_ERROR = 100
231
+ AUTH_ERROR = 1
232
+ SYSTEM_UNAVAILABLE = 2
233
+
234
+ FIELDS = {
235
+ SUCCESS => {:type => ::Thrift::Types::MAP, :name => 'success', :key => {:type => ::Thrift::Types::STRUCT, :class => ::Radar::Api::SecurityId}, :value => {:type => ::Thrift::Types::I32}},
236
+ APP_ERROR => {:type => ::Thrift::Types::STRUCT, :name => 'app_error', :class => ::Radar::Api::ApplicationError},
237
+ AUTH_ERROR => {:type => ::Thrift::Types::STRUCT, :name => 'auth_error', :class => ::Radar::Api::AuthenticationError},
238
+ SYSTEM_UNAVAILABLE => {:type => ::Thrift::Types::STRUCT, :name => 'system_unavailable', :class => ::Radar::Api::SystemUnavailableError}
239
+ }
240
+
241
+ def struct_fields; FIELDS; end
242
+
243
+ def validate
244
+ end
245
+
246
+ ::Thrift::Struct.generate_accessors self
247
+ end
248
+
249
+ end
250
+
251
+ end
252
+ 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/transaction_importer_types'
9
+
10
+ module Radar
11
+ module Api
12
+ end
13
+ end
@@ -0,0 +1,60 @@
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
+ class AuthenticationError < ::Thrift::Exception; end
14
+
15
+ class SystemUnavailableError < ::Thrift::Exception; end
16
+
17
+ class AuthenticationError < ::Thrift::Exception
18
+ include ::Thrift::Struct, ::Thrift::Struct_Union
19
+ def initialize(message=nil)
20
+ super()
21
+ self.message = message
22
+ end
23
+
24
+ MESSAGE = 1
25
+
26
+ FIELDS = {
27
+ MESSAGE => {:type => ::Thrift::Types::STRING, :name => 'message'}
28
+ }
29
+
30
+ def struct_fields; FIELDS; end
31
+
32
+ def validate
33
+ end
34
+
35
+ ::Thrift::Struct.generate_accessors self
36
+ end
37
+
38
+ class SystemUnavailableError < ::Thrift::Exception
39
+ include ::Thrift::Struct, ::Thrift::Struct_Union
40
+ def initialize(message=nil)
41
+ super()
42
+ self.message = message
43
+ end
44
+
45
+ MESSAGE = 1
46
+
47
+ FIELDS = {
48
+ MESSAGE => {:type => ::Thrift::Types::STRING, :name => 'message'}
49
+ }
50
+
51
+ def struct_fields; FIELDS; end
52
+
53
+ def validate
54
+ end
55
+
56
+ ::Thrift::Struct.generate_accessors self
57
+ end
58
+
59
+ end
60
+ end