/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import { locationsCreate } from "../funcs/locationsCreate.js"; import { locationsGet } from "../funcs/locationsGet.js"; import { locationsGetMinimumWages } from "../funcs/locationsGetMinimumWages.js"; import { locationsRetrieve } from "../funcs/locationsRetrieve.js"; import { locationsUpdate } from "../funcs/locationsUpdate.js"; import { ClientSDK, RequestOptions } from "../lib/sdks.js"; import { GetV1CompaniesCompanyIdLocationsRequest, GetV1CompaniesCompanyIdLocationsResponse, } from "../models/operations/getv1companiescompanyidlocations.js"; import { GetV1LocationsLocationIdRequest, GetV1LocationsLocationIdResponse, } from "../models/operations/getv1locationslocationid.js"; import { GetV1LocationsLocationUuidMinimumWagesRequest, GetV1LocationsLocationUuidMinimumWagesResponse, } from "../models/operations/getv1locationslocationuuidminimumwages.js"; import { PostV1CompaniesCompanyIdLocationsRequest, PostV1CompaniesCompanyIdLocationsResponse, } from "../models/operations/postv1companiescompanyidlocations.js"; import { PutV1LocationsLocationIdRequest, PutV1LocationsLocationIdResponse, } from "../models/operations/putv1locationslocationid.js"; import { unwrapAsync } from "../types/fp.js"; export class Locations extends ClientSDK { /** * Get all company locations * * @remarks * Retrieves all company locations (addresses) associated with a company: mailing addresses, filing * addresses, or work locations. A single address may serve multiple, or all, purposes. * * Since all company locations are subsets of locations, use the Locations endpoints to * [get](ref:get-v1-locations-location_id) or [update](ref:put-v1-locations-location_id) an individual record. * * scope: `companies:read` */ async get( request: GetV1CompaniesCompanyIdLocationsRequest, options?: RequestOptions, ): Promise { return unwrapAsync(locationsGet( this, request, options, )); } /** * Create a company location * * @remarks * Create a company location, which represents any address associated with a company: mailing * addresses, filing addresses, or work locations. A single address may serve multiple, or all, purposes. * * Since all company locations are subsets of locations, use the Locations endpoints to * [get](ref:get-v1-locations-location_id) or [update](ref:put-v1-locations-location_id) an individual record. * * scope: `companies:write` */ async create( request: PostV1CompaniesCompanyIdLocationsRequest, options?: RequestOptions, ): Promise { return unwrapAsync(locationsCreate( this, request, options, )); } /** * Get a location * * @remarks * Get a location. * * scope: `companies:read` */ async retrieve( request: GetV1LocationsLocationIdRequest, options?: RequestOptions, ): Promise { return unwrapAsync(locationsRetrieve( this, request, options, )); } /** * Update a location * * @remarks * Update a location. * * scope: `companies:write` */ async update( request: PutV1LocationsLocationIdRequest, options?: RequestOptions, ): Promise { return unwrapAsync(locationsUpdate( this, request, options, )); } /** * Get minimum wages for a location * * @remarks * Get minimum wages for a location * * scope: `companies:read` */ async getMinimumWages( request: GetV1LocationsLocationUuidMinimumWagesRequest, options?: RequestOptions, ): Promise { return unwrapAsync(locationsGetMinimumWages( this, request, options, )); } }