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.



875
876
877
# File 'lib/google/apis/mybusinessbusinessinformation_v1/classes.rb', line 875

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



738
739
740
# File 'lib/google/apis/mybusinessbusinessinformation_v1/classes.rb', line 738

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



745
746
747
# File 'lib/google/apis/mybusinessbusinessinformation_v1/classes.rb', line 745

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


752
753
754
# File 'lib/google/apis/mybusinessbusinessinformation_v1/classes.rb', line 752

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)


758
759
760
# File 'lib/google/apis/mybusinessbusinessinformation_v1/classes.rb', line 758

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



766
767
768
# File 'lib/google/apis/mybusinessbusinessinformation_v1/classes.rb', line 766

def latlng
  @latlng
end

#metadataGoogle::Apis::MybusinessbusinessinformationV1::Metadata

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



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

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



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

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)


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

def name
  @name
end

#open_infoGoogle::Apis::MybusinessbusinessinformationV1::OpenInfo

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



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

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



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

def phone_numbers
  @phone_numbers
end

#profileGoogle::Apis::MybusinessbusinessinformationV1::Profile

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



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

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



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

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



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

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



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

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



825
826
827
# File 'lib/google/apis/mybusinessbusinessinformation_v1/classes.rb', line 825

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



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

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)


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

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



852
853
854
# File 'lib/google/apis/mybusinessbusinessinformation_v1/classes.rb', line 852

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)


866
867
868
# File 'lib/google/apis/mybusinessbusinessinformation_v1/classes.rb', line 866

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)


873
874
875
# File 'lib/google/apis/mybusinessbusinessinformation_v1/classes.rb', line 873

def website_uri
  @website_uri
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
# File 'lib/google/apis/mybusinessbusinessinformation_v1/classes.rb', line 880

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