Class: Google::Apis::SurveysV2::SurveyCost
- Inherits:
-
Object
- Object
- Google::Apis::SurveysV2::SurveyCost
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- generated/google/apis/surveys_v2/classes.rb,
generated/google/apis/surveys_v2/representations.rb,
generated/google/apis/surveys_v2/representations.rb
Overview
Message defining the cost to run a given survey through API.
Instance Attribute Summary collapse
-
#cost_per_response_nanos ⇒ Fixnum
Cost per survey response in nano units of the given currency.
-
#currency_code ⇒ String
Currency code that the cost is given in.
-
#max_cost_per_response_nanos ⇒ Fixnum
Threshold to start a survey automatically if the quoted price is at most this value.
-
#nanos ⇒ Fixnum
Cost of survey in nano units of the given currency.
Instance Method Summary collapse
-
#initialize(**args) ⇒ SurveyCost
constructor
A new instance of SurveyCost.
-
#update!(**args) ⇒ Object
Update properties of this object.
Methods included from Core::JsonObjectSupport
Methods included from Core::Hashable
Constructor Details
#initialize(**args) ⇒ SurveyCost
Returns a new instance of SurveyCost
413 414 415 |
# File 'generated/google/apis/surveys_v2/classes.rb', line 413 def initialize(**args) update!(**args) end |
Instance Attribute Details
#cost_per_response_nanos ⇒ Fixnum
Cost per survey response in nano units of the given currency. To get the total
cost for a survey, multiply this value by wanted_response_count.
Corresponds to the JSON property costPerResponseNanos
381 382 383 |
# File 'generated/google/apis/surveys_v2/classes.rb', line 381 def cost_per_response_nanos @cost_per_response_nanos end |
#currency_code ⇒ String
Currency code that the cost is given in.
Corresponds to the JSON property currencyCode
386 387 388 |
# File 'generated/google/apis/surveys_v2/classes.rb', line 386 def currency_code @currency_code end |
#max_cost_per_response_nanos ⇒ Fixnum
Threshold to start a survey automatically if the quoted price is at most this
value. When a survey has a Screener (threshold) question, it must go through
an incidence pricing test to determine the final cost per response. Typically
you will have to make a followup call to start the survey giving the final
computed cost per response. If the survey has no threshold_answers, setting
this property will return an error. By specifying this property, you indicate
the max price per response you are willing to pay in advance of the incidence
test. If the price turns out to be lower than the specified value, the survey
will begin immediately and you will be charged at the rate determined by the
incidence pricing test. If the price turns out to be greater than the
specified value the survey will not be started and you will instead be
notified what price was determined by the incidence test. At that point, you
must raise the value of this property to be greater than or equal to that cost
before attempting to start the survey again. This will immediately start the
survey as long the incidence test was run within the last 21 days.
Corresponds to the JSON property maxCostPerResponseNanos
405 406 407 |
# File 'generated/google/apis/surveys_v2/classes.rb', line 405 def max_cost_per_response_nanos @max_cost_per_response_nanos end |
#nanos ⇒ Fixnum
Cost of survey in nano units of the given currency. DEPRECATED in favor of
cost_per_response_nanos
Corresponds to the JSON property nanos
411 412 413 |
# File 'generated/google/apis/surveys_v2/classes.rb', line 411 def nanos @nanos end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
418 419 420 421 422 423 |
# File 'generated/google/apis/surveys_v2/classes.rb', line 418 def update!(**args) @cost_per_response_nanos = args[:cost_per_response_nanos] if args.key?(:cost_per_response_nanos) @currency_code = args[:currency_code] if args.key?(:currency_code) @max_cost_per_response_nanos = args[:max_cost_per_response_nanos] if args.key?(:max_cost_per_response_nanos) @nanos = args[:nanos] if args.key?(:nanos) end |