Location class

Represents a business's locations. Can be physical or mobile. They are set up in the Square dashboard. Their id is used in many other endpoints.

Annotations
  • @JsonSerializable()

Constructors

Location({required String id, required LocationStatus status, required String? merchantId, required LocationType type, String? name, Address? address, String? timezone, List<LocationCapability>? capabilities, DateTime? createdAt, String? country, String? languageCode, String? currency, String? phoneNumber, String? businessName, String? websiteUrl, BusinessHours? businessHours, String? businessEmail, String? description, String? twitterUsername, String? instagramUsername, String? facebookUrl, Coordinates? coordinates})
Represents a business's locations. Can be physical or mobile. They are set up in the Square dashboard. Their id is used in many other endpoints.
const
Location.fromJson(Map<String, dynamic> json)
Converts a Map<String, dynamic> to a Location
factory

Properties

address Address?
The address of the Location.
final
businessEmail String?
The email address for the Location.
final
businessHours BusinessHours?
The full business hours for the Location.
final
businessName String?
The customer facing business name, shown on customer receipts.
final
capabilities List<LocationCapability>?
The LocationCapabilitys for the Location.
final
coordinates Coordinates?
The physical coordinates (Latitude and Longitude) of the Location.
final
country String?
The Location's country in ISO 3166-1-alpha-2 format.
final
createdAt DateTime?
When the Location was created.
final
currency String?
The currency the Location uses.
final
description String?
The description of the Location.
final
facebookUrl String?
The facebook url for the Location.
final
hashCode int
The hash code for this object.
no setterinherited
id String
The Location's id in guid form.
final
instagramUsername String?
The instagram username for the Location.
final
languageCode String?
The Location's language in BCP 47 format.
final
merchantId String?
The identifier of the merchant that owns the location.
final
name String?
The name of the Location.
final
phoneNumber String?
The Location's phone number.
final
props List<Object?>
The list of properties that will be used to determine whether two instances are equal.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
status LocationStatus
Whether the Location is active or inactive.
final
stringify bool?
If set to true, the toString method will be overridden to output this instance's props.
no setterinherited
timezone String?
The timezone of the Location.
final
twitterUsername String?
The twitter username for the Location.
final
type LocationType
Whether the Location is physical or mobile.
final
websiteUrl String?
The website url for the Location.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Converts a Location to a Map<String, dynamic>
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited