Class: Radar::API::Settlement

Inherits:
Thrift::Union
  • Object
show all
Includes:
Thrift::Struct_Union
Defined in:
lib/radar/api/radar_types.rb

Overview

Criado na versão 0.2.1

Constant Summary collapse

DATE =
1
PERIOD =
2
FIELDS =
{
  DATE => {:type => ::Thrift::Types::I32, :name => 'date'},
  PERIOD => {:type => ::Thrift::Types::I16, :name => 'period'}
}

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.date(val) ⇒ Object



540
541
542
# File 'lib/radar/api/radar_types.rb', line 540

def date(val)
  Settlement.new(:date, val)
end

.period(val) ⇒ Object



544
545
546
# File 'lib/radar/api/radar_types.rb', line 544

def period(val)
  Settlement.new(:period, val)
end

Instance Method Details

#struct_fieldsObject



557
# File 'lib/radar/api/radar_types.rb', line 557

def struct_fields; FIELDS; end

#validateObject

Raises:

  • (StandardError)


559
560
561
# File 'lib/radar/api/radar_types.rb', line 559

def validate
  raise(StandardError, 'Union fields are not set.') if get_set_field.nil? || get_value.nil?
end