// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import { APIResource } from '../core/resource'; import * as LegalEntitiesAPI from './legal-entities'; import * as Shared from './shared'; import { PageCursorURL, PagePromise } from '../core/pagination'; import { RequestOptions } from '../internal/request-options'; /** * Companies on Rippling */ export class Companies extends APIResource { /** * A list of companies. * * - Requires: `API Tier 1` * - Expandable fields: `parent_legal_entity`, `legal_entities` * - Sortable fields: `id`, `created_at`, `updated_at` */ list( query: CompanyListParams | null | undefined = {}, options?: RequestOptions, ): PagePromise { return this._client.getAPIList('/companies/', PageCursorURL, { query, ...options }); } } export type CompaniesPageCursorURL = PageCursorURL; export interface Company { /** * Identifier field */ id: string; /** * Record creation date */ created_at: string; /** * A list of the company's entities. * * Expandable field */ legal_entities: Array; /** * A list of the company's entities. */ legal_entities_id: Array; /** * The name of the company. */ name: string; /** * Record update date */ updated_at: string; /** * The doing business as name for the company. */ doing_business_as_name?: string; /** * The legal name of the company. */ legal_name?: string; /** * The company's ultimate holding entity. * * Expandable field */ parent_legal_entity?: LegalEntitiesAPI.LegalEntity; /** * The company's ultimate holding entity. */ parent_legal_entity_id?: string; /** * The phone number for the company. */ phone?: string; /** * The physical address of the holding entity. */ physical_address?: Shared.Address; /** * The email address used when registering this company. */ primary_email?: string; } export interface CompanyListParams { cursor?: string; expand?: string; order_by?: string; } export declare namespace Companies { export { type Company as Company, type CompaniesPageCursorURL as CompaniesPageCursorURL, type CompanyListParams as CompanyListParams, }; }