Method: Naver::Searchad::Api::AdKeyword::Service#create_ad_keywords

Defined in:
lib/naver/searchad/api/ad-keyword/service.rb

#create_ad_keywords(ad_keywords, adgroup_id, options: nil, &block) ⇒ Object



37
38
39
40
41
42
43
44
# File 'lib/naver/searchad/api/ad-keyword/service.rb', line 37

def create_ad_keywords(ad_keywords, adgroup_id, options: nil, &block)
  ad_keywords.each { |kw| validates_presence_of(%w[keyword], kw) }

  command = make_command(:post, 'keywords', options)
  command.query['nccAdgroupId'] = adgroup_id
  command.request_object = ad_keywords
  execute_command(command, &block)
end