Class: Google::Apis::AdmobV1beta::NetworkReportSpec

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 an AdMob Network report. For example, the specification to get clicks and estimated earnings for only the 'US' and 'CN' countries can look like the following example: 'date_range': 'start_date': 'year': 2021, 'month': 9, 'day': 1, 'end_date': 'year': 2021, 'month': 9, ' day': 30 , 'dimensions': ['DATE', 'APP', 'COUNTRY'], 'metrics': ['CLICKS', ' ESTIMATED_EARNINGS'], 'dimension_filters': [ 'dimension': 'COUNTRY', ' matches_any': 'values': ['value': 'US', 'value': 'CN'] ], ' sort_conditions': ['dimension':'APP', order: 'ASCENDING','metric':'CLICKS' , order: 'DESCENDING'], 'localization_settings': 'currency_code': 'USD', ' language_code': 'en-US' For a better understanding, you can treat the preceding specification like the following pseudo SQL: SELECT DATE, APP, COUNTRY, CLICKS, ESTIMATED_EARNINGS FROM NETWORK_REPORT WHERE DATE >= '2021-09- 01' AND DATE <= '2021-09-30' AND COUNTRY IN ('US', 'CN') GROUP BY DATE, APP, COUNTRY ORDER BY APP ASC, CLICKS DESC;

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ NetworkReportSpec

Returns a new instance of NetworkReportSpec.



1615
1616
1617
# File 'lib/google/apis/admob_v1beta/classes.rb', line 1615

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



1568
1569
1570
# File 'lib/google/apis/admob_v1beta/classes.rb', line 1568

def date_range
  @date_range
end

#dimension_filtersArray<Google::Apis::AdmobV1beta::NetworkReportSpecDimensionFilter>

Describes which report rows to match based on their dimension values. Corresponds to the JSON property dimensionFilters



1573
1574
1575
# File 'lib/google/apis/admob_v1beta/classes.rb', line 1573

def dimension_filters
  @dimension_filters
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>)


1580
1581
1582
# File 'lib/google/apis/admob_v1beta/classes.rb', line 1580

def dimensions
  @dimensions
end

#localization_settingsGoogle::Apis::AdmobV1beta::LocalizationSettings

Localization settings for reports, such as currency and language. It affects how metrics are calculated. Corresponds to the JSON property localizationSettings



1586
1587
1588
# File 'lib/google/apis/admob_v1beta/classes.rb', line 1586

def localization_settings
  @localization_settings
end

#max_report_rowsFixnum

Maximum number of report data rows to return. If the value is not set, the API returns as many rows as possible, up to 100000. Acceptable values are 1-100000, inclusive. Values larger than 100000 return an error. Corresponds to the JSON property maxReportRows

Returns:

  • (Fixnum)


1593
1594
1595
# File 'lib/google/apis/admob_v1beta/classes.rb', line 1593

def max_report_rows
  @max_report_rows
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>)


1598
1599
1600
# File 'lib/google/apis/admob_v1beta/classes.rb', line 1598

def metrics
  @metrics
end

#sort_conditionsArray<Google::Apis::AdmobV1beta::NetworkReportSpecSortCondition>

Describes the sorting of report rows. The order of the condition in the list defines its precedence; the earlier the condition, the higher its precedence. If no sort conditions are specified, the row ordering is undefined. Corresponds to the JSON property sortConditions



1605
1606
1607
# File 'lib/google/apis/admob_v1beta/classes.rb', line 1605

def sort_conditions
  @sort_conditions
end

#time_zoneString

A report time zone. Accepts an IANA TZ name values, such as "America/ Los_Angeles." If no time zone is defined, the account default takes effect. Check default value by the get account action. Warning: The "America/ Los_Angeles" is the only supported value at the moment. Corresponds to the JSON property timeZone

Returns:

  • (String)


1613
1614
1615
# File 'lib/google/apis/admob_v1beta/classes.rb', line 1613

def time_zone
  @time_zone
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
# File 'lib/google/apis/admob_v1beta/classes.rb', line 1620

def update!(**args)
  @date_range = args[:date_range] if args.key?(:date_range)
  @dimension_filters = args[:dimension_filters] if args.key?(:dimension_filters)
  @dimensions = args[:dimensions] if args.key?(:dimensions)
  @localization_settings = args[:localization_settings] if args.key?(:localization_settings)
  @max_report_rows = args[:max_report_rows] if args.key?(:max_report_rows)
  @metrics = args[:metrics] if args.key?(:metrics)
  @sort_conditions = args[:sort_conditions] if args.key?(:sort_conditions)
  @time_zone = args[:time_zone] if args.key?(:time_zone)
end