Struct Location

Source
pub struct Location {
Show 27 fields pub id: Option<String>, pub name: Option<String>, pub address: Option<Address>, pub timezone: Option<Timezone>, pub capabilities: Option<Vec<LocationCapability>>, pub status: Option<LocationStatus>, pub created_at: Option<DateTime>, pub merchant_id: Option<String>, pub country: Option<Country>, pub language_code: Option<Language>, pub currency: Option<Currency>, pub phone_number: Option<String>, pub business_name: Option<String>, pub type: Option<LocationType>, pub website_url: Option<String>, pub business_hours: Option<BusinessHours>, pub business_email: Option<String>, pub description: Option<String>, pub twitter_username: Option<String>, pub instagram_username: Option<String>, pub facebook_url: Option<String>, pub coordinates: Option<Coordinates>, pub logo_url: Option<String>, pub pos_background_url: Option<String>, pub mcc: Option<String>, pub full_format_logo_url: Option<String>, pub tax_ids: Option<TaxIds>,
}
Expand description

Represents one of a business’ locations.

Fields§

§id: Option<String>

Read only A short generated string of letters and numbers that uniquely identifies this location instance.

Max Length 32

§name: Option<String>

The name of the location. This information appears in the Seller Dashboard as the nickname. A location name must be unique within a seller account.

Max Length 255

§address: Option<Address>

The physical address of the location.

§timezone: Option<Timezone>

The IANA time zone identifier for the time zone of the location. For example, America/Los_Angeles.

§capabilities: Option<Vec<LocationCapability>>

Read only The Square features that are enabled for the location.

§status: Option<LocationStatus>

The status of the location.

§created_at: Option<DateTime>

Read only The time when the location was created, in RFC 3339 format. For more information, see Working with Dates.

§merchant_id: Option<String>

Read only The ID of the merchant that owns the location.

Max Length 32

§country: Option<Country>

Read only The country of the location, in the two-letter format of ISO 3166. For example, US or JP.

§language_code: Option<Language>

The language associated with the location, in BCP 47 format. For more information, see Location language code.

§currency: Option<Currency>

Read only The currency used for all transactions at this location, in ISO 4217 format. For example, the currency code for US dollars is USD.

§phone_number: Option<String>

The phone number of the location. For example, +1 855-700-6000.

Max Length 17

§business_name: Option<String>

The name of the location’s overall business. This name is present on receipts and other customer-facing branding.

Max Length 255

§type: Option<LocationType>

The type of the location.

§website_url: Option<String>

The website URL of the location. For example, https://squareup.com.

Max Length 255

§business_hours: Option<BusinessHours>

The hours of operation for the location.

§business_email: Option<String>

The email address of the location. This can be unique to the location and is not always the email address for the business owner or administrator.

Max Length 255

§description: Option<String>

The description of the location. For example, Main Street location.

Max Length 1024

§twitter_username: Option<String>

The Twitter username of the location without the ‘@’ symbol. For example, Square.

Min Length 1 Max Length 15

§instagram_username: Option<String>

The Instagram username of the location without the ‘@’ symbol. For example, square.

Min Length 1 Max Length 30

§facebook_url: Option<String>

The Facebook profile URL of the location. The URL should begin with ‘facebook.com/’. For example, https://www.facebook.com/square.

Max Length 255

§coordinates: Option<Coordinates>

The physical coordinates (latitude and longitude) of the location.

§logo_url: Option<String>

Read only The URL of the logo image for the location. When configured in the Seller Dashboard (Receipts section), the logo appears on transactions (such as receipts and invoices) that Square generates on behalf of the seller. This image should have a roughly square (1:1) aspect ratio and should be at least 200x200 pixels.

Max Length 255

§pos_background_url: Option<String>

Read only The URL of the Point of Sale background image for the location.

Max Length 255

§mcc: Option<String>

A four-digit number that describes the kind of goods or services sold at the location. The merchant category code (MCC) of the location as standardized by ISO 18245. For example, 5045, for a location that sells computer goods and software.

Min Length 4 Max Length 4

§full_format_logo_url: Option<String>

Read only The URL of a full-format logo image for the location. When configured in the Seller Dashboard (Receipts section), the logo appears on transactions (such as receipts and invoices) that Square generates on behalf of the seller. This image can be wider than it is tall and should be at least 1280x648 pixels.

§tax_ids: Option<TaxIds>

The tax IDs for this location.

Trait Implementations§

Source§

impl Clone for Location

Source§

fn clone(&self) -> Location

Returns a duplicate of the value. Read more
1.0.0 · Source§

const fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Location

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for Location

Source§

fn default() -> Location

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for Location

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl PartialEq for Location

Source§

fn eq(&self, other: &Location) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for Location

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for Location

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> ErasedDestructor for T
where T: 'static,