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.



906
907
908
# File 'lib/google/apis/mybusinessbusinessinformation_v1/classes.rb', line 906

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



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

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



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

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


783
784
785
# File 'lib/google/apis/mybusinessbusinessinformation_v1/classes.rb', line 783

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)


789
790
791
# File 'lib/google/apis/mybusinessbusinessinformation_v1/classes.rb', line 789

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



797
798
799
# File 'lib/google/apis/mybusinessbusinessinformation_v1/classes.rb', line 797

def latlng
  @latlng
end

#metadataGoogle::Apis::MybusinessbusinessinformationV1::Metadata

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



802
803
804
# File 'lib/google/apis/mybusinessbusinessinformation_v1/classes.rb', line 802

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



808
809
810
# File 'lib/google/apis/mybusinessbusinessinformation_v1/classes.rb', line 808

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)


813
814
815
# File 'lib/google/apis/mybusinessbusinessinformation_v1/classes.rb', line 813

def name
  @name
end

#open_infoGoogle::Apis::MybusinessbusinessinformationV1::OpenInfo

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



818
819
820
# File 'lib/google/apis/mybusinessbusinessinformation_v1/classes.rb', line 818

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



827
828
829
# File 'lib/google/apis/mybusinessbusinessinformation_v1/classes.rb', line 827

def phone_numbers
  @phone_numbers
end

#profileGoogle::Apis::MybusinessbusinessinformationV1::Profile

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



832
833
834
# File 'lib/google/apis/mybusinessbusinessinformation_v1/classes.rb', line 832

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



838
839
840
# File 'lib/google/apis/mybusinessbusinessinformation_v1/classes.rb', line 838

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



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

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



849
850
851
# File 'lib/google/apis/mybusinessbusinessinformation_v1/classes.rb', line 849

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



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

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



862
863
864
# File 'lib/google/apis/mybusinessbusinessinformation_v1/classes.rb', line 862

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)


869
870
871
# File 'lib/google/apis/mybusinessbusinessinformation_v1/classes.rb', line 869

def store_code
  @store_code
end

#storefront_addressGoogle::Apis::MybusinessbusinessinformationV1::PostalAddress

Represents a postal address, e.g. for postal delivery or payments addresses. Given a postal address, a postal service can deliver items to a premise, P.O. Box or similar. It is not intended to model geographical locations (roads, towns, mountains). In typical usage an address would be created via user input or from importing existing data, depending on the type of process. Advice on address input / 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, please see: https://support.google.com/business/answer/6397478 Corresponds to the JSON property storefrontAddress



883
884
885
# File 'lib/google/apis/mybusinessbusinessinformation_v1/classes.rb', line 883

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)


897
898
899
# File 'lib/google/apis/mybusinessbusinessinformation_v1/classes.rb', line 897

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)


904
905
906
# File 'lib/google/apis/mybusinessbusinessinformation_v1/classes.rb', line 904

def website_uri
  @website_uri
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
# File 'lib/google/apis/mybusinessbusinessinformation_v1/classes.rb', line 911

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