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.



2557
2558
2559
# File 'lib/google/apis/content_v2_1/classes.rb', line 2557

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)


2502
2503
2504
# File 'lib/google/apis/content_v2_1/classes.rb', line 2502

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)


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

def country_code
  @country_code
end

#previous_rankFixnum

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

Returns:

  • (Fixnum)


2513
2514
2515
# File 'lib/google/apis/content_v2_1/classes.rb', line 2513

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)


2519
2520
2521
# File 'lib/google/apis/content_v2_1/classes.rb', line 2519

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)


2525
2526
2527
# File 'lib/google/apis/content_v2_1/classes.rb', line 2525

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)


2531
2532
2533
# File 'lib/google/apis/content_v2_1/classes.rb', line 2531

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)


2536
2537
2538
# File 'lib/google/apis/content_v2_1/classes.rb', line 2536

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



2548
2549
2550
# File 'lib/google/apis/content_v2_1/classes.rb', line 2548

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)


2555
2556
2557
# File 'lib/google/apis/content_v2_1/classes.rb', line 2555

def report_granularity
  @report_granularity
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
# File 'lib/google/apis/content_v2_1/classes.rb', line 2562

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