/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import { accountingFiscalPeriodsGet } from "../funcs/accountingFiscalPeriodsGet.js"; import { accountingFiscalPeriodsList } from "../funcs/accountingFiscalPeriodsList.js"; import { ClientSDK, RequestOptions } from "../lib/sdks.js"; import * as operations from "../models/operations/index.js"; import { unwrapAsync } from "../types/fp.js"; import { PageIterator, unwrapResultIterator } from "../types/operations.js"; export class FiscalPeriods extends ClientSDK { /** * List Fiscal Periods * * @remarks * List the fiscal (accounting) periods of the company, with their dates and whether they are open for posting. */ async list( request: operations.AccountingFiscalPeriodsAllRequest, options?: RequestOptions, ): Promise< PageIterator< operations.AccountingFiscalPeriodsAllResponse, { cursor: string } > > { return unwrapResultIterator(accountingFiscalPeriodsList( this, request, options, )); } /** * Get Fiscal Period * * @remarks * Get Fiscal Period */ async get( request: operations.AccountingFiscalPeriodsOneRequest, options?: RequestOptions, ): Promise { return unwrapAsync(accountingFiscalPeriodsGet( this, request, options, )); } }