Class: Ryext::Models::PublisherSuggestion

Inherits:
Object
  • Object
show all
Extended by:
Finder
Includes:
Model
Defined in:
lib/ryext/models/publisher_suggestion.rb

Constant Summary collapse

COLLECTION_KEY =
'suggestededits'
YEXT_ATTRIBUTES =
{
  id: 'id',
  site_id: 'siteId',
  location_id: 'locationId',
  date_created: 'dateCreated',
  date_resolved: 'dateResolved',
  field_name: 'fieldName',
  status: 'status',
  suggested_edit: 'suggestedEdit',
  original_content: 'originalContent'
}

Class Method Summary collapse

Methods included from Finder

all, base_uri, base_url, collection_from, get, instance_klass

Methods included from Model

#build, included, #initialize, #instance_klass

Class Method Details

.clean_params(params) ⇒ Object



17
18
19
# File 'lib/ryext/models/publisher_suggestion.rb', line 17

def self.clean_params(params)
  params.reject { |k| ['suggestionId'].include? k }
end

.default_path(params) ⇒ Object



8
9
10
# File 'lib/ryext/models/publisher_suggestion.rb', line 8

def self.default_path(params)
  path(params) || "/powerlistings/publisherSuggestions"
end

.path(params) ⇒ Object



12
13
14
15
# File 'lib/ryext/models/publisher_suggestion.rb', line 12

def self.path(params)
  suggestion_id = params['suggestionId']
  "/powerlistings/publisherSuggestions/#{suggestion_id}" unless suggestion_id.nil?
end