radar-api-legacy 0.14.2 → 0.14.3

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
2
  SHA1:
3
- metadata.gz: cfe54311b8a0016813f17fd73ca0660f05a9519f
4
- data.tar.gz: 3665f853eff5d904af662abd3d5f43b5b4803025
3
+ metadata.gz: 30acfddaf9f300170b03066a1945dbd67bb89c40
4
+ data.tar.gz: 3e0d8f7da7b8f098063f007ed222f0a55da19300
5
5
  SHA512:
6
- metadata.gz: 26f6e200323d2f197858824fb5868b7f5a6172d94817aab82b54b6be141fb627edd5eed77dab3bfbf3364d47e560a99d7da2e50a7f67450cb1311c87a1d20444
7
- data.tar.gz: 5f4cb98bfb8fd6fae07df396adfcbe5410cc5ff9d12dd1c6c433369d2a28dc3ccdd4515d50c9bc6e980a1e41c57c8d95f13bf861fccdff21a27aee8b36d49e76
6
+ metadata.gz: 6bb6f3027b48c47030fe52aae424516ca1acb77666ff2c3ee350b16e08d7d29b69e43bf70267e3ab39ba1b5906b64f8044e8465b174b5bc9f7e8b8b35ebc18fd
7
+ data.tar.gz: 4f5a052426f419735f1b985c02bb50175480753e3357c70abf0c4d9a8f4cc31db5d2b2d139264becda24b5332435030178552849a373c4cc70d9596034e37e02
@@ -48,13 +48,13 @@ module Radar
48
48
  return
49
49
  end
50
50
 
51
- def fetch_portfolio(username, password, stock_position_date, option_position_date)
52
- send_fetch_portfolio(username, password, stock_position_date, option_position_date)
51
+ def fetch_portfolio(username, password, date)
52
+ send_fetch_portfolio(username, password, date)
53
53
  return recv_fetch_portfolio()
54
54
  end
55
55
 
56
- def send_fetch_portfolio(username, password, stock_position_date, option_position_date)
57
- send_message('fetch_portfolio', Fetch_portfolio_args, :username => username, :password => password, :stock_position_date => stock_position_date, :option_position_date => option_position_date)
56
+ def send_fetch_portfolio(username, password, date)
57
+ send_message('fetch_portfolio', Fetch_portfolio_args, :username => username, :password => password, :date => date)
58
58
  end
59
59
 
60
60
  def recv_fetch_portfolio()
@@ -105,7 +105,7 @@ module Radar
105
105
  args = read_args(iprot, Fetch_portfolio_args)
106
106
  result = Fetch_portfolio_result.new()
107
107
  begin
108
- result.success = @handler.fetch_portfolio(args.username, args.password, args.stock_position_date, args.option_position_date)
108
+ result.success = @handler.fetch_portfolio(args.username, args.password, args.date)
109
109
  rescue ::Radar::Api::ApplicationError => app_error
110
110
  result.app_error = app_error
111
111
  rescue ::Radar::Api::AuthenticationError => auth_error
@@ -208,14 +208,12 @@ module Radar
208
208
  include ::Thrift::Struct, ::Thrift::Struct_Union
209
209
  USERNAME = 1
210
210
  PASSWORD = 2
211
- STOCK_POSITION_DATE = 3
212
- OPTION_POSITION_DATE = 4
211
+ DATE = 3
213
212
 
214
213
  FIELDS = {
215
214
  USERNAME => {:type => ::Thrift::Types::STRING, :name => 'username'},
216
215
  PASSWORD => {:type => ::Thrift::Types::STRING, :name => 'password'},
217
- STOCK_POSITION_DATE => {:type => ::Thrift::Types::I64, :name => 'stock_position_date'},
218
- OPTION_POSITION_DATE => {:type => ::Thrift::Types::I64, :name => 'option_position_date'}
216
+ DATE => {:type => ::Thrift::Types::I64, :name => 'date'}
219
217
  }
220
218
 
221
219
  def struct_fields; FIELDS; end
@@ -234,7 +232,7 @@ module Radar
234
232
  SYSTEM_UNAVAILABLE = 2
235
233
 
236
234
  FIELDS = {
237
- SUCCESS => {:type => ::Thrift::Types::MAP, :name => 'success', :key => {:type => ::Thrift::Types::STRUCT, :class => ::Radar::Api::SecurityId}, :value => {:type => ::Thrift::Types::I32}},
235
+ SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::Radar::Api::FetchedPortfolio},
238
236
  APP_ERROR => {:type => ::Thrift::Types::STRUCT, :name => 'app_error', :class => ::Radar::Api::ApplicationError},
239
237
  AUTH_ERROR => {:type => ::Thrift::Types::STRUCT, :name => 'auth_error', :class => ::Radar::Api::AuthenticationError},
240
238
  SYSTEM_UNAVAILABLE => {:type => ::Thrift::Types::STRUCT, :name => 'system_unavailable', :class => ::Radar::Api::SystemUnavailableError}
@@ -14,6 +14,8 @@ module Radar
14
14
 
15
15
  class SystemUnavailableError < ::Thrift::Exception; end
16
16
 
17
+ class FetchedPortfolio; end
18
+
17
19
  class AuthenticationError < ::Thrift::Exception
18
20
  include ::Thrift::Struct, ::Thrift::Struct_Union
19
21
  def initialize(message=nil)
@@ -56,5 +58,23 @@ module Radar
56
58
  ::Thrift::Struct.generate_accessors self
57
59
  end
58
60
 
61
+ class FetchedPortfolio
62
+ include ::Thrift::Struct, ::Thrift::Struct_Union
63
+ DATE = 1
64
+ PORTFOLIO = 2
65
+
66
+ FIELDS = {
67
+ DATE => {:type => ::Thrift::Types::I64, :name => 'date'},
68
+ PORTFOLIO => {:type => ::Thrift::Types::MAP, :name => 'portfolio', :key => {:type => ::Thrift::Types::STRUCT, :class => ::Radar::Api::SecurityId}, :value => {:type => ::Thrift::Types::I32}}
69
+ }
70
+
71
+ def struct_fields; FIELDS; end
72
+
73
+ def validate
74
+ end
75
+
76
+ ::Thrift::Struct.generate_accessors self
77
+ end
78
+
59
79
  end
60
80
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: radar-api-legacy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.14.2
4
+ version: 0.14.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - André Aizim Kelmanson