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

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

#update_ad_keyword(ad_keyword, field: '', options: nil, &block) ⇒ Object



46
47
48
49
50
51
52
53
54
# File 'lib/naver/searchad/api/ad-keyword/service.rb', line 46

def update_ad_keyword(ad_keyword, field: '', options: nil, &block)
  validates_presence_of(%w[nccKeywordId nccAdgroupId], ad_keyword)

  command = make_command(:put, 'keywords/{ad_keyword_id}', options)
  command.params['ad_keyword_id'] = ad_keyword['nccKeywordId']
  command.query['fields'] = field
  command.request_object = ad_keyword
  execute_command(command, &block)
end