Location
Use the Location
class to associate location information with an Item. It serves use cases such as filtering products based on availability in specific areas.
The Location
class is intended solely for use with items and isn’t applicable to other entities or functionalities.
Field | Description | Modifier and Type |
---|---|---|
city | Name of the city. | java.lang.String |
latitude | Latitudinal coordinate of the location. The value must be from -90 to 90 . | java.lang.Double |
longitude | Longitudinal coordinate of the location. The value must be from -180 to 180 . | java.lang.Double |
postalCode | Postal code of the location. | java.lang.String |
stateProvinceCode | Name of the state or province. | java.lang.String |
Latitudinal coordinate of the location. The value must be from -90
to 90
.
Longitudinal coordinate of the location. The value must be from -180
to 180
.
Name of the city.
Name of the state or province.
Postal code of the location.
Creates a location with geographic coordinates.
Parameters:
Parameter | Description |
---|---|
latitude | Latitudinal coordinate. The value must be from -90 to 90 |
longitude | Longitudinal coordinate. The value must be from -180 to 180 |
Creates a location with city and state.
Parameters:
Parameter | Description |
---|---|
city | City name |
stateProvinceCode | State or Province Code (for example, MA ) |
Creates a location with postal code.
Parameters:
Parameter | Description |
---|---|
postalCode | Postal code |
Method | Modifier and Type |
---|---|
fromJSONObject(org.json.JSONObject json) | static Location |