EVGLocation Class Reference
Inherits from Declared in NSObjectEVGItems.h
Overview
Use the EVGLocation class to associate location information with an Item. It serves use cases such as filtering products based on availability in specific areas.
The EVGLocation class is intended solely for use with items and is not applicable to other entities or functionalities.
latitude
Latitudinal coordinate of the location, should be from -90 to 90.
1 @property (nullable, nonatomic, strong) NSNumber *latitude
longitude
Longitudinal coordinate of the location, should be from -180 to 180.
1 @property (nullable, nonatomic, strong) NSNumber *longitude
city
Name of the city.
1 @property (nullable, nonatomic, copy) NSString *city
stateProvinceCode
Name of the state or province.
1 @property (nullable, nonatomic, copy) NSString *stateProvinceCode
postalCode
Postal code of the location.
1 @property (nullable, nonatomic, copy) NSString *postalCode
locationWithLatitude:longitude:
Creates a location with geographic coordinates.
1 + (nullable instancetype)locationWithLatitude:(double)latitude longitude:(double)longitude
Parameters
Parameter Description latitudeLatitudinal coordinate, should be from -90 to 90 longitudeLongitudinal coordinate, should be from -180 to 180
locationWithCity:stateProvinceCode:
Creates a location with city and state.
1 + (nullable instancetype)locationWithCity:(nonnull NSString *)city stateProvinceCode:(nonnull NSString *)stateProvinceCode
Parameters
Parameter Description cityCity name stateProvinceCodeState or Province Code (e.g. MA)
locationWithPostalCode:
Creates a location with postal code.
1 + (nullable instancetype)locationWithPostalCode:(nonnull NSString *)postalCode
Parameters
Parameter Description postalCodePostal code
locationFromJSONDictionary:
Creates a location from the provided JSON.
1 + (nullable instancetype)locationFromJSONDictionary:(nonnull NSDictionary<NSString*,id> *)json
Parameters
Parameter Description jsonA location in JSON form
Return Value
A location which can be further modified, or nil if JSON is invalid