Class: Neuron::Schema::GeoTarget

Inherits:
Object
  • Object
show all
Includes:
Common
Defined in:
lib/neuron-client/schema/geo_target.rb

Constant Summary collapse

SCHEMA =
self.new

Instance Method Summary collapse

Methods included from Common

#choice_of, #datetime, #errors, #id, included, #integer, #merged, #missing_or_null, #missing_or_null_or_empty_hash, #nonnull_string, #null, #nullable_string, #object_type, #object_type_or_null, #one_of, #parameters, #priority, #set_of, #slug, #timezone, #url, #uuid, #weight, #yes_no

Instance Method Details

#indexObject



8
9
10
11
12
13
14
15
16
17
18
# File 'lib/neuron-client/schema/geo_target.rb', line 8

def index
  @@index ||=
  set_of(object_type("geo_target",
    :id => id,
    :abbreviation => nonnull_string,
    :full_name => nonnull_string,
    :geo_type => choice_of(Neuron::Client::GeoTarget::TYPES),
    :name => nonnull_string,
    :netacuity_id => integer
  ))
end

#showObject



20
21
22
23
24
25
26
27
28
29
30
# File 'lib/neuron-client/schema/geo_target.rb', line 20

def show
  @@show ||=
  object_type("geo_target",
    :id => id,
    :abbreviation => nonnull_string,
    :full_name => nonnull_string,
    :geo_type => choice_of(Neuron::Client::GeoTarget::TYPES),
    :name => nonnull_string,
    :netacuity_id => integer
  )
end