Class: Google::Apis::MybusinessV3::Category

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

Overview

A category describing what this business is (not what it does). For a list of valid category IDs, and the mappings to their human readable names, see the category list.

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) ⇒ Category

Returns a new instance of Category.



596
597
598
# File 'generated/google/apis/mybusiness_v3/classes.rb', line 596

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

Instance Attribute Details

#category_idString

A stable ID (provided by Google) for this category. While it is possible to populate only the name field in a category, setting the category_id field is preferred. If both fields are populated, the category_id takes precedence, and the supplied name field is ignored, and populated based on the value of this field. Corresponds to the JSON property categoryId

Returns:

  • (String)


594
595
596
# File 'generated/google/apis/mybusiness_v3/classes.rb', line 594

def category_id
  @category_id
end

#nameString

The human-readable name of the category. Corresponds to the JSON property name

Returns:

  • (String)


583
584
585
# File 'generated/google/apis/mybusiness_v3/classes.rb', line 583

def name
  @name
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



601
602
603
604
# File 'generated/google/apis/mybusiness_v3/classes.rb', line 601

def update!(**args)
  @name = args[:name] if args.key?(:name)
  @category_id = args[:category_id] if args.key?(:category_id)
end