Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed issue #107 #119

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 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,20 @@ 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.key?(:automatically_select_bid)

# If set to true, bid_amount_local_micro must be NULL
params.store(:bid_amount_local_micro, nil) if params[:automatically_select_bid] && !self.id.nil?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Redundant self detected.
Line is too long. [102/100]


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

params
end

end
end