Class: Google::Apis::MybusinessbusinessinformationV1::Location

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

Overview

A location. See the help center article for a detailed description of these fields, or the category endpoint for a list of valid business categories.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Location

Returns a new instance of Location.



880
881
882
# File 'lib/google/apis/mybusinessbusinessinformation_v1/classes.rb', line 880

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

Instance Attribute Details

#ad_words_location_extensionsGoogle::Apis::MybusinessbusinessinformationV1::AdWordsLocationExtensions

Additional information that is surfaced in AdWords. Corresponds to the JSON property adWordsLocationExtensions



742
743
744
# File 'lib/google/apis/mybusinessbusinessinformation_v1/classes.rb', line 742

def ad_words_location_extensions
  @ad_words_location_extensions
end

#categoriesGoogle::Apis::MybusinessbusinessinformationV1::Categories

A collection of categories that describes the business. During updates, both fields must be set. Clients are prohibited from individually updating the primary or additional categories using the update mask. Corresponds to the JSON property categories



749
750
751
# File 'lib/google/apis/mybusinessbusinessinformation_v1/classes.rb', line 749

def categories
  @categories
end

#labelsArray<String>

Optional. A collection of free-form strings to allow you to tag your business. These labels are NOT user facing; only you can see them. Must be between 1-255 characters per label. Corresponds to the JSON property labels

Returns:

  • (Array<String>)


756
757
758
# File 'lib/google/apis/mybusinessbusinessinformation_v1/classes.rb', line 756

def labels
  @labels
end

#language_codeString

Immutable. The language of the location. Set during creation and not updateable. Corresponds to the JSON property languageCode

Returns:

  • (String)


762
763
764
# File 'lib/google/apis/mybusinessbusinessinformation_v1/classes.rb', line 762

def language_code
  @language_code
end

#latlngGoogle::Apis::MybusinessbusinessinformationV1::LatLng

An object that represents a latitude/longitude pair. This is expressed as a pair of doubles to represent degrees latitude and degrees longitude. Unless specified otherwise, this object must conform to the WGS84 standard. Values must be within normalized ranges. Corresponds to the JSON property latlng



770
771
772
# File 'lib/google/apis/mybusinessbusinessinformation_v1/classes.rb', line 770

def latlng
  @latlng
end

#metadataGoogle::Apis::MybusinessbusinessinformationV1::Metadata

Additional non-user-editable information about the location. Corresponds to the JSON property metadata



775
776
777
# File 'lib/google/apis/mybusinessbusinessinformation_v1/classes.rb', line 775

def 
  @metadata
end

#more_hoursArray<Google::Apis::MybusinessbusinessinformationV1::MoreHours>

Optional. More hours for a business's different departments or specific customers. Corresponds to the JSON property moreHours



781
782
783
# File 'lib/google/apis/mybusinessbusinessinformation_v1/classes.rb', line 781

def more_hours
  @more_hours
end

#nameString

Google identifier for this location in the form: locations/location_id`. Corresponds to the JSON propertyname`

Returns:

  • (String)


786
787
788
# File 'lib/google/apis/mybusinessbusinessinformation_v1/classes.rb', line 786

def name
  @name
end

#open_infoGoogle::Apis::MybusinessbusinessinformationV1::OpenInfo

Information related to the opening state of the business. Corresponds to the JSON property openInfo



791
792
793
# File 'lib/google/apis/mybusinessbusinessinformation_v1/classes.rb', line 791

def open_info
  @open_info
end

#phone_numbersGoogle::Apis::MybusinessbusinessinformationV1::PhoneNumbers

