Class: Google::Apis::AdmobV1beta::CampaignReportSpec

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/admob_v1beta/classes.rb,
lib/google/apis/admob_v1beta/representations.rb,
lib/google/apis/admob_v1beta/representations.rb

Overview

The specification for generating a Campaign report. For example, the specification to get IMPRESSIONS and CLICKS sliced by CAMPAIGN_ID can look like the following example: "date_range": "start_date": "year": 2021, " month": 12, "day": 1, "end_date": "year": 2021, "month": 12, "day": 30 , " dimensions": ["CAMPAIGN_ID"], "metrics": ["IMPRESSIONS", "CLICKS"],

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ CampaignReportSpec

Returns a new instance of CampaignReportSpec.



483
484
485
# File 'lib/google/apis/admob_v1beta/classes.rb', line 483

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

Instance Attribute Details

#date_rangeGoogle::Apis::AdmobV1beta::DateRange

Specification of a single date range. Both dates are inclusive. Corresponds to the JSON property dateRange



462
463
464
# File 'lib/google/apis/admob_v1beta/classes.rb', line 462

def date_range
  @date_range
end

#dimensionsArray<String>

List of dimensions of the report. The value combination of these dimensions determines the row of the report. If no dimensions are specified, the report returns a single row of requested metrics for the entire account. Corresponds to the JSON property dimensions

Returns:

  • (Array<String>)


469
470
471
# File 'lib/google/apis/admob_v1beta/classes.rb', line 469

def dimensions
  @dimensions
end

#language_codeString

Language used for any localized text, such as certain applicable dimension values. The language tag is defined in the IETF BCP47. Defaults to 'en-US' if unspecified or invalid. Corresponds to the JSON property languageCode

Returns:

  • (String)


476
477
478
# File 'lib/google/apis/admob_v1beta/classes.rb', line 476

def language_code
  @language_code
end

#metricsArray<String>

List of metrics of the report. A report must specify at least one metric. Corresponds to the JSON property metrics

Returns:

  • (Array<String>)


481
482
483
# File 'lib/google/apis/admob_v1beta/classes.rb', line 481

def metrics
  @metrics
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



488
489
490
491
492
493
# File 'lib/google/apis/admob_v1beta/classes.rb', line 488

def update!(**args)
  @date_range = args[:date_range] if args.key?(:date_range)
  @dimensions = args[:dimensions] if args.key?(:dimensions)
  @language_code = args[:language_code] if args.key?(:language_code)
  @metrics = args[:metrics] if args.key?(:metrics)
end