Class: Neuron::Schema::AdZone

Inherits:
Object
  • Object
show all
Includes:
Common
Defined in:
lib/neuron-client/schema/ad_zone.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

#createObject



18
19
20
21
22
23
24
25
26
# File 'lib/neuron-client/schema/ad_zone.rb', line 18

def create
  @@create ||=
  object_type("ad_zone",
    :ad_id => id,
    :zone_id => uuid,
    :weight => weight,
    :priority => priority
  )
end

#indexObject



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

def index
  @@index ||=
  set_of(object_type("ad_zone",
    :ad_id => id,
    :zone_id => uuid,
    :weight => weight,
    :priority => priority
  ))
end

#showObject



28
29
30
31
32
33
34
35
36
# File 'lib/neuron-client/schema/ad_zone.rb', line 28

def show
  @@show ||=
  object_type("ad_zone",
    :ad_id => id,
    :zone_id => uuid,
    :weight => weight,
    :priority => priority
  )
end

#updateObject



38
39
40
41
42
43
44
45
46
# File 'lib/neuron-client/schema/ad_zone.rb', line 38

def update
  @@update ||=
  object_type("ad_zone",
    :ad_id => id,
    :zone_id => uuid,
    :weight => weight,
    :priority => priority
  )
end