Skip to content

Commit

Permalink
fix error coming back to gem. related to twitterdev#107
Browse files Browse the repository at this point in the history
  • Loading branch information
kevindwells authored and kambayashia committed Sep 23, 2016
1 parent dd9b770 commit 28fc622
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions lib/twitter-ads/campaign/line_item.rb
Original file line number Diff line number Diff line change
Expand Up @@ -85,5 +85,17 @@ def targeting_criteria(id = nil, opts = {})
id ? TargetingCriteria.load(account, id, opts) : TargetingCriteria.all(account, @id, opts)
end

def to_params
params = super

# If automatically_set_bid is set, bid_type must not be set.
params.delete(:bid_type) if params.has_key?(:automatically_select_bid)

# advertiser_user_id is currently beta-only and causes an error when sent.
params.delete(:advertiser_user_id)

params
end

end
end

0 comments on commit 28fc622

Please sign in to comment.