Class: Google::Apis::MybusinessV3::Photos

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 collection of photos representing the business, categorized by photo type. The URL for each photo should point to a publicly accessible image. Photos should be supplied in either JPG or PNG format unless specified otherwise. If the photo was added by using Google My Business Locations or this API, the user-provided URL is used. If the photo was uploaded via the Google My Business Photos App, the photo uses a generated URL hosted by Google. Exceptions: profile_photo_url and cover_photo_url are always under a Google domain. With the exception of profile_photo_url and cover_photo_url, all photos must measure a minimum of 250px on the short edge, with a file size of at least 10240 bytes.

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

Returns a new instance of Photos



1168
1169
1170
# File 'generated/google/apis/mybusiness_v3/classes.rb', line 1168

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

Instance Attribute Details

#additional_photo_urlsArray<String>

Use the additional photos category for images that don't fit in any of the other categories. Corresponds to the JSON property additionalPhotoUrls

Returns:

  • (Array<String>)


1161
1162
1163
# File 'generated/google/apis/mybusiness_v3/classes.rb', line 1161

def additional_photo_urls
  @additional_photo_urls
end

#common_areas_photo_urlsArray<String>

Common area photos show customers the common areas of your business location. Corresponds to the JSON property commonAreasPhotoUrls

Returns:

  • (Array<String>)


1145
1146
1147
# File 'generated/google/apis/mybusiness_v3/classes.rb', line 1145

def common_areas_photo_urls
  @common_areas_photo_urls
end

#cover_photo_urlString

The cover photo showcases the personality of your business. Cover photos must have a 16:9 aspect ratio, with a minimum size of 480px x 270px, and a maximum size of 2120px x 1192px. Corresponds to the JSON property coverPhotoUrl

Returns:

  • (String)


1099
1100
1101
# File 'generated/google/apis/mybusiness_v3/classes.rb', line 1099

def cover_photo_url
  @cover_photo_url
end

#exterior_photo_urlsArray<String>

Exterior photos help customers to recognize your business as they approach from different directions. Corresponds to the JSON property exteriorPhotoUrls

Returns:

  • (Array<String>)


1112
1113
1114
# File 'generated/google/apis/mybusiness_v3/classes.rb', line 1112

def exterior_photo_urls
  @exterior_photo_urls
end

#food_and_drink_photo_urlsArray<String>

Food and drink photos display the food and drink items served by your business. Corresponds to the JSON property foodAndDrinkPhotoUrls

Returns:

  • (Array<String>)


1134
1135
1136
# File 'generated/google/apis/mybusiness_v3/classes.rb', line 1134

def food_and_drink_photo_urls
  @food_and_drink_photo_urls
end

#interior_photo_urlsArray<String>

Interior photos show customers what your business location looks like inside. Corresponds to the JSON property interiorPhotoUrls

Returns:

  • (Array<String>)


1118
1119
1120
# File 'generated/google/apis/mybusiness_v3/classes.rb', line 1118

def interior_photo_urls
  @interior_photo_urls
end

#logo_photo_urlString

The logo photo helps customers to recognize your brand. Upon upload, logo images are fitted into a square (transparent vertical or horizontal lines are added on two sides of the image if the original image is not square). Corresponds to the JSON property logoPhotoUrl

Returns:

  • (String)


1106
1107
1108
# File 'generated/google/apis/mybusiness_v3/classes.rb', line 1106

def logo_photo_url
  @logo_photo_url
end

Menu photos show customers what your food menu looks like. Corresponds to the JSON property menuPhotoUrls

Returns:

  • (Array<String>)


1139
1140
1141
# File 'generated/google/apis/mybusiness_v3/classes.rb', line 1139

def menu_photo_urls
  @menu_photo_urls
end

#photos_at_work_urlsArray<String>

At work photos show you and your employees serving your customers. Corresponds to the JSON property photosAtWorkUrls

Returns:

  • (Array<String>)


1128
1129
1130
# File 'generated/google/apis/mybusiness_v3/classes.rb', line 1128

def photos_at_work_urls
  @photos_at_work_urls
end

#preferred_photoString

Indicate which photo should be shown first in Google Maps and Search. Corresponds to the JSON property preferredPhoto

Returns:

  • (String)


1166
1167
1168
# File 'generated/google/apis/mybusiness_v3/classes.rb', line 1166

def preferred_photo
  @preferred_photo
end

#product_photo_urlsArray<String>

Product photos showcase the products sold by your business. Corresponds to the JSON property productPhotoUrls

Returns:

  • (Array<String>)


1123
1124
1125
# File 'generated/google/apis/mybusiness_v3/classes.rb', line 1123

def product_photo_urls
  @product_photo_urls
end

#profile_photo_urlString

The profile photo helps people recognize your business across Google. Profile photos must be square, with a minimum size of 250px and a maximum size of 500px. Allowed formats are JPG, PNG, and GIF. Corresponds to the JSON property profilePhotoUrl

Returns:

  • (String)


1092
1093
1094
# File 'generated/google/apis/mybusiness_v3/classes.rb', line 1092

def profile_photo_url
  @profile_photo_url
end

#rooms_photo_urlsArray<String>

Room photos show customers the inside of your guest rooms. Corresponds to the JSON property roomsPhotoUrls

Returns:

  • (Array<String>)


1150
1151
1152
# File 'generated/google/apis/mybusiness_v3/classes.rb', line 1150

def rooms_photo_urls
  @rooms_photo_urls
end

#team_photo_urlsArray<String>

Team photos show your management team and your employees. Corresponds to the JSON property teamPhotoUrls

Returns:

  • (Array<String>)


1155
1156
1157
# File 'generated/google/apis/mybusiness_v3/classes.rb', line 1155

def team_photo_urls
  @team_photo_urls
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
# File 'generated/google/apis/mybusiness_v3/classes.rb', line 1173

def update!(**args)
  @profile_photo_url = args[:profile_photo_url] if args.key?(:profile_photo_url)
  @cover_photo_url = args[:cover_photo_url] if args.key?(:cover_photo_url)
  @logo_photo_url = args[:logo_photo_url] if args.key?(:logo_photo_url)
  @exterior_photo_urls = args[:exterior_photo_urls] if args.key?(:exterior_photo_urls)
  @interior_photo_urls = args[:interior_photo_urls] if args.key?(:interior_photo_urls)
  @product_photo_urls = args[:product_photo_urls] if args.key?(:product_photo_urls)
  @photos_at_work_urls = args[:photos_at_work_urls] if args.key?(:photos_at_work_urls)
  @food_and_drink_photo_urls = args[:food_and_drink_photo_urls] if args.key?(:food_and_drink_photo_urls)
  @menu_photo_urls = args[:menu_photo_urls] if args.key?(:menu_photo_urls)
  @common_areas_photo_urls = args[:common_areas_photo_urls] if args.key?(:common_areas_photo_urls)
  @rooms_photo_urls = args[:rooms_photo_urls] if args.key?(:rooms_photo_urls)
  @team_photo_urls = args[:team_photo_urls] if args.key?(:team_photo_urls)
  @additional_photo_urls = args[:additional_photo_urls] if args.key?(:additional_photo_urls)
  @preferred_photo = args[:preferred_photo] if args.key?(:preferred_photo)
end