Class: Outbrain::Api::Marketer

Inherits:
Base
  • Object
show all
Defined in:
lib/outbrain/api/marketer.rb

Constant Summary collapse

PATH =
'marketers'

Instance Attribute Summary

Attributes inherited from Base

#errors

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#initialize, #persisted?, #valid?

Constructor Details

This class inherits a constructor from Outbrain::Base

Class Method Details

.allObject



11
12
13
# File 'lib/outbrain/api/marketer.rb', line 11

def self.all
  Request.all(PATH, { as: self })
end

.createObject



15
16
17
# File 'lib/outbrain/api/marketer.rb', line 15

def self.create(*)
  raise EndpointNotAvialable.new('Marketers can not be created via the api.')
end

Instance Method Details

#budgetsObject



19
20
21
# File 'lib/outbrain/api/marketer.rb', line 19

def budgets
  Budget.find_by(marketer_id: id)
end