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



1426
1427
1428
# File 'generated/google/apis/mybusiness_v3/classes.rb', line 1426

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


1349
1350
1351
# File 'generated/google/apis/mybusiness_v3/classes.rb', line 1349

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


1355
1356
1357
# File 'generated/google/apis/mybusiness_v3/classes.rb', line 1355

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)


1362
1363
1364
# File 'generated/google/apis/mybusiness_v3/classes.rb', line 1362

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


1368
1369
1370
# File 'generated/google/apis/mybusiness_v3/classes.rb', line 1368

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


1374
1375
1376
# File 'generated/google/apis/mybusiness_v3/classes.rb', line 1374

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


1380
1381
1382
# File 'generated/google/apis/mybusiness_v3/classes.rb', line 1380

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)


1387
1388
1389
# File 'generated/google/apis/mybusiness_v3/classes.rb', line 1387

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


1392
1393
1394
# File 'generated/google/apis/mybusiness_v3/classes.rb', line 1392

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


1397
1398
1399
# File 'generated/google/apis/mybusiness_v3/classes.rb', line 1397

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)


1402
1403
1404
# File 'generated/google/apis/mybusiness_v3/classes.rb', line 1402

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


1407
1408
1409
# File 'generated/google/apis/mybusiness_v3/classes.rb', line 1407

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)


1414
1415
1416
# File 'generated/google/apis/mybusiness_v3/classes.rb', line 1414

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


1419
1420
1421
# File 'generated/google/apis/mybusiness_v3/classes.rb', line 1419

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


1424
1425
1426
# File 'generated/google/apis/mybusiness_v3/classes.rb', line 1424

def team_photo_urls
  @team_photo_urls
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
# File 'generated/google/apis/mybusiness_v3/classes.rb', line 1431

def update!(**args)
  @additional_photo_urls = args[:additional_photo_urls] if args.key?(:additional_photo_urls)
  @common_areas_photo_urls = args[:common_areas_photo_urls] if args.key?(:common_areas_photo_urls)
  @cover_photo_url = args[:cover_photo_url] if args.key?(:cover_photo_url)
  @exterior_photo_urls = args[:exterior_photo_urls] if args.key?(:exterior_photo_urls)
  @food_and_drink_photo_urls = args[:food_and_drink_photo_urls] if args.key?(:food_and_drink_photo_urls)
  @interior_photo_urls = args[:interior_photo_urls] if args.key?(:interior_photo_urls)
  @logo_photo_url = args[:logo_photo_url] if args.key?(:logo_photo_url)
  @menu_photo_urls = args[:menu_photo_urls] if args.key?(:menu_photo_urls)
  @photos_at_work_urls = args[:photos_at_work_urls] if args.key?(:photos_at_work_urls)
  @preferred_photo = args[:preferred_photo] if args.key?(:preferred_photo)
  @product_photo_urls = args[:product_photo_urls] if args.key?(:product_photo_urls)
  @profile_photo_url = args[:profile_photo_url] if args.key?(:profile_photo_url)
  @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)
end