/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import { invoicesGet } from "../funcs/invoicesGet.js"; import { ClientSDK, RequestOptions } from "../lib/sdks.js"; import { GetInvoicesInvoicePeriodRequest, GetInvoicesInvoicePeriodResponse, GetInvoicesInvoicePeriodSecurity, } from "../models/operations/getinvoicesinvoiceperiod.js"; import { unwrapAsync } from "../types/fp.js"; export class Invoices extends ClientSDK { /** * Retrieve invoicing data for companies * * @remarks * Retrieve data for active companies used to calculate invoices for Gusto Embedded Payroll. A company is considered active for an invoice period if they are an active partner managed company, have run payroll or created contractor payments since becoming a partner managed company, and are not suspended at any point during the invoice period. This endpoint forces pagination, with 100 results returned at a time. You can learn more about our pagination here: [pagination guide](https://docs.gusto.com/embedded-payroll/docs/pagination) * * 📘 System Access Authentication * * This endpoint uses the [Bearer Auth scheme with the system-level access token in the HTTP Authorization header](https://docs.gusto.com/embedded-payroll/docs/system-access) * * scope: `invoices:read` */ async get( security: GetInvoicesInvoicePeriodSecurity, request: GetInvoicesInvoicePeriodRequest, options?: RequestOptions, ): Promise { return unwrapAsync(invoicesGet( this, security, request, options, )); } }