radar-api 0.12.0 → 0.12.2
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 +5 -5
- data/Gemfile.lock +1 -1
- data/gen/radar/api/transaction_importer.rb +68 -0
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: fc050777b90f888100b7cc06c9b87027e5c9bb38a840c603a517ffb6e66cbd1a
|
4
|
+
data.tar.gz: 182c2261adf5d8da6932560814611c79bb08750a28040a1eeb1040baf4f8f3fb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e31195e03d1bbcb1f8c0e4a1bdf8ea1913df87648b1ca36ccd9539187b64fb0edce7f03290ad3b8c4a304dfd3ca388e4e83dc89776917633e64c4755fefa0b10
|
7
|
+
data.tar.gz: d53ff1457d5a3e18ed6ed2b8220966b1dd1d831c330e514f065f4b2d7e1eabdb55529dba79cdb10e45492eafea5e804d8a78295736fb516d641bf830b744eca7
|
data/Gemfile.lock
CHANGED
@@ -46,6 +46,23 @@ module Radar
|
|
46
46
|
return
|
47
47
|
end
|
48
48
|
|
49
|
+
def fetch_portfolio(username, password)
|
50
|
+
send_fetch_portfolio(username, password)
|
51
|
+
return recv_fetch_portfolio()
|
52
|
+
end
|
53
|
+
|
54
|
+
def send_fetch_portfolio(username, password)
|
55
|
+
send_message('fetch_portfolio', Fetch_portfolio_args, :username => username, :password => password)
|
56
|
+
end
|
57
|
+
|
58
|
+
def recv_fetch_portfolio()
|
59
|
+
result = receive_message(Fetch_portfolio_result)
|
60
|
+
return result.success unless result.success.nil?
|
61
|
+
raise result.auth_error unless result.auth_error.nil?
|
62
|
+
raise result.system_unavailable unless result.system_unavailable.nil?
|
63
|
+
raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'fetch_portfolio failed: unknown result')
|
64
|
+
end
|
65
|
+
|
49
66
|
end
|
50
67
|
|
51
68
|
class Processor
|
@@ -77,6 +94,19 @@ module Radar
|
|
77
94
|
write_result(result, oprot, 'fetch', seqid)
|
78
95
|
end
|
79
96
|
|
97
|
+
def process_fetch_portfolio(seqid, iprot, oprot)
|
98
|
+
args = read_args(iprot, Fetch_portfolio_args)
|
99
|
+
result = Fetch_portfolio_result.new()
|
100
|
+
begin
|
101
|
+
result.success = @handler.fetch_portfolio(args.username, args.password)
|
102
|
+
rescue ::Radar::Api::AuthenticationError => auth_error
|
103
|
+
result.auth_error = auth_error
|
104
|
+
rescue ::Radar::Api::SystemUnavailableError => system_unavailable
|
105
|
+
result.system_unavailable = system_unavailable
|
106
|
+
end
|
107
|
+
write_result(result, oprot, 'fetch_portfolio', seqid)
|
108
|
+
end
|
109
|
+
|
80
110
|
end
|
81
111
|
|
82
112
|
# HELPER FUNCTIONS AND STRUCTURES
|
@@ -161,6 +191,44 @@ module Radar
|
|
161
191
|
::Thrift::Struct.generate_accessors self
|
162
192
|
end
|
163
193
|
|
194
|
+
class Fetch_portfolio_args
|
195
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
196
|
+
USERNAME = 1
|
197
|
+
PASSWORD = 2
|
198
|
+
|
199
|
+
FIELDS = {
|
200
|
+
USERNAME => {:type => ::Thrift::Types::STRING, :name => 'username'},
|
201
|
+
PASSWORD => {:type => ::Thrift::Types::STRING, :name => 'password'}
|
202
|
+
}
|
203
|
+
|
204
|
+
def struct_fields; FIELDS; end
|
205
|
+
|
206
|
+
def validate
|
207
|
+
end
|
208
|
+
|
209
|
+
::Thrift::Struct.generate_accessors self
|
210
|
+
end
|
211
|
+
|
212
|
+
class Fetch_portfolio_result
|
213
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
214
|
+
SUCCESS = 0
|
215
|
+
AUTH_ERROR = 1
|
216
|
+
SYSTEM_UNAVAILABLE = 2
|
217
|
+
|
218
|
+
FIELDS = {
|
219
|
+
SUCCESS => {:type => ::Thrift::Types::MAP, :name => 'success', :key => {:type => ::Thrift::Types::STRUCT, :class => ::Radar::Api::SecurityId}, :value => {:type => ::Thrift::Types::I32}},
|
220
|
+
AUTH_ERROR => {:type => ::Thrift::Types::STRUCT, :name => 'auth_error', :class => ::Radar::Api::AuthenticationError},
|
221
|
+
SYSTEM_UNAVAILABLE => {:type => ::Thrift::Types::STRUCT, :name => 'system_unavailable', :class => ::Radar::Api::SystemUnavailableError}
|
222
|
+
}
|
223
|
+
|
224
|
+
def struct_fields; FIELDS; end
|
225
|
+
|
226
|
+
def validate
|
227
|
+
end
|
228
|
+
|
229
|
+
::Thrift::Struct.generate_accessors self
|
230
|
+
end
|
231
|
+
|
164
232
|
end
|
165
233
|
|
166
234
|
end
|
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.12.
|
4
|
+
version: 0.12.2
|
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-
|
11
|
+
date: 2019-12-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -113,8 +113,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
113
113
|
- !ruby/object:Gem::Version
|
114
114
|
version: '0'
|
115
115
|
requirements: []
|
116
|
-
|
117
|
-
rubygems_version: 2.6.14.4
|
116
|
+
rubygems_version: 3.0.6
|
118
117
|
signing_key:
|
119
118
|
specification_version: 4
|
120
119
|
summary: Radar API
|