-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBusiness.java
More file actions
57 lines (41 loc) · 1.24 KB
/
Business.java
File metadata and controls
57 lines (41 loc) · 1.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
package com.snackoverflow.yelproulette;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import lombok.Data;
@Data
@JsonIgnoreProperties(ignoreUnknown = true)
public class Business {
@JsonProperty("rating")
public int rating;
@JsonProperty("price")
public String price;
@JsonProperty("phone")
public String phone;
@JsonProperty("id")
public String id;
@JsonProperty("alias")
public String alias;
@JsonProperty("is_closed")
public boolean is_closed;
@JsonProperty("review_count")
public int review_count;
@JsonProperty("name")
public String name;
@JsonProperty("url")
public String url;
@JsonProperty("coordinates")
public int[] coordinates = new int[2];
@JsonProperty("image_url")
public String image_url;
@JsonProperty("location")
public String[] location = new String[7];
@JsonProperty("distance")
public float distance;
@Override
public String toString(){
return
"Name: " + name + ".\n" +
"Price: " + price + ".\n" +
"Rating: " + rating + ".\n";
}
}