Class: Google::Apis::ContentV2_1::BestSellers

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

Overview

Fields related to the Best sellers reports.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ BestSellers

Returns a new instance of BestSellers.



2509
2510
2511
# File 'lib/google/apis/content_v2_1/classes.rb', line 2509

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

Instance Attribute Details

#category_idFixnum

Google product category ID to calculate the ranking for, represented in Google's product taxonomy . If a WHERE condition on best_sellers.category_id is not specified in the query, rankings for all top-level categories are returned. Corresponds to the JSON property categoryId

Returns:

  • (Fixnum)


2454
2455
2456
# File 'lib/google/apis/content_v2_1/classes.rb', line 2454

def category_id
  @category_id
end

#country_codeString

Country where the ranking is calculated. A WHERE condition on best_sellers. country_code is required in the query. Corresponds to the JSON property countryCode

Returns:

  • (String)


2460
2461
2462
# File 'lib/google/apis/content_v2_1/classes.rb', line 2460

def country_code
  @country_code
end

#previous_rankFixnum

Popularity rank in the previous week or month. Corresponds to the JSON property previousRank

Returns:

  • (Fixnum)


2465
2466
2467
# File 'lib/google/apis/content_v2_1/classes.rb', line 2465

def previous_rank
  @previous_rank
end

#previous_relative_demandString

Estimated demand in relation to the item with the highest popularity rank in the same category and country in the previous week or month. Corresponds to the JSON property previousRelativeDemand

Returns:

  • (String)


2471
2472
2473
# File 'lib/google/apis/content_v2_1/classes.rb', line 2471

def previous_relative_demand
  @previous_relative_demand
end

#rankFixnum

Popularity on Shopping ads and free listings, in the selected category and country, based on the estimated number of units sold. Corresponds to the JSON property rank

Returns:

  • (Fixnum)


2477
2478
2479
# File 'lib/google/apis/content_v2_1/classes.rb', line 2477

def rank
  @rank
end

#relative_demandString

Estimated demand in relation to the item with the highest popularity rank in the same category and country. Corresponds to the JSON property relativeDemand

Returns:

  • (String)


2483
2484
2485
# File 'lib/google/apis/content_v2_1/classes.rb', line 2483

def relative_demand
  @relative_demand
end

#relative_demand_changeString

Change in the estimated demand. Whether it rose, sank or remained flat. Corresponds to the JSON property relativeDemandChange

Returns:

  • (String)


2488
2489
2490
# File 'lib/google/apis/content_v2_1/classes.rb', line 2488

def relative_demand_change
  @relative_demand_change
end

#report_dateGoogle::Apis::ContentV2_1::Date

Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type. TimeOfDay * google.type.DateTime * google.protobuf.Timestamp Corresponds to the JSON property reportDate



2500
2501
2502
# File 'lib/google/apis/content_v2_1/classes.rb', line 2500

def report_date
  @report_date
end

#report_granularityString

Granularity of the report. The ranking can be done over a week or a month timeframe. A WHERE condition on best_sellers.report_granularity is required in the query. Corresponds to the JSON property reportGranularity

Returns:

  • (String)


2507
2508
2509
# File 'lib/google/apis/content_v2_1/classes.rb', line 2507

def report_granularity
  @report_granularity
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
# File 'lib/google/apis/content_v2_1/classes.rb', line 2514

def update!(**args)
  @category_id = args[:category_id] if args.key?(:category_id)
  @country_code = args[:country_code] if args.key?(:country_code)
  @previous_rank = args[:previous_rank] if args.key?(:previous_rank)
  @previous_relative_demand = args[:previous_relative_demand] if args.key?(:previous_relative_demand)
  @rank = args[:rank] if args.key?(:rank)
  @relative_demand = args[:relative_demand] if args.key?(:relative_demand)
  @relative_demand_change = args[:relative_demand_change] if args.key?(:relative_demand_change)
  @report_date = args[:report_date] if args.key?(:report_date)
  @report_granularity = args[:report_granularity] if args.key?(:report_granularity)
end