Class: Radar::API::SecurityService::Processor

Inherits:
Object
  • Object
show all
Includes:
Thrift::Processor
Defined in:
lib/radar/api/security_service.rb

Instance Method Summary collapse

Instance Method Details

#process_price(seqid, iprot, oprot) ⇒ Object



103
104
105
106
107
108
# File 'lib/radar/api/security_service.rb', line 103

def process_price(seqid, iprot, oprot)
  args = read_args(iprot, Price_args)
  result = Price_result.new()
  result.success = @handler.price(args.id, args.date)
  write_result(result, oprot, 'price', seqid)
end

#process_price_change(seqid, iprot, oprot) ⇒ Object



110
111
112
113
114
115
# File 'lib/radar/api/security_service.rb', line 110

def process_price_change(seqid, iprot, oprot)
  args = read_args(iprot, Price_change_args)
  result = Price_change_result.new()
  result.success = @handler.price_change(args.id, args.start_date, args.end_date)
  write_result(result, oprot, 'price_change', seqid)
end

#process_price_changes(seqid, iprot, oprot) ⇒ Object



117
118
119
120
121
122
# File 'lib/radar/api/security_service.rb', line 117

def process_price_changes(seqid, iprot, oprot)
  args = read_args(iprot, Price_changes_args)
  result = Price_changes_result.new()
  result.success = @handler.price_changes(args.id, args.start_date, args.end_date)
  write_result(result, oprot, 'price_changes', seqid)
end

#process_price_volatility(seqid, iprot, oprot) ⇒ Object



124
125
126
127
128
129
# File 'lib/radar/api/security_service.rb', line 124

def process_price_volatility(seqid, iprot, oprot)
  args = read_args(iprot, Price_volatility_args)
  result = Price_volatility_result.new()
  result.success = @handler.price_volatility(args.id, args.start_date, args.end_date)
  write_result(result, oprot, 'price_volatility', seqid)
end

#process_prices(seqid, iprot, oprot) ⇒ Object



96
97
98
99
100
101
# File 'lib/radar/api/security_service.rb', line 96

def process_prices(seqid, iprot, oprot)
  args = read_args(iprot, Prices_args)
  result = Prices_result.new()
  result.success = @handler.prices(args.id, args.start_date, args.end_date)
  write_result(result, oprot, 'prices', seqid)
end