Class: Google::Apis::SurveysV2::SurveyCost

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ SurveyCost

Returns a new instance of SurveyCost



309
310
311
# File 'generated/google/apis/surveys_v2/classes.rb', line 309

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#cost_per_response_nanosFixnum

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

Returns:

  • (Fixnum)


276
277
278
# File 'generated/google/apis/surveys_v2/classes.rb', line 276

def cost_per_response_nanos
  @cost_per_response_nanos
end

#currency_codeString

Currency code that the cost is given in. Corresponds to the JSON property currencyCode

Returns:

  • (String)


281
282
283
# File 'generated/google/apis/surveys_v2/classes.rb', line 281

def currency_code
  @currency_code
end

#max_cost_per_response_nanosFixnum

Deprecated 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. This will no longer be available after June 2018. Corresponds to the JSON property maxCostPerResponseNanos

Returns:

  • (Fixnum)


301
302
303
# File 'generated/google/apis/surveys_v2/classes.rb', line 301

def max_cost_per_response_nanos
  @max_cost_per_response_nanos
end

#nanosFixnum

Cost of survey in nano units of the given currency. DEPRECATED in favor of cost_per_response_nanos Corresponds to the JSON property nanos

Returns:

  • (Fixnum)


307
308
309
# File 'generated/google/apis/surveys_v2/classes.rb', line 307

def nanos
  @nanos
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



314
315
316
317
318
319
# File 'generated/google/apis/surveys_v2/classes.rb', line 314

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