SquareConnect::V1LocationsApi
March 13, 2019 ยท View on GitHub
All URIs are relative to https://connect.squareup.com
| Method | HTTP request | Description |
|---|---|---|
| list_locations | GET /v1/me/locations | ListLocations |
| retrieve_business | GET /v1/me | RetrieveBusiness |
list_locations
Array<V1Merchant> list_locations
ListLocations
Provides details for a business's locations, including their IDs.
Example
# load the gem
require 'square_connect'
# setup authorization
SquareConnect.configure do |config|
# Configure OAuth2 access token for authorization: oauth2
config.access_token = 'YOUR ACCESS TOKEN'
end
api_instance = SquareConnect::V1LocationsApi.new
begin
#ListLocations
result = api_instance.list_locations
p result
rescue SquareConnect::ApiError => e
puts "Exception when calling V1LocationsApi->list_locations: #{e}"
end
Parameters
This endpoint does not need any parameter.
Return type
Authorization
HTTP request headers
- Content-Type: application/json
- Accept: application/json
retrieve_business
V1Merchant retrieve_business
RetrieveBusiness
Get a business's information.
Example
# load the gem
require 'square_connect'
# setup authorization
SquareConnect.configure do |config|
# Configure OAuth2 access token for authorization: oauth2
config.access_token = 'YOUR ACCESS TOKEN'
end
api_instance = SquareConnect::V1LocationsApi.new
begin
#RetrieveBusiness
result = api_instance.retrieve_business
p result
rescue SquareConnect::ApiError => e
puts "Exception when calling V1LocationsApi->retrieve_business: #{e}"
end
Parameters
This endpoint does not need any parameter.
Return type
Authorization
HTTP request headers
- Content-Type: application/json
- Accept: application/json