quickbooks-api
Version:
A modular TypeScript SDK for seamless integration with Intuit QuickBooks APIs. Provides robust authentication handling and future-ready foundation for accounting, payments, and commerce operations.
22 lines (21 loc) • 714 B
JavaScript
/**
* Get Company Info
* @param this - The Company Info API
* @param options - The Search Options
* @returns The Company Info
*/
export async function getCompanyInfo(options = {}) {
// Get the Query Builder
const queryBuilder = await this.getQueryBuilder();
// Setup the Search Options (if provided)
if (options.searchOptions)
queryBuilder.setSearchOptions(options.searchOptions);
// Setup the URL
const url = queryBuilder.build();
// Get the Company Info
const response = await this.apiClient.runRequest(url, { method: 'GET' });
// Format the Response
const companyInfo = this.formatResponse(response);
// Return the Company Info
return companyInfo;
}