import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient"; import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient"; import * as core from "../../../../core"; import type * as Square from "../../../index"; import { CustomAttributeDefinitionsClient } from "../resources/customAttributeDefinitions/client/Client"; import { CustomAttributesClient } from "../resources/customAttributes/client/Client"; import { TransactionsClient } from "../resources/transactions/client/Client"; export declare namespace LocationsClient { type Options = BaseClientOptions; interface RequestOptions extends BaseRequestOptions { } } export declare class LocationsClient { protected readonly _options: NormalizedClientOptionsWithAuth; protected _customAttributeDefinitions: CustomAttributeDefinitionsClient | undefined; protected _customAttributes: CustomAttributesClient | undefined; protected _transactions: TransactionsClient | undefined; constructor(options?: LocationsClient.Options); get customAttributeDefinitions(): CustomAttributeDefinitionsClient; get customAttributes(): CustomAttributesClient; get transactions(): TransactionsClient; /** * Provides details about all of the seller's [locations](https://developer.squareup.com/docs/locations-api), * including those with an inactive status. Locations are listed alphabetically by `name`. * * @param {LocationsClient.RequestOptions} requestOptions - Request-specific configuration. * * @example * await client.locations.list() */ list(requestOptions?: LocationsClient.RequestOptions): core.HttpResponsePromise; private __list; /** * Creates a [location](https://developer.squareup.com/docs/locations-api). * Creating new locations allows for separate configuration of receipt layouts, item prices, * and sales reports. Developers can use locations to separate sales activity through applications * that integrate with Square from sales activity elsewhere in a seller's account. * Locations created programmatically with the Locations API last forever and * are visible to the seller for their own management. Therefore, ensure that * each location has a sensible and unique name. * * @param {Square.CreateLocationRequest} request * @param {LocationsClient.RequestOptions} requestOptions - Request-specific configuration. * * @example * await client.locations.create({ * location: { * name: "Midtown", * address: { * addressLine1: "1234 Peachtree St. NE", * locality: "Atlanta", * administrativeDistrictLevel1: "GA", * postalCode: "30309" * }, * description: "Midtown Atlanta store" * } * }) */ create(request?: Square.CreateLocationRequest, requestOptions?: LocationsClient.RequestOptions): core.HttpResponsePromise; private __create; /** * Retrieves details of a single location. Specify "main" * as the location ID to retrieve details of the [main location](https://developer.squareup.com/docs/locations-api#about-the-main-location). * * @param {Square.GetLocationsRequest} request * @param {LocationsClient.RequestOptions} requestOptions - Request-specific configuration. * * @example * await client.locations.get({ * locationId: "location_id" * }) */ get(request: Square.GetLocationsRequest, requestOptions?: LocationsClient.RequestOptions): core.HttpResponsePromise; private __get; /** * Updates a [location](https://developer.squareup.com/docs/locations-api). * * @param {Square.UpdateLocationRequest} request * @param {LocationsClient.RequestOptions} requestOptions - Request-specific configuration. * * @example * await client.locations.update({ * locationId: "location_id", * location: { * businessHours: { * periods: [{ * dayOfWeek: "FRI", * startLocalTime: "07:00", * endLocalTime: "18:00" * }, { * dayOfWeek: "SAT", * startLocalTime: "07:00", * endLocalTime: "18:00" * }, { * dayOfWeek: "SUN", * startLocalTime: "09:00", * endLocalTime: "15:00" * }] * }, * description: "Midtown Atlanta store - Open weekends" * } * }) */ update(request: Square.UpdateLocationRequest, requestOptions?: LocationsClient.RequestOptions): core.HttpResponsePromise; private __update; /** * @deprecated * * Links a `checkoutId` to a `checkout_page_url` that customers are * directed to in order to provide their payment information using a * payment processing workflow hosted on connect.squareup.com. * * * NOTE: The Checkout API has been updated with new features. * For more information, see [Checkout API highlights](https://developer.squareup.com/docs/checkout-api#checkout-api-highlights). * * @param {Square.CreateCheckoutRequest} request * @param {LocationsClient.RequestOptions} requestOptions - Request-specific configuration. * * @example * await client.locations.checkouts({ * locationId: "location_id", * idempotencyKey: "86ae1696-b1e3-4328-af6d-f1e04d947ad6", * order: { * order: { * locationId: "location_id", * referenceId: "reference_id", * customerId: "customer_id", * lineItems: [{ * name: "Printed T Shirt", * quantity: "2", * appliedTaxes: [{ * taxUid: "38ze1696-z1e3-5628-af6d-f1e04d947fg3" * }], * appliedDiscounts: [{ * discountUid: "56ae1696-z1e3-9328-af6d-f1e04d947gd4" * }], * basePriceMoney: { * amount: BigInt("1500"), * currency: "USD" * } * }, { * name: "Slim Jeans", * quantity: "1", * basePriceMoney: { * amount: BigInt("2500"), * currency: "USD" * } * }, { * name: "Woven Sweater", * quantity: "3", * basePriceMoney: { * amount: BigInt("3500"), * currency: "USD" * } * }], * taxes: [{ * uid: "38ze1696-z1e3-5628-af6d-f1e04d947fg3", * type: "INCLUSIVE", * percentage: "7.75", * scope: "LINE_ITEM" * }], * discounts: [{ * uid: "56ae1696-z1e3-9328-af6d-f1e04d947gd4", * type: "FIXED_AMOUNT", * amountMoney: { * amount: BigInt("100"), * currency: "USD" * }, * scope: "LINE_ITEM" * }] * }, * idempotencyKey: "12ae1696-z1e3-4328-af6d-f1e04d947gd4" * }, * askForShippingAddress: true, * merchantSupportEmail: "merchant+support@website.com", * prePopulateBuyerEmail: "example@email.com", * prePopulateShippingAddress: { * addressLine1: "1455 Market St.", * addressLine2: "Suite 600", * locality: "San Francisco", * administrativeDistrictLevel1: "CA", * postalCode: "94103", * country: "US", * firstName: "Jane", * lastName: "Doe" * }, * redirectUrl: "https://merchant.website.com/order-confirm", * additionalRecipients: [{ * locationId: "057P5VYJ4A5X1", * description: "Application fees", * amountMoney: { * amount: BigInt("60"), * currency: "USD" * } * }] * }) */ checkouts(request: Square.CreateCheckoutRequest, requestOptions?: LocationsClient.RequestOptions): core.HttpResponsePromise; private __checkouts; }