Class: Neuron::Client::AdZone
Constant Summary
collapse
- ATTRIBUTES =
[
:ad_id, :zone_id, :weight, :priority,
:created_at, :updated_at, ]
Class Method Summary
collapse
Instance Method Summary
collapse
Methods included from Base
#apply_attributes!, #id=, included, #initialize, #save, #to_create_hash, #to_hash, #to_update_hash, #update_attributes, #valid?
#all, #api=, #create, #create!, #find, #validate=
Class Method Details
.unlink(ad_id, zone_id) ⇒ Object
37
38
39
40
41
42
|
# File 'lib/neuron-client/model/ad_zone.rb', line 37
def self.unlink(ad_id, zone_id)
connected_to_admin!
validate_id!(ad_id)
validate_uuid!(zone_id)
connection.delete("zones/#{zone_id}/ads/#{ad_id}")
end
|
Instance Method Details
#attributes ⇒ Object
18
19
20
|
# File 'lib/neuron-client/model/ad_zone.rb', line 18
def attributes
ATTRIBUTES
end
|
30
31
32
33
34
35
|
# File 'lib/neuron-client/model/ad_zone.rb', line 30
def destroy
connected_to_admin!
validate_id!(ad_id)
validate_uuid!(zone_id)
connection.delete("zones/#{zone_id}/ads/#{ad_id}")
end
|
26
27
28
|
# File 'lib/neuron-client/model/ad_zone.rb', line 26
def id
nil
end
|
#new_record? ⇒ Boolean
22
23
24
|
# File 'lib/neuron-client/model/ad_zone.rb', line 22
def new_record?
true
end
|