Class: Radar::API::SecurityId
- Inherits:
-
Thrift::Union
- Object
- Thrift::Union
- Radar::API::SecurityId
- Includes:
- Thrift::Struct_Union
- Defined in:
- lib/radar/api/radar_types.rb
Constant Summary collapse
- STOCK =
1- FUND =
2- INDEX_LINKED_BOND =
3- FIELDS =
{ STOCK => {:type => ::Thrift::Types::STRUCT, :name => 'stock', :class => ::Radar::API::StockId}, FUND => {:type => ::Thrift::Types::STRUCT, :name => 'fund', :class => ::Radar::API::FundId}, INDEX_LINKED_BOND => {:type => ::Thrift::Types::STRUCT, :name => 'index_linked_bond', :class => ::Radar::API::IndexLinkedBondId} }
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.fund(val) ⇒ Object
108 109 110 |
# File 'lib/radar/api/radar_types.rb', line 108 def fund(val) SecurityId.new(:fund, val) end |
.index_linked_bond(val) ⇒ Object
112 113 114 |
# File 'lib/radar/api/radar_types.rb', line 112 def index_linked_bond(val) SecurityId.new(:index_linked_bond, val) end |
.stock(val) ⇒ Object
104 105 106 |
# File 'lib/radar/api/radar_types.rb', line 104 def stock(val) SecurityId.new(:stock, val) end |
Instance Method Details
#struct_fields ⇒ Object
127 |
# File 'lib/radar/api/radar_types.rb', line 127 def struct_fields; FIELDS; end |
#validate ⇒ Object
129 130 131 |
# File 'lib/radar/api/radar_types.rb', line 129 def validate raise(StandardError, 'Union fields are not set.') if get_set_field.nil? || get_value.nil? end |