A collection of phone numbers for the business. During updates, both fields must be set. Clients may not update just the primary or additional phone numbers using the update mask. International phone format is preferred, such as "+1 415 555 0132", see more in (https://developers.google.com/style/phone- numbers#international-phone-numbers). Corresponds to the JSON property phoneNumbers



800
801
802
# File 'lib/google/apis/mybusinessbusinessinformation_v1/classes.rb', line 800

def phone_numbers
  @phone_numbers
end

#profileGoogle::Apis::MybusinessbusinessinformationV1::Profile

All information pertaining to the location's profile. Corresponds to the JSON property profile



805
806
807
# File 'lib/google/apis/mybusinessbusinessinformation_v1/classes.rb', line 805

def profile
  @profile
end

#regular_hoursGoogle::Apis::MybusinessbusinessinformationV1::BusinessHours

Represents the time periods that this location is open for business. Holds a collection of TimePeriod instances. Corresponds to the JSON property regularHours



811
812
813
# File 'lib/google/apis/mybusinessbusinessinformation_v1/classes.rb', line 811

def regular_hours
  @regular_hours
end

#relationship_dataGoogle::Apis::MybusinessbusinessinformationV1::RelationshipData

Information of all parent and children locations related to this one. Corresponds to the JSON property relationshipData



816
817
818
# File 'lib/google/apis/mybusinessbusinessinformation_v1/classes.rb', line 816

def relationship_data
  @relationship_data
end

#service_areaGoogle::Apis::MybusinessbusinessinformationV1::ServiceAreaBusiness

Service area businesses provide their service at the customer's location (for example, a locksmith or plumber). Corresponds to the JSON property serviceArea



822
823
824
# File 'lib/google/apis/mybusinessbusinessinformation_v1/classes.rb', line 822

def service_area
  @service_area
end

#service_itemsArray<Google::Apis::MybusinessbusinessinformationV1::ServiceItem>

Optional. List of services supported by merchants. A service can be haircut, install water heater, etc. Duplicated service items will be removed automatically. Corresponds to the JSON property serviceItems



829
830
831
# File 'lib/google/apis/mybusinessbusinessinformation_v1/classes.rb', line 829

def service_items
  @service_items
end

#special_hoursGoogle::Apis::MybusinessbusinessinformationV1::SpecialHours

Represents a set of time periods when a location's operational hours differ from its normal business hours. Corresponds to the JSON property specialHours



835
836
837
# File 'lib/google/apis/mybusinessbusinessinformation_v1/classes.rb', line 835

def special_hours
  @special_hours
end

#store_codeString

Optional. External identifier for this location, which must be unique within a given account. This is a means of associating the location with your own records. Corresponds to the JSON property storeCode

Returns:

  • (String)


842
843
844
# File 'lib/google/apis/mybusinessbusinessinformation_v1/classes.rb', line 842

def store_code
  @store_code
end

#storefront_addressGoogle::Apis::MybusinessbusinessinformationV1::PostalAddress

Represents a postal address, such as for postal delivery or payments addresses. With a postal address, a postal service can deliver items to a premise, P.O. box, or similar. A postal address is not intended to model geographical locations like roads, towns, or mountains. In typical usage, an address would be created by user input or from importing existing data, depending on the type of process. Advice on address input or editing: - Use an internationalization-ready address widget such as https://github.com/google/ libaddressinput. - Users should not be presented with UI elements for input or editing of fields outside countries where that field is used. For more guidance on how to use this schema, see: https://support.google.com/business/ answer/6397478. Corresponds to the JSON property storefrontAddress



857
858
859
# File 'lib/google/apis/mybusinessbusinessinformation_v1/classes.rb', line 857

def storefront_address
  @storefront_address
end

#titleString

Required. Location name should reflect your business's real-world name, as used consistently on your storefront, website, and stationery, and as known to customers. Any additional information, when relevant, can be included in other fields of the resource (for example, Address, Categories). Don't add unnecessary information to your name (for example, prefer "Google" over " Google Inc. - Mountain View Corporate Headquarters"). Don't include marketing taglines, store codes, special characters, hours or closed/open status, phone numbers, website URLs, service/product information, location/address or directions, or containment information (for example, "Chase ATM in Duane Reade" ). Corresponds to the JSON property title

Returns:

  • (String)


871
872
873
# File 'lib/google/apis/mybusinessbusinessinformation_v1/classes.rb', line 871

def title
  @title
end

#website_uriString

Optional. A URL for this business. If possible, use a URL that represents this individual business location instead of a generic website/URL that represents all locations, or the brand. Corresponds to the JSON property websiteUri

Returns:

  • (String)


878
879
880
# File 'lib/google/apis/mybusinessbusinessinformation_v1/classes.rb', line 878

def website_uri
  @website_uri
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
# File 'lib/google/apis/mybusinessbusinessinformation_v1/classes.rb', line 885

def update!(**args)
  @ad_words_location_extensions = args[:ad_words_location_extensions] if args.key?(:ad_words_location_extensions)
  @categories = args[:categories] if args.key?(:categories)
  @labels = args[:labels] if args.key?(:labels)
  @language_code = args[:language_code] if args.key?(:language_code)
  @latlng = args[:latlng] if args.key?(:latlng)
  @metadata = args[:metadata] if args.key?(:metadata)
  @more_hours = args[:more_hours] if args.key?(:more_hours)
  @name = args[:name] if args.key?(:name)
  @open_info = args[:open_info] if args.key?(:open_info)
  @phone_numbers = args[:phone_numbers] if args.key?(:phone_numbers)
  @profile = args[:profile] if args.key?(:profile)
  @regular_hours = args[:regular_hours] if args.key?(:regular_hours)
  @relationship_data = args[:relationship_data] if args.key?(:relationship_data)
  @service_area = args[:service_area] if args.key?(:service_area)
  @service_items = args[:service_items] if args.key?(:service_items)
  @special_hours = args[:special_hours] if args.key?(:special_hours)
  @store_code = args[:store_code] if args.key?(:store_code)
  @storefront_address = args[:storefront_address] if args.key?(:storefront_address)
  @title = args[:title] if args.key?(:title)
  @website_uri = args[:website_uri] if args.key?(:website_uri)
end