Skip to content

fix #906 - secondary opening hours must be an array #1024

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/main/java/com/google/maps/model/PlaceDetails.java
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ public enum RatingType {
* DRIVE_THROUGH, PICKUP, or TAKEOUT) based on the types of the place. This field includes the
* special_days subfield of all hours, set for dates that have exceptional hours.
*/
public OpeningHours secondaryOpeningHours;
public OpeningHours[] secondaryOpeningHours;

/** Specifies if the place serves beer. */
public Boolean servesBeer;
Expand Down
14 changes: 14 additions & 0 deletions src/test/java/com/google/maps/issues/Issue906.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package com.google.maps.issues;

import org.junit.Test;

public class Issue906 {

@Test
public void test() {
// /maps/api/place/details/json
// https://maps.googleapis.com/maps/api/place/details/json?key=YOUR_API_KEY&placeid=ChIJTSQM7Smze0gR627zU4Cvkn4
// The above placeid is expired/not_found sadly and thus cannot be used to test the fix, thus TODO find a place that has the secondary_opening_hours field
// The example/test json provided in resources also does not contain a single example with this field
}
}