Class: Google::Apis::RealtimebiddingV1alpha::BiddingFunction
- Inherits:
-
Object
- Object
- Google::Apis::RealtimebiddingV1alpha::BiddingFunction
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/realtimebidding_v1alpha/classes.rb,
lib/google/apis/realtimebidding_v1alpha/representations.rb,
lib/google/apis/realtimebidding_v1alpha/representations.rb
Overview
The bidding function to be executed as part of the TURTLEDOVE simulation experiment bidding flow.
Instance Attribute Summary collapse
-
#bidding_function ⇒ String
The raw Javascript source code of the bidding function.
-
#name ⇒ String
The name of the bidding function that must follow the pattern:
bidders/bidder_account_id/biddingFunctions/bidding_function_name``.
Instance Method Summary collapse
-
#initialize(**args) ⇒ BiddingFunction
constructor
A new instance of BiddingFunction.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ BiddingFunction
Returns a new instance of BiddingFunction.
51 52 53 |
# File 'lib/google/apis/realtimebidding_v1alpha/classes.rb', line 51 def initialize(**args) update!(**args) end |
Instance Attribute Details
#bidding_function ⇒ String
The raw Javascript source code of the bidding function. The function takes in
a Javascript object, inputs, that contains the following named fields:
openrtbContextualBidRequest OR googleContextualBidRequest,
customContextualSignal, interestBasedBidData, interestGroupData,
recentImpressionAges, and returns the bid price CPM (double). Example: ``/*
Returns a bid price CPM (double). * * @paramObject` inputs an object with
the * following named fields: * - openrtbContextualBidRequest * OR
googleContextualBidRequest * - customContextualSignal * - interestBasedBidData
- - interestGroupData * - recentImpressionAges */ function biddingFunction(
inputs)
... return inputs.interestBasedBidData.cpm * inputs. customContextualSignals.placementMultiplier;``Corresponds to the JSON propertybiddingFunction`
43 44 45 |
# File 'lib/google/apis/realtimebidding_v1alpha/classes.rb', line 43 def bidding_function @bidding_function end |
#name ⇒ String
The name of the bidding function that must follow the pattern: bidders/
bidder_account_id/biddingFunctions/bidding_function_name`.
Corresponds to the JSON propertyname`
49 50 51 |
# File 'lib/google/apis/realtimebidding_v1alpha/classes.rb', line 49 def name @name end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
56 57 58 59 |
# File 'lib/google/apis/realtimebidding_v1alpha/classes.rb', line 56 def update!(**args) @bidding_function = args[:bidding_function] if args.key?(:bidding_function) @name = args[:name] if args.key?(:name) end |